svg
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit

This commit is contained in:
2023-02-16 17:03:53 +01:00
parent 9554b9cdd3
commit eef04429ee
192 changed files with 9375 additions and 17414 deletions

View File

@ -0,0 +1,222 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="submit" %}
Création child = {{ childtype.name }}
{% else %}
Modification child = {{ childtype.name }}
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_child',{catparent:catparent,idparent:parent.id}) }}>Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_child_delete',{catparent:catparent,idparent:parent.id,idchild:child.id}) }}
class="btn btn-danger float-end"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">
Supprimer
</a>
{% endif %}
<br><br>
{% if app.session.flashbag.has('error') %}
<div class='alert alert-danger' style='margin: 5px 0px'>
<strong>Erreur</strong><br>
{% for flashMessage in app.session.flashbag.get('error') %}
{{ flashMessage }}<br>
{% endfor %}
</div>
{% endif %}
{% if app.session.flashbag.has('notice') %}
<div class='alert alert-info' style='margin: 5px 0px'>
<strong>Information</strong><br>
{% for flashMessage in app.session.flashbag.get('notice') %}
{{ flashMessage }}<br>
{% endfor %}
</div>
{% endif %}
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header">
<i class="fa fa-pencil-alt fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.name) }}
{{ form_row(form.subname) }}
{% if childtype.haveurl %}
{{ form_row(form.url) }}
{% endif %}
{{ form_row(form.description) }}
</div>
</div>
</div>
<div class="col-md-6">
<div class="card mb-3">
<div class="card-header">
<i class="fas fa-tag fa-fw"></i> Tags
</div>
<div class="card-body">
{{ form_widget(form.tags) }}
</div>
</div>
{% if childtype.havepin %}
<div class="card mb-3">
<div class="card-header">
<i class="fas fa-tag fa-fw"></i> Pins
</div>
<div class="card-body">
{{ form_widget(form.pins) }}
</div>
</div>
{% endif %}
{% if childtype.havefile %}
{% if childtype.id == 12 %}
<div class="card mb-3">
<div class="card-header">
<i class="fa fa-pencil-alt fa-fw"></i> Image
{% if mode=="update" %}
<a class="btn btn-link float-end" href="{{path("app_child_upload",{catparent:catparent,idparent:parent.id,idchild:child.id,type:"image"})}}"><i class="fas fa-upload"></i></a>
{%endif%}
</div>
<div class="card-body text-center">
{% if mode=="submit" %}
Veuillez valider votre création avant de pouvoir ajouter une image
{% else %}
<img src="{{path("app_minio_image",{file:'child/'~child.id~'/thumb/'~child.filename}) }}" style="max-width:100%; width:300px; margin:auto">
{% endif %}
</div>
</div>
{%else%}
<div class="card mb-3">
<div class="card-header">
<i class="fa fa-pencil-alt fa-fw"></i> Fichier
{% if mode=="update" and childtype.id!=10 %}
<a class="btn btn-link float-end" href="{{path("app_child_upload",{catparent:catparent,idparent:parent.id,idchild:child.id,type:"file"})}}"><i class="fas fa-upload"></i></a>
{%endif%}
</div>
<div class="card-body text-left">
{% if mode=="submit" %}
Veuillez valider votre création avant de pouvoir ajouter un fichier
{% else %}
<a href="{{path("app_minio_show",{file:'child/'~child.id~'/'~child.filename}) }}" target="_blank">{{child.filename}}</a>
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
{% if childtype.havechildheader %}
<div class="card mb-3">
<div class="card-header">
<i class="fa fa-pencil-alt fa-fw"></i> Images
{% if mode=="update" and childtype.havechildheader %}
<i class="btn btn-link btn-modal float-end" data-modalid="mymodallarge" data-modaltitle="Ajouter Images" data-modalurl="{{ path("app_cropentity01", {type:"childheader", idparent:child.id }) }}"><i class="fas fa-upload"></i></i>
{% endif %}
</div>
<div class="card-body">
{% if mode=="submit" %}
Veuillez valider votre création avant de pouvoir ajouter des Images
{%else%}
<ol id="childheaders" class="list-group list-group">
</ol>
{%endif%}
</div>
</div>
{% endif %}
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("#child_name").focus();
{% if mode=="update" %}
loadchildheaders();
{%endif%}
});
{% if mode=="update" %}
$('#mymodallarge').on('hidden.bs.modal', function () {
loadchildheaders();
});
function loadchildheaders() {
$("#childheaders").empty();
$.ajax({
method: "POST",
url: "{{path("app_childheader_select",{idchild:child.id})}}",
success: function(datas, dataType)
{
jQuery.each(datas, function(i, wid) {
urldel="{{path("app_childheader_delete",{catparent:catparent,idparent:parent.id,id:"xxx"})}}";
urldel=urldel.replace("xxx",wid.id);
urlupt="{{path("app_childheader_update",{catparent:catparent,idparent:parent.id,idchild:child.id,id:"xxx"})}}";
urlupt=urlupt.replace("xxx",wid.id);
html ='<li data-id="'+wid.id+'" class="list-group-item">';
html+='<div class="float-start btn-link"><i class="fas fa-arrows-alt-v fa fa-fw"></i></div>';
if(wid.credit) { html+='<div class="float-start ml-3">Crédit = '+wid.credit+'</div>'; }
html+='<div class="float-end btn-link"><a href="'+urldel+'"><i class="fas fa-trash fa fa-fw"></i></a></div>';
html+='<div class="float-end btn-link mr-2"><a href="'+urlupt+'"><i class="fas fa-file fa fa-fw"></i></a></div>';
url="{{path("app_minio_image",{file:'xxx'})}}";
url=url.replace("xxx",wid.filename)
html+='<img src="'+url+'" style="width:100%">';
html+='</li>';
$("#childheaders").append(html);
});
$( "#childheaders" ).sortable({
axis: "y",
handle: ".fa-arrows-alt-v",
stop: function( event, ui ) {
lstordered="";
$( "#childheaders li" ).each(function( index ) {
if(index==0) lstordered=$(this).data("id");
else lstordered=lstordered+","+$(this).data("id");
});
$.ajax({
method: "POST",
url: "{{path("app_childheader_order",{idchild:child.id})}}",
data: {
lstordered:lstordered
}
});
}
});
},
});
}
{% endif %}
</script>
{% endblock %}

