{% extends "layouts/organization.html.twig" %}
{% block bodyClass %}tpl-repository{% endblock %}
{% block siteHeader %}
{% include 'organisms/organization-header.html.twig' %}
{% endblock %}
{% block pageHeader %}
{% include 'molecules/page-header.html.twig' with {
title: 'Directorio'
} %}
{% endblock %}
{% block pageContent %}
<section class="org-tier is-minimal is-marginless-top">
<div class="tier-content">
<usc-content-filter
:options="[{key: null, name: 'Todos', selected: true}, {key: 'is-type-1', name: 'PDI', selected: false}, {key: 'is-type-2', name: 'PAS', selected: false} ]"
>
<template v-slot:filters>
<usc-text-filter
target-container="#banners-container-1"
target-items=".ml-specs"
></usc-text-filter>
</template>
<div class="org-modules-container repository-content" id="banners-container-1">
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Carlos Hidalgo', modifiers:'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Xandra Rodríguez Lemos', modifiers:'is-type-1'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Macarena Rodríguez Toural', modifiers:'is-type-1'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Henrique Santiago Rodríguez',modifiers: 'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Sebastián Salgado', modifiers:'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Isabel Rodríguez Docarmo',modifiers: 'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Enriqueta Lamenca Martínez', modifiers:'is-type-1'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Sabela Samuel Rodríguez',modifiers: 'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Carmo Fidalgo Sabarís', modifiers:'is-type-1'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Helena Domínguez Dasilva',modifiers: 'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Xela Cruz Costa',modifiers: 'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Eladio Suárez Álvarez', modifiers:'is-type-1'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Miguel Campos Ricárdez', modifiers:'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Manuel Pérez Roma',modifiers: 'is-type-2'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Fabiola Rodríguez Castro', modifiers:'is-type-1'} %}
{% include 'molecules/specs/contact-hidden.html.twig' with {
link: path('department-staff-person'),
title: 'Enrique Santiago Rodríguez',modifiers: 'is-type-2'} %}
</div>
</usc-content-filter>
</div>
</section>
{% endblock %}
{% block siteFooter %}
{% include 'organisms/site-footer.html.twig' %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script type="text/javascript">
$(function () {
if (!Array.isArray) {
Array.isArray = function(arg) {
return Object.prototype.toString.call(arg) === '[object Array]';
};
}
function renderEmail(email) {
return '<a href="mailto:' + email + '">' + email + '</a>';
}
function renderEntry(data) {
var html = '';
if (data.telefono && Array.isArray(data.telefono) && data.telefono.length > 0) {
html += '<dt>Teléfono</dt><dd property="telephone">' +
data.telefono.join('<br/>') + '</dd>';
}
if (data.correo && data.correo.length > 0) {
html += '<dt>Email</dt><dd property="email">' + renderEmail(data.correo) + '</dd>';
}
if (html === '') {
return '<strong>Non hai datos de contacto</strong>';
}
return '<dl class="at-desc-list">' + html + '</dl>';
}
$('a.more-contact-details-button').click(function(evt) {
evt.stopPropagation();
evt.preventDefault();
var postVars = {};
var container = $(this).parent();
var dropDown = container.find('div.more-contact-details');
if (dropDown.attr("aria-expanded") === "true") {
dropDown.attr("aria-expanded", "false");
container.find('div.more-contact-details').html('');
return;
}
// Amosar só un contedor aberto a vez.
$('.repository-content .more-contact-details-container').attr("aria-expanded", "false").html('');
postVars.id = $(this).data('contactId');
container.find('.more-contact-details-container').html(
'<strong>Cargando información de contacto</strong>'
);
dropDown.attr("aria-expanded", "true");
$.ajax({
type: 'post',
url: '{{ path('repository_contact_info') }}',
data: postVars,
success: function (data) {
if (data.data) {
container.find('.more-contact-details-container').html(renderEntry(data.data));
}
},
error: function (xhr, ajaxOptions, thrownError) {
container.find('.more-contact-details-container').html(
'<strong>ERROR! Please try again later</strong>'
);
}
});
});
});
</script>
{% endblock %}