Skip to content

Commit

Permalink
Merge pull request #17 from Astra-Development/revert-16-revert-14-pat…
Browse files Browse the repository at this point in the history
…ch-1

Revert "Revert "Update servers.ejs""
  • Loading branch information
johnandreopoulos committed Nov 7, 2023
2 parents bd05b0b + 6cfa38c commit df1c237
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions views/dashboard/servers.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<%- include('../partials/head.ejs') %>


<body>

<%- include('./partials/header.ejs') %>
Expand Down Expand Up @@ -42,31 +41,38 @@
</div>
<div class="table-responsive">
<table class="table table-striped-columns">
<thead;>
<thead>
<tr>
<th>#</th>
<th>Developer</th>
<th>Servers</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<% for (let i = 0; i < serversdata.length; i++) { %>
<tr id="user<%= serversdata[i].ownerID %>">
<th scope="row"><%= i + 1 %></th>
<td>
<%= sbot.users.cache.get(serversdata[i].ownerID) ? sbot.users.cache.get(serversdata[i].ownerID).tag : "Unknown" %>
<span class="fs-xs mb-md-0">(<%= serversdata[i].ownerID %>)</span>
</td>
<td>
<%- serversdata.filter(b => b.ownerID == serversdata[i].ownerID).map(b => `${sbot.guilds.cache.get(b.serverID).name} <span class="fs-xs mb-md-0">(${b.serverID})</span>`).join(', ') %>
</td>
<td style="text-align: center;">
<a href="/profile/<%= serversdata[i].ownerID %>" class="badge bg-faded-success text-success">View Profile</a>
</td>
</tr>
<% } %>
</tbody>
</thead>
<tbody>
<% for (let i = 0; i < serversdata.length; i++) { %>
<tr id="user<%= serversdata[i].ownerID %>">
<th scope="row"><%= i + 1 %></th>
<td>
<%= sbot.users.cache.get(serversdata[i].ownerID) ? sbot.users.cache.get(serversdata[i].ownerID).tag : "Unknown" %>
<span class="fs-xs mb-md-0">(<%= serversdata[i].ownerID %>)</span>
</td>
<td>
<%- serversdata
.filter(b => b.ownerID == serversdata[i].ownerID)
.map(b => {
const guild = sbot.guilds.cache.get(b.serverID);
return guild ? `${guild.name} <span class="fs-xs mb-md-0">(${b.serverID})</span>` : 'Unknown Guild';
})
.join(', ')
%>
</td>
<td style="text-align: center;">
<a href="/profile/<%= serversdata[i].ownerID %>" class="badge bg-faded-success text-success">View Profile</a>
</td>
</tr>
<% } %>
</tbody>
</table>
</div>
<script>
Expand All @@ -92,4 +98,4 @@

</body>

</html>
</html>

0 comments on commit df1c237

Please sign in to comment.