View File

@ -0,0 +1,134 @@
{% extends 'base.html.twig' %}
{% block title %}{{app.session.get("appname")}} - {{child.name}}{% endblock %}
{% block useractions %}
{% if is_granted('ROLE_ADMIN') %}
<li>
<a href="{{path("app_child",{catparent:catparent,idparent:parent.id})}}"><i class="fa fa-file fa-2x"></i></a>
</li>
{% endif %}
{% endblock %}
{% block body %}
{% if child.childtype.id==16 %}
{% set filename="/"~appAlias~"/uploads/child/"~child.id~"/"~child.filename %}
{% else %}
{% set filename=child.url %}
{% endif %}
<div class="mt-3" style="width:80%; margin:auto;">
<h1 class="child-name pt-0 text-uppercase mb-4" style="margin-top:30px">{{child.name}}</h1>
{% if child.subname %}<div style="margin-top:-23px"><small class="child-subname">{{child.subname}}</small></div>{% endif %}
{%if child.image %}
{% set background=child.image|replace({"**appAlias**":appAlias}) %}
<center>
<a class="btn-link" target="_blank" href="{{filename}}" download>
<img src="{{background}}" class="mb-3" style="margin:auto; max-width:300px;">
</a>
</center>
{% endif %}
<div class="card card-body mt-3 mb-3">
<a class="btn-link" target="_blank" href="{{filename}}" download>
<div class="d-flex align-items-center">
<i class="fas fa-file-alt fa-2x mr-4"></i>
<div style="line-height: 15px;">
{{ child.name}}<br>
<small>{{ child.subname}}</small>
</div>
</div>
</a>
</div>
{% for attributorder in child.childtype.childtypeattributs %}
{% if attributorder.childattribut.name in child.attributs|keys and not child.attributs[attributorder.childattribut.name] is empty %}
<strong>{{ attributorder.childattribut.label }}</strong> = {{ child.attributs[attributorder.childattribut.name]}}<br>
{% endif %}
{% endfor %}
{{child.description|raw}}
{% set separator="g" %}
{%if otherpages %}
<div class="child-separator mt-5" >
<img src="/{{appAlias}}/images/separateur-{{separator}}.png" width="100%">
{% if separator=="d" %} {% set separator="g" %} {%else%} {% set separator="d" %} {%endif%}
</div>
<div class="child-pages mb-5">
<h3 class="mt-5">Articles associés</h3>
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% for page in otherpages %}
{% set style="" %}
{%if page.image %}
{% set background=page.image|replace({"**appAlias**":appAlias}) %}
{% set style="height:auto;background-position: center ; background-size: cover; background-image: url("~background~")" %}
{%endif%}
<a href="{{path("app_child_view",{catparent:catparent,idparent:parent.id,idchild:page.id,framed:framed,size:size})}}">
<div class="grid-item grid-item-size-2 grid-square d-flex align-items-stretch">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="{{style}}">
<div class="grid-item-title">{{ page.name }}</div>
</div>
</div>
</a>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% endblock %}
{% block localscript %}
<script>
$(window).resize(function() {
resizegrid();
});
$(document).ready(function() {
$('.grid-item').imagesLoaded(function() {
$('.grid').masonry({
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer',
itemSelector: '.grid-item',
percentPosition: true,
horizontalOrder: false,
});
resizegrid();
});
});
function resizegrid() {
$('.grid-square').each(function() {
$(this).height($(this).width());
});
$('.grid').masonry({
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer',
itemSelector: '.grid-item',
percentPosition: true,
horizontalOrder: false,
});
}
$( ".grid-item" ).hover(function() {
$( this ).children(".grid-image").css("transform","scale(1.05)");
}, function() {
$( this ).children(".grid-image").css("transform","scale(1)");
});
</script>
{% endblock %}

View File

