-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #975 from ricval/Exhortos-Vistas
Exhortos - vistas
- Loading branch information
Showing
8 changed files
with
431 additions
and
3 deletions.
There are no files selected for viewing
112 changes: 112 additions & 0 deletions
112
plataforma_web/blueprints/exh_exhortos/templates/exh_exhortos/detail.jinja2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{% extends 'layouts/app.jinja2' %} | ||
{% import 'macros/detail.jinja2' as detail %} | ||
{% import 'macros/modals.jinja2' as modals %} | ||
{% import 'macros/topbar.jinja2' as topbar %} | ||
|
||
{% block title %}Exhorto{% endblock %} | ||
|
||
{% block topbar_actions %} | ||
{% call topbar.page_buttons('Exhorto ' + exh_exhorto.exhorto_origen_id) %} | ||
{{ topbar.button_previous('Exhortos', url_for('exh_exhortos.list_active')) }} | ||
{% endcall %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% call detail.card(estatus=exh_exhorto.estatus) %} | ||
{{ detail.label_value('ID', exh_exhorto.id) }} | ||
{{ detail.label_value('UUID', exh_exhorto.exhorto_origen_id) }} | ||
{% if municipio_destino %} | ||
{% if current_user.can_view('MUNICIPIOS') %} | ||
{{ detail.label_value('Municipio Destino', municipio_destino.nombre + ', ' + municipio_destino.estado.nombre, url_for('municipios.detail', municipio_id=municipio_destino.id)) }} | ||
{% else %} | ||
{{ detail.label_value('Municipio Destino', municipio_destino.nombre + ', ' + municipio_destino.estado.nombre) }} | ||
{% endif %} | ||
{% else %} | ||
{{ detail.label_value('Municipio Destino', 'NO DEFINIDO') }} | ||
{% endif %} | ||
{{ detail.label_value('Materia', exh_exhorto.materia.nombre) }} | ||
{% if current_user.can_view('MUNICIPIOS') %} | ||
{{ detail.label_value('Municipio Origen', exh_exhorto.municipio_origen.nombre + ', ' + exh_exhorto.municipio_origen.estado.nombre, url_for('municipios.detail', municipio_id=exh_exhorto.municipio_origen_id)) }} | ||
{% else %} | ||
{{ detail.label_value('Municipio Origen', exh_exhorto.municipio_origen.nombre + ', ' + exh_exhorto.municipio_origen.estado.nombre) }} | ||
{% endif %} | ||
{{ detail.label_value('No. Expediente Origen', exh_exhorto.numero_expediente_origen) }} | ||
{{ detail.label_value('No. Oficio Origen', exh_exhorto.numero_oficio_origen) }} | ||
{{ detail.label_value('Tipo de juicio', exh_exhorto.tipo_juicio_asunto_delitos) }} | ||
{{ detail.label_value('Juez Exhortante', exh_exhorto.juez_exhortante) }} | ||
{{ detail.label_value('Fojas', exh_exhorto.fojas) }} | ||
{{ detail.label_value('Días en responder', exh_exhorto.dias_responder) }} | ||
{{ detail.label_value('Tipo de diligenciación', exh_exhorto.tipo_diligenciacion_nombre) }} | ||
{{ detail.label_value('Fecha de origen', exh_exhorto.fecha_origen) }} | ||
{{ detail.label_value('Observaciones', exh_exhorto.observaciones) }} | ||
{% endcall %} | ||
{# Listado de Partes #} | ||
{% call detail.card("Partes")%} | ||
<table id="exh_exhortos_partes_datatable" class="table display nowrap" style="width:100%"> | ||
<thead> | ||
<tr> | ||
<th>Nombre</th> | ||
<th>Tipo</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
{% endcall %} | ||
{# Listado de Archivos #} | ||
{% call detail.card("Archivos")%} | ||
<table id="exh_exhortos_archivos_datatable" class="table display nowrap" style="width:100%"> | ||
<thead> | ||
<tr> | ||
<th>Nombre</th> | ||
<th>Tipo</th> | ||
<th>URL</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
{% endcall %} | ||
{% endblock %} | ||
|
||
{% block custom_javascript %} | ||
<script src="/static/js/datatables-constructor.js"></script> | ||
<script src="/static/js/datatables-filtros.js"></script> | ||
{# Tabla de Partes #} | ||
<script> | ||
const constructorDataTable = new ConfigDataTable( '{{ csrf_token() }}' ); | ||
</script> | ||
<script> | ||
// DataTable Partes | ||
let configDTPartes = constructorDataTable.config(); | ||
configDTPartes['ajax']['url'] = '/exh_exhortos_partes/datatable_json'; | ||
configDTPartes['ajax']['data'] = {'estatus':'A', 'exh_exhorto_id':{{exh_exhorto.id}}}; | ||
configDTPartes['columns'] = [ | ||
{ data: 'nombre_completo' }, | ||
{ data: 'tipo_parte' }, | ||
]; | ||
// Filtros Exhortos Partes | ||
const filtrosPartes = new FiltrosDataTable('#exh_exhortos_partes_datatable', configDTPartes); | ||
filtrosPartes.precargar(); | ||
</script> | ||
{# Tabla de Archivos #} | ||
<script> | ||
// DataTable Archivos | ||
let configDTArchivos = constructorDataTable.config(); | ||
configDTArchivos['ajax']['url'] = '/exh_exhortos_archivos/datatable_json'; | ||
configDTArchivos['ajax']['data'] = {'estatus':'A', 'exh_exhorto_id':{{exh_exhorto.id}}}; | ||
configDTArchivos['columns'] = [ | ||
{ data: 'nombre_archivo' }, | ||
{ data: 'tipo_documento' }, | ||
{ data: 'url' }, | ||
]; | ||
configDTArchivos['columnDefs'] = [ | ||
{ | ||
targets: 2, // url | ||
data: null, | ||
render: function(data, type, row, meta) { | ||
return '<a href="' + data + '" target="blank">Ver <span class="iconify" data-icon="mdi:open-in-new"></span></a>'; | ||
} | ||
} | ||
]; | ||
// Filtros Exhortos Archivos | ||
const filtrosArchivos = new FiltrosDataTable('#exh_exhortos_archivos_datatable', configDTArchivos); | ||
filtrosArchivos.precargar(); | ||
</script> | ||
{% endblock %} |
55 changes: 55 additions & 0 deletions
55
plataforma_web/blueprints/exh_exhortos/templates/exh_exhortos/list.jinja2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{% extends 'layouts/app.jinja2' %} | ||
{% import 'macros/list.jinja2' as list %} | ||
{% import 'macros/topbar.jinja2' as topbar %} | ||
|
||
{% block title %}Exhortos{% endblock %} | ||
|
||
{% block topbar_actions %} | ||
{% call topbar.page_buttons(titulo) %} | ||
{% if current_user.can_view('EXH EXHORTOS PARTES') %} | ||
{{ topbar.button('Partes', url_for('exh_exhortos_partes.list_active'), "mdi:account-multiple") }} | ||
{% endif %} | ||
{% if current_user.can_view('EXH EXHORTOS ARCHIVOS') %} | ||
{{ topbar.button('Archivos', url_for('exh_exhortos_archivos.list_active'), "mdi:file-document-multiple") }} | ||
{% endif %} | ||
{% endcall %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% call list.card() %} | ||
<table id="exh_exhortos_datatable" class="table display nowrap" style="width:100%"> | ||
<thead> | ||
<tr> | ||
<th>ID</th> | ||
<th>UUID</th> | ||
<th>Juzgado ID</th> | ||
<th>Juzgado Nombre</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
{% endcall %} | ||
{% endblock %} | ||
|
||
{% block custom_javascript %} | ||
{{ list.config_datatable() }} | ||
<script> | ||
configDataTable['ajax']['url'] = '/exh_exhortos/datatable_json'; | ||
configDataTable['ajax']['data'] = {{ filtros }}; | ||
configDataTable['columns'] = [ | ||
{ data: 'detalle' }, | ||
{ data: 'UUID' }, | ||
{ data: 'juzgado_origen' }, | ||
{ data: 'juzgado_nombre' }, | ||
]; | ||
configDataTable['columnDefs'] = [ | ||
{ | ||
targets: 0, // detalle | ||
data: null, | ||
render: function(data, type, row, meta) { | ||
return '<a href="' + data.url + '">' + data.id + '</a>'; | ||
} | ||
} | ||
]; | ||
$('#exh_exhortos_datatable').DataTable(configDataTable); | ||
</script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
plataforma_web/blueprints/exh_exhortos_archivos/templates/exh_exhortos_archivos/list.jinja2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{% extends 'layouts/app.jinja2' %} | ||
{% import 'macros/list.jinja2' as list %} | ||
{% import 'macros/topbar.jinja2' as topbar %} | ||
|
||
{% block title %}Exhortos Archivos{% endblock %} | ||
|
||
{% block topbar_actions %} | ||
{% call topbar.page_buttons(titulo) %} | ||
{% if current_user.can_view('EXH EXHORTOS') %} | ||
{{ topbar.button('Exhortos', url_for('exh_exhortos.list_active'), 'mdi:email-fast') }} | ||
{% endif %} | ||
{% if current_user.can_view('EXH EXHORTOS PARTES') %} | ||
{{ topbar.button('Partes', url_for('exh_exhortos_partes.list_active'), 'mdi:account-multiple') }} | ||
{% endif %} | ||
{% endcall %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% call list.card() %} | ||
<table id="exh_exhortos_archivos_datatable" class="table display nowrap" style="width:100%"> | ||
<thead> | ||
<tr> | ||
<th>Nombre</th> | ||
<th>Tipo</th> | ||
<th>URL</th> | ||
</tr> | ||
</thead> | ||
</table> | ||
{% endcall %} | ||
{% endblock %} | ||
|
||
{% block custom_javascript %} | ||
{{ list.config_datatable() }} | ||
<script> | ||
configDataTable['ajax']['url'] = '/exh_exhortos_archivos/datatable_json'; | ||
configDataTable['ajax']['data'] = {{ filtros }}; | ||
configDataTable['columns'] = [ | ||
{ data: 'nombre_archivo' }, | ||
{ data: 'tipo_documento' }, | ||
{ data: 'url' }, | ||
]; | ||
configDataTable['columnDefs'] = [ | ||
{ | ||
targets: 2, // url | ||
data: null, | ||
render: function(data, type, row, meta) { | ||
return '<a href="' + data + '" target="blank">Ver <span class="iconify" data-icon="mdi:open-in-new"></span></a>'; | ||
} | ||
} | ||
]; | ||
$('#exh_exhortos_archivos_datatable').DataTable(configDataTable); | ||
</script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.