diff --git a/README.md b/README.md
index dbc8e37..29db067 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,69 @@
-# sprpcb-exportpdf-func
+# exportPDF
-Funcionalidad para exportar datos de un recurso a un archivo PDF
\ No newline at end of file
+Funcionalidad para implementar la capacidad de exportar los datos de un recurso a formato PDF.
+Los modelos de recursos habilitados para la función son los siguientes:
+
+* Patrimonio material - Bienes inmuebles
+* Patrimonio material - Bienes muebles
+* Patrimonio inmaterial
+* Organización o persona
+
+# Para agregar la funcionalidad ExportPDF a un proyecto de Arches puede seguir el siguiente procedimiento.
+Procedimiento válido para un proyecto en modo desarrollo implementado con un enfoque tradicional sin contenedores.
+Para el caso de un enfoque utilizando contenedores o en moo Producción, el procesos varía levemente.
+
+### 1. Clonar este repositorio en alguna carpeta de su servidor).
+
+```shell
+pip install git+https://gitea.patrimonio.org.bo/sysadmin/sprpcb-resumen-app.git
+```
+
+### 2. Agregar la vista personalizada creando (copiando) la carpeta indicada y moviendo la vista adentro:
+
+```properties
+INSTALLED_APPS = (
+# otras aplicaciones ya enumeradas
+ "resumen",
+ "arches_proy", # Ensure the project is listed before any other arches applications
+)
+```
+### 3. Agregar la entrada de ruta en el archivo urls.py del proyecto:
+
+```shell
+from django.urls import include, re_path, path # re_path añadido
+
+urlpatterns = [
+ re_path(r"^", include("resumen.urls")), # Línea añadida
+ # project-level urls
+]
+```
+
+### 4. Copiar las plantillas de la funcionalidad correspondientes a los modelos de recursos:
+```python
+python manage.py migrate
+```
+
+### 5. Copiar los arachivos necesarios para una nueva plantilla de reporte:
+```python
+python manage.py migrate
+```
+
+### 6. Registrar la plantilla personalizada de proyecto que agrega los botones necesarios:
+```python
+python manage.py migrate
+```
+
+### 7. A continuación, asegúrese de reconstruir la interfaz de su proyecto para incluir el complemento:
+
+```
+npm run build_development
+```
+
+### 8. Cuando haya terminado, debería ver los botones de exportar en la ventana de vista de reporte de su modelo de recursos:
+
+
+### 9. Forma de uso:
+
+```
+
+```
\ No newline at end of file
diff --git a/pdf/__pycache__/views.cpython-312.pyc b/pdf/__pycache__/views.cpython-312.pyc
new file mode 100644
index 0000000..fa75c53
Binary files /dev/null and b/pdf/__pycache__/views.cpython-312.pyc differ
diff --git a/pdf/views.py b/pdf/views.py
new file mode 100644
index 0000000..3d8eab5
--- /dev/null
+++ b/pdf/views.py
@@ -0,0 +1,166 @@
+# mi_proyecto/pdf/views.py
+# dpsk - 2026
+import io
+from pathlib import Path
+from django.http import HttpResponse
+from django.template.loader import render_to_string
+from weasyprint import HTML
+from arches.app.models.resource import Resource
+from django.contrib.auth.models import Group
+from datetime import datetime
+from zoneinfo import ZoneInfo
+from functools import reduce
+from operator import getitem
+from pypdf import PdfReader, PdfWriter
+import json
+import ast
+
+def ajustar_medios(resource_media_rel, medios_list):
+ medios = []
+ img=["image/bmp", "image/gif", "image/jpg", "image/jpeg", "image/png", "image/tif", "image/tiff"]
+ no_imagen_principal = True
+ try:
+ if isinstance(medios_list, list) :
+ for rel in resource_media_rel['related_resources']:
+ if isinstance(medios_list[0], dict) :
+ medio=next((item for item in medios_list if item['@value'] == rel['displayname']), None)
+ else:
+ medio = None
+ for til in rel['tiles']:
+ for dato in til['data']:
+ if isinstance(til['data'][dato], list):
+ for dat in til['data'][dato]:
+ idx = " - " + str(dat['index'] +1) if len(til['data'][dato])>1 else ""
+ if medio is not None and isinstance(medio, dict):
+ medio_nuevo = {'tipo': val for key, val in medio.items() if "Tipo" in key}
+ else:
+ if dat['type'] in img and no_imagen_principal:
+ medio_nuevo = {'tipo':'Imagen principal'}
+ no_imagen_principal = False
+ else:
+ medio_nuevo = {'tipo':'Medio'}
+ medio_nuevo.update({'@value':rel['displayname']+idx, 'file':dat['name'], 'url': dat['url'], 'formato':dat['type']})
+ medios.append(medio_nuevo)
+
+ # Reordenamos para que el primer medio de la lista sea de tipo Imagen principal o al menos del tipo imagen
+ medios.sort(key=lambda item: item.get('formato') not in img)
+ medios.sort(key=lambda item: item.get('tipo') != 'Imagen principal')
+
+ except:
+ pass
+ return medios
+
+def find_key_path(data, target_key, current_path=None):
+ if current_path is None:
+ current_path = []
+
+ # Verifica si es diccionario válido
+ if isinstance(data, dict):
+ for key, value in data.items():
+ # si la clave buscada está en el nivel actual del diccionario.
+ if key == target_key:
+ return current_path + [key]
+
+ # Profundiza en el rastreo mientras agrega la clave actual a la ruta.
+ path = find_key_path(value, target_key, current_path + [key])
+ if path:
+ return path
+ # En caso de que la clave esté dentro de una lista
+ elif isinstance(data, list):
+ for index, item in enumerate(data):
+ path = find_key_path(item, target_key, current_path + [index])
+ if path:
+ return path
+ return None
+
+def strdict_to_dict(strdict):
+ """ Representación de texto de un diccionario a formato json """
+ value = {}
+ try:
+ if isinstance(strdict, str):
+ value = json.dumps(ast.literal_eval(strdict))
+ except:
+ pass
+ return value
+
+def export_resource_pdf(request, resourceid, printubic, printimgs, printpdfs):
+ resource = Resource.objects.get(pk=resourceid)
+ resource_data = resource.to_json()
+
+ # Corrección de medios relacionados, se normalizan claves y se adicionan propiedades
+ ruta_medios = find_key_path( resource_data, "Medio de información")
+ if ruta_medios is not None:
+ valor_medios=reduce(lambda dict_layer, key: dict_layer[key], ruta_medios, resource_data)
+ resource_rel=resource.get_related_resources(user=request.user,resourceinstance_graphid='6afc4e9e-727e-4152-8084-309267752650')
+ #resource_data["Información gráfica"]["Medio de información"] = ajustar_medios(resource_rel)
+ reduce(getitem, ruta_medios[:-1], resource_data)[ruta_medios[-1]] = ajustar_medios(resource_rel,valor_medios)
+
+ # Cambio de datos gis en texto a formato json
+ ruta_gis = find_key_path( resource_data, "Coordenadas / Geometría")
+ if ruta_gis is not None:
+ valor_gis=reduce(lambda dict_layer, key: dict_layer[key], ruta_gis, resource_data)["@value"]
+ reduce(getitem, ruta_gis[:-1], resource_data)[ruta_gis[-1]]["@value"] = strdict_to_dict(valor_gis)
+
+ # Extracción del identificador de grupo ETA
+ eta_group=""
+ ruta_meta_iden = find_key_path( resource_data, "Meta identificación")
+ if ruta_meta_iden is not None:
+ meta_iden=json.loads(strdict_to_dict(reduce(lambda dict_layer, key: dict_layer[key], ruta_meta_iden, resource_data)))
+ eta_group=str(Group.objects.get(pk=meta_iden["grp_eta"])).upper()
+
+ # Fecha del informe
+ sprpcb_url=request.build_absolute_uri('/')[:-1]
+ fecha=datetime.now(ZoneInfo("America/La_Paz"))
+
+ resources = [{
+ 'resourceinstanceid': str(resource.resourceinstanceid),
+ 'graph_id': str(resource.graph_id),
+ 'displayname': resource.displayname,
+ 'resource': resource_data,
+ 'sprpcb_url': sprpcb_url,
+ 'fecha': fecha,
+ 'eta_group': eta_group,
+ 'print_imgs': bool(int(printimgs)),
+ 'print_pdfs': bool(int(printpdfs))
+ }]
+
+ context = {'resources': resources}
+
+ match str(resource.graph_id):
+ case "72420da0-db59-4048-aea2-03b0bc5cdcdf": # Actores
+ context["resources"][0]["grafo"]="Organizaciones y personas"
+ nombre_pdf = f'Actor_{resourceid}'
+ html_string = render_to_string('reports/actor_pdf_report.html', context)
+ case '8ea3bf67-89ce-474c-b3cb-6dd5ee3d6198': # Bienes inmuebles
+ context["resources"][0]["grafo"]="Patrimonio material - Bienes inmuebles"
+ html_string = render_to_string('reports/bim_pdf_report.html', context)
+ nombre_pdf = f'bienes_inmuebles_{resourceid}'
+ case '10b03fec-4d85-11ee-a708-ffcd06c08a5d': # Bienes muebles
+ context["resources"][0]["grafo"]="Patrimonio material - Bienes muebles"
+ html_string = render_to_string('reports/bm_pdf_report.html', context)
+ nombre_pdf = f'bienes_muebles_{resourceid}'
+ case "9b0e22c7-5c56-4be6-aa89-ae2632ba28e8": # Inmaterial
+ context["resources"][0]["grafo"]="Patrimonio Inmaterial"
+ html_string = render_to_string('reports/pi_pdf_report.html', context)
+ nombre_pdf = f'Inmaterial_{resourceid}'
+
+ gen_pdf_file = HTML(string=html_string, base_url=request.build_absolute_uri("/")).write_pdf()
+
+ merger = PdfWriter()
+ merger.append(PdfReader(io.BytesIO(gen_pdf_file)))
+
+ root_path = Path(__file__).resolve().parent.parent
+
+ for medio in reduce(getitem, ruta_medios[:-1], resource_data)[ruta_medios[-1]] :
+ if medio['formato'] == 'application/pdf' and bool(int(printpdfs)) :
+ merger.append(PdfReader(f'{root_path}/uploadedfiles/{medio["file"]}'))
+ output_buffer = io.BytesIO()
+ merger.write(output_buffer)
+ merger.close()
+ else:
+ output_buffer = io.BytesIO()
+ merger.write(output_buffer)
+ merger.close()
+ response = HttpResponse(output_buffer.getvalue(), content_type='application/pdf')
+ response['Content-Disposition'] = f'attachment; filename="{nombre_pdf}.pdf"'
+ return response
\ No newline at end of file
diff --git a/report-templates/default.htm b/report-templates/default.htm
new file mode 100644
index 0000000..c08065c
--- /dev/null
+++ b/report-templates/default.htm
@@ -0,0 +1,183 @@
+{% load i18n %}
+
+
+{% block report %}
+
+
+{% block report_title_bar %}
+
+
+{% endblock report_title_bar %}
+
+
+
+
+
+ {% block header %}
+ {% endblock header %}
+
+ {% block body %}
+
+
+
+
+
+
+
+
+
+
+
+ {% endblock body %}
+
+
+ {% block related_resources %}
+
+ {% endblock related_resources %}
+
+ {% block footer %}
+ {% endblock footer %}
+
+{% endblock report %}
+
+
+
+{% block summary %}
+
+
+
+{% endblock summary %}
+
+
+
+
+
+
+{% block header_form %}
+{% endblock header_form %}
+
diff --git a/report-templates/export-pdf-report.htm b/report-templates/export-pdf-report.htm
new file mode 100644
index 0000000..9f064dc
--- /dev/null
+++ b/report-templates/export-pdf-report.htm
@@ -0,0 +1,60 @@
+
+{% extends "views/report-templates/default.htm" %}
+{% load i18n %}
+
+{% block header %}
+ {{ block.super }}
+
+{% endblock header %}
+
+{% block body %}
+
+ {% trans 'This resource has provisional edits (not displayed in this report) that are pending review' %}
+
+
+ {% trans 'This resource has provisional edits (not displayed in this report) that are pending review' %}
+
+
+ {% trans 'This resource has provisional edits that are pending review' %}
+
+
+
+ {% endblock body %}
diff --git a/reports/actor_pdf_report.html b/reports/actor_pdf_report.html
new file mode 100644
index 0000000..53ce996
--- /dev/null
+++ b/reports/actor_pdf_report.html
@@ -0,0 +1,156 @@
+
+{% load template_tags %}
+{% for resource in resources %}
+ {% with resource_data=resource.resource %}
+
+
+
+
+
+ {{ resource.grafo }} ID de sistema: {{ resource.resourceinstanceid }}
+
+
+
+ {% if resource_data %}
+ {{ resource.displayname|truncatewords:10 }}
+
+
+
Identificación
+ {% if resource_data|has_key:"Identificación" %}
+ {% for iden in resource_data|val_from_key:"Identificación" %}
+
+ Nombre / Título :
+ {{ iden|val_from_key:"@value" }}
+
+
+ Tipo de actor :
+ {{ iden|val_from_key:"Tipo de actor" }}
+
+
+ Cargo :
+ {{ iden|val_from_key:"Cargo" }}
+
+ {% endfor %}
+ {% endif %}
+
+
+
Características
+ {% if resource_data|has_key:"Detalles del actor" %}
+
+ Grupo etario:
+ {{ resource_data|val_from_key:"Detalles del actor"|val_from_key:"Grupo etario" }}
+
+
+ Rasgo Cultural Principal:
+ {{ resource_data|val_from_key:"Detalles del actor"|val_from_key:"Rasgo Cultural Principal" }}
+
+
+ Otro rasgo cultural:
+ {{ resource_data|val_from_key:"Detalles del actor"|val_from_key:"Otro rasgo cultural" }}
+
+
+ Sexo:
+ {{ resource_data|val_from_key:"Detalles del actor"|val_from_key:"Sexo" }}
+
+
+ Nº de personas (aprox.):
+ {{ resource_data|val_from_key:"Detalles del actor"|val_from_key:'Cantidad de personas del grupo(aprox.)' }}
+
+ {% endif %}
+
+
+
+
Imagen de referencia
+ {% if resource_data|has_key:"Imagen de referencia" %}
+
+