@ -0,0 +1,124 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
<style>
body {
background-color: var(--colorbgbodydark);
}
img {
margin:auto;
display: block;
}
#page {
padding: 0px !important;
}
h3, #filetitle {
margin:0px;
text-align:center;
padding-top:5px;
padding-bottom: 5px;
}
h3, a, a:hover {
color: var(--colorfttitledark);
}
#fileaction {
margin-top: -10px;
}
#bigright{
position:absolute;
top:0px;
right:0px;
width:45%;
height:100%;
line-height:100%;
text-align: right;
vertical-align: middle;
padding:5px;
}
#bigleft{
position:absolute;
top:0px;
left:0px;
width:45%;
height:100%;
vertical-align: middle;
padding:5px;
}
</style>
{% endblock %}
{% block body %}
<div id="filecontent" style="display:none">
{% if child.childtype.id==12 %}
{% set url=path("app_minio_image",{file:"child/"~child.id~"/"~child.filename}) %}
{% else %}
{% set url=child.url %}
{% endif %}
<div id="filetitle">
<h3>{{child.name}}
{% if child.subname %}<small class="child-subname" style="margin-top:-10px">{{child.subname}}</small>{% endif %}
</h3>
<div id="fileaction">
{% if child.childtype.id==12 %}
<a href="{{ path("app_minio_download",{file:"child/"~child.id~"/"~child.filename})}}"><i class="fa-solid fa-download"></i></a>
{% endif %}
</div>
</div>
{% if not imagenext is empty %}
<a id="bigleft" href="{{ path("app_child_view",{catparent:catparent,idparent:parent.id,idchild:imagenext.id}) }}"><i class="fas fa-chevron-left fa-3x"></i></a>
{% endif %}
{% if not imageprev is empty %}
<a id="bigright" href="{{ path("app_child_view",{catparent:catparent,idparent:parent.id,idchild:imageprev.id}) }}"><i class="fas fa-chevron-right fa-3x"></i></a>
{% endif %}
<img id="fileimage" style="display:none" src="{{url}}">
</div>
{% endblock %}
{% block localscript %}
<script>
function resize() {
height=$(window).height()-($("#filetitle").height() * 2);
$("#fileimage").css({height:height,width:'auto'});
width=$(window).width()-90;
if($("#fileimage").width()>width) {
$("#fileimage").css({width:width,height:'auto'});
$("#fileimage").css("margin-top",(height/2)-($("#fileimage").height()/2)+"px");
height=$(window).height();
}
height=$(window).height()-($("#filetitle").height() * 2);
$("#bigright").css({height:height,"line-height":height+"px",top:$("#filetitle").height()})
$("#bigleft").css({height:height,"line-height":height+"px",top:$("#filetitle").height()})
$("#fileimage").show();
}
$('#fileimage').imagesLoaded(function() {
$("#filecontent").show();
resize();
});
$("body").keydown(function(e) {
if(e.keyCode == 37) { // left
var href = $('#bigleft').attr('href');
if(href!=null) window.location.href = href;
}
else if(e.keyCode == 39) {
var href = $('#bigright').attr('href');
if(href!=null) window.location.href = href;
}
});
$(window).resize(function() {
resize();
});
$(document).ready(function(){
$(window).focus();
});
</script>
{% endblock %}

View File

@ -0,0 +1,141 @@
{% extends "base.html.twig" %}
{% block localstyle %}
{% endblock %}
{% block body %}
<h1 class="page-header">
{{ catparent }} = {{ parent.name }}
</h1>
<p>
<bouton class="btn btn-success" onClick="$('#modalchildtype').modal('show')">Ajouter Elément</bouton>
{% if not childs is empty %}<a class="btn btn-secondary" href={{ path('app_child_view',{'catparent':catparent,'idparent':parent.id,'idchild':childs[0].id}) }}>Visualiser</a>{%endif%}
{% if catparent == 'blog' %}
<a class="btn btn-secondary" href={{ path('app_blog_update',{'id':parent.id,from:"child"}) }}>Modifier le Blog</a>
{% elseif catparent == 'page' %}
<a class="btn btn-secondary" href={{ path('app_page_update',{'id':parent.id,from:"child"}) }}>Modifier la Page</a>
{% endif %}
</p>
<div class="row">
<div class="col-md-4">
{% set idchildtype=-100 %}
{% for child in childs %}
{% if child.childtype.id != idchildtype %}
{% if not loop.first %}
</ol>
{% endif %}
<h5 class="mt-3 mb-0">Type = {{ child.childtype.name }}</h5>
<ol class="list-group childs">
{% set idchildtype=child.childtype.id %}
{% endif %}
<li data-id="{{child.id}}" class="list-group-item d-flex align-items-center justify-content-start">
<i class="btn-link fas fa-arrows-alt-v fa-2x fa-fw"></i>
<a href="{{path("app_child_update",{catparent:catparent,idparent:parent.id,idchild:child.id})}}"><i class="fa fa-file fa-2x fa-fw"></i></a></i>
<i class="fas fa-eye btn-link fa-2x fa-fw" data-id="{{child.id}}"></i>
{% if child.childtype.id==12 %}
<img class="ms-2" src="{{path("app_minio_image",{file:'child/'~child.id~'/thumb/'~child.filename}) }}" style="width:50px;">
{%endif%}
{% if child.childtype.id==13 %}
<img class="ms-2" src="{{ child.url }}" style="width:50px;">
{%endif%}
<div class="ps-3 text-break">
{{child.name}}
{% if not child.subname is empty %}<br><small>{{child.subname}}</small>{%endif%}
</div>
</li>
{% if loop.last %}
</ol>
{% endif %}
{%endfor%}
</div>
<div id="childid" class="col-md-8">
<iframe id="childview" src="" style="border:none;width:100%"></iframe>
</div>
</div>
<div id="modalchildtype" class="modal" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Type de child</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<bouton class="btn btn-success" onClick="submitChild()">Ajouter</bouton>
<bouton class="btn btn-secondary" onClick="$('#modalchildtype').modal('hide')">Annuler</bouton>
<select id="childtypeid" name="childtypeid" class="form-control form-control mt-5 mb-5">
{% for childtype in childtypes %}
<option value="{{childtype.id}}">{{childtype.name}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
responsive: true,
iDisplayLength: 100,
order: [[ 1, "asc" ]]
});
$(".fa-eye").click(function(){
id=$(this).data("id");
url="{{path("app_child_view",{catparent:catparent,idparent:parent.id,idchild:"xxx",framed:true,size:1})}}";
url=url.replace("xxx",id);
url=url.replace("&amp;","&");
$("#childview").attr("src",url);
window.scrollTo(0, 0);
iFrameResize({ log: false, bodyMargin: "50px" }, '#childview')
});
$( ".childs" ).sortable({
axis: "y",
handle: ".fa-arrows-alt-v",
update: function( event, ui ) {
lstordered="";
$( ".childs li" ).each(function( index ) {
if(index==0) lstordered=$(this).data("id");
else lstordered=lstordered+","+$(this).data("id");
});
$.ajax({
method: "POST",
url: "{{path("app_child_order",{catparent:catparent,idparent:parent.id})}}",
data: {
lstordered:lstordered
}
});
}
});
});
function submitChild() {
idchildtype=$("#childtypeid").val();
url="{{path("app_child_submit",{catparent:catparent,idparent:parent.id,idchildtype:"xxx"})}}";
url=url.replace("xxx",idchildtype);
window.location=url;
}
</script>
{% endblock %}

