aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-03-18 18:30:21 +0000
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-03-18 18:30:21 +0000
commitbff5795ed10c923f0e26781ed53ff04fd2284923 (patch)
tree487bb1d33fafbfe052e6f6eb44459c9b8af5afea /app/templates
parentAdd command line interface for admin tasks (diff)
downloadAnnotateChange-bff5795ed10c923f0e26781ed53ff04fd2284923.tar.gz
AnnotateChange-bff5795ed10c923f0e26781ed53ff04fd2284923.zip
Start work on admin panel
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/admin/assign.html34
-rw-r--r--app/templates/base.html3
2 files changed, 37 insertions, 0 deletions
diff --git a/app/templates/admin/assign.html b/app/templates/admin/assign.html
new file mode 100644
index 0000000..44c6bf7
--- /dev/null
+++ b/app/templates/admin/assign.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+{% import 'bootstrap/wtf.html' as wtf %}
+
+{% block app_content %}
+<h1>Assign Task</h1>
+<div class="row">
+ <div class="col-md-4">
+ {{ wtf.quick_form(form) }}
+ </div>
+</div>
+<article class="overview">
+ <table>
+ <tr>
+ <th>User ID</th>
+ <th>Username</th>
+ <th>Dataset ID</th>
+ <th>Dataset Name</th>
+ <th>Status</th>
+ <th>Completed On</th>
+ </tr>
+ {% for task in tasks %}
+ <tr>
+ <td>{{ task.user_id }}</td>
+ <td>{{ task.username }}</td>
+ <td>{{ task.dataset_id }}</td>
+ <td>{{ task.dataset_name }}</td>
+ <td>{{ task.done }}</td>
+ <td>{{ task.completed_on }}</td>
+ </tr>
+ {% endfor %}
+ </tr>
+ </table>
+</article>
+{% endblock %}
diff --git a/app/templates/base.html b/app/templates/base.html
index 8e51695..7713eef 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -24,6 +24,9 @@
{% if current_user.is_anonymous %}
<li><a href="{{ url_for('auth.login') }}">Login</a></li>
{% else %}
+ {% if current_user.is_admin %}
+ <li><a href="/admin" style="color: red;">Admin Panel</a></li>
+ {% endif %}
<li><a href="{{ url_for('auth.logout') }}">Logout</a></li>
{% endif %}
</ul>