Browse Source

Relatório lista de gerentes com tema djbs

sigi-4.0
Sesóstris Vieira 2 weeks ago
parent
commit
8a1f1fe2fe
  1. 104
      sigi/apps/casas/templates/admin/casas/gerentes_list.html
  2. 98
      sigi/static/css/base_sigi.css

104
sigi/apps/casas/templates/admin/casas/gerentes_list.html

@ -0,0 +1,104 @@
{% extends 'admin/base_site.html' %}
{% load i18n static djbs_extras %}
{% block breadcrumbs %}
<li class="breadcrumb-item">{% translate "Relatórios" %}</li>
<li class="breadcrumb-item">{% translate "Lista de gerentes" %}</li>
{% endblock %}
{% block content_title %}
<h5>{% translate "Lista de gerentes" %}</h5>
{% endblock %}
{% block content %}
{% comment %} <nav class="nav my-3 bg-body-tertiary">
<a class="nav-link ms-lg-auto" href="?fmt=pdf">{% icon "pdf" %}Exportar para PDF</a>
<a class="nav-link" href="?fmt=csv&casas=yes">{% icon "csv" %} Exportar CSV com casas</a>
<a class="nav-link" href="?fmt=csv&casas=no">{% icon "csv" %} Exportar CSV sem casas</a>
</nav> {% endcomment %}
{% for gerente in object_list %}
<div class="card mb-3">
<div class="card-header">
{% if gerente.foto %}
<img class="rounded-circle user-image" src="{{ gerente.foto.url }}"/>
{% else %}
{% icon "user" %}
{% endif %}
{{ gerente.nome_completo }}
</div>
<div class="card-body">
<p class="card-text">
<a href="{% url 'openmap' %}?tipo_servico=ignore&tipo_convenio=ignore&gerente={{ gerente.id|stringformat:'s' }}" title="{% trans "Ver no mapa" %}">
{% blocktrans with total=gerente.tot_casas %}
Atende a {{ total }} casas legislativas.
</a>
{% endblocktrans %}
</p>
<div class="accordion" id="accordion{{ gerente.id }}">
{% for regiao, tot_casas, ufs in gerente.regioes %}
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-{{ gerente.id }}-{{ regiao|slugify }}" aria-expanded="false" aria-controls="collapse-{{ gerente.id }}-{{ regiao|slugify }}">
<strong>{{ regiao }}:&nbsp;</strong>
<em>
{% blocktrans with total=tot_casas %}
{{ total }} casas atendidas
{% endblocktrans %}
</em>
</button>
</h2>
<div id="collapse-{{ gerente.id }}-{{ regiao|slugify }}" class="accordion-collapse collapse" data-bs-parent="#accordion{{ gerente.id }}">
<div class="accordion-body">
<a href="{% url 'openmap' %}?tipo_servico=ignore&tipo_convenio=ignore&gerente={{ gerente.id|stringformat:'s' }}{% for uf_rec in ufs %}&uf={{ uf_rec.0 }}{% endfor %}" title="{% trans "Ver no mapa" %}">
<em>
{% blocktrans with total=tot_casas %}
Ver as {{ total }} casas atendidas na região {{ regiao }} no mapa.
{% endblocktrans %}
</em>
</a>
<table class="table table-sm table-striped">
<thead>
<tr>
<th>{% trans "Unidade da Federação" %}</th>
<th class="right-align">{% trans "Total de Casas" %}</th>
{% for tipo in tipos_orgao %}
<th class="right-align">{{ tipo.nome }}</th>
{% endfor %}
</tr>
</thead>
<tbody class="table-group-divider">
{% for uf_rec in ufs %}
<tr>
{% for value in uf_rec|slice:"1:" %}
{% if forloop.first %}
<td>
<a href="{% url 'openmap' %}?tipo_servico=ignore&tipo_convenio=ignore&gerente={{ gerente.id|stringformat:'s' }}&uf={{ uf_rec.0 }}" title="{% trans "Ver no mapa" %}">
{{ value }}
</a>
</td>
{% else %}
<td class="right-align">
{% if forloop.counter > 2 and value > 0 %}
<a href="{% url 'openmap' %}?tipo_servico=ignore&tipo_convenio=ignore&gerente={{ gerente.id|stringformat:'s' }}&uf={{ uf_rec.0 }}&tipo_orgao={% for tipo in tipos_orgao %}{% if forloop.counter == forloop.parentloop.counter|add:-2 %}{{ tipo.sigla }}{% endif %}{% endfor %}" title="{% trans "Ver no mapa" %}">
{{ value }}
</a>
{% else %}
{{ value|default:"-" }}
{% endif %}
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endfor %}
{% endblock %}