View File

@ -0,0 +1,387 @@
{% extends "base.html.twig" %}
{% block localstyle %}
<style>
h1 {
border-color: var(--colorbgbodydark);
border-block-width: 3px;
}
.tag, .tagalpha, .tagname {
background-color: var(--colorbgbodylight);
border-radius: 10px;
padding:5px 10px;
margin-bottom:5px;
display:inline-block;
min-width:35px;
text-align: center;
}
#selectcatparent, #selecttype, #selecttag {width:100%}
</style>
{% endblock %}
{% block body %}
<div class="row mb-5">
<div class="col-md-12 pt-3">
<div style="display:none">
<button data-types="16,17" class="btn btn-search mb-1 {% if childtypes=="16,17" %} btn-success{%else%} btn-primary{%endif%}">Ressources</button>
<button data-types="1,2" class="btn btn-search mb-1 {% if childtypes=="1,2" %} btn-success{%else%} btn-primary{%endif%}">Articles</button>
<button data-types="12,13" class="btn btn-search mb-1 {% if childtypes=="12,13" %} btn-success{%else%} btn-primary{%endif%}">Images</button>
<button data-types="10" class="btn btn-search mb-1 {% if childtypes=="10" %} btn-success{%else%} btn-primary{%endif%}">Visites Guidées</button>
<button data-types="11" class="btn btn-search mb-1 {% if childtypes=="11" %} btn-success{%else%} btn-primary{%endif%}">Sentiers</button>
<button data-types="14,15" class="btn btn-search mb-1 {% if childtypes=="14,15" %} btn-success{%else%} btn-primary{%endif%}">Vidéos</button>
<button data-types="18,19" class="btn btn-search mb-1 {% if childtypes=="18,19" %} btn-success{%else%} btn-primary{%endif%}">Interviews</button>
<button data-types="22" class="btn btn-search mb-1 {% if childtypes=="22" %} btn-success{%else%} btn-primary{%endif%}">Bibliographies</button>
<button data-types="30" class="btn btn-search mb-1 {% if childtypes=="30" %} btn-success{%else%} btn-primary{%endif%}">Photos Aériennes</button>
{% if is_granted('ROLE_ADMIN') %}
<button data-types="20" class="btn btn-search mb-1 {% if childtypes=="20" %} btn-success{%else%} btn-primary{%endif%}">Contacts</button>
<button data-types="21" class="btn btn-search mb-1 {% if childtypes=="21" %} btn-success{%else%} btn-primary{%endif%}">Liens</button>
{% endif %}
</div>
<div class="card card-body mt-3">
<div class="row">
<div class="col col-md-6">
<div class="form-group ">
<label class="control-label">Recherche</label>
<input id="searchname" class="form-control rounded" placeholder="Recherche" value="{{query}}"/>
</div>
</div>
<div class="col col-md-6" style="display:none">
<div class="form-group ">
<label for="selectcatparent">Types de Contenus</label>
<select id="selectcatparent">
{% for catparent in catparents %}
{% set selected ="" %}
{% if catparent == "map" %}
{% set selected ="selected" %}
{% endif %}
<option value="map" {{selected}}>Cartes</option>
{% set selected ="" %}
{% if catparent == "blog" %}
{% set selected ="selected" %}
{% endif %}
<option value="blog" {{selected}}>Actualités</option>
{% set selected ="" %}
{% if catparent == "page" %}
{% set selected ="selected" %}
{% endif %}
<option value="page" {{selected}}>Pages</option>
{% endfor %}
</select>
</div>
</div>
<div class="col col-md-6">
<div class="form-group ">
<label for="selecttag">Tags</label>
<select id="selecttag" multiple="multiple">
{% for tag in lsttags %}
{% set selected ="" %}
{% for selectag in tags %}
{% if tag.id == selectag %}
{% set selected ="selected" %}
{% endif %}
{% endfor %}
<option value="{{tag.id}}" {{selected}}>{{tag.id}}</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-9 pt-3">
{% set idchildtype=-100 %}
{% set idparent=-100 %}
{% set tbtag=[] %}
{% set tbname=[] %}
{% for child in childs %}
{% if loop.first %}
<h1 class="mt-3 mb-3">{{ child.childtype.name|replace({"Embed ":""}) }}</h1>
{% if not nopagination %}
<div class="mypaginationup mb-3" style="text-align:center;zoom:120%";></div>
{% endif %}
{% if not isalpha and child.childtype.id!=30 %}
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% endif %}
{% endif %}
{% if isalpha or child.childtype.id==30 %}
{% if child.idparent != idparent %}
{% if not loop.first %} </div> {% endif %}
<h2 class="mt-3 mb-3 MAP{{child.idparent}}">{{ child.nameparent }}</h2>
<div class="grid MAP{{child.idparent}}">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% set idparent=child.idparent %}
{% set tbname = tbname|merge({("MAP"~child.idparent):child.nameparent}) %}
{% endif %}
{% endif %}
{% set tagsclass="" %}
{% for tag in child.tags %}
{% set tagid=tag.id|replace({" ":""}) %}
{% if tag.id not in tbtag %}
{% set tbtag = tbtag|merge({(tagid):tag.id}) %}
{% endif %}
{% set tagsclass=tagsclass~" tag-"~tagid %}
{%endfor%}
{% if child.childtype.id==10 %}
<!--
{% set style="" %}
{% set url = "/"~appAlias~"/uploads/child/"~child.id~"/"~child.filename %}
<a href="{{url}}" target="_blank" class="d-block text-center">
<div class="grid-item grid-item-size-2 grid-square d-flex align-items-stretch {{tagsclass}}">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="{{style}}">
<div class="grid-item-title">{{ child.name }}</div>
</div>
</div>
</a>
-->
{% set url = "/"~appAlias~"/uploads/child/"~child.id~"/"~child.filename %}
<h2>{{ child.name }}</h2>
<a href="{{path("app_child_view",{catparent:child.catparent,idparent:child.idparent,idchild:0})}}">En savoir plus</a>
<iframe src="{{url}}" class="align-self-stretch" style="width:100%; background-color:#000;border:none; height:400px;"></iframe>
<a href="{{url}}" target="_blank" class="d-block text-center mb-5"><i class="fas fa-search-plus fa-2x"></i></a>
{% elseif child.childtype.id==12 or child.childtype.id==13 or child.childtype.id==30 %}
{% if child.childtype.id==12 or child.childtype.id==30 %}
{% set background="/"~appAlias~"/uploads/child/"~child.id~"/thumb/"~child.filename %}
{% else %}
{% set background=child.url %}
{% endif %}
{% set style="height:auto;background-position: center ; background-size: cover; background-image: url("~background~")" %}
<div class="grid-item grid-item-size-2 grid-square grid-modal d-flex align-items-stretch {{tagsclass}}" data-catparent="{{child.catparent}}" data-idparent="{{child.idparent}}" data-idchild="{{child.id}}">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="{{style}}"></div>
</div>
{% elseif child.childtype.id==16 or child.childtype.id==17 %}
{% set style="" %}
{%if child.image %}
{% set background=child.image|replace({"**appAlias**":appAlias}) %}
{% set style="height:auto;background-position: center ; background-size: cover; background-image: url("~background~")" %}
{% else %}
{%endif%}
<a href="{{path("app_child_view",{catparent:child.catparent,idparent:child.idparent,idchild:child.id})}}">
<div class="grid-item grid-item-size-2 grid-a4 d-flex align-items-stretch {{tagsclass}}">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="{{style}}">
<div class="grid-item-title">{{ child.name }}</div>
</div>
</div>
</a>
{%else%}
{% set style="" %}
{%if child.image %}
{% set background=child.image|replace({"**appAlias**":appAlias}) %}
{% set style="height:auto;background-position: center ; background-size: cover; background-image: url("~background~")" %}
{%endif%}
<a href="{{path("app_child_view",{catparent:child.catparent,idparent:child.idparent,idchild:child.id})}}">
<div class="grid-item grid-item-size-2 grid-square d-flex align-items-stretch {{tagsclass}}">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="{{style}}">
<div class="grid-item-title">{{ child.name }}</div>
</div>
</div>
</a>
{% endif %}
{% if loop.last %}
</div>
{% endif %}
{%endfor%}
{% if not nopagination %}
<div class="mypaginationdown" style="text-align:center;zoom:120%";></div>
{% endif %}
</div>
<div class="col-md-3">
<div class="mt-3 p-3" style="height:100%; background-color:#efefef;">
{% if isalpha %}
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"a"})}}">A</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"b"})}}">B</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"c"})}}">C</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"d"})}}">D</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"e"})}}">E</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"f"})}}">F</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"g"})}}">G</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"h"})}}">H</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"i"})}}">I</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"j"})}}">J</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"k"})}}">K</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"l"})}}">L</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"m"})}}">M</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"n"})}}">N</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"o"})}}">O</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"p"})}}">P</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"q"})}}">Q</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"r"})}}">R</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"s"})}}">S</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"t"})}}">T</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"u"})}}">U</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"v"})}}">V</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"w"})}}">W</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"x"})}}">X</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"y"})}}">Y</a>
<a class="btn-link tagalpha" href="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,alpha:"z"})}}">Z</a>
<br><br>
{% endif %}
{% if isalpha %}
<div style="zoom:80%">
<span data-id="tag-all" class="btn-link tagname"><i class="fas fa-tag"></i> Afficher Tout</span>
{% for key, name in tbname %}
<span data-id="{{key}}" class="btn-link tagname"><i class="fas fa-tag"></i> {{name}}</span>
{% endfor %}
</div>
{%else%}
<span data-id="tag-all" class="btn-link tag"><i class="fas fa-tag"></i> Afficher Tout</span>
{% for key, tag in tbtag %}
<span data-id="tag-{{key}}" class="btn-link tag"><i class="fas fa-tag"></i> {{tag}}</span>
{% endfor %}
{%endif%}
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$(window).resize(function() {
resizegrid();
});
$(document).ready(function() {
$("#selectcatparent").select2();
$("#selecttag").select2();
$("#selecttype").select2();
{% if not nopagination and count>maxresult%}
var itemsCount = {{count}};
var itemsOnPage = {{maxresult}};
url="{{path("app_child_search",{childtypes:childtypes,tags:tags|join(','),query:query,first:"{{page}}"})}}";
url=url.replaceAll("&amp;","&");
url=url.replaceAll("%7B","{");
url=url.replaceAll("%7D","}");
var pagination = new Pagination({
container: $(".mypaginationup"),
pageClickUrl: url
});
pagination.make(itemsCount, itemsOnPage, {{first}});
var pagination = new Pagination({
container: $(".mypaginationdown"),
pageClickUrl: url
});
pagination.make(itemsCount, itemsOnPage, {{first}});
{% endif %}
resizegrid();
});
function resizegrid() {
width=$('.grid-item').width();
console.log(width);
$('.grid-square').not('.grid-video').height(width);
$('.grid-a4').not('.grid-video').height(width/0.7);
$('.grid').masonry({
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer',
itemSelector: '.grid-item',
percentPosition: true,
horizontalOrder: false,
});
}
$(".tag").click(function(){
id=$(this).data("id");
if(id=="tag-all") {
$('.grid-item').each(function() {
$(this).addClass("d-flex");
$(this).show();
});
}
else {
$('.grid-item').each(function() {
$(this).removeClass("d-flex");
$(this).hide();
});
$('.'+id).each(function() {
$(this).addClass("d-flex");
$(this).show();
});
}
$('.grid').masonry();
});
$(".tagname").click(function(){
id=$(this).data("id");
if(id=="tag-all") {
$('.grid').show();
$('h2').show();
}
else {
$('.grid').hide();
$('h2').hide();
$('.'+id).each(function() {
$(this).show();
});
}
$("html, body").animate({ scrollTop: 0 },200);
});
$('#searchname').bind("enterKey",function(e){
$('.btn-success').click();
});
$('#searchname').keyup(function(e){
if(e.keyCode == 13)
{
$('.btn-success').click();
}
});
$('.grid-modal').click(function(){
url='{{path("app_child_view",{catparent:"ccc",idparent:"ppp",idchild:"iii"})}}';
url=url.replace("ccc",$(this).data("catparent"));
url=url.replace("ppp",$(this).data("idparent"));
url=url.replace("iii",$(this).data("idchild"));
ModalLoad('mymodallarge','Galerie',url );
});
$('.btn-search').click(function(){
catparent=$("#selectcatparent").val();
types=$(this).data("types");
tags=$("#selecttag").val().join(',');
query=$("#searchname").val();
url="{{path("app_child_search",{tags:"ttt",childtypes:"ppp",query:"qqq",catparents:"ccc"})}}";
url=url.replace("ccc",catparent);
url=url.replace("qqq",query);
url=url.replace("ppp",types);
url=url.replace("ttt",tags);
url=url.replaceAll("&amp;","&");
document.location=url;
});
$( ".grid-item" ).hover(function() {
$( this ).children(".grid-image").css("transform","scale(1.05)");
}, function() {
$( this ).children(".grid-image").css("transform","scale(1)");
});
</script>
{% endblock %}

