Browse Source

Melhorias na geração de relatórios

dependabot/pip/requirements/djangorestframework-3.15.2
Sesóstris Vieira 7 months ago
parent
commit
d0d4a8948b
  1. 67
      sigi/apps/utils/templates/utils/report/report.html
  2. 2
      sigi/templates/pdf/base_report.html

67
sigi/apps/utils/templates/utils/report/report.html

@ -26,44 +26,51 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% if form %} {% block form %}
<form class="row"> {% if form %}
<div class="col s12"> <form class="row">
<div class="card"> <div class="col s12">
<div class="card-content"> <div class="card">
{% block filterform %}{{ form }}{% endblock filterform %} <div class="card-content">
</div> {% block filterform %}{{ form }}{% endblock filterform %}
<div class="card-action"> </div>
<button class="waves-effect waves-light btn" type="submit">{% translate "Submit" %}</button> <div class="card-action">
<div class="fixed-action-btn"> <button class="waves-effect waves-light btn" type="submit">{% translate "Submit" %}</button>
<a class="btn-floating"> <div class="fixed-action-btn">
<i class="large material-icons">print</i> <a class="btn-floating">
</a> <i class="large material-icons">print</i>
<ul> </a>
<li><button class="btn-floating" type="submit" name="fmt" value="pdf" title="{% trans 'Exportar para PDF' %}" ><i class="material-icons">picture_as_pdf</i></button></li> <ul>
<li><button class="btn-floating" type="submit" name="fmt" value="csv" title="{% trans 'Exportar para CSV' %}" ><i class="material-icons">file_download</i></button></li> <li><button class="btn-floating" type="submit" name="fmt" value="pdf" title="{% trans 'Exportar para PDF' %}" ><i class="material-icons">picture_as_pdf</i></button></li>
</ul> <li><button class="btn-floating" type="submit" name="fmt" value="csv" title="{% trans 'Exportar para CSV' %}" ><i class="material-icons">file_download</i></button></li>
</ul>
</div>
</div> </div>
</div> </div>
</div> </div>
</form>
{% else %}
<div class="fixed-action-btn">
<a class="btn-floating">
<i class="large material-icons">print</i>
</a>
<ul>
<li><a class="btn-floating" href="?fmt=pdf" title="{% trans 'Exportar para PDF' %}" ><i class="material-icons">picture_as_pdf</i></a></li>
<li><a class="btn-floating" href="?fmt=csv" title="{% trans 'Exportar para CSV' %}" ><i class="material-icons">file_download</i></a></li>
</ul>
</div> </div>
</form> {% endif %}
{% else %} {% endblock form %}
<div class="fixed-action-btn"> {% block data %}
<a class="btn-floating"> {% include "utils/report/report_items_snippet.html" with mode="html" %}
<i class="large material-icons">print</i> {% endblock data %}
</a>
<ul>
<li><a class="btn-floating" href="?fmt=pdf" title="{% trans 'Exportar para PDF' %}" ><i class="material-icons">picture_as_pdf</i></a></li>
<li><a class="btn-floating" href="?fmt=csv" title="{% trans 'Exportar para CSV' %}" ><i class="material-icons">file_download</i></a></li>
</ul>
</div>
{% endif %}
{% include "utils/report/report_items_snippet.html" with mode="html" %}
{% endblock %} {% endblock %}
{% block footer %} {% block footer %}
{{ block.super }} {{ block.super }}
{% if form %}
{{ form.media }}
{% endif %}
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
M.FloatingActionButton.init($('.fixed-action-btn'), {hoverEnabled: false}); M.FloatingActionButton.init($('.fixed-action-btn'), {hoverEnabled: false});

2
sigi/templates/pdf/base_report.html

@ -43,6 +43,8 @@ th,td {
th { th {
background-color: #007433; background-color: #007433;
color: white; color: white;
font-weight: 600;
text-transform: uppercase;
} }
tr:nth-child(even) { tr:nth-child(even) {
background-color: #d2d2d2; background-color: #d2d2d2;

Loading…
Cancel
Save