Unify more tables

This commit is contained in:
Stephan Porada
2020-07-07 16:06:09 +02:00
parent 7648149584
commit 0fff7801fd
7 changed files with 90 additions and 167 deletions

@@ -13,28 +13,28 @@
<label for="search-user">Search user</label>
</div>
<ul class="pagination paginationTop"></ul>
{{ table }}
<table class="highlight responsive-table">
<thead>
<tr>
<th class="sort" data-sort="username">Username</th>
<th class="sort" data-sort="email">Email</th>
<th class="sort" data-sort="role_id">Role</th>
<th class="sort" data-sort="confirmed">Confirmed Status</th>
<th class="sort" data-sort="id">Id</th>
<th>{# Actions #}</th>
</tr>
</thead>
<tbody class="list">
</tbody>
</table>
<ul class="pagination paginationBottom"></ul>
</div>
</div>
</div>
<script>
var options = {page: 10,
pagination: [
{
name: "paginationTop",
paginationClass: "paginationTop",
innerWindow: 8,
outerWindow: 1
},
{
paginationClass: "paginationBottom",
innerWindow: 8,
outerWindow: 1
}
],
valueNames: ['username', 'email', 'role', 'confirmed', 'id']};
var userList = new List('users', options);
var ressources = {{ users|tojson|safe }};
var userList = new RessourceList('users', null, "user");
userList.addRessources(ressources);
</script>
{% endblock %}

@@ -84,3 +84,16 @@
{% endif %}
</button>
{% endmacro %}
{% macro delete_modal_file(file) %}
<div id="delete-corpus-file-{{ file.id }}-modal" class="modal">
<div class="modal-content">
<h4>Confirm corpus file deletion</h4>
<p>Do you really want to delete the corpus file {{ file.filename }}? The file will be permanently deleted!</p>
</div>
<div class="modal-footer">
<a href="#!" class="btn modal-close waves-effect waves-light">Cancel</a>
<a class="btn modal-close red waves-effect waves-light" href="{{ url_for('corpora.delete_corpus_file', corpus_file_id=resource_id, corpus_id=corpus.id) }}"><i class="material-icons left">delete</i>Delete</a>
</div>
</div>
{% endmacro %}