View File

@ -0,0 +1,80 @@
{% extends 'base.html.twig' %}
{% block encoretags %}
{{ encore_entry_link_tags('dropzone') }}
{% endblock %}
{% block body %}
<h1 class="page-header">
Upload child{% if typeupload!="all" %} = {{ typeupload }}{%endif%}
</h1>
{% if idchild is defined %}
<a href="{{path("app_child_update",{catparent:catparent,idparent:idparent,idchild:idchild})}}" class="btn btn-secondary">Annuler</a>
{% else %}
<a href="{{path("app_child",{catparent:catparent,idparent:idparent})}}" class="btn btn-secondary">Annuler</a>
{% endif %}
<form
action="{{ oneup_uploader_endpoint('child') }}"
class="dropzone"
id="mydropzone"
{%if typeupload=="image" %}
data-acceptedFiles: 'image/*',
{%elseif typeupload=="video" %}
data-acceptedFiles: 'video/*',
data-timeout: 900000,
{%endif%}
{% if idchild is defined %}
data-maxFiles=1
{% else %}
data-maxFiles="0"
{%endif%}
style="margin-top:10px">
</form>
{% endblock %}
{% block localscript %}
{{ encore_entry_script_tags('dropzone') }}
<script>
function dropzoneinit( elmt ) {
var totalFiles = 0;
var completeFiles = 0;
elmt.on("sending", function(file, xhr, formData) {
formData.append("type", "{{ type }}");
formData.append("catparent", "{{ catparent }}");
formData.append("idparent", "{{ idparent }}");
formData.append("idchildtype", "{{ idchildtype }}");
formData.append("typeupload", "{{ typeupload }}");
{% if idchild is defined %}
formData.append("idchild", "{{ idchild }}");
{% else %}
formData.append("idchild", "-99999");
{% endif %}
});
elmt.on("addedfile", function (file) {
totalFiles += 1;
});
elmt.on("removed file", function (file) {
totalFiles -= 1;
});
elmt.on("complete", function (file) {
completeFiles += 1;
if (completeFiles === totalFiles) {
{% if idchild is defined %}
window.location="{{path("app_child_update",{catparent:catparent,idparent:idparent,idchild:idchild})}}";
{% else %}
window.location="{{path("app_child",{catparent:catparent,idparent:idparent})}}";
{% endif %}
}
});
}
function dropzonesuccess( file, response ) {
}
</script>
{% endblock %}

