summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/staff/_header.ejs1
-rw-r--r--views/staff/_users.ejs6
-rw-r--r--views/staff/_users_recent.ejs8
-rw-r--r--views/staff/users/show.ejs70
4 files changed, 85 insertions, 0 deletions
diff --git a/views/staff/_header.ejs b/views/staff/_header.ejs
index 1880c98..3bbf4f1 100644
--- a/views/staff/_header.ejs
+++ b/views/staff/_header.ejs
@@ -5,6 +5,7 @@
[[ include ../partials/meta ]]
<link rel="stylesheet" href="/assets/javascripts/vendor/bower_components/jquery-jsonview/dist/jquery.jsonview.css"></script>
<link rel="stylesheet" href="/assets/stylesheets/staff.css"></script>
+ <input type="hidden" id="_csrf" name="_csrf" value="[[- token ]]">
</head>
<body class="loading">
<div class="rapper page staff">
diff --git a/views/staff/_users.ejs b/views/staff/_users.ejs
index ab8c9b3..344ee0c 100644
--- a/views/staff/_users.ejs
+++ b/views/staff/_users.ejs
@@ -2,11 +2,17 @@
[[ users.forEach(function(user){ ]]
<tr>
<td>
+ <a href="/staff/users/[[- user.username ]]"><div style="background-image:url([[- user.photo ]])" class="avatar"></div></a>
+ </td>
+ <td>
<a href="/staff/users/[[- user.username ]]">[[- user.username ]]</a>
</td>
<td>
[[- user.displayName ]]
</td>
+ <td class="editLinks">
+ <a href="/staff/users/[[- user.username ]]">[view profile]</a>
+ </td>
<td>
[[- user.last_seen ]]
</td>
diff --git a/views/staff/_users_recent.ejs b/views/staff/_users_recent.ejs
index ff3fd55..e55fe28 100644
--- a/views/staff/_users_recent.ejs
+++ b/views/staff/_users_recent.ejs
@@ -7,8 +7,16 @@
[[ users.forEach(function(user){ ]]
<tr>
<td>
+ [[ if (user.photo) { ]]
+ <a href="/staff/users/[[- user.username ]]"><div style="background-image:url([[- user.photo ]])" class="avatar"></div></a>
+ [[ } ]]
+ </td>
+ <td>
<a href="/staff/users/[[- user.username ]]">[[- user.username ]]</a>
</td>
+ <td class="editLinks">
+ <a href="/staff/users/[[- user.username ]]">[view profile]</a>
+ </td>
<td>
[[- user.displayName ]]
</td>
diff --git a/views/staff/users/show.ejs b/views/staff/users/show.ejs
index d306443..2315043 100644
--- a/views/staff/users/show.ejs
+++ b/views/staff/users/show.ejs
@@ -9,8 +9,78 @@
<hr>
+ <table id="users">
+ <tr>
+ <td rowspan="999" valign="top">
+ <a href="/staff/users/[[- profile.username ]]"><div style="background-image:url([[- profile.photo ]])" class="avatar"></div></a>
+ </td>
+ <td>
+ <a href="/staff/users/[[- profile.username ]]">[[- profile.username ]]</a>
+ </td>
+ <td>
+ [[- profile.displayName ]]
+ </td>
+ <td class="editLinks">
+ <a href="/staff/users/[[- profile.username ]]">[view profile]</a>
+ </td>
+ </tr>
+ </table>
+ <br>
+ <table style="margin-left: 50px;">
+ <tr>
+ <th>
+ location
+ </th>
+ <td>
+ [[- profile.location ]]
+ </td>
+ </tr>
+ <tr>
+ <th>
+ last seen
+ </th>
+ <td>
+ [[- profile.last_seen ]]
+ </td>
+ </tr>
+ <tr>
+ <th>
+ ip addresses
+ </th>
+ <td>
+ [[- profile.created_ip ]]
+ [[- profile.last_ip ]]
+ </td>
+ </tr>
+ <tr>
+ <th>
+ is admin?
+ </th>
+ <td id="is-staff">
+ [[- profile.isStaff ? "yes" : "no" ]]
+ </td>
+ </tr>
+ </tr>
+ <tr>
+ <th>
+ </th>
+ <td id="actions">
+ [[ if (String(user._id) != String(profile._id)) { ]]
+ <button id="toggle-staff" data-isStaff="[[- !! profile.isStaff ]]">Make Staff</button>
+ [[ } ]]
+ </td>
+ </tr>
+ </table>
+ <br><br>
<div class="json">
[[- profileJSON ]]
</div>
[[ include ../_footer ]]
+<style>
+#actions button {
+ float: none;
+ width: auto;
+}
+}
+</style> \ No newline at end of file