aboutsummaryrefslogtreecommitdiff
path: root/app/templates/admin
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-05-30 13:29:31 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-05-30 13:29:31 +0100
commitda15e439e64c8314825ad5f28073fbcbd436946f (patch)
tree62b40c9be838316fc1c0e1a5372d7bf8fbdc496b /app/templates/admin
parentAdd database migration for cp_index (diff)
downloadAnnotateChange-da15e439e64c8314825ad5f28073fbcbd436946f.tar.gz
AnnotateChange-da15e439e64c8314825ad5f28073fbcbd436946f.zip
Initial version of demo
This commit introduces the demo functionality. The task assignment has been removed at the moment, as this will be changed in a future commit.
Diffstat (limited to 'app/templates/admin')
-rw-r--r--app/templates/admin/annotations_by_dataset.html2
-rw-r--r--app/templates/admin/manage_datasets.html20
-rw-r--r--app/templates/admin/manage_users.html116
3 files changed, 71 insertions, 67 deletions
diff --git a/app/templates/admin/annotations_by_dataset.html b/app/templates/admin/annotations_by_dataset.html
index 5ad98b6..eb7a7e8 100644
--- a/app/templates/admin/annotations_by_dataset.html
+++ b/app/templates/admin/annotations_by_dataset.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block styles %}
-{{super()}}
+{{ super() }}
<link rel="stylesheet" href="{{url_for('static', filename='view_annotation.css')}}">{% endblock %}
{% block app_content %}
diff --git a/app/templates/admin/manage_datasets.html b/app/templates/admin/manage_datasets.html
index f14fe81..f68259f 100644
--- a/app/templates/admin/manage_datasets.html
+++ b/app/templates/admin/manage_datasets.html
@@ -42,18 +42,20 @@
<thead class="thead-dark">
<th scope="col">ID</th>
<th scope="col">Name</th>
- <th scope="col">Assigned Tasks</th>
- <th scope="col">Completed Tasks</th>
- <th scope="col">Percentage</th>
+ <th scope="col">Demo</th>
+ <th scope="col">Assigned Tasks</th>
+ <th scope="col">Completed Tasks</th>
+ <th scope="col">Percentage</th>
</thead>
{% for entry in overview %}
<tr>
- <th scope="row">{{ entry['id'] }}</th>
- <td>{{ entry['name'] }}</td>
- <td>{{ entry['assigned'] }}</td>
- <td>{{ entry['completed'] }}</td>
- <td>{{ entry['percentage'] }}</td>
- </tr>
+ <th scope="row">{{ entry['id'] }}</th>
+ <td>{{ entry['name'] }}</td>
+ <td>{% if entry['demo'] %}Yes{% else %}No{% endif %}</td>
+ <td>{{ entry['assigned'] }}</td>
+ <td>{{ entry['completed'] }}</td>
+ <td>{{ entry['percentage'] }}</td>
+ </tr>
{% endfor %}
</tr>
</table>
diff --git a/app/templates/admin/manage_users.html b/app/templates/admin/manage_users.html
index 5c44a48..8788958 100644
--- a/app/templates/admin/manage_users.html
+++ b/app/templates/admin/manage_users.html
@@ -1,70 +1,72 @@
{% extends "base.html" %}
{% block app_content %}
-<h1>Manage Users</h1>
+ <h1>Manage Users</h1>
-<div class="col-lg-3">
+ <div class="col-lg-3">
<div class="row">
- <form class="form" action="" method="POST">
- {{ form.hidden_tag() }}
- {{ form.user }}
- {{ form.delete(hidden='true', id='form-submit') }}
- <!-- Button trigger modal -->
- <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteModal">
- Delete
- </button>
- </form>
+ <form class="form" action="" method="POST">
+ {{ form.hidden_tag() }}
+ {{ form.user }}
+ {{ form.delete(hidden='true', id='form-submit') }}
+ <!-- Button trigger modal -->
+ <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteModal">
+ Delete
+ </button>
+ </form>
</div>
-</div>
+ </div>
-<!-- Modal -->
-<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-dialog-centered" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="deleteModalLabel">Delete Dataset</h5>
- </div>
- <div class="modal-body">
- You are about to delete the user <span id="user-name"></span> <b>and</b> all associated tasks and annotations. Are you sure?
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-success success" id="modal-confirm">Confirm</button>
+ <!-- Modal -->
+ <div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-dialog-centered" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h5 class="modal-title" id="deleteModalLabel">Delete Dataset</h5>
+ </div>
+ <div class="modal-body">
+ You are about to delete the user <span id="user-name"></span> <b>and</b> all associated tasks and annotations. Are you sure?
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-success success" id="modal-confirm">Confirm</button>
+ </div>
</div>
</div>
</div>
-</div>
-<br>
-<h1>User Overview</h1>
-<article class="overview">
- <table class="table table-striped">
- <thead class="thead-dark">
- <th scope="col">ID</th>
- <th scope="col">Username</th>
- <th scope="col">Email</th>
- <th scope="col">Confirmed</th>
- <th scope="col">Last Active</th>
- <th scope="col">Admin</th>
- </thead>
- {% for user in users %}
- <tr>
- <th scope="row">{{ user.id }}</th>
- <td>{{ user.username }}</td>
- <td>{{ user.email }}</td>
- <td>{% if user.is_confirmed %}Yes{% else %}No{% endif %}</td>
- <td>{{ user.last_active }}</td>
- <td>{% if user.is_admin %}Yes{% else %}{% endif %}</td>
- </tr>
- {% endfor %}
- </tr>
- </table>
-</article>
+ <br>
+ <h1>User Overview</h1>
+ <article class="overview">
+ <table class="table table-striped">
+ <thead class="thead-dark">
+ <th scope="col">ID</th>
+ <th scope="col">Username</th>
+ <th scope="col">Email</th>
+ <th scope="col">Confirmed?</th>
+ <th scope="col">Introduced?</th>
+ <th scope="col">Last Active (UTC)</th>
+ <th scope="col">Admin?</th>
+ </thead>
+ {% for user in users %}
+ <tr>
+ <th scope="row">{{ user.id }}</th>
+ <td>{{ user.username }}</td>
+ <td>{{ user.email }}</td>
+ <td>{% if user.is_confirmed %}Yes{% else %}No{% endif %}</td>
+ <td>{% if user.is_introduced %}Yes{% else %}No{% endif %}</td>
+ <td>{{ user.last_active }}</td>
+ <td>{% if user.is_admin %}Yes{% else %}{% endif %}</td>
+ </tr>
+ {% endfor %}
+ </tr>
+ </table>
+ </article>
-<script>
-var conf = document.getElementById("modal-confirm");
-conf.onclick = function() {
- document.getElementById("form-submit").click();
-};
-</script>
+ <script>
+ var conf = document.getElementById("modal-confirm");
+ conf.onclick = function() {
+ document.getElementById("form-submit").click();
+ };
+ </script>
{% endblock %}