+
+ {% endif %}
+
+
+
+ Ubicación
+
+
+ {% if resource_data|has_key:"Ubicación simple" %}
+
+ Localidad:
+ {{ resource_data|val_from_key:"Ubicación simple"|val_from_key:"Departamento" }}
+
+
+ Otra localidad:
+ {{ resource_data|val_from_key:"Ubicación simple"|val_from_key:"Otra localidad" }}
+
+
+ Coordenadas / Geometría:
+
+ {% 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 %}
+
+ {{ gis.geometry }}
+
+ {% endfor %}
+ {% endwith %}
+
+ Geometría principal:
+ {{ resource_data|val_from_key:"Ubicación simple"|val_from_key:"Coordenadas / Geometría"|val_from_key:"Tipo de geometría" }}
+
+ {% endif %}
+ {% endif %}
+
+
+
+
+
Notas
+ {% if resource_data|has_key:"Descripción / Notas" %}
+ {% for desc in resource_data|val_from_key:"Descripción / Notas" %}
+
+ {{ desc|val_from_key:"Tipo de descripción" }}
+
+
+
{{ desc|val_from_key:"Descripción"|safe|cut:"
" }}
+
+ {% endfor %}
+ {% endif %}
+
+ {% else %}
+ El recurso no tiene información.
+ {% endif %}
+
+ {% endwith %}
+{% endfor %}
+
\ No newline at end of file
diff --git a/reports/bim_pdf_report.html b/reports/bim_pdf_report.html
new file mode 100644
index 0000000..6dd600e
--- /dev/null
+++ b/reports/bim_pdf_report.html
@@ -0,0 +1,476 @@
+
+{% load template_tags %}
+{% for resource in resources %}
+ {% with resource_data=resource.resource %}
+
+
+
+
+
+ {{ resource.grafo }} ID de sistema: {{ resource.resourceinstanceid }}
+
+
+
+ {% if resource_data %}
+ {{ resource.displayname|truncatewords:10 }}
+
+
+
Identificación
+ {% if resource_data|has_key:"Identificación" %}
+
+ Ámbito / subámbito:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Ámbito / subámbito' }}
+
+
+ Código principal:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Código principal" }}
+
+ {% if resource_data|val_from_key:"Identificación"|has_key:"Código institucional" %}
+
Código alternativo:
+ {% for cod in resource_data|val_from_key:"Identificación"|val_from_key:"Código institucional" %}
+
+ {{ cod|val_from_key:"Tipo de código" }}:
+ {{ cod|val_from_key:"@value" }}
+
+ {% endfor %}
+ {% endif %}
+
Denominación
+ {% for nom in resource_data|val_from_key:"Identificación"|val_from_key:"Denominación" %}
+
+ {{ nom|val_from_key:"Tipo de nombre" }} :
+ {{ nom|val_from_key:"@value" }}
+
+ {% endfor %}
+
+ Época :
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Época'|val_from_key:"@value" }}
+
+
+ Otra época :
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Época'|val_from_key:"Otro" }}
+
+
+ Autor / constructor :
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Autor / constructor" }}
+
+
+ Uso original :
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Uso original" }}
+
+
+ Año :
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Año" }}
+
+
+ Uso actual :
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Uso actual" }}
+
+
+ Estilo / filiación cultural:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Estilo / filiación cultural" }}
+
+
+ Tipología :
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Tipología" }}
+
+ {% endif %}
+
+
+
+
Imagen de referencia
+ {% if resource_data|has_key:"Recursos" %}
+ {% with medios=resource_data|val_from_key:'Recursos'|val_from_key:'Medio de información' %}
+

+ {% endwith %}
+ {% endif %}
+
+
+
+
+
+
Ubicación
+ {% if resource_data|has_key:"Ubicación BIM" %}
+
+ Localidad :
+ {{ resource_data|val_from_key:"Ubicación BIM"|val_from_key:"Departamento" }}
+
+
+ Departamento :
+ {{ resource_data|val_from_key:"Ubicación BIM"|val_from_key:"Ubicación extendida" }}
+
+
+ Calle/Avenida/Pasaje :
+ {{ resource_data|val_from_key:"Ubicación BIM"|val_from_key:"Calle/Avenida/Pasaje" }}
+
+
+ Número :
+ {{ resource_data|val_from_key:"Ubicación BIM"|val_from_key:"Número" }}
+
+
+ Zona :
+ {{ resource_data|val_from_key:"Ubicación BIM"|val_from_key:"Zona" }}
+
+
+ Coordenadas / Geometría:
+
+ {% if resource_data|val_from_key:"Ubicación BIM"|has_key:"Coordenadas / Geometría" %}
+ {% with gis_vector=resource_data|val_from_key:"Ubicación BIM"|val_from_key:"Coordenadas / Geometría"|val_from_key:"@value"|json_to_obj %}
+ {% for gis in gis_vector.features %}
+
+ {{ gis.geometry }}
+
+ {% endfor %}
+ {% endwith %}
+
+ Geometría principal : {{ resource_data|val_from_key:"Ubicación BIM"|val_from_key:"Coordenadas / Geometría"|val_from_key:"Tipo de geometría" }}
+
+ {% endif %}
+ {% endif %}
+
+
+
+
+
Marco legal
+ {% if resource_data|has_key:"Marco Legal BM" %}
+
+
+
+ Es de interés patrimonial :
+ {{ resource_data|val_from_key:"Marco Legal BM"|val_from_key:"Es de interés patrimonial"|yesno:"Si,No" }}
+
+
+ Protección :
+ {{ resource_data|val_from_key:"Marco Legal BM"|val_from_key:"Protección" }}
+
+
+
+
+
+ Propietario(s) :
+ {{ resource_data|val_from_key:"Marco Legal BM"|val_from_key:'Propietario/s'|val_from_key:"@value" }}
+
+
+ Tipo :
+ {{ resource_data|val_from_key:"Marco Legal BM"|val_from_key:'Propietario/s'|val_from_key:"Tipo de propietario" }}
+
+
+ Propiedad con:
+ {{ resource_data|val_from_key:"Marco Legal BM"|val_from_key:'Propietario/s'|val_from_key:"Propiedad con" }}
+
+
+
+
+ {% endif %}
+
+
+
Características
+ {% if resource_data|has_key:"Características BiM" %}
+ {% with caracteristica=resource_data|val_from_key:"Características BiM" %}
+
+
+ Número de niveles : {{ caracteristica|val_from_key:'Niveles'|val_from_key:"@value" }}
+ Cambios : {{ caracteristica|val_from_key:"Niveles"|val_from_key:'Cambios'|val_from_key:"@value" }}
+
+
+ {% if caracteristica|has_key:"Mediciones" %}
+
+
Mediciones :
+
+ {% for item in caracteristica|val_from_key:"Mediciones" %}
+
+
+ {{item|val_from_key:"Tipo de medida"}} : {{ item|val_from_key:"Medida"|val_from_key:"Valor de la medida" }} {{ item|val_from_key:"Medida"|val_from_key:"Unidad de medida" }}
+
+
+ {% endfor %}
+
+
+ {% endif %}
+
+
+ Servicios :
+ {{ caracteristica|val_from_key:'Servicios' }}
+
+
+
+ {% if caracteristica|has_key:"Valorización" %}
+
+ Valorización :
+ {{caracteristica|val_from_key:"Valorización"|val_from_key:"@value"}}
+
+
+ Ponderación total :
+ {{caracteristica|val_from_key:"Valorización"|val_from_key:"Ponderación total"}}
+
+
+ Valor resultante :
+ {{caracteristica|val_from_key:"Valorización"|val_from_key:"Valor resultante"}}
+
+ {% endif %}
+
+
+
+ Factores de deterioro :
+ {{ caracteristica|val_from_key:'Factores de deterioro' }}
+
+
+ Estado de conservación :
+ {{ caracteristica|val_from_key:'Estado de conservación' }}
+
+
+
+
Datos del inmueble
+ {% if caracteristica|has_key:"Datos del inmueble" %}
+ {% if caracteristica|val_from_key:"Datos del inmueble"|val_from_key:"Interior"|has_key:"Sección interior" %}
+
+ Sección Interior
+
+ {% for sec_int in caracteristica|val_from_key:"Datos del inmueble"|val_from_key:"Interior"|val_from_key:"Sección interior" %}
+ {% if sec_int|has_key:"Elemento sección interior" %}
+
+ {{ sec_int|val_from_key:"@value" }}{{ sec_int|val_from_key:"Elemento sección interior"|val_from_key:"@value" }}
+
+
+
+ {% for elem in sec_int|val_from_key:"Elemento sección interior"%}
+
+
{{elem|val_from_key:"@value"}}
+
{{elem|val_from_key:"Material"}}
+
{{elem|val_from_key:"Detalles artísticos"}}
+
{{elem|val_from_key:"Estado"}}
+
{{elem|val_from_key:"Cambios"}}
+
+ {% endfor %}
+
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% if caracteristica|val_from_key:"Datos del inmueble"|val_from_key:"Exterior"|has_key:"Sección exterior" %}
+
+ Sección Exterior
+
+ {% for sec_ext in caracteristica|val_from_key:"Datos del inmueble"|val_from_key:"Exterior"|val_from_key:"Sección exterior" %}
+ {% if sec_ext|has_key:"Elemento - sección exterior" %}
+
+ {{ sec_ext|val_from_key:"@value" }}{{ sec_ext|val_from_key:"Elemento - sección exterior"|val_from_key:"@value" }}
+
+
+
+ {% for elem in sec_ext|val_from_key:"Elemento - sección exterior"%}
+
+
{{elem|val_from_key:"@value"}}
+
{{elem|val_from_key:"Material"}}
+
{{elem|val_from_key:"Detalles artísticos"}}
+
{{elem|val_from_key:"Estado"}}
+
{{elem|val_from_key:"Cambios"}}
+
+ {% endfor %}
+
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% if caracteristica|val_from_key:"Datos del inmueble"|val_from_key:"Espacios exteriores "|has_key:"Sección espacios exteriores" %}
+
+ Espacios exteriores
+
+ {% for esp_ext in caracteristica|val_from_key:"Datos del inmueble"|val_from_key:"Espacios exteriores "|val_from_key:"Sección espacios exteriores" %}
+ {% if esp_ext|has_key:"Elemento - espacio exterior" %}
+
+ {{ esp_ext|val_from_key:"@value" }}{{ esp_ext|val_from_key:"Elemento - espacio exterior"|val_from_key:"@value" }}
+
+
+
+ {% for elem in esp_ext|val_from_key:"Elemento - espacio exterior"%}
+
+
{{elem|val_from_key:"@value"}}
+
{{elem|val_from_key:"Material"}}
+
{{elem|val_from_key:"Detalles artísticos"}}
+
{{elem|val_from_key:"Estado"}}
+
{{elem|val_from_key:"Cambios"}}
+
+ {% endfor %}
+
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% if caracteristica|val_from_key:"Datos del inmueble"|val_from_key:"Espacios de circulación"|has_key:"Sección espacios de circulación" %}
+
+ Espacios de circulación
+
+ {% for esp_circ in caracteristica|val_from_key:"Datos del inmueble"|val_from_key:"Espacios de circulación"|val_from_key:"Sección espacios de circulación" %}
+ {% if esp_circ|has_key:"Elemento - espacio de circulación" %}
+
+ {{ esp_circ|val_from_key:"@value" }}{{ esp_circ|val_from_key:"Elemento - espacio de circulación"|val_from_key:"@value" }}
+
+
+
+ {% for elem in esp_circ|val_from_key:"Elemento - espacio de circulación"%}
+
+
{{elem|val_from_key:"@value"}}
+
{{elem|val_from_key:"Material"}}
+
{{elem|val_from_key:"Detalles artísticos"}}
+
{{elem|val_from_key:"Estado"}}
+
{{elem|val_from_key:"Cambios"}}
+
+ {% endfor %}
+
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ {% endif %}
+
+
+
Intervenciones
+ {% if caracteristica|has_key:"Intervenciones" %}
+ {% for desc in caracteristica|val_from_key:"Intervenciones" %}
+
+
{{ desc|val_from_key:"Tipo de intervención" }} ({{desc|val_from_key:"Fecha"}}): {{ desc|val_from_key:"@value"|safe|cut:"
" }}
+
+ {% endfor %}
+ {% endif %}
+
+ {% if caracteristica|has_key:"Descripción asignada" %}
+
+
{{ caracteristica|val_from_key:"Descripción asignada"|val_from_key:"Tipo de descripción" }} :
+
+
{{ caracteristica|val_from_key:"Descripción asignada"|val_from_key:"Descripción"|safe|cut:"
" }}
+
+
+ {% endif %}
+ {% endwith %}
+ {% endif %}
+
+
+
+
Medios adjuntos
+ {% if resource_data|has_key:"Recursos" %}
+
+ {% for medio in resource_data|val_from_key:'Recursos'|val_from_key:'Medio de información' %}
+
+ {% endfor %}
+
+ {% endif %}
+
+
+
Observaciones
+ {% if resource_data|has_key:"Descripción asignada" %}
+ {% for desc in resource_data|val_from_key:"Descripción asignada" %}
+
+
{{ desc|val_from_key:"Tipo de descripción" }} : {{ desc|val_from_key:"Descripción"|safe|cut:"
" }}
+
+ {% endfor %}
+ {% endif %}
+
+
+
Responsables
+ {% if resource_data|has_key:"Responsables" %}
+
+ Entidad administrativa : {{ resource_data|val_from_key:"Responsables"|val_from_key:"Entidad administrativa" }}
+
+ {% if resource_data|val_from_key:"Responsables"|has_key:"Responsable" %}
+ {% for item in resource_data|val_from_key:"Responsables"|val_from_key:"Responsable" %}
+
+ {{ item|val_from_key:"Rol" }} ({{ item|val_from_key:"Fecha" }}) : {{ item|val_from_key:"@value" }}
+
+ {% endfor %}
+ {% endif %}
+ {% endif %}
+
+
+ {% if resource_data|has_key:"Recursos" and resource.print_imgs %}
+ Anexo de imágenes
+
+ {% for medio in resource_data|val_from_key:'Recursos'|val_from_key:'Medio de información' %}
+ {% if medio.formato in "image/bmp, image/gif, image/jpg, image/jpeg, image/png, image/tif, image/tiff" %}
+
+ {% endif %}
+ {% endfor %}
+
+ {% endif %}
+ {% else %}
+ El recurso no tiene información.
+ {% endif %}
+
+ {% endwith %}
+{% endfor %}
+
\ No newline at end of file
diff --git a/reports/bm_pdf_report.html b/reports/bm_pdf_report.html
new file mode 100644
index 0000000..46a27e0
--- /dev/null
+++ b/reports/bm_pdf_report.html
@@ -0,0 +1,365 @@
+
+{% load template_tags %}
+{% for resource in resources %}
+ {% with resource_data=resource.resource %}
+
+
+
+
+
+ {{ resource.grafo }} ID de sistema: {{ resource.resourceinstanceid }}
+
+
+
+ {% if resource_data %}
+ {{ resource.displayname|truncatewords:10 }}
+
+
+
Identificación
+ {% if resource_data|has_key:"Identificación" %}
+
+ Ámbito / subámbito:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Ámbito / subámbito' }}
+
+
+ Código principal:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Código principal" }}
+
+ {% if resource_data|val_from_key:"Identificación"|has_key:"Código institucional" %}
+
Código alternativo:
+ {% for cod in resource_data|val_from_key:"Identificación"|val_from_key:"Código institucional" %}
+
+ {{ cod|val_from_key:"Tipo de código" }}:
+ {{ cod|val_from_key:"@value" }}
+
+ {% endfor %}
+ {% endif %}
+
+ Denominación :
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Denominación'|val_from_key:"@value" }}
+
+
+ Tipo de Bien mueble : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Denominación'|val_from_key:"Tipo de nombre" }}
+
+ {% if resource_data|val_from_key:"Identificación"|has_key:"Bienes muebles histórico-artístico" %}
+
Bienes muebles histórico-artístico :
+
+ Época : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles histórico-artístico'|val_from_key:"Época"|val_from_key:"@value" }}
+
+
+ Otra época : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles histórico-artístico'|val_from_key:"Época"|val_from_key:"Otra época" }}
+
+
+ Estilo : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles histórico-artístico'|val_from_key:"Estilo"|val_from_key:"@value" }}
+
+
+ Otros estilos : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles histórico-artístico'|val_from_key:"Estilo"|val_from_key:"Otros estilos" }}
+
+
+ Escuela : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles histórico-artístico'|val_from_key:"Escuela"|val_from_key:"@value" }}
+
+
+ Otra escuela : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles histórico-artístico'|val_from_key:"Escuela"|val_from_key:"Otra escuela" }}
+
+
+ Autor / atribución : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles histórico-artístico'|val_from_key:"Autor / atribución" }}
+
+
+ Origen o procedencia : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles histórico-artístico'|val_from_key:"Origen o procedencia" }}
+
+ {% endif %}
+ {% if resource_data|val_from_key:"Identificación"|has_key:"Bienes muebles arqueológicos" %}
+
Bienes muebles arqueológicos:
+
+ Periodo : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles arqueológicos'|val_from_key:"Periodo" }}
+
+
+ Filiación cultural : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles arqueológicos'|val_from_key:"Filiación cultural" }}
+
+
+ Material asociado : {{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles arqueológicos'|val_from_key:"Material asociado" }}
+
+ {% endif %}
+ {% endif %}
+
+
+
+
Imagen de referencia
+ {% if resource_data|val_from_key:"Identificación"|has_key:"Imagen principal" %}
+

+ {% endif %}
+
+
+
+ {% if resource_data|val_from_key:"Identificación"|has_key:"Bienes muebles arqueológicos" %}
+
+
Cronología :
+
+
{{ resource_data|val_from_key:"Identificación"|val_from_key:'Bienes muebles arqueológicos'|val_from_key:"Cronología"|safe|cut:"
" }}
+
+
+ {% endif %}
+
+
+
Ubicación
+ {% if resource_data|has_key:"Localización" %}
+
+ Localidad:
+ {{ resource_data|val_from_key:"Localización"|val_from_key:"Departamento / Localidad" }}
+
+
+ Departamento:
+ {{ resource_data|val_from_key:"Localización"|val_from_key:"Ubicación extendida" }}
+
+
+ Espacio:
+ {{ resource_data|val_from_key:"Localización"|val_from_key:"Espacio" }}
+
+
+ Inmueble:
+ {{ resource_data|val_from_key:"Localización"|val_from_key:"Inmueble" }}
+
+
+ Colección:
+ {{ resource_data|val_from_key:"Localización"|val_from_key:"Colección" }}
+
+ {% if resource_data|val_from_key:"Localización"|has_key:"Ubicación" %}
+
+ Ambiente : {{resource_data|val_from_key:"Localización"|val_from_key:"Ubicación"|val_from_key:"Ambiente" }}
+
+
+ N° de ambiente : {{resource_data|val_from_key:"Localización"|val_from_key:"Ubicación"|val_from_key:"N° de ambiente" }}
+
+
+ N° de bandeja : {{resource_data|val_from_key:"Localización"|val_from_key:"Ubicación"|val_from_key:"N° de bandeja" }}
+
+
+ N° de caja : {{resource_data|val_from_key:"Localización"|val_from_key:"Ubicación"|val_from_key:"N° de caja" }}
+
+
+ Ubicación actual : {{resource_data|val_from_key:"Localización"|val_from_key:"Ubicación"|val_from_key:"Ubicación actual" }}
+
+ {% endif %}
+
+ Coordenadas / Geometría:
+
+ {% if resource_data|val_from_key:"Localización"|has_key:"Coordenadas / Geometría" %}
+ {% with gis_vector=resource_data|val_from_key:"Localización"|val_from_key:"Coordenadas / Geometría"|val_from_key:"@value"|json_to_obj %}
+ {% for gis in gis_vector.features %}
+
+ {{ gis.geometry }}
+
+ {% endfor %}
+ {% endwith %}
+
+ Geometría principal : {{ resource_data|val_from_key:"Localización"|val_from_key:"Coordenadas / Geometría"|val_from_key:"Tipo de geometría" }}
+
+ {% endif %}
+ {% endif %}
+
+
+
+
+
Marco legal
+ {% if resource_data|has_key:"Marco Legal" %}
+
+
+
+ Reconocimiento Internacional : {{ resource_data|val_from_key:"Marco Legal"|val_from_key:" Reconocimiento Internacional" }}
+
+
+ Patrimonio Cultural Departamental : {{ resource_data|val_from_key:"Marco Legal"|val_from_key:"Patrimonio Cultural Departamental" }}
+
+
+ Patrimonio Cultural Nacional : {{ resource_data|val_from_key:"Marco Legal"|val_from_key:"Patrimonio Cultural Nacional" }}
+
+
+ Patrimonio Cultural Municipal : {{ resource_data|val_from_key:"Marco Legal"|val_from_key:"Patrimonio Cultural Municipal" }}
+
+
+
+
+ {% if resource_data|val_from_key:"Marco Legal"|has_key:"Forma de ingreso" %}
+ {% if resource_data|val_from_key:"Marco Legal"|val_from_key:"Forma de ingreso"|has_key:"Ingreso" %}
+
+ Forma de ingreso : {{ resource_data|val_from_key:"Marco Legal"|val_from_key:"Forma de ingreso"|val_from_key:"Ingreso"|val_from_key:"@value" }}
+
+ {% if resource_data|val_from_key:"Marco Legal"|val_from_key:"Forma de ingreso"|val_from_key:"Ingreso"|has_key:"Otros" %}
+
+ Otra forma de ingreso : {{ resource_data|val_from_key:"Marco Legal"|val_from_key:"Forma de ingreso"|val_from_key:"Ingreso"|val_from_key:"Otros"|val_from_key:"@value" }}
+
+
+ Tipo de documento : {{ resource_data|val_from_key:"Marco Legal"|val_from_key:"Forma de ingreso"|val_from_key:"Ingreso"|val_from_key:"Otros"|val_from_key:"Tipo de documento de entrega" }}
+
+ {% endif %}
+ {% endif %}
+ {% endif %}
+
+
+
+ {% endif %}
+
+
+
Características
+ {% if resource_data|has_key:"Características" %}
+ {% for desc in resource_data|val_from_key:"Características" %}
+ {% if desc == "Principales transformaciones de la expresión Cultural" or desc == "Riesgos y amenazas" %}
+
+ {{ desc }} :
+
+
+
{{ resource_data|val_from_key:"Características"|val_from_key:desc|safe|cut:"
" }}
+
+ {% elif desc == "Medidas de la pieza" %}
+
+ {{ desc }} (cm. y gr.) :
+
+ {% if resource_data|val_from_key:"Características"|val_from_key:desc|has_key:"Medidas" %}
+ {% for item in resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Medidas" %}
+
+ {{item.Medida}} : Medida mínima: {{ item|val_from_key:"Medida mínima" }} | Medida máxima : {{ item|val_from_key:"Medida máxima" }}
+
+ {% endfor %}
+
+
Observaciones : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Observaciones a las medidas"|safe|cut:"
" }}
+
+ {% endif %}
+ {% elif desc == "Estado de conservación" %}
+
+
Estado de conservación : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"@value"|safe|cut:"
" }}
+
+
+
Observaciones : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Observaciones"|safe|cut:"
" }}
+
+ {% elif desc == "Uso Actual" or desc == "Nivel de integridad" %}
+
+ {{ desc }} : {{ resource_data|val_from_key:"Características"|val_from_key:desc }}
+
+ {% elif desc == "Intervenciones" %}
+
+ {{ desc }} :
+
+
+ Tiene intervenciones : {{resource_data|val_from_key:"Características"|val_from_key:"Intervenciones"|val_from_key:"Sin intervención"|yesno:"Si,No"}}
+
+ {% if resource_data|val_from_key:"Características"|val_from_key:desc|has_key:"Intervenciónes" %}
+ {% for item in resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Intervenciónes" %}
+
+ Intervención : {{ item }}
+
+ {% endfor %}
+ {% endif %}
+ {% elif desc == "Características Iconográficas/ornamentales" %}
+
+ {{ desc }} :
+
+ {% for item in resource_data|val_from_key:"Características"|val_from_key:desc %}
+
+
{{ item|safe|cut:"
" }}
+
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+
+ Condiciones de seguridad : {{ resource_data|val_from_key:"Características"|val_from_key:"Condiciones de seguridad" }}
+
+ {% endif %}
+
+
+
Medios adjuntos
+ {% if resource_data|has_key:"Recursos adjuntos" %}
+
+ {% for medio in resource_data|val_from_key:'Recursos adjuntos'|val_from_key:'Medio de información' %}
+
+ {% endfor %}
+
+ {% endif %}
+
+
+
Observaciones
+ {% if resource_data|has_key:"Observaciones" %}
+
+
{{ resource_data|val_from_key:"Observaciones"|val_from_key:"Tipo de descripción" }} : {{ resource_data|val_from_key:"Observaciones"|val_from_key:"Descripción"|safe|cut:"
" }}
+
+ {% endif %}
+
+
+
Responsables
+ {% if resource_data|has_key:"Responsables" %}
+
+ Entidad administrativa : {{ resource_data|val_from_key:"Responsables"|val_from_key:"Entidad administrativa" }}
+
+ {% if resource_data|val_from_key:"Responsables"|has_key:"Responsable" %}
+ {% for item in resource_data|val_from_key:"Responsables"|val_from_key:"Responsable" %}
+
+ {{ item|val_from_key:"Rol" }} ({{ item|val_from_key:"Fecha" }}) : {{ item|val_from_key:"@value" }}
+
+ {% endfor %}
+ {% endif %}
+ {% endif %}
+
+ {% if resource_data|has_key:"Recursos adjuntos" and resource.print_imgs %}
+ Anexo de imágenes
+
+ {% for medio in resource_data|val_from_key:'Recursos adjuntos'|val_from_key:'Medio de información' %}
+ {% if medio.formato in "image/bmp, image/gif, image/jpg, image/jpeg, image/png, image/tif, image/tiff" %}
+
+ {% endif %}
+ {% endfor %}
+
+ {% endif %}
+ {% else %}
+ El recurso no tiene información.
+ {% endif %}
+
+ {% endwith %}
+{% endfor %}
+
\ No newline at end of file
diff --git a/reports/pi_pdf_report.html b/reports/pi_pdf_report.html
new file mode 100644
index 0000000..219102e
--- /dev/null
+++ b/reports/pi_pdf_report.html
@@ -0,0 +1,312 @@
+
+{% load template_tags %}
+{% for resource in resources %}
+ {% with resource_data=resource.resource %}
+
+
+
+
+
+ {{ resource.grafo }} ID de sistema: {{ resource.resourceinstanceid }}
+
+
+
+ {% if resource_data %}
+ {{ resource.displayname|truncatewords:10 }}
+
+
+
Identificación
+ {% if resource_data|has_key:"Identificación" %}
+
+ Código principal:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Código principal" }}
+
+
+ Código anterior:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Código anterior" }}
+
+
+ Código alternativo:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Código alternativo" }}
+
+
+ Filiación cultural:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:"Filiación cultural" }}
+
+
+ Ámbito / subámbito:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Ámbito / subámbito' }}
+
+
+ Nominación actual:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Nominación actual' }}
+
+
+ Origen o procedencia:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Origen o procedencia' }}
+
+
+ Nominación anterior:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Nominación anterior' }}
+
+
+ Manifestación cultural:
+ {{ resource_data|val_from_key:"Identificación"|val_from_key:'Manifestación cultural' }}
+
+ {% endif %}
+
+
+
+
Imagen de referencia
+ {% if resource_data|has_key:"Información gráfica" %}
+ {% with medios=resource_data|val_from_key:'Información gráfica'|val_from_key:'Medio de información' %}
+

+ {% endwith %}
+ {% endif %}
+
+
+
+
+
+
Ubicación
+ {% if resource_data|has_key:"Ubicación 2" %}
+
+ Localidad:
+ {{ resource_data|val_from_key:"Ubicación 2"|val_from_key:"Departamento" }}
+
+
+ Departamento:
+ {{ resource_data|val_from_key:"Ubicación 2"|val_from_key:"Ubicación extendida" }}
+
+
+ Otra localidad:
+ {{ resource_data|val_from_key:"Ubicación 2"|val_from_key:"Otra localidad" }}
+
+
+ Coordenadas / Geometría:
+
+ {% if resource_data|val_from_key:"Ubicación 2"|has_key:"Coordenadas / Geometría" %}
+ {% with gis_vector=resource_data|val_from_key:"Ubicación 2"|val_from_key:"Coordenadas / Geometría"|val_from_key:"@value"|json_to_obj %}
+ {% for gis in gis_vector.features %}
+
+ {{ gis.geometry }}
+
+ {% endfor %}
+ {% endwith %}
+
+ Geometría principal:
+ {{ resource_data|val_from_key:"Ubicación 2"|val_from_key:"Coordenadas / Geometría"|val_from_key:"Tipo de geometría" }}
+
+ {% endif %}
+ {% endif %}
+
+
+
+
+
Marco legal
+ {% if resource_data|has_key:"Marco legal" %}
+
+ Reconocimiento Internacional:
+ {{ resource_data|val_from_key:"Marco legal"|val_from_key:" Reconocimiento Internacional" }}
+
+
+ Patrimonio Cultural Departamental:
+ {{ resource_data|val_from_key:"Marco legal"|val_from_key:"Patrimonio Cultural Departamental" }}
+
+
+ Patrimonio Cultural Nacional:
+ {{ resource_data|val_from_key:"Marco legal"|val_from_key:"Patrimonio Cultural Nacional" }}
+
+
+ Patrimonio Cultural Municipal:
+ {{ resource_data|val_from_key:"Marco legal"|val_from_key:"Patrimonio Cultural Municipal" }}
+
+ {% endif %}
+
+
+
Características
+ {% if resource_data|has_key:"Características" %}
+ {% for desc in resource_data|val_from_key:"Características" %}
+ {% if desc == "Principales transformaciones de la expresión Cultural" or desc == "Riesgos y amenazas" %}
+
+ {{ desc }} :
+
+
+
{{ resource_data|val_from_key:"Características"|val_from_key:desc|safe|cut:"
" }}
+
+ {% elif resource_data|val_from_key:"Características"|val_from_key:desc|has_key:"Descripción resumida" and resource_data|val_from_key:"Características"|val_from_key:desc|has_key:"@value" %}
+
+ {{ desc }} :
+
+
+ {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"@value" }}
+
+
+
Descripción resumida : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Descripción resumida"|safe|cut:"
" }}
+
+ {% elif desc == "Descripción del ámbito" %}
+
+ {{ desc }} :
+
+
+ {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"@value" }}
+
+
+ {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Descripción" }}
+
+ {% elif desc == "Mecanismo de transmisión" %}
+
+ {{ desc }} :
+
+
+ Mecanismo : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Mecanismo" }}
+
+
+ Otro mecanismo : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Otro mecanismo" }}
+
+
+
Descripción resumida : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Descripción resumida"|safe|cut:"
" }}
+
+ {% elif desc == "Expresiones musicales" %}
+
+ {{ desc }} :
+
+
+ Historias de vida (música, canto y danza) : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Historias de vida (música, canto y danza)" }}
+
+
+ Género musical : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Género musical" }}
+
+
+ Forma musical (subgénero) : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Forma musical (subgénero)" }}
+
+
+ Canto : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Canto" }}
+
+
+ Danza : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Danza" }}
+
+
+
Descripción resumida : {{ resource_data|val_from_key:"Características"|val_from_key:desc|val_from_key:"Descripción resumida"|safe|cut:"
" }}
+
+ {% elif desc == "Elementos significativos" %}
+
+ {{ desc }} :
+
+ {% for item in resource_data|val_from_key:"Características"|val_from_key:"Elementos significativos" %}
+
+ Nombre : {{ item|val_from_key:"Nombre" }}
+
+
+ Tipo : {{ item|val_from_key:"Tipo" }}
+
+
+ Detalle del elemento : {{ item|val_from_key:"Detalle del elemento" }}
+
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+
+
+
Medios adjuntos
+ {% if resource_data|has_key:"Información gráfica" %}
+
+ {% for medio in resource_data|val_from_key:'Información gráfica'|val_from_key:'Medio de información' %}
+
+ {% endfor %}
+
+ {% endif %}
+
+
+
Descripción general
+ {% if resource_data|has_key:"Descripción asignada" %}
+
+ {{ resource_data|val_from_key:"Descripción asignada"|val_from_key:"Tipo de descripción" }} :
+
+
+
{{ resource_data|val_from_key:"Descripción asignada"|val_from_key:"Descripción"|safe|cut:"
" }}
+
+
+ {% endif %}
+
+
+
Responsables
+ {% if resource_data|has_key:"Responsables" %}
+
+ Entidad administrativa : {{ resource_data|val_from_key:"Responsables"|val_from_key:"Entidad administrativa" }}
+
+ {% if resource_data|val_from_key:"Responsables"|has_key:"Responsable" %}
+ {% for item in resource_data|val_from_key:"Responsables"|val_from_key:"Responsable" %}
+
+ {{ item|val_from_key:"Rol" }} ({{ item|val_from_key:"Fecha" }}) : {{ item|val_from_key:"@value" }}
+
+ {% endfor %}
+ {% endif %}
+ {% endif %}
+
+ {% if resource_data|has_key:"Información gráfica" and resource.print_imgs %}
+ Anexo de imágenes
+
+ {% for medio in resource_data|val_from_key:'Información gráfica'|val_from_key:'Medio de información' %}
+ {% if medio.formato in "image/bmp, image/gif, image/jpg, image/jpeg, image/png, image/tif, image/tiff" %}
+
+ {% endif %}
+ {% endfor %}
+
+ {% endif %}
+ {% else %}
+ El recurso no tiene información.
+ {% endif %}
+
+ {% endwith %}
+{% endfor %}
+
\ No newline at end of file