mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 10:54:18 +00:00
76 lines
2.9 KiB
Django/Jinja
76 lines
2.9 KiB
Django/Jinja
{% extends "base.html.j2" %}
|
|
|
|
{% block page_content %}
|
|
<div class="col s12 m6">
|
|
<div class="card large">
|
|
<div class="card-content">
|
|
<span class="card-title">User information</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col s12 m6">
|
|
<div class="card large">
|
|
<div class="card-content">
|
|
<span class="card-title">User Jobs</span>
|
|
<div id="users">
|
|
<div class="input-field">
|
|
<i class="material-icons prefix">search</i>
|
|
<input id="search-corpus" class="search" type="text"></input>
|
|
<label for="search-corpus">Search users</label>
|
|
</div>
|
|
<div class="collection list">
|
|
{% for job in selected_user.jobs.all() %}
|
|
{% if job.service == 'nlp' %}
|
|
{% set service_color = 'blue' %}
|
|
{% set service_icon = 'format_textdirection_l_to_r' %}
|
|
{% elif job.service =='ocr' %}
|
|
{% set service_color = 'green' %}
|
|
{% set service_icon = 'find_in_page' %}
|
|
{% else %}
|
|
{% set service_color = 'red' %}
|
|
{% set service_icon = 'help' %}
|
|
{% endif %}
|
|
{% if job.status == 'pending' %}
|
|
{% set badge_color = 'amber' %}
|
|
{% elif job.status =='running' %}
|
|
{% set badge_color = 'indigo' %}
|
|
{% elif job.status =='complete' %}
|
|
{% set badge_color = 'teal' %}
|
|
{% else %}
|
|
{% set badge_color = 'red' %}
|
|
{% endif %}
|
|
<a href="{{ url_for('main.job', job_id=job.id) }}" class="collection-item avatar">
|
|
<i class="material-icons circle {{ service_color }}">{{ service_icon }}</i>
|
|
<span class="new badge {{ badge_color }}" data-badge-caption="">{{ job.status }}</span>
|
|
<span class="title">{{ job.title }}</span>
|
|
<p>{{ job.description }}</p>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
<ul class="pagination"></ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col s12">
|
|
<div class="card large">
|
|
<div class="card-content">
|
|
<span class="card-title">Administration actions</span>
|
|
<!-- Confirm deletion of selected user with modal dialogue
|
|
Modal Trigger-->
|
|
<a href="#modal-confirm-delete" class="waves-effect waves-light btn modal-trigger"><i class="material-icons left">delete</i>Delete User</a>
|
|
<!-- Modal Strucutre -->
|
|
<div id="modal-confirm-delete" class="modal">
|
|
<div class="modal-content">
|
|
<h4>Confirm deletion</h4>
|
|
<p>Do you really want to delete the current selected user ({{selected_user.username}})?</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<a href="{{url_for('admin.admin_delete_user', user_id=selected_user.id)}}" class="modal-close waves-effect waves-green btn red"><i class="material-icons left">delete</i>Delete User</a></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|