View File

@ -0,0 +1,115 @@
{% extends 'base.html.twig' %}
{% block title %}{{app.session.get("appname")}} - {{child.name}}{% endblock %}
{% block useractions %}
{% if is_granted('ROLE_ADMIN') %}
<li>
<a href="{{path("app_child",{catparent:catparent,idparent:parent.id})}}"><i class="fa fa-file fa-2x"></i></a>
</li>
{% endif %}
{% endblock %}
{% block body %}
<h1 class="child-name pt-0 text-uppercase mb-4" style="margin-top:30px">{{child.name}}</h1>
{% if child.subname %}<div style="margin-top:-23px"><small class="child-subname">{{child.subname}}</small></div>{% endif %}
<center>
{% if child.childtype.id==14 or child.childtype.id==18 %}
{% set url = "/"~appAlias~"/uploads/child/"~child.id~"/"~child.filename %}
<video class="align-self-stretch" style="width:100%;background-color:#000;" controls="" name="media"><source src="{{url}}"></video>
{% elseif child.childtype.id==10 %}
{% set url = "/"~appAlias~"/uploads/child/"~child.id~"/"~child.filename %}
<iframe src='{{url}}' class="align-self-stretch" style="width:100%; background-color:#000;border:none; height:500px;"></iframe>
{% else %}
<iframe class='widyoutube' src='{{child.url}}' class="align-self-stretch" style="width:100%; background-color:#000;border:none; height:500px;"></iframe>
{% endif %}
</center>
{% for attributorder in child.childtype.childtypeattributs %}
{% if attributorder.childattribut.name in child.attributs|keys and not child.attributs[attributorder.childattribut.name] is empty %}
<strong>{{ attributorder.childattribut.label }}</strong> = {{ child.attributs[attributorder.childattribut.name]}}<br>
{% endif %}
{% endfor %}
<div class="mt-2">{{child.description|raw}}</div>
{% set separator="g" %}
{%if otherpages %}
<div class="child-separator mt-5" >
<img src="/{{appAlias}}/images/separateur-{{separator}}.png" width="100%">
{% if separator=="d" %} {% set separator="g" %} {%else%} {% set separator="d" %} {%endif%}
</div>
<div class="child-pages mb-5">
<h3 class="mt-5">Articles associés</h3>
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% for page in otherpages %}
{% set style="" %}
{%if page.image %}
{% set background=page.image|replace({"**appAlias**":appAlias}) %}
{% set style="height:auto;background-position: center ; background-size: cover; background-image: url("~background~")" %}
{%endif%}
<a href="{{path("app_child_view",{catparent:catparent,idparent:parent.id,idchild:page.id,framed:framed,size:size})}}">
<div class="grid-item grid-item-size-2 grid-square d-flex align-items-stretch">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="{{style}}">
<div class="grid-item-title">{{ page.name }}</div>
</div>
</div>
</a>
{% endfor %}
</div>
</div>
{% endif %}
{% endblock %}
{% block localscript %}
<script>
$(window).resize(function() {
resizegrid();
});
$(document).ready(function() {
$('.grid-item').imagesLoaded(function() {
$('.grid').masonry({
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer',
itemSelector: '.grid-item',
percentPosition: true,
horizontalOrder: false,
});
resizegrid();
});
});
function resizegrid() {
$('.grid-square').each(function() {
$(this).height($(this).width());
});
$('.grid').masonry({
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer',
itemSelector: '.grid-item',
percentPosition: true,
horizontalOrder: false,
});
}
$( ".grid-item" ).hover(function() {
$( this ).children(".grid-image").css("transform","scale(1.05)");
}, function() {
$( this ).children(".grid-image").css("transform","scale(1)");
});
</script>
{% endblock %}

