Skip to content

Commit

Permalink
Actualización de diseños de impresos y corrección de errores
Browse files Browse the repository at this point in the history
  • Loading branch information
livrasand committed Feb 13, 2025
1 parent b67afaf commit 9a36779
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 109 deletions.
161 changes: 95 additions & 66 deletions templates/bosquejos.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@
{% include 'user_info.html' %}
</div>
</div>
<a href="/eliminar_todos_bosquejos">
<button class="btn btn-danger mr-2 btn-sm" type="button">
<svg class="octicon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M11 1.75V3h2.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75ZM4.496 6.675l.66 6.6a.25.25 0 0 0 .249.225h5.19a.25.25 0 0 0 .249-.225l.66-6.6a.75.75 0 0 1 1.492.149l-.66 6.6A1.748 1.748 0 0 1 10.595 15h-5.19a1.75 1.75 0 0 1-1.741-1.575l-.66-6.6a.75.75 0 1 1 1.492-.15ZM6.5 1.75V3h3V1.75a.25.25 0 0 0-.25-.25h-2.5a.25.25 0 0 0-.25.25Z"></path></svg>
</button>
</a>
<a class="btn btn-sm mr-2" onclick="imprimirPagina()" role="button">{{ _('Imprimir') }}</a>

<div className="d-flex flex-justify-end ml-2">
<details class="details-reset details-overlay float-right">
<summary class="btn btn-sm float-right" aria-haspopup="true">
{{ _('Nuevo') }}
<svg class="octicon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M7.75 2a.75.75 0 0 1 .75.75V7h4.25a.75.75 0 0 1 0 1.5H8.5v4.25a.75.75 0 0 1-1.5 0V8.5H2.75a.75.75 0 0 1 0-1.5H7V2.75A.75.75 0 0 1 7.75 2Z"></path></svg>
</summary>
<div class="SelectMenu SelectMenu--hasFilter right-5 mt-4">
<div class="SelectMenu-modal">
Expand All @@ -58,66 +63,96 @@ <h4 style="width:50%;">{{ _('Primero registra un orador en Oradores públicos.')
</div>
</div>

<!-- HEAD PRINT -->
<div id="header-page" style="display: flex;align-items: center;width: 100%;visibility: hidden;">
<p class="h3 ml-4 mt-4" style="width:85%;">{{ _('Discursos públicos') }}</p>
<p class="h6 color-fg-muted mr-4 mt-4" align="right" style="width: 15%">{% if congregacion %}
{{ congregacion }}
{% else %}
{{ _('Registra tu congregación') }}
{% endif %}</p>
</div>
<!-- HEAD PRINT -->
<div class="container-xl mt-6">

<div class="p-2">

<div class="container-xl mt-6">
<div class="pl-2">
<div class="container-lg clearfix">
<div class="color-fg-on-emphasis p-2 rounded-top-2 mb-0"
style="background-color: #89A890; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0.5rem;">
<!-- Contenedor izquierdo: icono y título -->
<div style="display: flex; align-items: center; flex: 1; min-width: 0;">
<i class="jwIcon e125 mr-1" style="color: #fff; font-size: 1em;"></i>
<!-- Se utiliza overflow hidden para evitar que textos muy largos empujen el contenido -->
<span style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
Discursos públicos
</span>
</div>

<!-- Contenedor derecho: congregación -->
<div class="mr-2" style="flex-shrink: 0; margin-left: 1rem; text-align: right;">
<span style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
{% if congregacion %}
{{ congregacion }}
{% else %}
{{ _('Registra tu congregación') }}
{% endif %}
</span>
</div>
</div>
{% if bosquejos_list %}
{% for bosquejo in bosquejos_list %}
<div class="Box mt-2 mr-2">
<div class="Box-row d-flex flex-items-center">
<div class="flex-auto">
<strong>{% if bosquejo[5] %}
<strong>{{ _('Discurso público') }} {{ bosquejo[5] }}</strong>
{% else %}
<strong>{{ _('Sin asignar bosquejo') }}</strong>
{% endif %}</strong>
</div>
<div class="container-lg clearfix" style="width: 70%;">
<div class="col-3 float-left">
<p class="h4">{{ _('Fecha:') }}</p>
<p class="mt-n2">{{ bosquejo[3] if bosquejo[3] else _('Sin asignar') }}</p>
</div>
<div class="col-3 float-left">
<p class="h4">{{ _('Orador:') }}</p>
<p class="mt-n2">{{ bosquejo[1] }} {{ bosquejo[2] }}</p>
</div>
<div class="col-3 float-left">
<p class="h4">{{ _('Congregación:') }}</p>
<p class="mt-n2">{{ bosquejo[4] if bosquejo[4] else _('Local') }}</p>
</div>
<div class="col-3 float-left">
<p class="h4">{{ _('Saliente a:') }}</p>
<p class="mt-n2">{{ bosquejo[11] if bosquejo[11] else _('Es visitante') }}</p>
</div>
</div>
<a href="/mostrar_bosquejo/{{ bosquejo[0] }}"><button class="btn mr-2 btn-sm" type="button">
<!-- <%= octicon "search" %> -->
<svg class="octicon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
<path
d="M8 2c1.981 0 3.671.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.45.678-1.367 1.932-2.637 3.023C11.67 13.008 9.981 14 8 14c-1.981 0-3.671-.992-4.933-2.078C1.797 10.83.88 9.576.43 8.898a1.62 1.62 0 0 1 0-1.798c.45-.677 1.367-1.931 2.637-3.022C4.33 2.992 6.019 2 8 2ZM1.679 7.932a.12.12 0 0 0 0 .136c.411.622 1.241 1.75 2.366 2.717C5.176 11.758 6.527 12.5 8 12.5c1.473 0 2.825-.742 3.955-1.715 1.124-.967 1.954-2.096 2.366-2.717a.12.12 0 0 0 0-.136c-.412-.621-1.242-1.75-2.366-2.717C10.824 4.242 9.473 3.5 8 3.5c-1.473 0-2.825.742-3.955 1.715-1.124.967-1.954 2.096-2.366 2.717ZM8 10a2 2 0 1 1-.001-3.999A2 2 0 0 1 8 10Z">
</path>
</svg>
</button></a>
</div>
<div class="Box mt-0 {% if loop.last %}rounded-bottom-2{% endif %}" style="border: 0.5px solid #D7E3DA; border-radius: 0;">
<div class="Box-row d-flex flex-items-center p-0">
<div class="flex-auto p-2 flex-items-center" style="background-color: #D7E3DA; align-self: stretch; justify-content: center; align-items: center; max-width: 10%;min-width: 10%;">
<strong style="color:#498457;">{{ bosquejo[3] if bosquejo[3] else _('Sin asignar') }}</strong>
</div>

<div class="container-lg p-2" style="width: 100%;">
<div class="d-flex flex-wrap align-items-center">
<!-- Orador -->
<div class="d-flex align-items-center mr-3">
<span style="color:#757575;">{{ _('Orador:') }}</span>
<span style="font-weight:500; margin-left:5px;">{{ bosquejo[1] }} {{ bosquejo[2] }}</span>
</div>

<!-- Congregación -->
{% if bosquejo[4] %}
<div class="d-flex align-items-center mr-3">
<span style="color:#757575;">{{ _('Congregación:') }}</span>
<span style="font-weight:normal; margin-left:5px;">{{ bosquejo[4] }}</span>
</div>
{% endif %}

<!-- Saliente a -->
{% if bosquejo[11] %}
<!-- Saliente a -->
<div class="d-flex align-items-center mr-3">
<span style="color:#757575;">{{ _('Saliente a:') }}</span>
<span style="font-weight:500; margin-left:5px;">{{ bosquejo[11] }}</span>
</div>
{% endif %}
<div class="d-flex align-items-center mr-2">
<span class="border-right">
</span>
</div>
<!-- Bosquejo -->
<div class="d-flex align-items-center">
<span style="font-weight:500; margin-left:5px; color:#498457;">
{% if bosquejo[5] %}
{{ _('Discurso público') }} {{ bosquejo[5] }}
{% else %}
{{ _('Sin asignar') }}
{% endif %}
</span>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="container-lg mt-1" align="center">
<h1>🤔</h1>
<h4 style="width:50%;">{{ _('¡Aún no tienes ningún bosquejo programado! Para empezar, programa el primer bosquejo haciendo clic en el botón "Nuevo".') }}</h4>
</div>

<a href="/mostrar_bosquejo/{{ bosquejo[0] }}">
<button class="btn mr-2 btn-sm" type="button">
<svg class="octicon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
<path d="M11.013 1.427a1.75 1.75 0 0 1 2.474 0l1.086 1.086a1.75 1.75 0 0 1 0 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 0 1-.927-.928l.929-3.25c.081-.286.235-.547.445-.758l8.61-8.61Zm.176 4.823L9.75 4.81l-6.286 6.287a.253.253 0 0 0-.064.108l-.558 1.953 1.953-.558a.253.253 0 0 0 .108-.064Zm1.238-3.763a.25.25 0 0 0-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 0 0 0-.354Z"></path>
</svg>
</button>
</a>
</div>
</div>
{% endfor %}
{% else %}
<div class="container-lg mt-4" align="center">
<h4 style="width:100%;">{{ _('¡Aún no tienes ningún discurso programado!') }}</h4>
</div>
{% endif %}
</div>
</div>
Expand All @@ -126,17 +161,6 @@ <h4 style="width:50%;">{{ _('¡Aún no tienes ningún bosquejo programado! Para
</div>

<script type="text/javascript">
function imprimirPagina() {
// Cambiar la visibilidad del elemento con id "elemento-oculto" a visible

document.getElementById("header-page").style.visibility = "visible";


window.print(); // Inicia el proceso de impresión

document.getElementById("header-page").style.visibility = "hidden";
}

// Obtener la fecha actual
var fechaActual = new Date();

Expand All @@ -147,6 +171,11 @@ <h4 style="width:50%;">{{ _('¡Aún no tienes ningún bosquejo programado! Para
// Insertar la fecha en el elemento <span> dentro del <h3>
document.getElementById("fecha").innerText = fechaFormateada;
</script>
<script type="text/javascript">
function imprimirPagina() {
window.print();
}
</script>
</body>

</html>
6 changes: 3 additions & 3 deletions templates/detalle-bosquejo.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<label class="" htmlFor="name">{{ _('Número del discurso') }}</label>
<br>
<input class="form-control" type="text" id="discurso_numero" name="discurso_numero" value="{{ bosquejo[5] }}" />
<input class="form-control" type="text" id="discurso_numero" name="discurso_numero" value="{{ bosquejo[5] if bosquejo[5] else '' }}" />
<div class="flash-messages mt-2">
<div class="flash flash-warn">
{% if columnas_con_uno %}
Expand Down Expand Up @@ -108,7 +108,7 @@
{% if bosquejo[4] == ''%}
<div class="Box-sc-g0xbh4-0 evdGSG mt-3 mb-3" style="display:inline-block;"><div class="Box-sc-g0xbh4-0 kbBARO"><svg aria-hidden="true" focusable="false" role="img" class="Octicon-sc-9kayk9-0 iOgZXa" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible;color: #9a6700;"><path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg><span class="Text-sc-17v1xeu-0 eqBkeL" style="color: #9a6700;">{{ _('Tip') }}</span><span class="Text-sc-17v1xeu-0 fUummm" style="display:inline-block;margin-left: 5px;color: #656d76;">{{ _('Si el orador va a salir a discursar, especifique la congregación') }}</span></div></div>
<p class="f5 mb-1">{{ _('Congregación:') }}</p>
<input class="form-control width-full" type="text" name="congregacion_visitar" id="congregacion_visitar" value="{{ bosquejo[11] }}" />
<input class="form-control width-full" type="text" name="congregacion_visitar" id="congregacion_visitar" value="{{ bosquejo[11] if bosquejo[11] else '' }}" />
{% endif %}
<!-- FIN DE LA NOTA -->
<div class="form-checkbox mb-0">
Expand All @@ -131,7 +131,7 @@
</div>
<p class="f5 mt-2 mb-n1">{{ _('Anotaciones:') }}</p>
<textarea class="form-control width-full mt-2" id="anotaciones" name="anotaciones"
placeholder="Anotaciones">{{ bosquejo[7] }}</textarea>
placeholder="Anotaciones">{{ bosquejo[7] if bosquejo[7] else '' }}</textarea>
<br><br>
<div class="form-actions">
<button type="submit" class="btn btn-primary">{{ _('Guardar') }}</button>
Expand Down
6 changes: 3 additions & 3 deletions templates/detalle-orador.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
<em class="highlight">{{ _('Aprobado para salir ') }}</em>
</label>
</div>
<div class="Box-sc-g0xbh4-0 evdGSG" style="display:inline-block;"><div class="Box-sc-g0xbh4-0 kbBARO"><svg aria-hidden="true" focusable="false" role="img" class="Octicon-sc-9kayk9-0 iOgZXa" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible;color: #9a6700;"><path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg><span class="Text-sc-17v1xeu-0 eqBkeL" style="color: #9a6700;">{{ _('Tip') }}</span><span class="Text-sc-17v1xeu-0 fUummm" style="display:inline-block;margin-left: 5px;color: #656d76;">{{ _('Si el orador es foráneo, especifique su congregación de origen') }}</span></div></div>
<input class="form-control width-full mt-2" type="text" name="congregacion" placeholder="{{ _('Congregación') }}" aria-label="congregacion" value="{{ orador[202] }}" />
<input class="form-control width-full mt-2" type="email" name="correo_electronico" placeholder="{{ _('Correo electrónico') }}" aria-label="Correo electrónico" value="{{ orador[4] }}" />
<div class="Box-sc-g0xbh4-0 evdGSG" style="display:inline-block;"><div class="Box-sc-g0xbh4-0 kbBARO"><svg aria-hidden="true" focusable="false" role="img" class="Octicon-sc-9kayk9-0 iOgZXa" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible;color: #9a6700;"><path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg><span class="Text-sc-17v1xeu-0 eqBkeL" style="color: #9a6700;">{{ _('Tip') }}</span><span class="Text-sc-17v1xeu-0 fUummm" style="display:inline-block;margin-left: 5px;color: #656d76;">{{ _('Si el orador es foráneo, especifique su congregación de origen. Si es Local, deje en blanco el campo Congregación.') }}</span></div></div>
<input class="form-control width-full mt-2" type="text" name="congregacion" placeholder="{{ _('Congregación') }}" aria-label="congregacion" value="{{ orador[202] if orador[202] else '' }}" />
<input class="form-control width-full mt-2" type="email" name="correo_electronico" placeholder="{{ _('Correo electrónico') }}" aria-label="Correo electrónico" value="{{ orador[4] if orador[4] else '' }}" />
<input class="form-control width-full mt-2" type="number" name="celular" placeholder="{{ _('Celular') }}" aria-label="Celular" value="{{ orador[5] }}" />
<input class="form-control width-full mt-2" type="number" name="telefono" placeholder="{{ _('Teléfono') }}" aria-label="Teléfono" value="{{ orador[6] }}" />
<div class="radio-group mt-2">
Expand Down
Loading

0 comments on commit 9a36779

Please sign in to comment.