mirror of https://github.com/interlegis/sapl.git
2 changed files with 63 additions and 1 deletions
@ -1 +0,0 @@ |
|||
{% extends "crud/list.html" %} |
|||
@ -0,0 +1,63 @@ |
|||
{% extends "crud/list.html" %} |
|||
{% load i18n common_tags crispy_forms_tags cropping %} |
|||
|
|||
{% block container_table_list %} |
|||
{% if perms.add_mesadiretora %} |
|||
{{ block.super }} |
|||
{% else %} |
|||
<div> |
|||
<ul class="nav nav-tabs" role="tablist"> |
|||
{% for md in object_list %} |
|||
{% if forloop.first %} |
|||
<li class="nav-item"> |
|||
<a class="nav-link active" href="#tab-mesa-{{ md.id }}" data-toggle="tab" role="tab">{{ md }}</a> |
|||
</li> |
|||
{% else %} |
|||
<li class="nav-item"> |
|||
<a class="nav-link" href="#tab-mesa-{{ md.id }}" data-toggle="tab" role="tab">{{ md }}</a> |
|||
</li> |
|||
{% endif %} |
|||
{% endfor %} |
|||
</ul> |
|||
<div class="tab-content"> |
|||
{% for md in object_list %} |
|||
{% if forloop.first or request.GET.mesadiretora == md.id|stringformat:"s" %} |
|||
<div class="tab-pane fade show active" id="tab-mesa-{{ md.id }}" role="tabpanel"> |
|||
{% else %} |
|||
<div class="tab-pane fade" id="tab-mesa-{{ md.id }}" role="tabpanel"> |
|||
{% endif %} |
|||
<table class="table table-striped table-hover table-link-ordering"> |
|||
<thead> |
|||
<tr> |
|||
<th></th> |
|||
<th>Nome do Parlamentar</th> |
|||
<th>Partido</th> |
|||
<th>Cargo</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{% for p in md.composicaomesa_set.all %} |
|||
<tr> |
|||
{% if p.parlamentar.fotografia %} |
|||
<td> |
|||
<div id="w-100"> |
|||
<img class="img-fluid img-thumbnail" src="{% cropped_thumbnail p.parlamentar "cropping"%}"> |
|||
</div> |
|||
</td> |
|||
{% else %} |
|||
<td></td> |
|||
{% endif %} |
|||
<td><a href="{% url 'sapl.parlamentares:parlamentar_detail' p.parlamentar.pk %}"> |
|||
{{p.parlamentar.nome_parlamentar}}</a></td> |
|||
<td>{{p.parlamentar.filiacao_atual}}</td> |
|||
<td>{{p.cargo}}</td> |
|||
</tr> |
|||
{% endfor %} |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
{% endfor %} |
|||
</div> |
|||
{% endif %} |
|||
|
|||
{% endblock container_table_list %} |
|||
Loading…
Reference in new issue