View File

@ -0,0 +1,240 @@
{% extends 'base.html.twig' %}
{% block title %}{{app.session.get("appname")}} - {{child.name}}{% endblock %}
{% block menuuser %}
{% if is_granted('ROLE_ADMIN') %}
<li>
<a href="{{path("app_child",{catparent:catparent,idparent:parent.id})}}"><i class="fa fa-file"></i></a>
</li>
{% endif %}
{% endblock %}
{% block beforebody %}
{% if not child.childheaders is empty %}
<div class="heroheader" style="display:none;width:100%;" >
{% for childheader in child.childheaders %}
<div class="p-0 m-0" style="height:100%;background-size:cover;background-image:url({{path("app_minio_image",{file:childheader.filename})}})">
<div style="padding-left:150px;padding-top:70px; height:auto;">
<h1>
<div style="font-size:16px; margin-bottom: 10px;">
{% set haveother=false %}
{% if catparent=="blog" and parent.blogtype.blogs|length > 1%}
{% set haveother=true %}
<a href="{{path("app_typeblog_home",{id:parent.blogtype.id}) }}">
{% elseif catparent=="page" and parent.pagetype.pages|length > 1 %}
{% set haveother=true %}
<a href="{{path("app_typepage_home",{id:parent.pagetype.id}) }}">
{%endif%}
{{ typeparent }}
{%if haveother %}
</a>
{%endif%}
</div>
{{child.name}}
</h1>
{% if catparent=="page" %}
{% for page in parent.pagetype.pages %}
{% set url=path("app_child_view",{catparent:'page', idparent:page.id, idchild:page.childs[0].id }) %}
<a class="p-2 me-1" style="background-color:var(--colorbgbodyimportant" href="{{url}}">{{page.childs[0].name}}</a>
{% endfor %}
{% endif %}
<span style="line-height:20px; display:block">{{ child.subname|nl2br }}</span>
</div>
{% if childheader.credit %}<div class="herocredit position-absolute d-flex align-items-end justify-content-end" style="top:0px;padding:5px;font-size:80%;">© {{ childheader.credit }}</div>{% endif %}
</div>
{%endfor%}
</div>
{% endif %}
{% endblock %}
{% block body %}
{% set haveside=true %}
{% if catparent!="blog" and
child.tags is empty and
contacts is empty and
ressources is empty and
links is empty %}
{% set haveside=false %}
{% endif %}
{%if pages and pages|length > 1%}
<div class="child-pages">
{% for page in pages %}
<a class="btn btn-primary mb-1" href="{{path("app_child_view",{catparent:catparent,idparent:parent.id,idchild:page.id,framed:framed,size:size})}}">
{{ page.name }}
</a>
{% endfor %}
</div>
{% endif %}
<div class="mt-5">
{%if haveside %}
<div class="row mb-5">
<div class="col-md-8">
{% endif %}
<h1 class="child-name pt-0 text-uppercase mb-4">{{child.name}}</h1>
{% if child.subname %}<div style="margin-top:-23px"><small class="child-subname">{{child.subname}}</small></div>{% endif %}
<div class="child-content mt-3">
<div class="child-attributs">
{% if child.childtype.haveurl and child.url %}<strong>Site</strong> = <a target="_blank" href="{{ child.url }}">{{child.url}}</a><br>{%endif%}
</div>
<div class="child-description mt-2">
{{child.description|raw}}
</div>
{% if images %}
<div class="child-images">
<h3 class="mt-5">Galerie Photos</h3>
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% for image in images %}
{% if image.childtype.id==12 %}
{% set background=path("app_minio_image",{file:"child/"~image.id~"/thumb/"~image.filename}) %}
{% else %}
{% set background=image.url %}
{% endif %}
{% set style="height:auto;background-position: center ; background-size: cover; background-image: url("~background~")" %}
<button class="btn-modal" data-modalid="mymodalfull" data-modaltitle="Galerie" data-modalurl="{{path("app_child_view",{catparent:catparent,idparent:parent.id,idchild:image.id})}}">
<div class="grid-item grid-item-size-4 grid-square d-flex align-items-stretch">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="{{style}}">
</div>
</div>
</button>
{% endfor %}
</div>
</div>
{% endif %}
{% if videos %}
<div class="child-videos">
<h3 class="mt-5">Videos</h3>
<div class="d-flex">
{% for video in videos %}
{% if video.childtype.id==14 %}
{% set url = path("app_minio_image",{file:"child/"~video.id~"/"~video.filename }) %}
<video class="align-self-stretch" style="width:50%;background-color:#000; height:240px;" controls="" name="media"><source src="{{url}}"></video>
{% else %}
<iframe class='widyoutube' src='{{video.url}}' allowfullscreen="allowfullscreen" class="align-self-stretch" style="width:50%; background-color:#000;border:none; height:240px;"></iframe>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% if bibliographys %}
<div class="child-separator mt-5" >
<img src="/{{appAlias}}/images/separateur-{{separator}}.png" width="100%">
{% if separator=="d" %} {% set separator="g" %} {%else%} {% set separator="d" %} {%endif%}
</div>
<div class="child-links">
{% for bibliography in bibliographys %}
{% if loop.first %}
<h3 class="mt-5">Bibliographies</h3>
{%endif%}
{% if bibliography.url %}
<a class="btn-link" target="_blank" href="{{bibliography.url}}">
{% endif %}
<div class="mb-2" style="line-height:16px">
{{ bibliography.name}}<br>
<small>{{ bibliography.subname}}</small>
</div>
{% if bibliography.url %}
</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% if haveside %}
</div>
<div class="col-md-4">
<div class="p-3 child-sidebar">
{% if not child.tags is empty %}
<div class="mb-3 child-tags">
{% for tag in child.tags %}
{% if loop.first %}
<h3 class="mt-5">Tags</h3>
{%endif%}
<span class="tag"><a class="btn-link" href="{{path("app_child_search",{tags:tag.id}) }}"><i class="fas fa-tag"></i> {{tag.id}}</a></span>
{% endfor %}
</div>
{% endif %}
<div class="child-other">
<h3>Autres Publications</h3>
{% for otherchidblog in child.childblogs[0].blog.childblogs[0] %}
{{otherchidblog.child.name}}<br>
{% endfor %}
</div>
{% if not ressources is empty %}
<div class="child-ressources">
<h3>Ressources</h3>
{% for ressource in ressources %}
{% if ressource.childtype.id==16 %}
{% set filename="/"~appAlias~"/uploads/child/"~ressource.id~"/"~ressource.filename %}
{% else %}
{% set filename=ressource.url %}
{% endif %}
<a class="btn-link" target="_blank" href="{{filename}}">
<div class="d-flex align-items-center mb-3">
<i class="fas fa-file-alt fa-2x mr-4"></i>
<div style="line-height: 15px;">
{{ ressource.name}}<br>
<small>{{ ressource.subname}}</small>
</div>
</div>
</a>
{% endfor %}
</div>
{% endif %}
{% if not links is empty %}
<div class="mb-3 child-links">
<h3 >Liens Externes</h3>
{% for link in links %}
<a class="btn-link" target="_blank" href="{{link.url}}">
<div class="d-flex align-items-center mb-3">
<i class="fas fa-link fa-2x me-2"></i>
<div style="line-height: 15px;">
<big>{{ link.name}}</big><br>
<small>{{ link.subname}}</small>
</div>
</div>
</a>
{% endfor %}
</div>
{% endif %}
</div>
{% if is_granted('ROLE_ADMIN') %}
<div class="text-right p-1" style="line-height:10px">
<small><i>
{% if not parent.externalcode is empty %}
{{parent.externalcode}} = {{parent.externalid}}<br>
{%endif%}
</i>
</small>
</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endblock %}