summaryrefslogtreecommitdiff
path: root/views/staff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-09-05 15:54:12 -0400
committerJules Laplace <jules@okfoc.us>2014-09-05 15:54:12 -0400
commit1082e3be99669671b6c745307131a7cb8d54eabc (patch)
tree91897ff420885672a2dc5390ca334b65828737d5 /views/staff
parent1877aa4b508704634774e47385cf5429f67a4565 (diff)
pagination on all queries
Diffstat (limited to 'views/staff')
-rw-r--r--views/staff/_pagination.ejs17
-rw-r--r--views/staff/index.ejs2
-rw-r--r--views/staff/media/index.ejs2
-rw-r--r--views/staff/projects/index.ejs2
-rw-r--r--views/staff/users/index.ejs2
-rw-r--r--views/staff/users/media.ejs2
-rw-r--r--views/staff/users/show.ejs17
7 files changed, 33 insertions, 11 deletions
diff --git a/views/staff/_pagination.ejs b/views/staff/_pagination.ejs
new file mode 100644
index 0000000..6c3bfb1
--- /dev/null
+++ b/views/staff/_pagination.ejs
@@ -0,0 +1,17 @@
+[[ if (pagination.prev_page !== -1 && pagination.next_page !== -1) { ]]
+ <div id="pagination">
+
+ [[ if (pagination.prev_page !== -1) { ]]
+ <a href="?[[- pagination.query ]]&offset=[[- pagination.prev_page ]]">&larr;</a>
+ [[ } else { ]]
+ &larr;
+ [[ } ]]
+ |
+ [[ if (pagination.next_page !== -1) { ]]
+ <a href="?[[- pagination.query ]]&offset=[[- pagination.next_page ]]">Next page &rarr;</a>
+ [[ } else { ]]
+ &rarr;
+ [[ } ]]
+
+ </div>
+[[ } ]] \ No newline at end of file
diff --git a/views/staff/index.ejs b/views/staff/index.ejs
index f721339..5ca7269 100644
--- a/views/staff/index.ejs
+++ b/views/staff/index.ejs
@@ -9,7 +9,7 @@
</nav>
<hr>
-
+
[[ include _users_recent ]]
[[ include _stats ]]
diff --git a/views/staff/media/index.ejs b/views/staff/media/index.ejs
index 76aaafb..516af2d 100644
--- a/views/staff/media/index.ejs
+++ b/views/staff/media/index.ejs
@@ -11,6 +11,8 @@
<hr>
+[[ include ../_pagination ]]
[[ include ../_media ]]
+[[ include ../_pagination ]]
[[ include ../_footer ]]
diff --git a/views/staff/projects/index.ejs b/views/staff/projects/index.ejs
index a6fad6b..482ea25 100644
--- a/views/staff/projects/index.ejs
+++ b/views/staff/projects/index.ejs
@@ -11,6 +11,8 @@
<hr>
+[[ include ../_pagination ]]
[[ include ../_projects ]]
+[[ include ../_pagination ]]
[[ include ../_footer ]]
diff --git a/views/staff/users/index.ejs b/views/staff/users/index.ejs
index 8c56565..f14d666 100644
--- a/views/staff/users/index.ejs
+++ b/views/staff/users/index.ejs
@@ -11,6 +11,8 @@
<hr>
+[[ include ../_pagination ]]
[[ include ../_users ]]
+[[ include ../_pagination ]]
[[ include ../_footer ]]
diff --git a/views/staff/users/media.ejs b/views/staff/users/media.ejs
index 6ea2668..b13e5fb 100644
--- a/views/staff/users/media.ejs
+++ b/views/staff/users/media.ejs
@@ -11,6 +11,8 @@
<hr>
+[[ include ../_pagination ]]
[[ include ../_media ]]
+[[ include ../_pagination ]]
[[ include ../_footer ]]
diff --git a/views/staff/users/show.ejs b/views/staff/users/show.ejs
index 127ca8c..8e9b447 100644
--- a/views/staff/users/show.ejs
+++ b/views/staff/users/show.ejs
@@ -80,17 +80,14 @@
[[- 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 id="actions">
+ [[ if (String(user._id) != String(profile._id)) { ]]
+ <button id="toggle-staff" data-isStaff="[[- !! profile.isStaff ]]">Make Staff</button>
+ [[ } ]]
+ </div>
<h2>Projects</h2>