98
sigi/static/css/base_sigi.css

@ -79,4 +79,102 @@
--bs-form-valid-border-color: #39c08f;
--bs-form-invalid-color: #dc3545;
--bs-form-invalid-border-color: #dc3545;
}
.user-image {
width: 24px;
height: 24px;
}
.right-align {
text-align: right;
}
::sigi {
.root {
/* Cores Primárias */
--bs-primary: #00305c;
--bs-primary-rgb: 0, 48, 92;
--bs-primary-text-emphasis: #ffffff;
--bs-primary-bg-subtle: rgba(0, 48, 92, 0.1);
--bs-primary-border-subtle: rgba(0, 48, 92, 0.3);
/* Cores Secundárias */
--bs-secondary: #004c00;
--bs-secondary-rgb: 0, 76, 0;
--bs-secondary-text-emphasis: #ffffff;
--bs-secondary-bg-subtle: rgba(0, 76, 0, 0.1);
--bs-secondary-border-subtle: rgba(0, 76, 0, 0.3);
/* Cores de Sucesso */
--bs-success: #005e2c;
--bs-success-rgb: 0, 94, 44;
--bs-success-text-emphasis: #ffffff;
--bs-success-bg-subtle: rgba(0, 94, 44, 0.1);
--bs-success-border-subtle: rgba(0, 94, 44, 0.3);
/* Cores Informativas */
--bs-info: #004085;
--bs-info-rgb: 0, 64, 133;
--bs-info-text-emphasis: #ffffff;
--bs-info-bg-subtle: rgba(0, 64, 133, 0.1);
--bs-info-border-subtle: rgba(0, 64, 133, 0.3);
/* Cores de Destaque (Warning) */
--bs-warning: #c97411;
--bs-warning-rgb: 201, 116, 17;
--bs-warning-text-emphasis: #ffffff;
--bs-warning-bg-subtle: rgba(201, 116, 17, 0.1);
--bs-warning-border-subtle: rgba(201, 116, 17, 0.3);
/* Cores de Alerta (Danger) */
--bs-danger: #ad443d;
--bs-danger-rgb: 173, 68, 61;
--bs-danger-text-emphasis: #ffffff;
--bs-danger-bg-subtle: rgba(173, 68, 61, 0.1);
--bs-danger-border-subtle: rgba(173, 68, 61, 0.3);
/* Cores Claras (Light) */
--bs-light: #f8f9fa;
--bs-light-rgb: 248, 249, 250;
--bs-light-text-emphasis: #212529;
--bs-light-bg-subtle: rgba(248, 249, 250, 0.5);
--bs-light-border-subtle: rgba(248, 249, 250, 0.7);
/* Cores Escuras (Dark) */
--bs-dark: #212529;
--bs-dark-rgb: 33, 37, 41;
--bs-dark-text-emphasis: #ffffff;
--bs-dark-bg-subtle: rgba(33, 37, 41, 0.1);
--bs-dark-border-subtle: rgba(33, 37, 41, 0.3);
/* Neutros e Fundo */
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color: #212529;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg: #ffffff;
--bs-body-bg-rgb: 255, 255, 255;
/* Realces */
--bs-emphasis-color: #00305c;
--bs-emphasis-color-rgb: 0, 48, 92;
--bs-highlight-color: #c97411;
--bs-highlight-bg: rgba(201, 116, 17, 0.2);
--bs-border-color: rgba(0, 0, 0, 0.125);
--bs-border-color-translucent: rgba(33, 37, 41, 0.2);
--bs-focus-ring-color: rgba(0, 48, 92, 0.25);
/* Links */
--bs-link-color: #00305c;
--bs-link-color-rgb: 0, 48, 92;
--bs-link-hover-color: #004085;
--bs-link-hover-color-rgb: 0, 64, 133;
/* Formulários */
--bs-form-valid-color: #005e2c;
--bs-form-valid-border-color: rgba(0, 94, 44, 0.5);
--bs-form-invalid-color: #ad443d;
--bs-form-invalid-border-color: rgba(173, 68, 61, 0.5);
}
}
Loading…
Cancel
Save