mirror of https://github.com/interlegis/sapl.git
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.
76 lines
3.2 KiB
76 lines
3.2 KiB
{% extends "crud/list.html" %}
|
|
{% load i18n common_tags %}
|
|
|
|
{% block container_table_list %}
|
|
{% if not rows %}
|
|
<p>{{ NO_ENTRIES_MSG }}</p>
|
|
{% else %}
|
|
<div class="container-table">
|
|
<div class="result-count">{% blocktrans with verbose_name_plural=view.verbose_name_plural %}Total de {{ verbose_name_plural }}: <strong>{{count}}</strong>{% endblocktrans %}</div>
|
|
<table class="table table-striped table-hover table-link-ordering">
|
|
<thead>
|
|
<tr>
|
|
{% for name in headers %}
|
|
<th>
|
|
{% if view.ordered_list %}
|
|
<a title="{% trans 'Clique para alterar a ordem a listagem'%}" href="?o={% if 'o' not in request.GET and forloop.counter == 1 or 'o' in request.GET and forloop.counter|safe == request.GET.o %}-{%endif%}{{forloop.counter}}{{ordering_url}}">
|
|
{{ name }}
|
|
{% if 'o' in request.GET or not view.ordering %}
|
|
{% if 'o' not in request.GET and forloop.counter == 1 or 'o' in request.GET and forloop.counter|safe == request.GET.o %}
|
|
<span class="caret top" title="{% trans 'Listado na Ordem Ascendente'%}"></span>
|
|
{% elif 'o' in request.GET and forloop.counter == request.GET.o|str2intabs %}
|
|
<span class="caret" title="{% trans 'Listado na Ordem Descendente'%}"></span>
|
|
{% endif %}
|
|
{% endif %}
|
|
</a>
|
|
{% else %}
|
|
{{ name }}
|
|
{% endif %}
|
|
</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for doc in object_list %}
|
|
<tr>
|
|
{% if not doc.restrito or 'materia.change_documentoacessorio' in request.user.get_all_permissions %}
|
|
<td>
|
|
<a href="{% url 'sapl.materia:documentoacessorio_detail' doc.id %}">{{ doc.nome }}</a>
|
|
</td>
|
|
<td>
|
|
{{ doc.tipo }}
|
|
</td>
|
|
<td>
|
|
{% if doc.data %}{{ doc.data }}{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if doc.autor %}{{ doc.autor }}{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if doc.arquivo %}<a href="{{ doc.arquivo.url }}">Ver arquivo{% endif %}
|
|
</td>
|
|
{% else %}
|
|
<td colspan=5>
|
|
<strong style="color: red">Documento Restrito</strong></br>{{ doc.justificativa_restricao|safe }}
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock container_table_list %}
|
|
|
|
|
|
{% block base_content %}
|
|
{{ block.super }}
|
|
<div style="display:flex;padding-left: 600px;padding-top: 10px;">
|
|
<div class="actions btn-group float-right" role="group">
|
|
<a href="{% url 'sapl.materia:merge_docacessorios' root_pk %}" class="btn btn-outline-primary">{% trans 'Baixar documentos como PDF único' %}</a>
|
|
</div>
|
|
<div class="actions btn-group float-right" role="group">
|
|
<a href="{% url 'sapl.materia:compress_docacessorios' root_pk %}" class="btn btn-outline-primary">{% trans 'Baixar documentos compactados' %}</a>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|