From 240415bb95f92a99cf28b4a0ce101f129cfd9526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Fri, 6 Dec 2024 10:49:54 -0300 Subject: [PATCH] =?UTF-8?q?Adapta=20relat=C3=B3rio=20agenda=20de=20espa?= =?UTF-8?q?=C3=A7os=20para=20djbs-theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../espacos/templates/espacos/agenda.html | 58 ++++++++++ .../espacos/templates/espacos/agenda_pdf.html | 107 ++++++++++++++++++ .../espacos/snippets/agenda_cal.html | 78 +++++++++++++ 3 files changed, 243 insertions(+) create mode 100644 sigi/apps/espacos/templates/espacos/agenda.html create mode 100644 sigi/apps/espacos/templates/espacos/agenda_pdf.html create mode 100644 sigi/apps/espacos/templates/espacos/snippets/agenda_cal.html diff --git a/sigi/apps/espacos/templates/espacos/agenda.html b/sigi/apps/espacos/templates/espacos/agenda.html new file mode 100644 index 0000000..308435f --- /dev/null +++ b/sigi/apps/espacos/templates/espacos/agenda.html @@ -0,0 +1,58 @@ +{% extends "eventos/calendario.html" %} +{% load i18n static sigi_tags djbs_extras %} + +{% block extrastyle %} + {{ block.super }} + +{% endblock %} + +{% block breadcrumbs %} + + +{% endblock %} + +{% block content %} +
+
+ {% icon "filter" %} {% translate "Filtros" %} +
+
+ +
+ {% for ano, lista in meses.items %} +
+ {% for mes, nome in lista.items %} + {{ nome }} + {% endfor %} +
+ {% endfor %} +
+
+ +
+ {% include "espacos/snippets/agenda_cal.html" %} +{% endblock %} \ No newline at end of file diff --git a/sigi/apps/espacos/templates/espacos/agenda_pdf.html b/sigi/apps/espacos/templates/espacos/agenda_pdf.html new file mode 100644 index 0000000..250b24d --- /dev/null +++ b/sigi/apps/espacos/templates/espacos/agenda_pdf.html @@ -0,0 +1,107 @@ +{% extends 'pdf/base_report.html' %} +{% load static i18n sigi_tags %} + +{% block extra_style %} + {{ block.super }} + .card-header { + font-size: 1.1 rem; + font-weight: bold; + } + + a { + color: black; + text-decoration: none; + } + table { + table-layout: fixed; + } + .calendar-table { + border-collapse: collapse; + border-spacing: 0; + border: 1px solid #d2d2d2; + } + .calendar-table td+td { + border-left: 1px solid #d2d2d2 !important; + } + table td, + table td * { + vertical-align: top; + } + .calendar-table tr:nth-child(even) { + background-color: white !important; + } + tr.linha-dias { + background: #d2d2d2; + border-top: 1px solid #d2d2d2; + } + tr.linha-evento { + border-bottom: 1px solid #d2d2d2; + } + tr.linha-evento.last { + border-bottom: 1px solid #007433; + } + span.numero-dia { + font-size: 1em; + } + .card { + background-color: #fff; + padding: 15px; + margin: 10px 0; + } + .card .card-content .card-title { + display: block; + line-height: 32px; + margin-bottom: 8px; + font-weight: 300; + } + .card-title { + font-size: 20px !important; + margin-bottom: -6px !important; + } + .data-evento { + font-size: 1em; + display: block; + } + .tipo-evento { + font-size: 1em; + color: var(--body-quiet-color); + display: block; + margin-bottom: 8px; + } + .evento { + margin: 0; + padding: 5px 10px; + } + .cyan.lighten-4 { background-color: #b2ebf2!important; } + .red.lighten-4 { background-color: #ffcdd2!important; } + .purple.lighten-4 { background-color: #e1bee7!important; } + .blue.lighten-4 { background-color: #bbdefb!important; } + .orange.lighten-4 { background-color: #ffe0b2!important; } + .brown.lighten-4 { background-color: #d7ccc8 !important; } + @font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url('/static/material/fonts/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2') format('woff2'); + } + i.tiny { font-size: 1rem; } + .material-icons { + font-family: "Material Icons"; + font-weight: 400; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-feature-settings: "liga"; + -webkit-font-smoothing: antialiased; + } +{% endblock %} + +{% block main_content %} + {% include "espacos/snippets/agenda_cal.html" %} +{% endblock main_content %} \ No newline at end of file diff --git a/sigi/apps/espacos/templates/espacos/snippets/agenda_cal.html b/sigi/apps/espacos/templates/espacos/snippets/agenda_cal.html new file mode 100644 index 0000000..9d54304 --- /dev/null +++ b/sigi/apps/espacos/templates/espacos/snippets/agenda_cal.html @@ -0,0 +1,78 @@ +{% load i18n static sigi_tags %} + +{% for semana in semanas %} + {% if pdf and not forloop.last and not forloop.first and semana|length > 1 %} +
+ {% endif %} + +
+
+ {% blocktranslate with start=semana.datas|first|date:"SHORT_DATE_FORMAT" end=semana.datas|last|date:"SHORT_DATE_FORMAT" %} + Semana de {{ start }} a {{ end }} + {% endblocktranslate %} +
+
+ {% if semana|length > 1 %} + + + + + + + + + + {% for name in day_names %} + + {% endfor %} + + + {% for dia in semana.datas %} + + {% endfor %} + + + + {% for espaco, linhas in semana.items %} + {% if espaco != "datas" %} + {% for linha in linhas %} + + {% if forloop.first %} + + {% endif %} + + {% for coluna in linha.colunas %} + {% if "reserva" in coluna %} + + {% else %} + {% if not coluna is None %} + + {% endif %} + {% endif %} + {% endfor %} + + {% endfor %} + {% endif %} + {% endfor %} + +
{% trans "Espaço" %}{{ name }}
{{ dia|date:"d/m"}}
{{ espaco.sigla }}{{ linha.hora }} +

+ + + {{ coluna.reserva.proposito }} + + +

+

{{ coluna.reserva.data_inicio|interval:coluna.reserva.data_termino }}

+

+ {% blocktranslate with solicitante=coluna.reserva.solicitante %} + solicitado por {{ solicitante }} + {% endblocktranslate %} +

+
+ {% else %} +

{% translate "Nenhuma reserva de espaço nesta semana" %}

+ {% endif %} +
+
+{% endfor %} \ No newline at end of file