You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
3.8 KiB
89 lines
3.8 KiB
{% extends request.is_ajax|yesno:'nullcont.htm,taskapp/ext.htm' %}
|
|
{% load i18n %}
|
|
{% block content %}
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th class="hidden-xs">#</th>
|
|
<th class="col-sm-3">{% trans 'Name' %}</th>
|
|
<th class="col-sm-1">{% trans 'Address' %}</th>
|
|
<th class="col-sm-1">{% trans 'The nature of the damage' %}</th>
|
|
<th class="col-sm-4">{% trans 'Description' %}</th>
|
|
<th class="col-sm-1">{% trans 'Task author' %}</th>
|
|
<th class="col-sm-1 hidden-xs">{% trans 'Date of create' %}</th>
|
|
<th class="col-sm-1">{% trans 'Actions' %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for task in tasks %}
|
|
|
|
{% if task.is_relevant %}
|
|
<tr class="text-muted">
|
|
{% else %}
|
|
{% if task.priority == 'E' %}
|
|
<tr class="success">
|
|
{% elif task.priority == 'C' %}
|
|
<tr>
|
|
{% elif task.priority == 'A' %}
|
|
<tr class="danger">
|
|
{% else %}
|
|
<tr>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<td class="hidden-xs"><a href="{% url 'taskapp:view' task.pk %}">{{ task.pk }}</a></td>
|
|
|
|
{% if task.abon and task.abon.group %}
|
|
<td><a href="{% url 'abonapp:abon_home' task.abon.group.pk task.abon.pk %}" title="{{ task.abon.description|default:'' }}" data-toggle="tooltip">{{ task.abon.get_full_name }}</a></td>
|
|
<td>{{ task.abon.group.title }}, {{ task.abon.street|default:'' }} {{ task.abon.house|default:'' }}</td>
|
|
{% else %}
|
|
<td>{% trans 'User does not exist' %}</td>
|
|
<td>---</td>
|
|
{% endif %}
|
|
|
|
<td>{{ task.get_mode_display }}</td>
|
|
<td>{{ task.descr|default:'' }}</td>
|
|
<td>
|
|
{% if task.author %}
|
|
<a href="{% url 'acc_app:other_profile' task.author.pk %}" data-toggle="tooltip" title="{{ task.author.get_full_name }}">{{ task.author.username }}</a>
|
|
{% else %}
|
|
{% trans 'Author does not exist' %}
|
|
{% endif %}
|
|
</td>
|
|
<td class="hidden-xs">{{ task.time_of_create|date:'d E H:i' }}</td>
|
|
|
|
<td class="btn-group btn-group-xs btn-group-justified">
|
|
<a href="{% url 'taskapp:finish' task.pk %}" class="btn btn-success" data-toggle="tooltip" title="{% trans 'Complete' %}">
|
|
<span class="glyphicon glyphicon-ok"></span>
|
|
</a>
|
|
<a href="{% url 'taskapp:fail' task.pk %}" class="btn btn-danger" data-toggle="tooltip" title="{% trans 'Mark as unsuccessful' %}">
|
|
<span class="glyphicon glyphicon-fire"></span>
|
|
</a>
|
|
{% if perms.taskapp.change_task %}
|
|
<a href="{% url 'taskapp:edit' task.pk %}" class="btn btn-default" data-toggle="tooltip" title="{% trans 'Edit' %}">
|
|
<span class="glyphicon glyphicon-edit"></span>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="8">{% trans 'The list is empty' %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="8">
|
|
{% include 'taskapp/footer_btns.html' %}
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
{% include 'pagination.html' %}
|
|
|
|
{% endblock %}
|