summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/staff/_footer.ejs6
-rw-r--r--views/staff/_header.ejs3
-rw-r--r--views/staff/_projects.ejs22
-rw-r--r--views/staff/_stats.ejs13
-rw-r--r--views/staff/index.ejs14
-rw-r--r--views/staff/projects/index.ejs10
-rw-r--r--views/staff/projects/show.ejs15
-rw-r--r--views/staff/projects/show_404.ejs8
-rw-r--r--views/staff/users/index.ejs10
-rw-r--r--views/staff/users/show.ejs14
-rw-r--r--views/staff/users/show_404.ejs8
11 files changed, 115 insertions, 8 deletions
diff --git a/views/staff/_footer.ejs b/views/staff/_footer.ejs
index 580828f..c363beb 100644
--- a/views/staff/_footer.ejs
+++ b/views/staff/_footer.ejs
@@ -1,3 +1,4 @@
+ </div>
[[ include ../partials/confirm-modal ]]
[[ include ../partials/footer ]]
</div>
@@ -5,4 +6,9 @@
</body>
[[ include ../partials/scripts ]]
<script type="text/javascript" src="/assets/javascripts/vendor/bower_components/jquery-jsonview/dist/jquery.jsonview.js"></script>
+<script>
+$(".json").each(function(){
+ $(this).JSONView( this.innerText )
+})
+</script>
</html>
diff --git a/views/staff/_header.ejs b/views/staff/_header.ejs
index d726b02..1880c98 100644
--- a/views/staff/_header.ejs
+++ b/views/staff/_header.ejs
@@ -7,7 +7,8 @@
<link rel="stylesheet" href="/assets/stylesheets/staff.css"></script>
</head>
<body class="loading">
-<div class="rapper page">
+<div class="rapper page staff">
[[ include ../partials/header ]]
<br clear="all">
+ <div class="body">
diff --git a/views/staff/_projects.ejs b/views/staff/_projects.ejs
new file mode 100644
index 0000000..83041ae
--- /dev/null
+++ b/views/staff/_projects.ejs
@@ -0,0 +1,22 @@
+<table id="users">
+[[ projects.forEach(function(project){ ]]
+ <tr>
+ <td>
+ <a href="/staff/projects/[[- project.slug ]]">[[- project.name ]]</a>
+ </td>
+ <td class="editLinks">
+ <a href="/project/[[- project.slug ]]">[view]</a>
+ <a href="/project/[[- project.slug ]]/edit">[edit]</a>
+ </td>
+ <td>
+ <a href="/staff/users/[[- project.user.username ]]">[[- project.user.username ]]</a>
+ </td>
+ <td>
+ [[- project.date ]]
+ </td>
+ <td>
+ [[- project.privacy ? "private" : "" ]]
+ </td>
+ </tr>
+[[ }) ]]
+</table>
diff --git a/views/staff/_stats.ejs b/views/staff/_stats.ejs
new file mode 100644
index 0000000..6439ab9
--- /dev/null
+++ b/views/staff/_stats.ejs
@@ -0,0 +1,13 @@
+<table>
+ <tr>
+ <th>stats</th>
+ </tr>
+ <tr>
+ <td><a href="/staff/users">users</a></td>
+ <td>[[- userCount ]]</td>
+ </tr>
+ <tr>
+ <td><a href="/staff/projects">projects</a></td>
+ <td>[[- projectCount ]]</td>
+ </tr>
+</table>
diff --git a/views/staff/index.ejs b/views/staff/index.ejs
index 0cb67da..842e086 100644
--- a/views/staff/index.ejs
+++ b/views/staff/index.ejs
@@ -2,10 +2,14 @@
<h1>Staff Area</h1>
-<b>users:</b> [[- userCount ]]
-<b>projects:</b> [[- projectCount ]]
-
-<br>
-[[ include _users_recent ]]
+ <nav>
+ <a href="/staff/users">users</a>
+ <a href="/staff/projects">projects</a>
+ </nav>
+
+ <hr>
+
+ [[ include _users_recent ]]
+ [[ include _stats ]]
[[ include _footer ]] \ No newline at end of file
diff --git a/views/staff/projects/index.ejs b/views/staff/projects/index.ejs
index a27a132..a5a9308 100644
--- a/views/staff/projects/index.ejs
+++ b/views/staff/projects/index.ejs
@@ -1,4 +1,14 @@
[[ include ../_header ]]
<h1>Projects</h1>
+ <nav>
+ <a href="/staff">home</a>
+ <a href="/staff/users">users</a>
+ <a href="/staff/projects">projects</a>
+ </nav>
+
+ <hr>
+
+[[ include ../_projects ]]
+
[[ include ../_footer ]]
diff --git a/views/staff/projects/show.ejs b/views/staff/projects/show.ejs
index 01b5c76..e821614 100644
--- a/views/staff/projects/show.ejs
+++ b/views/staff/projects/show.ejs
@@ -1,2 +1,17 @@
[[ include ../_header ]]
+
+ <h1>Project</h1>
+
+ <nav>
+ <a href="/staff">home</a>
+ <a href="/staff/users">users</a>
+ <a href="/staff/projects">projects</a>
+ </nav>
+
+ <hr>
+
+ <div class="json">
+ [[- projectJSON ]]
+ </div>
+
[[ include ../_footer ]]
diff --git a/views/staff/projects/show_404.ejs b/views/staff/projects/show_404.ejs
index e0cf0e2..193333f 100644
--- a/views/staff/projects/show_404.ejs
+++ b/views/staff/projects/show_404.ejs
@@ -1,4 +1,12 @@
[[ include ../_header ]]
<h1>Project not found</h1>
+ <nav>
+ <a href="/staff">home</a>
+ <a href="/staff/users">users</a>
+ <a href="/staff/projects">projects</a>
+ </nav>
+
+ <hr>
+
[[ include ../_footer ]]
diff --git a/views/staff/users/index.ejs b/views/staff/users/index.ejs
index fb072d8..ad92fc3 100644
--- a/views/staff/users/index.ejs
+++ b/views/staff/users/index.ejs
@@ -1,6 +1,14 @@
[[ include ../_header ]]
<h1>Users</h1>
-[[ include _users ]]
+ <nav>
+ <a href="/staff">home</a>
+ <a href="/staff/users">users</a>
+ <a href="/staff/projects">projects</a>
+ </nav>
+
+ <hr>
+
+[[ include ../_users ]]
[[ include ../_footer ]]
diff --git a/views/staff/users/show.ejs b/views/staff/users/show.ejs
index b5e1a6c..d306443 100644
--- a/views/staff/users/show.ejs
+++ b/views/staff/users/show.ejs
@@ -1,4 +1,16 @@
[[ include ../_header ]]
- <h1>User: [[ profile.username ]]</h1>
+ <h1>User: [[- profile.username ]]</h1>
+
+ <nav>
+ <a href="/staff">home</a>
+ <a href="/staff/users">users</a>
+ <a href="/staff/projects">projects</a>
+ </nav>
+
+ <hr>
+
+ <div class="json">
+ [[- profileJSON ]]
+ </div>
[[ include ../_footer ]]
diff --git a/views/staff/users/show_404.ejs b/views/staff/users/show_404.ejs
index c52e1e7..3fd20a8 100644
--- a/views/staff/users/show_404.ejs
+++ b/views/staff/users/show_404.ejs
@@ -1,4 +1,12 @@
[[ include ../_header ]]
<h1>User not found</h1>
+ <nav>
+ <a href="/staff">home</a>
+ <a href="/staff/users">users</a>
+ <a href="/staff/projects">projects</a>
+ </nav>
+
+ <hr>
+
[[ include ../_footer ]]