158 lines
9.8 KiB
HTML
158 lines
9.8 KiB
HTML
<!-- mi_proyecto/templates/reports/actor_pdf_report.html -->
|
|
{% load template_tags %}
|
|
{% for resource in resources %}
|
|
{% with resource_data=resource.resource %}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
:root {--oscuro: #242424; --carbon: #4c4c4c; --ceniza: #999; --claro: #fafafa; --resaltado: #d1a21c;}
|
|
html { color: var(carbon); font-family: 'Helvetica', sans-serif; font-size: 9pt; font-weight: 300; line-height: 1.2;}
|
|
body { margin: 0;}
|
|
h1 { color: var(--resaltado); font-size: 13pt; text-align: center; width: 100%;}
|
|
h2, h3, h4 { color: black; font-weight: 400;}
|
|
h2 { break-before: always; font-size: 12pt;}
|
|
h3 { font-size: 12pt;}
|
|
h4 { font-size: 11pt;}
|
|
|
|
.tiles-grid-grp { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 2px;}
|
|
.tiles-grid-grp-col { grid-column: 2; grid-row: 1 / span 2; }
|
|
.tile-block { border: 1px solid var(--ceniza); border-radius: 4px; padding: 2px; margin: 2px 0; background-color: var(--claro);}
|
|
.tile-title { font-size: 11pt; font-weight: bold; color: var(--oscuro); border-bottom: 1px solid var(--ceniza); padding-bottom: 2px; margin-bottom: 5px;}
|
|
.data-row { display: flex; padding: 2px 0; border-bottom: 1px solid var(--claro);}
|
|
.data-label { font-weight: 600; letter-spacing: -0.05em; width: 40%; color: var(--oscuro);}
|
|
.data-value { width: 60%; font-size:.9em; word-wrap: break-word;}
|
|
.no-data { color: var(--ceniza); font-style: italic;}
|
|
.tiles-grid-grp-col .tile-block img { object-fit: cover; width: 330px; max-height: 230px;}
|
|
|
|
@page {
|
|
@top-left { background: var(--resaltado); content: counter(page); height: 1cm; text-align: center; width: 1cm;}
|
|
@top-center { background: var(--resaltado); content: ''; display: block; height: .05cm; opacity: .5; width: 100%;}
|
|
@top-right { content: '{{ resource.grafo }} \A UUID: {{ resource.resourceinstanceid }}'; white-space: pre-line; color: var(--ceniza); font-size: 8pt; height: 1cm; vertical-align: middle; width: 100%;}
|
|
@bottom-center { background: var(--resaltado); content: ''; display: block; height: .05cm; opacity: .5; width: 100%;}
|
|
@bottom-left { content: 'Sistema Plurinacional de Registro de Patrimonio Cultural Boliviano\ASPRPCB - {{ resource.eta_group }}'; white-space: pre-line; color: var(--ceniza); font-size: 8pt; height: 1cm; vertical-align: middle; width: 100%;}
|
|
@bottom-right { content: '{{ resource.fecha }} \A BOLIVIA'; white-space: pre-line; color: var(--ceniza); font-size: 8pt; height: 1cm; vertical-align: middle; width: 100%;}
|
|
size: Letter;
|
|
margin-top: 1.5cm; margin-bottom: 1.8cm; margin-left: 2cm; margin-right: 1.5cm;
|
|
}
|
|
</style>
|
|
<title>{{ resource.grafo }} ID de sistema: {{ resource.resourceinstanceid }}</title>
|
|
<meta name="description" content="Ficha PDF">
|
|
</head>
|
|
<body>
|
|
{% if resource_data %}
|
|
<h1>{{ resource.displayname|truncatewords:10 }}</h1>
|
|
<div class="tiles-grid-grp">
|
|
<div class="tile-block">
|
|
<div class="tile-title">Identificación</div>
|
|
{% if resource_data|has_key:"Identificación" %}
|
|
{% for iden in resource_data|val_from_key:"Identificación" %}
|
|
<div class="data-row">
|
|
<span class="data-label">Nombre / Título :</span>
|
|
<span class="data-value">{{ iden|val_from_key:"@value" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-label">Tipo de actor :</span>
|
|
<span class="data-value">{{ iden|val_from_key:"Tipo de actor" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-label">Cargo :</span>
|
|
<span class="data-value">{{ iden|val_from_key:"Cargo" }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
<div class="tile-block">
|
|
<div class="tile-title">Características</div>
|
|
{% if resource_data|has_key:"Detalles del actor" %}
|
|
<div class="data-row">
|
|
<span class="data-label">Grupo etario: </span>
|
|
<span class="data-value">{{ resource_data|val_from_key:"Detalles del actor"|val_from_key:"Grupo etario" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-label">Rasgo Cultural Principal: </span>
|
|
<span class="data-value">{{ resource_data|val_from_key:"Detalles del actor"|val_from_key:"Rasgo Cultural Principal" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-label">Otro rasgo cultural: </span>
|
|
<span class="data-value">{{ resource_data|val_from_key:"Detalles del actor"|val_from_key:"Otro rasgo cultural" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-label">Sexo: </span>
|
|
<span class="data-value">{{ resource_data|val_from_key:"Detalles del actor"|val_from_key:"Sexo" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-label">Nº de personas (aprox.): </span>
|
|
<span class="data-value">{{ resource_data|val_from_key:"Detalles del actor"|val_from_key:'Cantidad de personas del grupo(aprox.)' }}</span>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="tiles-grid-grp-col">
|
|
<div class="tile-block">
|
|
<div class="tile-title">Imagen de referencia</div>
|
|
{% if resource_data|has_key:"Imagen de referencia" %}
|
|
<div class="data-row">
|
|
<img src="{{resource.sprpcb_url}}{{ resource_data|val_from_key:'Imagen de referencia' }}" alt="foto">
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tile-title">Ubicación</div>
|
|
<div class="tiles-grid-grp">
|
|
<div class="tile-block">
|
|
{% if resource_data|has_key:"Ubicación simple" %}
|
|
<div class="data-row">
|
|
<span class="data-label">Localidad: </span>
|
|
<span class="data-value">{{ resource_data|val_from_key:"Ubicación simple"|val_from_key:"Departamento" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-label">Otra localidad: </span>
|
|
<span class="data-value">{{ resource_data|val_from_key:"Ubicación simple"|val_from_key:"Otra localidad" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-label">Coordenadas / Geometría: </span>
|
|
</div>
|
|
{% if resource_data|val_from_key:"Ubicación simple"|has_key:"Coordenadas / Geometría" %}
|
|
{% with gis_vector=resource_data|val_from_key:"Ubicación simple"|val_from_key:"Coordenadas / Geometría"|val_from_key:"@value"|json_to_obj %}
|
|
{% for gis in gis_vector.features %}
|
|
<div class="data-row">
|
|
<span class="data-value" style="width: 100%; font-size: .72em;">{{ gis.geometry|truncatewords:24 }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
{% endwith %}
|
|
<div class="data-row">
|
|
<span class="data-label">Geometría principal: </span>
|
|
<span class="data-value">{{ resource_data|val_from_key:"Ubicación simple"|val_from_key:"Coordenadas / Geometría"|val_from_key:"Tipo de geometría" }}</span>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
<div class="tiles-grid-grp-col">
|
|
<div class="tile-block">
|
|
<div class="data-label">Mapa de referencia</div>
|
|
<img src="data:image/png;base64,{{ resource.map_img }}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tile-block">
|
|
<div class="tile-title">Notas</div>
|
|
{% if resource_data|has_key:"Descripción / Notas" %}
|
|
{% for desc in resource_data|val_from_key:"Descripción / Notas" %}
|
|
<div class="data-row">
|
|
<span class="data-label" style="width: 100%;">{{ desc|val_from_key:"Tipo de descripción" }}</span>
|
|
</div>
|
|
<div class="data-row">
|
|
<span class="data-value" style="width: 100%;">{{ desc|val_from_key:"Descripción"|safe|cut:"<p> </p>" }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<p class="no-data">El recurso no tiene información.</p>
|
|
{% endif %}
|
|
</body>
|
|
{% endwith %}
|
|
{% endfor %}
|
|
</html> |