diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-09-05 15:54:12 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-09-05 15:54:12 -0400 |
| commit | 1082e3be99669671b6c745307131a7cb8d54eabc (patch) | |
| tree | 91897ff420885672a2dc5390ca334b65828737d5 /views/staff | |
| parent | 1877aa4b508704634774e47385cf5429f67a4565 (diff) | |
pagination on all queries
Diffstat (limited to 'views/staff')
| -rw-r--r-- | views/staff/_pagination.ejs | 17 | ||||
| -rw-r--r-- | views/staff/index.ejs | 2 | ||||
| -rw-r--r-- | views/staff/media/index.ejs | 2 | ||||
| -rw-r--r-- | views/staff/projects/index.ejs | 2 | ||||
| -rw-r--r-- | views/staff/users/index.ejs | 2 | ||||
| -rw-r--r-- | views/staff/users/media.ejs | 2 | ||||
| -rw-r--r-- | views/staff/users/show.ejs | 17 |
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 ]]">←</a> + [[ } else { ]] + ← + [[ } ]] + | + [[ if (pagination.next_page !== -1) { ]] + <a href="?[[- pagination.query ]]&offset=[[- pagination.next_page ]]">Next page →</a> + [[ } else { ]] + → + [[ } ]] + + </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> |
