Browse Source

Resolução de templates que quebravam o start do sistema

pull/184/head
Sesóstris Vieira 2 months ago
parent
commit
4f947c7fc6
  1. 21
      sigi/apps/home/templates/home/editor_help_snippet.html
  2. 38
      sigi/apps/utils/templates/sigialerts/alert_snippet.html

21
sigi/apps/home/templates/home/editor_help_snippet.html

@ -0,0 +1,21 @@
Utilize os seguintes <a class="modal-trigger" href="#help_modal_{{ field_name }}"><i>placeholders</i></a>
<div id="help_modal_{{ field_name }}" class="modal">
<div class="modal-content">
<h5>Placeholders</h5>
<ul class="collection">
{% for placeholder in placeholders %}
<li class="collection-item"><b>{{ placeholder.0 }}</b>: {{ placeholder.1 }}</li>
{% endfor %}
</ul>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-green btn-small btn-flat">Fechar</a>
</div>
</div>
<script>
console.log("Rodou");
$(document).ready(function(){
M.Modal.init($('.modal'), {});
});
</script>

38
sigi/apps/utils/templates/sigialerts/alert_snippet.html

@ -0,0 +1,38 @@
{% load i18n %}
<div id="alertModal" class="modal fade" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{% translate "Avisos" %}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="tab-content" id="alertTabContent">
{% for alerta in alertas %}
<div class="tab-pane fade container{% if forloop.first %} show active{% endif %}" id="{{ alerta.titulo|lower|slugify }}-pane" role="tabpanel" aria-labelledby="{{ alerta.titulo|lower|slugify }}-tab" tabindex="0">
<h5>{{ alerta.titulo }}</h5>
{{ alerta.mensagem|safe }}
</div>
{% endfor %}
</div>
</div>
<div class="modal-footer">
<ul class="nav nav-pills" id="alertTab" role="tablist">
{% for alerta in alertas %}
<li class="nav-item" role="presentation">
<button class="nav-link{% if forloop.first %} active{% endif %}" id="{{ alerta.titulo|lower|slugify }}-tab" data-bs-toggle="tab" data-bs-target="#{{ alerta.titulo|lower|slugify }}-pane" type="button" role="tab" aria-controls="{{ alerta.titulo|lower|slugify }}-pane"{% if forloop.first %} aria-selected="true"{% endif %}> # {{ forloop.counter }}</button>
</li>
{% endfor %}
</ul>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% translate "Close" %}</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
const myModal = new bootstrap.Modal('#alertModal');
myModal.show();
})
</script>
Loading…
Cancel
Save