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.
87 lines
3.7 KiB
87 lines
3.7 KiB
{% extends request.is_ajax|yesno:'bajax.html,base.html' %}
|
|
{% load i18n %}
|
|
{% block main %}
|
|
|
|
<ol class="breadcrumb">
|
|
<li><span class="glyphicon glyphicon-home"></span></li>
|
|
<li><a href="{% url 'taskapp:home' %}">{% trans 'Tasks' %}</a></li>
|
|
<li class="active">{% trans 'All tasks' %}</li>
|
|
</ol>
|
|
|
|
{% include 'message_block.html' %}
|
|
|
|
<div class="page-header">
|
|
<h2>{% trans 'Records of all the tasks in the system' %}</h2>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th class="col-sm-4">{% trans 'Description' %}</th>
|
|
<th class="col-sm-1">{% trans 'Task author' %}</th>
|
|
<th class="col-sm-1">{% trans 'The nature of the damage' %}</th>
|
|
<th class="col-sm-1">{% trans 'Condition' %}</th>
|
|
<th class="col-sm-1">{% trans 'A priority' %}</th>
|
|
<th class="col-sm-1">{% trans 'Date of create' %}</th>
|
|
<th class="col-sm-1">{% trans 'Attachment' %}</th>
|
|
<th class="col-sm-2" colspan="3">{% trans 'Actions' %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for task in tasks %}
|
|
|
|
{% if task.priority == 'E' %}
|
|
<tr class="success">
|
|
{% elif task.priority == 'C' %}
|
|
<tr>
|
|
{% elif task.priority == 'A' %}
|
|
<tr class="danger">
|
|
{% else %}
|
|
<tr>{% endif %}
|
|
|
|
<td><a href="{% url 'taskapp:view' task.id %}" target="_blank">{{ task.id }}</a></td>
|
|
<td>{{ task.descr }}</td>
|
|
<td><a href="{% url 'acc_app:other_profile' task.author.id %}" title="{{ task.author.get_full_name }}">{{ task.author.username }}</a></td>
|
|
<td>{{ task.get_mode_display }}</td>
|
|
<td>{{ task.get_state_display }}</td>
|
|
<td>{{ task.get_priority_display }}</td>
|
|
<td>{{ task.time_of_create|date:'d N Y H:i:s' }}</td>
|
|
<td>{% if task.attachment %}<a href="{{ task.attachment.url }}" target="_blank">{{ task.attachment.name }}</a>{% else %}―{% endif %}</td>
|
|
<td colspan="3" class="btn-group btn-group-justified">
|
|
{% if perms.taskapp.change_task %}
|
|
<a href="{% url 'taskapp:edit' task.id %}" class="btn btn-default btn-sm" title="{% trans 'Edit' %}">
|
|
<span class="glyphicon glyphicon-edit"></span>
|
|
</a>
|
|
{% endif %}
|
|
{% if perms.taskapp.can_remind %}
|
|
<a href="{% url 'taskapp:remind' task.id %}" class="btn btn-default btn-sm" title="{% trans 'Remind' %}">
|
|
<span class="glyphicon glyphicon-bell"></span>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="12">{% trans 'The list is empty' %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="12">
|
|
{% if perms.taskapp.add_task %}
|
|
<a href="{% url 'taskapp:add' %}" class="btn btn-sm btn-success" title="{% trans 'Add new task' %}">
|
|
<span class="glyphicon glyphicon-plus"></span> {% trans 'Add new task' %}
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
|
|
{% include 'toolbar_page.html' with pag=tasks %}
|
|
|
|
{% endblock %}
|