{% if name != 'Restrito' and name != 'Justificativa de Restrição' %}
{% endcomment %}
<th>
{% if view.ordered_list %}
<atitle="{% 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 %}
<spanclass="caret top"title="{% trans 'Listado na Ordem Ascendente'%}"></span>
{% elif 'o' in request.GET and forloop.counter == request.GET.o|str2intabs %}
<spanclass="caret"title="{% trans 'Listado na Ordem Descendente'%}"></span>
{% endif %}
{% endif %}
</a>
{% else %}
{{ name }}
{% endif %}
</th>
{% comment %}
{% endif %}
{% endcomment %}
{% endfor %}
</tr>
</thead>
<tbody>
{% for doc in object_list %}
<tr>
{% if not doc.restrito or 'materia.change_documentoacessorio' in request.user.get_all_permissions %}