Commit
路
7d0c16f
1
Parent(s):
c27a0e3
plantillas
Browse files- templates/ClientScript.html.j2 +38 -0
- templates/IndexDocument.html.j2 +84 -0
- templates/InternalModule.html.j2 +31 -0
- templates/MapReduce.html.j2 +78 -0
- templates/RESTlet.html.j2 +62 -0
- templates/ScheduledScript.html.j2 +67 -0
- templates/Suitelet.html.j2 +85 -0
- templates/UserEventScript.html.j2 +38 -0
- templates/base.html.j2 +173 -0
- templates/components.html.j2 +91 -0
templates/ClientScript.html.j2
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html.j2" %}
|
| 2 |
+
{% import "components.html.j2" as ui %}
|
| 3 |
+
|
| 4 |
+
{% block content %}
|
| 5 |
+
<h1>Client Script 路 {{ doc.metadata.description or doc.metadata.script_type }}</h1>
|
| 6 |
+
<p class="muted">Eventos de cliente y validaciones en UI.</p>
|
| 7 |
+
|
| 8 |
+
{{ ui.metadata_block(doc.metadata) }}
|
| 9 |
+
{{ ui.summary_block(doc.summary) }}
|
| 10 |
+
|
| 11 |
+
{% set lifecycle = doc.lifecycle or {} %}
|
| 12 |
+
{% if lifecycle %}
|
| 13 |
+
<div class="section">
|
| 14 |
+
<h2>Lifecycle Hooks</h2>
|
| 15 |
+
{% for hook, description in lifecycle.items() if description %}
|
| 16 |
+
<h3>{{ hook }}</h3>
|
| 17 |
+
<p>{{ description }}</p>
|
| 18 |
+
{% endfor %}
|
| 19 |
+
</div>
|
| 20 |
+
{% endif %}
|
| 21 |
+
|
| 22 |
+
{{ ui.table_block("Campos controlados", doc.fields, [
|
| 23 |
+
{"field": "id", "title": "ID"},
|
| 24 |
+
{"field": "label", "title": "Etiqueta"},
|
| 25 |
+
{"field": "type", "title": "Tipo"},
|
| 26 |
+
{"field": "default", "title": "Valor por defecto"}
|
| 27 |
+
]) }}
|
| 28 |
+
|
| 29 |
+
{{ ui.list_block("Validaciones", doc.validations) }}
|
| 30 |
+
|
| 31 |
+
{% if doc.user_interaction %}
|
| 32 |
+
{{ ui.list_block("Mensajes al usuario", doc.user_interaction.messages) }}
|
| 33 |
+
{{ ui.list_block("Cambios autom谩ticos", doc.user_interaction.automatic_changes) }}
|
| 34 |
+
{% endif %}
|
| 35 |
+
|
| 36 |
+
{{ ui.list_block("Side effects", doc.side_effects) }}
|
| 37 |
+
|
| 38 |
+
{% endblock %}
|
templates/IndexDocument.html.j2
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="es">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<title>脥ndice de Formas 路 {{ job_id }}</title>
|
| 6 |
+
<style>
|
| 7 |
+
body {
|
| 8 |
+
font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Noto Sans", sans-serif;
|
| 9 |
+
color: #0f172a;
|
| 10 |
+
margin: 28px;
|
| 11 |
+
font-size: 12px;
|
| 12 |
+
}
|
| 13 |
+
h1 {
|
| 14 |
+
font-size: 24px;
|
| 15 |
+
text-transform: uppercase;
|
| 16 |
+
letter-spacing: 0.06em;
|
| 17 |
+
margin-bottom: 4px;
|
| 18 |
+
}
|
| 19 |
+
h2 {
|
| 20 |
+
color: #475569;
|
| 21 |
+
font-size: 14px;
|
| 22 |
+
margin-top: 4px;
|
| 23 |
+
margin-bottom: 16px;
|
| 24 |
+
}
|
| 25 |
+
table {
|
| 26 |
+
width: 100%;
|
| 27 |
+
border-collapse: collapse;
|
| 28 |
+
font-size: 11px;
|
| 29 |
+
}
|
| 30 |
+
th,
|
| 31 |
+
td {
|
| 32 |
+
border: 1px solid #e2e8f0;
|
| 33 |
+
padding: 6px 8px;
|
| 34 |
+
text-align: left;
|
| 35 |
+
vertical-align: top;
|
| 36 |
+
}
|
| 37 |
+
th {
|
| 38 |
+
text-transform: uppercase;
|
| 39 |
+
letter-spacing: 0.08em;
|
| 40 |
+
font-size: 10px;
|
| 41 |
+
background: #f1f5f9;
|
| 42 |
+
}
|
| 43 |
+
tbody tr:nth-child(odd) {
|
| 44 |
+
background: #f8fafc;
|
| 45 |
+
}
|
| 46 |
+
.muted {
|
| 47 |
+
color: #94a3b8;
|
| 48 |
+
font-size: 10px;
|
| 49 |
+
text-transform: uppercase;
|
| 50 |
+
letter-spacing: 0.08em;
|
| 51 |
+
margin-top: 24px;
|
| 52 |
+
}
|
| 53 |
+
</style>
|
| 54 |
+
</head>
|
| 55 |
+
<body>
|
| 56 |
+
<h1>脥ndice de Formas</h1>
|
| 57 |
+
<h2>Job {{ job_id }} 路 {{ entries|length }} documentos</h2>
|
| 58 |
+
<table>
|
| 59 |
+
<thead>
|
| 60 |
+
<tr>
|
| 61 |
+
<th>#</th>
|
| 62 |
+
<th>Archivo</th>
|
| 63 |
+
<th>T铆tulo</th>
|
| 64 |
+
<th>Tipo</th>
|
| 65 |
+
<th>Descripci贸n</th>
|
| 66 |
+
<th>SuiteScript</th>
|
| 67 |
+
</tr>
|
| 68 |
+
</thead>
|
| 69 |
+
<tbody>
|
| 70 |
+
{% for entry in entries %}
|
| 71 |
+
<tr>
|
| 72 |
+
<td>{{ loop.index }}</td>
|
| 73 |
+
<td>{{ entry.path }}</td>
|
| 74 |
+
<td>{{ entry.title }}</td>
|
| 75 |
+
<td>{{ entry.script_type or "-" }}</td>
|
| 76 |
+
<td>{{ entry.description or "Sin descripci贸n" }}</td>
|
| 77 |
+
<td>{{ entry.api_version or "-" }}</td>
|
| 78 |
+
</tr>
|
| 79 |
+
{% endfor %}
|
| 80 |
+
</tbody>
|
| 81 |
+
</table>
|
| 82 |
+
<p class="muted">Generado autom谩ticamente {{ generated_at }}</p>
|
| 83 |
+
</body>
|
| 84 |
+
</html>
|
templates/InternalModule.html.j2
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html.j2" %}
|
| 2 |
+
{% import "components.html.j2" as ui %}
|
| 3 |
+
|
| 4 |
+
{% block content %}
|
| 5 |
+
<h1>{{ doc.metadata.script_type or "M贸dulo interno" }} 路 {{ doc.metadata.description or "Documentaci贸n" }}</h1>
|
| 6 |
+
<p class="muted">Referencia funcional del m贸dulo compartido.</p>
|
| 7 |
+
|
| 8 |
+
{{ ui.metadata_block(doc.metadata) }}
|
| 9 |
+
{{ ui.summary_block(doc.summary) }}
|
| 10 |
+
|
| 11 |
+
{% if doc.api %}
|
| 12 |
+
<div class="section">
|
| 13 |
+
<h2>API p煤blica</h2>
|
| 14 |
+
{% for fn in doc.api %}
|
| 15 |
+
<h3>{{ fn.name }}</h3>
|
| 16 |
+
<p>{{ fn.description }}</p>
|
| 17 |
+
{{ ui.table_block("Par谩metros", fn.parameters, [
|
| 18 |
+
{"field": "name", "title": "Nombre"},
|
| 19 |
+
{"field": "description", "title": "Descripci贸n"},
|
| 20 |
+
{"field": "type", "title": "Tipo"}
|
| 21 |
+
]) }}
|
| 22 |
+
{{ ui.list_block("Efectos colaterales", fn.side_effects) }}
|
| 23 |
+
{{ ui.logic_block("Retorna", fn.returns) }}
|
| 24 |
+
{% endfor %}
|
| 25 |
+
</div>
|
| 26 |
+
{% endif %}
|
| 27 |
+
{{ ui.list_block("Efectos colaterales", doc.side_effects) }}
|
| 28 |
+
{{ ui.list_block("Errores", doc.errors) }}
|
| 29 |
+
{{ ui.logic_block("Detalles de implementaci贸n", doc.logic) }}
|
| 30 |
+
|
| 31 |
+
{% endblock %}
|
templates/MapReduce.html.j2
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html.j2" %}
|
| 2 |
+
{% import "components.html.j2" as ui %}
|
| 3 |
+
|
| 4 |
+
{% block content %}
|
| 5 |
+
<h1>Map/Reduce 路 {{ doc.metadata.description or doc.metadata.script_type }}</h1>
|
| 6 |
+
<p class="muted">Pipeline de procesamiento por lotes.</p>
|
| 7 |
+
|
| 8 |
+
{{ ui.metadata_block(doc.metadata) }}
|
| 9 |
+
{{ ui.summary_block(doc.summary) }}
|
| 10 |
+
|
| 11 |
+
{% if doc.getInputData %}
|
| 12 |
+
<div class="section">
|
| 13 |
+
<h2>getInputData</h2>
|
| 14 |
+
<p>{{ doc.getInputData.details }}</p>
|
| 15 |
+
{{ ui.table_block("Filtros", doc.getInputData.filters, [
|
| 16 |
+
{"field": "field", "title": "Campo"},
|
| 17 |
+
{"field": "operator", "title": "Operador"},
|
| 18 |
+
{"field": "value", "title": "Valor"}
|
| 19 |
+
]) }}
|
| 20 |
+
{{ ui.table_block("Columnas", doc.getInputData.columns, [
|
| 21 |
+
{"field": "name", "title": "Nombre"},
|
| 22 |
+
{"field": "label", "title": "Etiqueta"}
|
| 23 |
+
]) }}
|
| 24 |
+
</div>
|
| 25 |
+
{% endif %}
|
| 26 |
+
|
| 27 |
+
{% if doc.map %}
|
| 28 |
+
<div class="section">
|
| 29 |
+
<h2>map</h2>
|
| 30 |
+
<p>{{ doc.map.logic }}</p>
|
| 31 |
+
{{ ui.list_block("Campos utilizados", doc.map.fields_used) }}
|
| 32 |
+
{{ ui.table_block("Operaciones en registros", doc.map.record_operations, [
|
| 33 |
+
{"field": "type", "title": "Operaci贸n"},
|
| 34 |
+
{"field": "recordType", "title": "Record"},
|
| 35 |
+
{"field": "fields", "title": "Campos"}
|
| 36 |
+
]) }}
|
| 37 |
+
</div>
|
| 38 |
+
{% endif %}
|
| 39 |
+
|
| 40 |
+
{% if doc.reduce %}
|
| 41 |
+
<div class="section">
|
| 42 |
+
<h2>reduce</h2>
|
| 43 |
+
<p>{{ doc.reduce.logic }}</p>
|
| 44 |
+
{{ ui.list_block("Agregaciones", doc.reduce.aggregations) }}
|
| 45 |
+
{{ ui.table_block("Operaciones en registros", doc.reduce.record_operations, [
|
| 46 |
+
{"field": "type", "title": "Operaci贸n"},
|
| 47 |
+
{"field": "recordType", "title": "Record"},
|
| 48 |
+
{"field": "fields", "title": "Campos"}
|
| 49 |
+
]) }}
|
| 50 |
+
</div>
|
| 51 |
+
{% endif %}
|
| 52 |
+
|
| 53 |
+
{% if doc.summarize %}
|
| 54 |
+
<div class="section">
|
| 55 |
+
<h2>summarize</h2>
|
| 56 |
+
<p>{{ doc.summarize.usage }}</p>
|
| 57 |
+
{{ ui.list_block("Errores", doc.summarize.errors) }}
|
| 58 |
+
{{ ui.list_block("Acciones finales", doc.summarize.final_actions) }}
|
| 59 |
+
</div>
|
| 60 |
+
{% endif %}
|
| 61 |
+
|
| 62 |
+
{{ ui.table_block("B煤squedas utilizadas", doc.searches, [
|
| 63 |
+
{"field": "id", "title": "ID"},
|
| 64 |
+
{"field": "filters", "title": "Filtros"},
|
| 65 |
+
{"field": "columns", "title": "Columnas"}
|
| 66 |
+
]) }}
|
| 67 |
+
{{ ui.table_block("Operaciones con registros", doc.records, [
|
| 68 |
+
{"field": "type", "title": "Operaci贸n"},
|
| 69 |
+
{"field": "recordType", "title": "Record"},
|
| 70 |
+
{"field": "fields", "title": "Campos"}
|
| 71 |
+
]) }}
|
| 72 |
+
{{ ui.list_block("Side effects", doc.side_effects) }}
|
| 73 |
+
{{ ui.table_block("Errores", doc.errors, [
|
| 74 |
+
{"field": "location", "title": "Ubicaci贸n"},
|
| 75 |
+
{"field": "description", "title": "Descripci贸n"}
|
| 76 |
+
]) }}
|
| 77 |
+
|
| 78 |
+
{% endblock %}
|
templates/RESTlet.html.j2
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html.j2" %}
|
| 2 |
+
{% import "components.html.j2" as ui %}
|
| 3 |
+
|
| 4 |
+
{% block content %}
|
| 5 |
+
<h1>RESTlet 路 {{ doc.metadata.description or doc.metadata.script_type }}</h1>
|
| 6 |
+
<p class="muted">Documentaci贸n t茅cnica del servicio RESTlet.</p>
|
| 7 |
+
|
| 8 |
+
{{ ui.metadata_block(doc.metadata) }}
|
| 9 |
+
{{ ui.summary_block(doc.summary) }}
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
{% set endpoints = doc.endpoints or {} %}
|
| 13 |
+
{% if endpoints %}
|
| 14 |
+
<div class="section">
|
| 15 |
+
<h2>Endpoints</h2>
|
| 16 |
+
{% for method, definition in endpoints.items() if definition %}
|
| 17 |
+
<h3>{{ method|upper }}</h3>
|
| 18 |
+
{% if definition.description %}<p>{{ definition.description }}</p>{% endif %}
|
| 19 |
+
{% set inputs = definition.inputs or {} %}
|
| 20 |
+
{{ ui.table_block("URL params", inputs.url_params, [
|
| 21 |
+
{"field": "name", "title": "Nombre"},
|
| 22 |
+
{"field": "description", "title": "Descripci贸n"},
|
| 23 |
+
{"field": "type", "title": "Tipo"}
|
| 24 |
+
]) }}
|
| 25 |
+
{{ ui.table_block("Query string", inputs.query_string, [
|
| 26 |
+
{"field": "name", "title": "Nombre"},
|
| 27 |
+
{"field": "description", "title": "Descripci贸n"},
|
| 28 |
+
{"field": "type", "title": "Tipo"}
|
| 29 |
+
]) }}
|
| 30 |
+
{{ ui.table_block("Body", inputs.body_fields, [
|
| 31 |
+
{"field": "name", "title": "Nombre"},
|
| 32 |
+
{"field": "description", "title": "Descripci贸n"},
|
| 33 |
+
{"field": "type", "title": "Tipo"}
|
| 34 |
+
]) }}
|
| 35 |
+
{{ ui.logic_block("L贸gica", definition.logic) }}
|
| 36 |
+
{{ ui.table_block("Operaciones sobre registros", definition.record_operations, [
|
| 37 |
+
{"field": "type", "title": "Operaci贸n"},
|
| 38 |
+
{"field": "recordType", "title": "Record"},
|
| 39 |
+
{"field": "details", "title": "Detalles"}
|
| 40 |
+
]) }}
|
| 41 |
+
{{ ui.table_block("B煤squedas", definition.searches, [
|
| 42 |
+
{"field": "id", "title": "ID"},
|
| 43 |
+
{"field": "filters", "title": "Filtros"},
|
| 44 |
+
{"field": "columns", "title": "Columnas"}
|
| 45 |
+
]) }}
|
| 46 |
+
{{ ui.logic_block("Salida", definition.output) }}
|
| 47 |
+
|
| 48 |
+
{{ ui.list_block("Validaciones", definition.validations) }}
|
| 49 |
+
{{ ui.list_block("Side effects", definition.side_effects) }}
|
| 50 |
+
{% endfor %}
|
| 51 |
+
</div>
|
| 52 |
+
{% endif %}
|
| 53 |
+
|
| 54 |
+
{{ ui.list_block("Validaciones globales", doc.validations) }}
|
| 55 |
+
{{ ui.table_block("Errores", doc.errors, [
|
| 56 |
+
{"field": "location", "title": "Ubicaci贸n"},
|
| 57 |
+
{"field": "description", "title": "Descripci贸n"},
|
| 58 |
+
{"field": "throws", "title": "Excepci贸n"}
|
| 59 |
+
]) }}
|
| 60 |
+
{{ ui.list_block("Side effects globales", doc.side_effects) }}
|
| 61 |
+
|
| 62 |
+
{% endblock %}
|
templates/ScheduledScript.html.j2
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html.j2" %}
|
| 2 |
+
{% import "components.html.j2" as ui %}
|
| 3 |
+
|
| 4 |
+
{% block content %}
|
| 5 |
+
<h1>Scheduled Script 路 {{ doc.metadata.description or doc.metadata.script_type }}</h1>
|
| 6 |
+
<p class="muted">Procesos peri贸dicos y lotes programados.</p>
|
| 7 |
+
|
| 8 |
+
{{ ui.metadata_block(doc.metadata) }}
|
| 9 |
+
{{ ui.summary_block(doc.summary) }}
|
| 10 |
+
|
| 11 |
+
{% if doc.input_data %}
|
| 12 |
+
<div class="section">
|
| 13 |
+
<h2>Entrada</h2>
|
| 14 |
+
<p>{{ doc.input_data.details }}</p>
|
| 15 |
+
{{ ui.table_block("Par谩metros", doc.input_data.parameters, [
|
| 16 |
+
{"field": "id", "title": "Par谩metro"},
|
| 17 |
+
{"field": "description", "title": "Descripci贸n"}
|
| 18 |
+
]) }}
|
| 19 |
+
{{ ui.table_block("Filtros", doc.input_data.filters, [
|
| 20 |
+
{"field": "field", "title": "Campo"},
|
| 21 |
+
{"field": "operator", "title": "Operador"},
|
| 22 |
+
{"field": "value", "title": "Valor"}
|
| 23 |
+
]) }}
|
| 24 |
+
{{ ui.table_block("Columnas", doc.input_data.columns, [
|
| 25 |
+
{"field": "name", "title": "Nombre"},
|
| 26 |
+
{"field": "label", "title": "Etiqueta"}
|
| 27 |
+
]) }}
|
| 28 |
+
</div>
|
| 29 |
+
{% endif %}
|
| 30 |
+
|
| 31 |
+
{% if doc.logic %}
|
| 32 |
+
<div class="section">
|
| 33 |
+
<h2>L贸gica</h2>
|
| 34 |
+
<p>{{ doc.logic.steps }}</p>
|
| 35 |
+
{{ ui.list_block("Bucles", doc.logic.loops) }}
|
| 36 |
+
{{ ui.list_block("Condiciones", doc.logic.conditions) }}
|
| 37 |
+
</div>
|
| 38 |
+
{% endif %}
|
| 39 |
+
|
| 40 |
+
{{ ui.table_block("Operaciones con registros", doc.record_operations, [
|
| 41 |
+
{"field": "type", "title": "Operaci贸n"},
|
| 42 |
+
{"field": "record", "title": "Record"},
|
| 43 |
+
{"field": "details", "title": "Detalles"}
|
| 44 |
+
]) }}
|
| 45 |
+
|
| 46 |
+
{{ ui.table_block("B煤squedas", doc.searches, [
|
| 47 |
+
{"field": "type", "title": "Tipo"},
|
| 48 |
+
{"field": "filters", "title": "Filtros"},
|
| 49 |
+
{"field": "columns", "title": "Columnas"}
|
| 50 |
+
]) }}
|
| 51 |
+
|
| 52 |
+
{% if doc.governance %}
|
| 53 |
+
<div class="section">
|
| 54 |
+
<h2>Governance</h2>
|
| 55 |
+
<p>Usage checks: {{ doc.governance.usage_checks }}</p>
|
| 56 |
+
<p>Yielding: {{ doc.governance.yielding }}</p>
|
| 57 |
+
<p>Task rescheduling: {{ doc.governance.task_rescheduling }}</p>
|
| 58 |
+
</div>
|
| 59 |
+
{% endif %}
|
| 60 |
+
|
| 61 |
+
{{ ui.table_block("Errores", doc.errors, [
|
| 62 |
+
{"field": "scenario", "title": "Escenario"},
|
| 63 |
+
{"field": "handling", "title": "Manejo"}
|
| 64 |
+
]) }}
|
| 65 |
+
{{ ui.list_block("Side effects", doc.side_effects) }}
|
| 66 |
+
|
| 67 |
+
{% endblock %}
|
templates/Suitelet.html.j2
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html.j2" %}
|
| 2 |
+
{% import "components.html.j2" as ui %}
|
| 3 |
+
|
| 4 |
+
{% block content %}
|
| 5 |
+
<h1>Suitelet 路 {{ doc.metadata.description or doc.metadata.script_type }}</h1>
|
| 6 |
+
<p class="muted">Procesos de UI y rutas Suitelet.</p>
|
| 7 |
+
|
| 8 |
+
{{ ui.metadata_block(doc.metadata) }}
|
| 9 |
+
{{ ui.summary_block(doc.summary) }}
|
| 10 |
+
|
| 11 |
+
{% if doc.flow %}
|
| 12 |
+
<div class="section">
|
| 13 |
+
<h2>Flujo de Ejecuci贸n</h2>
|
| 14 |
+
{% if doc.flow.get %}
|
| 15 |
+
<h3>GET</h3>
|
| 16 |
+
<p>{{ doc.flow.get }}</p>
|
| 17 |
+
{% endif %}
|
| 18 |
+
{% if doc.flow.post %}
|
| 19 |
+
<h3>POST</h3>
|
| 20 |
+
<p>{{ doc.flow.post }}</p>
|
| 21 |
+
{% endif %}
|
| 22 |
+
</div>
|
| 23 |
+
{% endif %}
|
| 24 |
+
|
| 25 |
+
{% if doc.inputs %}
|
| 26 |
+
{{ ui.table_block("Par谩metros GET", doc.inputs.get_parameters, [
|
| 27 |
+
{"field": "name", "title": "Nombre"},
|
| 28 |
+
{"field": "description", "title": "Descripci贸n"},
|
| 29 |
+
{"field": "type", "title": "Tipo"}
|
| 30 |
+
]) }}
|
| 31 |
+
{{ ui.table_block("Par谩metros POST", doc.inputs.post_parameters, [
|
| 32 |
+
{"field": "name", "title": "Nombre"},
|
| 33 |
+
{"field": "description", "title": "Descripci贸n"},
|
| 34 |
+
{"field": "type", "title": "Tipo"}
|
| 35 |
+
]) }}
|
| 36 |
+
{{ ui.list_block("Validaciones", doc.inputs.validations) }}
|
| 37 |
+
{% endif %}
|
| 38 |
+
|
| 39 |
+
{% if doc.form %}
|
| 40 |
+
{{ ui.table_block("Campos del formulario", doc.form.fields, [
|
| 41 |
+
{"field": "id", "title": "ID"},
|
| 42 |
+
{"field": "label", "title": "Etiqueta"},
|
| 43 |
+
{"field": "type", "title": "Tipo"},
|
| 44 |
+
{"field": "default", "title": "Valor"}
|
| 45 |
+
]) }}
|
| 46 |
+
{{ ui.table_block("Grupos de campos", doc.form.field_groups, [
|
| 47 |
+
{"field": "id", "title": "ID"},
|
| 48 |
+
{"field": "label", "title": "Etiqueta"},
|
| 49 |
+
{"field": "fields", "title": "Campos"}
|
| 50 |
+
]) }}
|
| 51 |
+
{{ ui.table_block("Botones", doc.form.buttons, [
|
| 52 |
+
{"field": "id", "title": "ID"},
|
| 53 |
+
{"field": "label", "title": "Etiqueta"},
|
| 54 |
+
{"field": "action", "title": "Acci贸n"}
|
| 55 |
+
]) }}
|
| 56 |
+
{% endif %}
|
| 57 |
+
|
| 58 |
+
{% if doc.logic %}
|
| 59 |
+
{{ ui.table_block("B煤squedas", doc.logic.searches, [
|
| 60 |
+
{"field": "type", "title": "Tipo"},
|
| 61 |
+
{"field": "filters", "title": "Filtros"},
|
| 62 |
+
{"field": "columns", "title": "Columnas"}
|
| 63 |
+
]) }}
|
| 64 |
+
{{ ui.table_block("Operaciones con registros", doc.logic.record_operations, [
|
| 65 |
+
{"field": "type", "title": "Operaci贸n"},
|
| 66 |
+
{"field": "record", "title": "Record"},
|
| 67 |
+
{"field": "details", "title": "Detalles"}
|
| 68 |
+
]) }}
|
| 69 |
+
{{ ui.list_block("Side effects", doc.logic.side_effects) }}
|
| 70 |
+
{% endif %}
|
| 71 |
+
|
| 72 |
+
{% if doc.errors is mapping %}
|
| 73 |
+
{{ ui.table_block("Errores", doc.errors.explicit_checks, [
|
| 74 |
+
{"field": "location", "title": "Ubicaci贸n"},
|
| 75 |
+
{"field": "description", "title": "Descripci贸n"}
|
| 76 |
+
]) }}
|
| 77 |
+
{{ ui.list_block("Manejo de excepciones", doc.errors.exception_handling) }}
|
| 78 |
+
{% else %}
|
| 79 |
+
{{ ui.table_block("Errores", doc.errors, [
|
| 80 |
+
{"field": "location", "title": "Ubicaci贸n"},
|
| 81 |
+
{"field": "description", "title": "Descripci贸n"}
|
| 82 |
+
]) }}
|
| 83 |
+
{% endif %}
|
| 84 |
+
|
| 85 |
+
{% endblock %}
|
templates/UserEventScript.html.j2
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends "base.html.j2" %}
|
| 2 |
+
{% import "components.html.j2" as ui %}
|
| 3 |
+
|
| 4 |
+
{% block content %}
|
| 5 |
+
<h1>User Event 路 {{ doc.metadata.description or doc.metadata.script_type }}</h1>
|
| 6 |
+
<p class="muted">Eventos server-side sobre records.</p>
|
| 7 |
+
|
| 8 |
+
{{ ui.metadata_block(doc.metadata) }}
|
| 9 |
+
{{ ui.summary_block(doc.summary) }}
|
| 10 |
+
|
| 11 |
+
{% if doc.events %}
|
| 12 |
+
<div class="section">
|
| 13 |
+
<h2>Eventos implementados</h2>
|
| 14 |
+
{% for name, description in doc.events.items() if description %}
|
| 15 |
+
<h3>{{ name }}</h3>
|
| 16 |
+
<p>{{ description }}</p>
|
| 17 |
+
{% endfor %}
|
| 18 |
+
</div>
|
| 19 |
+
{% endif %}
|
| 20 |
+
|
| 21 |
+
{{ ui.list_block("Validaciones", doc.validations) }}
|
| 22 |
+
{{ ui.table_block("B煤squedas", doc.searches, [
|
| 23 |
+
{"field": "type", "title": "Tipo"},
|
| 24 |
+
{"field": "filters", "title": "Filtros"},
|
| 25 |
+
{"field": "columns", "title": "Columnas"}
|
| 26 |
+
]) }}
|
| 27 |
+
{{ ui.table_block("Operaciones en registros", doc.record_operations, [
|
| 28 |
+
{"field": "type", "title": "Operaci贸n"},
|
| 29 |
+
{"field": "record", "title": "Record"},
|
| 30 |
+
{"field": "details", "title": "Detalles"}
|
| 31 |
+
]) }}
|
| 32 |
+
{{ ui.list_block("Side effects", doc.side_effects) }}
|
| 33 |
+
{{ ui.table_block("Errores", doc.errors, [
|
| 34 |
+
{"field": "location", "title": "Ubicaci贸n"},
|
| 35 |
+
{"field": "description", "title": "Descripci贸n"}
|
| 36 |
+
]) }}
|
| 37 |
+
|
| 38 |
+
{% endblock %}
|
templates/base.html.j2
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="es">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<title>{{ doc.metadata.description or "Documentaci贸n de Script" }}</title>
|
| 6 |
+
|
| 7 |
+
<style>
|
| 8 |
+
/* ----------------------------------------
|
| 9 |
+
CONFIGURACI脫N GLOBAL / A4 / M脕RGENES
|
| 10 |
+
----------------------------------------- */
|
| 11 |
+
@page {
|
| 12 |
+
size: A4;
|
| 13 |
+
margin: 2.54cm; /* 1 pulgada = 2.54 cm */
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
body {
|
| 17 |
+
font-family: "Segoe UI", Roboto, Arial, sans-serif;
|
| 18 |
+
color: #1f2937;
|
| 19 |
+
font-size: 14px;
|
| 20 |
+
line-height: 1.65;
|
| 21 |
+
margin: 0;
|
| 22 |
+
background: #ffffff;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.page {
|
| 26 |
+
/* contenedor para PDFKit */
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
/* ----------------------------------------
|
| 30 |
+
TITULOS
|
| 31 |
+
----------------------------------------- */
|
| 32 |
+
h1, h2, h3, h4 {
|
| 33 |
+
font-family: "Segoe UI", Roboto, Arial, sans-serif;
|
| 34 |
+
margin-bottom: 8px;
|
| 35 |
+
font-weight: 600;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
h1 {
|
| 39 |
+
font-size: 26px;
|
| 40 |
+
color: #b91c1c;
|
| 41 |
+
letter-spacing: 0.04em;
|
| 42 |
+
text-transform: uppercase;
|
| 43 |
+
margin-top: 0;
|
| 44 |
+
border-bottom: 2px solid #e5e7eb;
|
| 45 |
+
padding-bottom: 8px;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
h2 {
|
| 49 |
+
font-size: 20px;
|
| 50 |
+
color: #374151;
|
| 51 |
+
border-left: 4px solid #9b1c1c;
|
| 52 |
+
padding-left: 10px;
|
| 53 |
+
margin-top: 28px;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
h3 {
|
| 57 |
+
font-size: 16px;
|
| 58 |
+
color: #4b5563;
|
| 59 |
+
margin-top: 20px;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
h4 {
|
| 63 |
+
font-size: 14px;
|
| 64 |
+
color: #6b7280;
|
| 65 |
+
margin-top: 14px;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
p {
|
| 69 |
+
margin: 6px 0 12px;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.muted {
|
| 73 |
+
color: #9ca3af;
|
| 74 |
+
font-size: 12px;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.section {
|
| 78 |
+
margin-top: 22px;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
/* ----------------------------------------
|
| 82 |
+
TARJETAS
|
| 83 |
+
----------------------------------------- */
|
| 84 |
+
.card-grid {
|
| 85 |
+
display: grid;
|
| 86 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 87 |
+
gap: 12px;
|
| 88 |
+
margin: 16px 0;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.card {
|
| 92 |
+
border: 1px solid #e5e7eb;
|
| 93 |
+
border-radius: 6px;
|
| 94 |
+
padding: 14px 16px;
|
| 95 |
+
background: #f9fafb;
|
| 96 |
+
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.06);
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
/* ----------------------------------------
|
| 100 |
+
TABLAS
|
| 101 |
+
----------------------------------------- */
|
| 102 |
+
table {
|
| 103 |
+
width: 100%;
|
| 104 |
+
border-collapse: collapse;
|
| 105 |
+
margin: 16px 0 20px;
|
| 106 |
+
font-size: 13px;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
th, td {
|
| 110 |
+
border: 1px solid #e5e7eb;
|
| 111 |
+
padding: 8px 10px;
|
| 112 |
+
vertical-align: top;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
th {
|
| 116 |
+
background: #f3f4f6;
|
| 117 |
+
font-weight: 600;
|
| 118 |
+
text-transform: uppercase;
|
| 119 |
+
font-size: 11px;
|
| 120 |
+
letter-spacing: 0.05em;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
tr:nth-child(even) td {
|
| 124 |
+
background: #fafafa;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
/* ----------------------------------------
|
| 128 |
+
LISTAS
|
| 129 |
+
----------------------------------------- */
|
| 130 |
+
ul {
|
| 131 |
+
padding-left: 22px;
|
| 132 |
+
margin: 8px 0 10px;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
/* ----------------------------------------
|
| 136 |
+
PILLS
|
| 137 |
+
----------------------------------------- */
|
| 138 |
+
.pill {
|
| 139 |
+
display: inline-block;
|
| 140 |
+
padding: 4px 10px;
|
| 141 |
+
border-radius: 999px;
|
| 142 |
+
background: #e5e7eb;
|
| 143 |
+
font-size: 11px;
|
| 144 |
+
margin-right: 4px;
|
| 145 |
+
text-transform: uppercase;
|
| 146 |
+
letter-spacing: 0.05em;
|
| 147 |
+
color: #374151;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
/* ----------------------------------------
|
| 151 |
+
SUMMARY BOX
|
| 152 |
+
----------------------------------------- */
|
| 153 |
+
.summary-box {
|
| 154 |
+
border-left: 4px solid #0284c7;
|
| 155 |
+
background: #eff6ff;
|
| 156 |
+
padding: 12px 16px;
|
| 157 |
+
border-radius: 6px;
|
| 158 |
+
font-size: 13px;
|
| 159 |
+
margin: 14px 0 18px;
|
| 160 |
+
}
|
| 161 |
+
</style>
|
| 162 |
+
</head>
|
| 163 |
+
|
| 164 |
+
<body>
|
| 165 |
+
<div class="page">
|
| 166 |
+
{% block content %}{% endblock %}
|
| 167 |
+
|
| 168 |
+
<p class="muted" style="margin-top: 32px; text-align:right;">
|
| 169 |
+
Generado autom谩ticamente {{ generated_at }}
|
| 170 |
+
</p>
|
| 171 |
+
</div>
|
| 172 |
+
</body>
|
| 173 |
+
</html>
|
templates/components.html.j2
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% macro metadata_block(metadata) -%}
|
| 2 |
+
{% if metadata %}
|
| 3 |
+
<div class="section">
|
| 4 |
+
<h2>Metadatos</h2>
|
| 5 |
+
<div class="card-grid">
|
| 6 |
+
{% if metadata.script_type %}<div class="card"><strong>Tipo:</strong> {{ metadata.script_type }}</div>{% endif %}
|
| 7 |
+
{% if metadata.suitescript_version %}<div class="card"><strong>SuiteScript:</strong> {{ metadata.suitescript_version }}</div>{% endif %}
|
| 8 |
+
{% if metadata.language %}<div class="card"><strong>Lenguaje:</strong> {{ metadata.language }}</div>{% endif %}
|
| 9 |
+
{% if metadata.module_type %}<div class="card"><strong>M贸dulo:</strong> {{ metadata.module_type }}</div>{% endif %}
|
| 10 |
+
</div>
|
| 11 |
+
{% if metadata.description %}<p>{{ metadata.description }}</p>{% endif %}
|
| 12 |
+
{% if metadata.dependencies %}
|
| 13 |
+
<p class="muted">Dependencias:
|
| 14 |
+
{% for dep in metadata.dependencies %}
|
| 15 |
+
<span class="pill">{{ dep }}</span>
|
| 16 |
+
{% endfor %}
|
| 17 |
+
</p>
|
| 18 |
+
{% endif %}
|
| 19 |
+
</div>
|
| 20 |
+
{% endif %}
|
| 21 |
+
{%- endmacro %}
|
| 22 |
+
|
| 23 |
+
{% macro summary_block(text) -%}
|
| 24 |
+
{% if text %}
|
| 25 |
+
<div class="section">
|
| 26 |
+
<h2>Resumen Ejecutivo</h2>
|
| 27 |
+
<div class="summary-box">{{ text }}</div>
|
| 28 |
+
</div>
|
| 29 |
+
{% endif %}
|
| 30 |
+
{%- endmacro %}
|
| 31 |
+
|
| 32 |
+
{% macro list_block(title, items) -%}
|
| 33 |
+
{% if items %}
|
| 34 |
+
<div class="section">
|
| 35 |
+
<h2>{{ title }}</h2>
|
| 36 |
+
<ul>
|
| 37 |
+
{% for item in items %}
|
| 38 |
+
<li>
|
| 39 |
+
{% if item is mapping %}
|
| 40 |
+
{% for key, value in item.items() %}
|
| 41 |
+
<strong>{{ key|replace('_',' ')|title }}:</strong> {{ value }}{% if not loop.last %}; {% endif %}
|
| 42 |
+
{% endfor %}
|
| 43 |
+
{% else %}
|
| 44 |
+
{{ item }}
|
| 45 |
+
{% endif %}
|
| 46 |
+
</li>
|
| 47 |
+
{% endfor %}
|
| 48 |
+
</ul>
|
| 49 |
+
</div>
|
| 50 |
+
{% endif %}
|
| 51 |
+
{%- endmacro %}
|
| 52 |
+
|
| 53 |
+
{% macro table_block(title, rows, columns) -%}
|
| 54 |
+
{% if rows %}
|
| 55 |
+
<div class="section">
|
| 56 |
+
<h2>{{ title }}</h2>
|
| 57 |
+
<table>
|
| 58 |
+
<thead>
|
| 59 |
+
<tr>
|
| 60 |
+
{% for column in columns %}
|
| 61 |
+
<th>{{ column.title }}</th>
|
| 62 |
+
{% endfor %}
|
| 63 |
+
</tr>
|
| 64 |
+
</thead>
|
| 65 |
+
<tbody>
|
| 66 |
+
{% for row in rows %}
|
| 67 |
+
<tr>
|
| 68 |
+
{% for column in columns %}
|
| 69 |
+
{% set value = row.get(column.field) %}
|
| 70 |
+
{% if value is sequence and value is not string %}
|
| 71 |
+
<td>{{ value|join(", ") }}</td>
|
| 72 |
+
{% else %}
|
| 73 |
+
<td>{{ value or "" }}</td>
|
| 74 |
+
{% endif %}
|
| 75 |
+
{% endfor %}
|
| 76 |
+
</tr>
|
| 77 |
+
{% endfor %}
|
| 78 |
+
</tbody>
|
| 79 |
+
</table>
|
| 80 |
+
</div>
|
| 81 |
+
{% endif %}
|
| 82 |
+
{%- endmacro %}
|
| 83 |
+
|
| 84 |
+
{% macro logic_block(title, text) -%}
|
| 85 |
+
{% if text %}
|
| 86 |
+
<div class="section">
|
| 87 |
+
<h2>{{ title }}</h2>
|
| 88 |
+
<p>{{ text }}</p>
|
| 89 |
+
</div>
|
| 90 |
+
{% endif %}
|
| 91 |
+
{%- endmacro %}
|