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

@ -1,78 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification Annonces = {{alert.title}}
{% elseif mode=="submit" %}
Création Annonces
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_'~access~'_alert') }}>Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_'~access~'_alert_delete',{'id':alert.id}) }}
class="btn btn-danger float-end"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cette annonce ?">
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="form-group row clearfix">
<div class="col-md-8">
<div class="card">
<div class="card-header">
<i class="fas fa-pencil-alt fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.title) }}
{{ form_row(form.fghideable) }}
{{ form_row(form.publishedat) }}
{{ form_row(form.unpublishedat) }}
{{ form_row(form.content) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-header">
<i class="fa fa-link fa-fw"></i> Affectations
</div>
<div class="card-body">
{{ form_row(form.alertcategory) }}
{{ form_row(form.roles) }}
{{ form_row(form.groups) }}
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}

View File

@ -1,431 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
<h1 class="page-header">
Gestion des Annonces
</h1>
<p>
<a href="{{ path('app_'~access~'_alert_submit') }}" class="btn btn-success">Ajouter une Annonce</a>
<a href="{{ path('app_'~access~'_alertcategory_submit') }}" class="btn btn-success">Ajouter une Catégorie</a>
</p>
<div class="row">
<div class="col-md-9">
<div id="listpending" class="card mb-5">
<div class="card-header"><h3 style="margin:0px"><i class="fa fa-pause fa-fw"></i> En Attente Publication</h3></div>
<ul class="list-alert list-group list-group-flush">
{% for alert in alerts %}
{% if alert.isPending %}
<div
class="alert-item list-group-item d-flex flex-column
alertcategory-{{ alert.alertcategory.id }}
{{ alert.isOnline ? "alertstatut-online" : ""}}
{{ alert.isPending ? "alertstatut-pending" : ""}}
{{ alert.isArchived ? "alertstatut-archived" : ""}}
{% for group in alert.groups %}{{ ' group-' ~ group.id }}{% endfor %}
{% for role in alert.roles %}{{ ' role-' ~ role }}{% endfor %}
"
data-alert-category-id="{{ alert.alertcategory.id }}"
data-alert-id="{{ alert.id }}"
style="background: {{ alert.alertcategory.color ? alert.alertcategory.color : 'var(--colorbgbodydark)' }};"
>
<div class="d-flex align-items-center">
<div class="d-flex align-items-center w-100" style="color: var(--colorftbodydark) !important">
<i class="fa fa-arrows-up-down fa-2x fa-fw me-1"></i>
{% if alert.alertcategory.icon %}
<img height="35" src="{{ path('app_minio_image',{file:alert.alertcategory.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_megaphone.png"}) }}">
{% endif %}
<a href="{{ path('app_'~access~'_alert_update', { id: alert.id }) }}" class="ms-3" style="color: var(--colorftbodydark) !important; font-family: var(--fonttitle); font-size:var(--fontsizeh3)">
{{ alert.title }}
</a>
</div>
<a class="float-end" data-bs-toggle="collapse" href="#alert-{{ alert.id }}" role="button" aria-expanded="false" aria-controls="alert-{{ alert.id }}" style="color: var(--colorftbodydark) !important;">
<i class="fa fa-chevron-down fa-2x"></i>
</a>
</div>
<div id="alert-{{ alert.id }}" class="ckeditor-content collapse pt-3" style="color: var(--colorftbodydark) !important;">
{{ alert.content|raw }}
</div>
</div>
{% endif %}
{% endfor %}
</ul>
</div>
<div id="listonline" class="card mb-5">
<div class="card-header"><h3 style="margin:0px"><i class="fa fa-eye fa-fw"></i> En Ligne</h3></div>
<ul class="list-alert list-group list-group-flush">
{% for alert in alerts %}
{% if alert.isOnline %}
<div
class="alert-item list-group-item d-flex flex-column
alertcategory-{{ alert.alertcategory.id }}
{{ alert.isOnline ? "alertstatut-online" : ""}}
{{ alert.isPending ? "alertstatut-pending" : ""}}
{{ alert.isArchived ? "alertstatut-archived" : ""}}
{% for group in alert.groups %}{{ ' group-' ~ group.id }}{% endfor %}
{% for role in alert.roles %}{{ ' role-' ~ role }}{% endfor %}
"
data-alert-category-id="{{ alert.alertcategory.id }}"
data-alert-id="{{ alert.id }}"
style="background: {{ alert.alertcategory.color ? alert.alertcategory.color : 'var(--colorbgbodydark)' }};"
>
<div class="d-flex align-items-center">
<div class="d-flex align-items-center w-100" style="color: var(--colorftbodydark) !important">
<i class="fa fa-arrows-up-down fa-2x fa-fw me-1"></i>
{% if alert.alertcategory.icon %}
<img height="35" src="{{ path('app_minio_image',{file:alert.alertcategory.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_megaphone.png"}) }}">
{% endif %}
<a href="{{ path('app_'~access~'_alert_update', { id: alert.id }) }}" class="ms-3" style="color: var(--colorftbodydark) !important; font-family: var(--fonttitle); font-size:var(--fontsizeh3)">
{{ alert.title }}
</a>
</div>
<a class="float-end" data-bs-toggle="collapse" href="#alert-{{ alert.id }}" role="button" aria-expanded="false" aria-controls="alert-{{ alert.id }}" style="color: var(--colorftbodydark) !important;">
<i class="fa fa-chevron-down fa-2x"></i>
</a>
</div>
<div id="alert-{{ alert.id }}" class="ckeditor-content collapse pt-3" style="color: var(--colorftbodydark) !important;">
{{ alert.content|raw }}
</div>
</div>
{% endif %}
{% endfor %}
</ul>
</div>
<div id="listarchived" class="card mb-5">
<div class="card-header"><h3 style="margin:0px"><i class="fa fa-history fa-fw"></i>Archivées</h3></div>
<ul class="list-alert list-group list-group-flush">
{% for alert in alerts %}
{% if alert.isArchived %}
<div
class="alert-item list-group-item d-flex flex-column
alertcategory-{{ alert.alertcategory.id }}
{{ alert.isOnline ? "alertstatut-online" : ""}}
{{ alert.isPending ? "alertstatut-pending" : ""}}
{{ alert.isArchived ? "alertstatut-archived" : ""}}
{% for group in alert.groups %}{{ ' group-' ~ group.id }}{% endfor %}
{% for role in alert.roles %}{{ ' role-' ~ role }}{% endfor %}
"
data-alert-category-id="{{ alert.alertcategory.id }}"
data-alert-id="{{ alert.id }}"
style="background: {{ alert.alertcategory.color ? alert.alertcategory.color : 'var(--colorbgbodydark)' }};"
>
<div class="d-flex align-items-center">
<div class="d-flex align-items-center w-100" style="color: var(--colorftbodydark) !important">
<i class="fa fa-arrows-up-down fa-2x fa-fw me-1"></i>
{% if alert.alertcategory.icon %}
<img height="35" src="{{ path('app_minio_image',{file:alert.alertcategory.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_megaphone.png"}) }}">
{% endif %}
<a href="{{ path('app_'~access~'_alert_update', { id: alert.id }) }}" class="ms-3" style="color: var(--colorftbodydark) !important; font-family: var(--fonttitle); font-size:var(--fontsizeh3)">
{{ alert.title }}
</a>
</div>
<a class="float-end" data-bs-toggle="collapse" href="#alert-{{ alert.id }}" role="button" aria-expanded="false" aria-controls="alert-{{ alert.id }}" style="color: var(--colorftbodydark) !important;">
<i class="fa fa-chevron-down fa-2x"></i>
</a>
</div>
<div id="alert-{{ alert.id }}" class="ckeditor-content collapse pt-3" style="color: var(--colorftbodydark) !important;">
{{ alert.content|raw }}
</div>
</div>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
<div class="col-md-3">
<div class="card">
<div class="card-header">
<i class="fa fa-filter"></i>
Afficher par Catégorie
</div>
<div id="category-filter" class="list-group list-group-flush">
{% for alertcategory in alertcategorys %}
<div class="d-flex">
<a href="#" class="list-group-item active category-alert-item" data-category="{{ alertcategory.id }}" style="width:100%; border-left: 15px solid {{ alertcategory.color ? alertcategory.color : 'var(--colorbgbodydark)' }}; position: inherit;">
{% if alertcategory.icon %}
<img height="25" src="{{ path('app_minio_image',{file:alertcategory.icon.label}) }}">
{% else %}
<img height="25" src="{{ path('app_minio_image',{file:"icon/icon_megaphone.png"}) }}">
{% endif %}
{{ alertcategory.label }}
</a>
<a class="btn btn-primary float-right" href="{{ path('app_'~access~'_alertcategory_update', { id: alertcategory.id }) }}" style="margin:4px">
<i class="fa fa-edit"></i>
</a>
</div>
{% endfor %}
</div>
</div>
<div class="card mt-3">
<div class="card-header">
<i class="fa fa-filter"></i>
Afficher par Rôle
</div>
<ul id="role-filter" class="list-group list-group-flush">
<a class="active list-group-item filterfgall" id="allrole" style="cursor:pointer">
<i class="fa fa-users"></i>
Toutes les Rôles
<span class="badge bg-success float-end">{{ alerts|length }}</span>
</a>
<a class="list-group-item" data-role="ROLE_ANONYME" style="cursor:pointer">
<i class="fa fa-user"></i>
Visiteur
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_USER" style="cursor:pointer">
<i class="fa fa-user"></i>
Utilisateur
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_MANAGER" style="cursor:pointer">
<i class="fa fa-user"></i>
Manager
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_MASTER" style="cursor:pointer">
<i class="fa fa-user"></i>
Master
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_MODO" style="cursor:pointer">
<i class="fa fa-user"></i>
Modérateur
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_ADMIN" style="cursor:pointer">
<i class="fa fa-user"></i>
Administrateur
<span class="badge bg-success float-end"></span>
</a>
</ul>
</div>
<div class="card mt-3">
<div class="card-header">
<i class="fa fa-filter"></i>
Afficher par Groupes
</div>
<div id="group-filter" class="list-group list-group-flush">
<a href="#" class="active list-group-item filterfgall">
<i class="fa fa-users"></i>
Tout les groupes
<span class="badge bg-success float-end">{{ alerts|length }}</span>
</a>
{% for group in groups %}
<a class="list-group-item" href="#" data-role="{{ group.id }}">
<i class="fa fa-user"></i>
{{ group.label }}
<span class="badge bg-success float-end">{{ group.alerts|length }}</span>
</a>
{% endfor %}
</div>
</div>
<div class="card mt-3">
<div class="card-header">
<i class="fa fa-filter"></i>
Afficher par statut
</div>
<div id="statut-filter" class="list-group list-group-flush">
<a class="list-group-item active filterfgall" data-statut="all" href="#">
<i class="fa fa-eye-slash"></i>
Toutes
</a>
<a class="list-group-item" data-statut="online" href="#">
<i class="fa fa-eye"></i>
En ligne
</a>
<a class="list-group-item" data-statut="pending" href="#">
<i class="fas fa-pause"></i>
En attente de publication
</a>
<a class="list-group-item" data-statut="archived" href="#">
<i class="fa fa-history"></i>
Archivées
</a>
</div>
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("a[data-role='ROLE_ANONYME']").children("span").html($('.role-ROLE_ANONYME').length);
$("a[data-role='ROLE_USER']").children("span").html($('.role-ROLE_USER').length);
$("a[data-role='ROLE_MANAGER']").children("span").html($('.role-ROLE_MANAGER').length);
$("a[data-role='ROLE_MASTER']").children("span").html($('.role-ROLE_ANIM').length);
$("a[data-role='ROLE_MODO']").children("span").html($('.role-ROLE_MODO').length);
$("a[data-role='ROLE_ADMIN']").children("span").html($('.role-ROLE_ADMIN').length);
function updateItems() {
$('.alert-item').each(function(i) {
var itemid = $(this).data('alert-id');
$(this).find('input[name="alert_item[rowOrder][]"]').val(i);
// Mise à jour en base de l'order
$.ajax({
method: "POST",
url: "{{ path('app_'~access~'_alert_order') }}",
data: {
id:itemid,
order:i
}
});
});
}
if($(".alertstatut-pending").length==0) $("#listpending").hide();
if($(".alertstatut-online").length==0) $("#listonline").hide();
if($(".alertstatut-archived").length==0) $("#listarchived").hide();
$( ".list-alert" ).sortable({
axis: "y",
placeholder: "alert.item placeholder",
update: updateItems
});
$("#category-filter a.category-alert-item").click(function(){
// On réactive les auters filtres à tout
$('#role-filter a').removeClass('active');
$('#group-filter a').removeClass('active');
$('#statut-filter a').removeClass('active');
$(".filterfgall").addClass('active');
$(this).toggleClass('active');
$('.category-alert-item').each(function(i) {
var $alerts = $('.alertcategory-'+$(this).data('category'));
if($(this).hasClass('active')){
$alerts.each(function(i) { $(this).removeClass("hide"); });
} else {
$alerts.each(function(i) { $(this).addClass("hide"); });
}
});
return false;
});
$('#role-filter a').click(function(){
// On réactive les auters filtres à tout
$(".category-alert-item").addClass('active');
$('#group-filter a').removeClass('active');
$('#statut-filter a').removeClass('active');
$(".filterfgall").addClass('active');
// On rend actif la zone cliquée
$('#role-filter a').removeClass('active');
$(this).addClass('active');
// On cache l'ensemble des elements
$('.alert-item').each(function(i) { $(this).addClass("hide"); });
// On affiche les elements filtrés
if($(this).hasClass('filterfgall'))
var $alerts = $('.alert-item');
else
var $alerts = $('.role-'+$(this).data('role'));
$alerts.each(function(i) { $(this).removeClass("hide"); });
return false;
});
$('#group-filter a').click(function(){
// On réactive les auters filtres à tout
$(".category-alert-item").addClass('active');
$('#role-filter a').removeClass('active');
$('#statut-filter a').removeClass('active');
$(".filterfgall").addClass('active');
// On rend actif la zone cliquée
$('#group-filter a').removeClass('active');
$(this).addClass('active');
// On cache l'ensemble des elements
$('.alert-item').each(function(i) { $(this).addClass("hide"); });
// On affiche les elements filtrés
if($(this).hasClass('filterfgall'))
var $alerts = $('.alert-item');
else
var $alerts = $('.group-'+$(this).data('role'));
$alerts.each(function(i) { $(this).removeClass("hide"); });
return false;
});
$("#statut-filter a").click(function(){
// On réactive les auters filtres à tout
$(".category-alert-item").addClass('active');
$('#group-filter a').removeClass('active');
$("#group-filter .filterfgall").addClass('active');
// On rend actif la zone cliquée
$('#statut-filter a').removeClass('active');
$(this).addClass('active');
// On cache l'ensemble des elements
$('.alert-item').each(function(i) { $(this).addClass("hide"); });
// On affiche les elements filtrés
if($(this).hasClass('filterfgall'))
var $alerts = $('.alert-item');
else
var $alerts = $('.alertstatut-'+$(this).data('statut'));
$alerts.each(function(i) { $(this).removeClass("hide"); });
return false;
});
} );
</script>
{% endblock %}

View File

@ -1,91 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification Catégorie d'Annonce = {{alertcategory.label}}
{% elseif mode=="submit" %}
Création Catégorie d'Annonce
{% endif %}
</h1>
<p>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_'~access~'_alert') }}>Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_'~access~'_alertcategory_delete',{'id':alertcategory.id}) }}
class="btn btn-danger float-end"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cette catégorie ?">
Supprimer
</a>
{% endif %}
</p>
{% 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="card">
<div class="card-header">
<i class="fa fa-pencil-alt fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.label) }}
{{ form_row(form.color) }}
<div id="diviconsel" class="col-md-12 text-center mt-1 mb-1" style="height:140px; padding:20px; background-color: {{ alertcategory.color ? alertcategory.color : 'var(--colorbgbodydark)' }};">
{% if alertcategory.icon %}
<img src="{{ path('app_minio_image',{file:alertcategory.icon.label}) }}" height="100" />
{% endif %}
</div>
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success btn-modal" data-modalid="mymodallarge" data-modaltitle="Icône" data-modalurl="{{ path('app_all_icon_select') }}" title='Selectionner un Icône'>Selectionner un Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher'>Détacher l'Icône</a>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
function selIcon(idicon,url) {
$("#alertcategory_idicon").val(idicon);
$("#diviconsel img").remove();
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$("#mymodallarge").modal("hide");
}
function delIcon() {
$("#diviconsel img").remove();
$("#alertcategory_idicon").val(null);
}
$("#alertcategory_color").bind("change paste keyup", function() {
$("#diviconsel").css("background-color",$(this).val());
});
</script>
{% endblock %}

View File

@ -0,0 +1,83 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="submit" %}
Création blog
{% else %}
Modification blog
{% endif %}
</h1>
{{ form_widget(form.submit) }}
{% if from=="child" %}
<a class="btn btn-secondary" href={{ path('app_child',{catparent:'blog',idparent:blog.id}) }}>Annuler</a>
{% else %}
<a class="btn btn-secondary" href={{ path('app_blog') }}>Annuler</a>
{% endif %}
{% if mode=="update" and blog.id>0 %}
<a href={{ path('app_blog_delete',{id:blog.id}) }}
class="btn btn-danger float-right"
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.blogtype) }}
</div>
</div>
</div>
<div class="col-md-6">
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("#blog_name").focus();
});
</script>
{% endblock %}

View File

@ -0,0 +1,150 @@
{% extends 'base.html.twig' %}
{% block beforebody %}
{%if heros %}
<div class="heroheader" style="top:55px;display:none;" >
{% for hero in heros %}
<div class="p-0 m-0" style="background-image:url(/{{appAlias}}/uploads/childheader/{{hero.childid}}/{{hero.filename}})">
<img id="separateur" src="/{{appAlias}}/images/separateur-g.png">
<div id="herotitle">
<h1>
{{hero.name}}<br>
<small>
<div style="font-size:16px">{{ hero.parenttype }}</div>
<span style="font-size:20px; line-height:20px; display:block">{{ hero.subname|nl2br }}</span>
</small>
</h1>
<a class="btn btn-success" href="{{path("app_child_view",{catparent:hero.catparent,idparent:hero.parentid,idchild:hero.childid})}}">En savoir plus</a>
</div>
{% if hero.credit %}<div class="herocredit position-absolute d-flex align-items-end justify-content-end" style="top:0px;padding:5px;font-size:80%;">© {{ hero.credit }}</div>{% endif %}
</div>
{%endfor%}
</div>
{% endif %}
{% endblock %}
{% block useractions %}
{% if is_granted('ROLE_ADMIN') %}
<li>
<a href="{{path("app_blog_submit")}}"><i class="fa fa-plus fa-2x"></i></a>
</li>
{% endif %}
{% endblock %}
{% block body %}
<div class="container" style="padding-top:100px">
<h1 class="child-name pt-0 text-uppercase mb-4">Actualités</h1>
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% for blog in blogs %}
{% if not blog.childblogs is empty %}
{% set background="" %}
{% if not blog.childblogs[0].child.childheaders is empty and blog.childblogs[0].child.childheaders[0] %}
{% set background="/"~appAlias~"/uploads/childheader/"~blog.childblogs[0].child.id~"/"~blog.childblogs[0].child.childheaders[0].filename %}
{% endif %}
{% set style="height:auto;background-position: center ; background-size: cover; background-image: url("~background~")" %}
<a href="{{path("app_child_view",{catparent:'blog',idparent:blog.id,idchild:blog.childblogs[0].child.id})}}" class="d-block text-center">
<div class="grid-item grid-item-size-5 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">
<span class="p-1" style="font-weight:bold; text-transform:uppercase;">{{ blog.childblogs[0].child.name }}</span>
<small><br><span class="p-1" style="background-color:var(--colorbgbodylight);color:var(--colorftbodylight)">{{ blog.blogtype.name }}</span></small>
<small class="p-2" style="line-height:15px; display:block;">
{% if blog.childblogs[0].child.subname %}
{{ blog.childblogs[0].child.subname|nl2br }}<br>
{% endif %}
{% for tag in blog.childblogs[0].child.tags %}
{% if loop.first %}<br>{%endif%}
<span class="grid-tag" data-id="{{tag.id}}">#{{tag.id}}</span>
{% endfor %}
</small>
</small>
</div>
</div>
</div>
</a>
{% endif %}
{% endfor %}
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
function resizegrid() {
height=$('.grid-item').width();
height=Math.min(height,300);
$('.grid-item').not('.grid-video').height(height)
$('.grid').masonry({
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer',
itemSelector: '.grid-item',
percentPosition: true,
horizontalOrder: false,
});
}
$(window).resize(function() {
if($('.heroheader').length) {
heighthero=$('.heroheader').width()/4;
$('.heroheader').height(heighthero);
$('.herocredit').css({ top: (heighthero-30)+'px' });
if($('.heroheader').width()>980) $('.heroheader').show();
}
resizegrid();
});
$(document).ready(function() {
if($('.heroheader').length) {
heighthero=$('.heroheader').width()/4;
$('.heroheader').height(heighthero);
$('.herocredit').css({ top: (heighthero-30)+'px' });
if($('.heroheader').width()>980) $('.heroheader').show();
{% if heros|length > 1 %}
$('.heroheader').slick({
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 6000,
dots: true,
touchMove: false,
pauseOnDotsHover: true,
fade: true,
cssEase: 'linear',
prevArrow: false,
nextArrow: false,
customPaging: function(slider, i) {
return '<span class="heroheader-dot fa fa-circle fa-fw"></span>';
}
});
{% endif %}
}
resizegrid();
});
$( ".grid-item" ).hover(function() {
$( this ).children(".grid-image").css("transform","scale(1.05)");
}, function() {
$( this ).children(".grid-image").css("transform","scale(1)");
});
$( ".grid-tag" ).hover(function() {
$( this ).css("text-decoration","underline");
}, function() {
$( this ).css("text-decoration","none");
});
$( ".grid-tag" ).click(function() {
url="{{path("app_child_search",{tags:"xxx"}) }}"
url=url.replace("xxx",$(this).data("id"));
document.location = url;
return false;
});
</script>
{% endblock %}

View File

@ -0,0 +1,58 @@
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
blogs
</h1>
<p><a class="btn btn-success" href={{ path('app_blog_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des blogs
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="90px" class="no-sort">Action</th>
<th class="no-string" width="70px">ID</th>
<th width="70px">Date</th>
<th width="200px">Type</th>
<th>Nom</th>
</tr>
</thead>
<tbody>
{% for blog in blogs %}
<tr>
<td>
<a href="{{path("app_child",{catparent:"blog",idparent:blog.id})}}"><i class="fa fa-file fa-2x"></i></a>
</td>
<td>{{blog.id}}</td>
<td>{{blog.submitdate|date("Y-m-d")}}</td>
<td>{{blog.blogtype.name}}</td>
<td>{{blog.name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</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: [[ 2, "asc" ]]
});
});
</script>
{% endblock %}

View File

@ -0,0 +1,76 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="submit" %}
Création blogtype
{% else %}
Modification blogtype
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_typeblog') }}>Annuler</a>
{% if mode=="update" and blogtype.id>0 %}
<a href={{ path('app_typeblog_delete',{'id':blogtype.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="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.sortby) }}
{{ form_row(form.description) }}
{% set image= "noimage.png" %}
{% if blogtype.image %}
{% set image= blogtype.image %}
{% endif %}
<center>
<img class="mt-3" id="blogtype_image_img" src="{{ path("app_minio_image", {file:image}) }}" style="width:100%;"><br>
{{ form_widget(form.image) }}
<a class="btn btn-info btn-modal" style="width:90px" data-modalid="mymodallarge" data-modaltitle="Image" data-modalurl="{{ path('app_typeblog_upload') }}" title='Ajouter une image'>Modifier</a>
</center>
</div>
</div>
{{ form_end(form) }}
{% endblock %}

View File

@ -0,0 +1,63 @@
{% extends "base.html.twig" %}
{% block localstyle %}
<style>
.herobody .title, .herobody .navigation {
float:none;
width:90%;
margin-bottom: 30px;
left: 5%;
top: 5%;
}
</style>
{% endblock %}
{% block beforebody %}
<div class="herobody">
<div class="p-0 m-0" style="height:100%;background-size:cover;background-image:url({{path("app_minio_image",{file:blogtype.image})}}">
<div class="title">
<div class="d-flex align-items-center">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logodark")}) }}" style="height:120px;">
<div class="ps-3">
<h1>{{blogtype.name}}</h1>
</div>
</div>
{% if not blogtype.description is empty %}
<div class="mt-5 p-3" style="max-width: 1000px; margin:auto; background-color: var(--colorbgbodyimportant)">
{{blogtype.description|raw}}
</div>
{% endif %}
</div>
<div class="navigation">
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% for blog in blogtype.blogs %}
{% set url=path("app_child_view",{catparent:'blog', idparent:blog.id, idchild:blog.childs[0].id }) %}
{% set name=blog.name %}
{% set image=(blog.childs[0].childheaders is empty ? "" : blog.childs[0].childheaders[0].filename) %}
<a href="{{url}}" class="d-block text-center">
<div class="grid-item grid-item-size-4 d-flex align-items-stretch">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="background-image:url({{path("app_minio_image",{file:image})}}); background-size:cover;">
<div class="grid-item-title">
<span class="p-1" style="font-weight:bold; text-transform:uppercase;">
{{ name }}
</span>
</div>
</div>
</div>
</a>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,53 @@
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
blogtypes
</h1>
<p><a class="btn btn-success" href={{ path('app_typeblog_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des blogtypes
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="90px" class="no-sort">Action</th>
<th>Nom</th>
</tr>
</thead>
<tbody>
{% for blogtype in blogtypes %}
<tr>
<td>
<a href="{{path("app_typeblog_update",{id:blogtype.id})}}"><i class="fa fa-file fa-2x"></i></a>
</td>
<td>{{blogtype.name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</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: [[ 2, "asc" ]]
});
});
</script>
{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends 'base.html.twig' %}
{% extends "base.html.twig" %}
{% block encoretags %}
{{ encore_entry_link_tags('dropzone') }}
@ -8,31 +8,26 @@
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
<form
action="{{ oneup_uploader_endpoint('slide') }}"
action="{{ oneup_uploader_endpoint('image') }}"
class="dropzone"
id="mydropzone"
data-acceptedMimeTypes="image/*"
data-maxFiles=1
data-folder={{ pagewidget.id }}
style="margin-top:10px">
</form>
{% endblock %}
{% block localscript %}
{{ encore_entry_script_tags('dropzone') }}
<script>
function dropzoneinit( elmt ) {
elmt.on("sending", function(file, xhr, formData) {
formData.append("folder", "{{ pagewidget.id }}");
});
}
function dropzonesuccess( file, response ) {
parent.$("#pagewidgetslide_image").val("slide/{{pagewidget.id}}/"+response["file"]);
parent.$("#pagewidgetslide_image_img").attr("src","{{ path("app_minio_image",{file:"slide/"~pagewidget.id~"/"}) }}"+response["file"]);
parent.$("#blogtype_image").val("image/"+response["file"]);
parent.$("#blogtype_image_img").attr("src","{{ path("app_minio_image",{file:"image/"}) }}"+response["file"]);
closeModal();
}

View File

@ -1,126 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification {{ (touser=='false' ? "Lien" : "Favori") }}
{% elseif mode=="submit" %}
Création {{ (touser=='false' ? "Lien" : "Favori") }}
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href="{{ path('app_'~access~'_page_'~usage~'_view',{id:idpage}) }}">Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_'~access~'_bookmark_delete',{'id':entity.id,'idpage':idpage,'idwidget':idwidget,'touser':touser,usage:usage}) }}
class="btn btn-danger float-end"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer ce favoris ?">
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 clearfix">
<div class="col-md-8">
<div class="card">
<div class="card-header">
<i class="fas fa-pencil-alt fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.title) }}
{{ form_row(form.subtitle) }}
{{ form_row(form.url) }}
<em>le mot clé #login# sera remplacé par le login de l'utilisateur</em><br>
{{ form_row(form.target) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-header">
<i class="fas fa-glasses fa-fw"></i> Appararence
</div>
<div class="card-body">
{{ form_row(form.color) }}
<div id="diviconsel" class="col-md-12 text-center mb-1 mt-1" style="height:140px; padding:20px; background-color: {{ entity.color ? entity.color : 'var(--colorbgbodydark)' }};">
{% if entity.icon %}
<img src="{{ path('app_minio_image',{file:entity.icon.label}) }}" height="100" />
{% endif %}
</div>
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success btn-modal" data-modalid="mymodallarge" data-modaltitle="Icône" data-modalurl="{{ path('app_all_icon_select') }}" title='Selectionner un Icône'>Selectionner un Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher'>Détacher l'Icône</a>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$('document').ready(function(){
showhide();
});
$("#bookmark_color").bind("change paste keyup", function() {
$("#diviconsel").css("background-color",$(this).val());
});
function selIcon(idicon,url) {
$("#bookmark_idicon").val(idicon);
$("#diviconsel img").remove();
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$("#mymodallarge").modal("hide");
}
function delIcon() {
$("#diviconsel img").remove();
$("#bookmark_idicon").val(null);
}
function showhide() {
$("#divhelp").hide();
if($("#bookmark_target").val()=="frame") {
$("#divhelp").show();
}
}
</script>
{% endblock %}

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

@ -1,3 +1,4 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
@ -16,6 +17,8 @@ img {
h3, #filetitle {
margin:0px;
text-align:center;
padding-top:5px;
padding-bottom: 5px;
}
h3, a, a:hover {
color: var(--colorfttitledark);
@ -43,65 +46,60 @@ h3, a, a:hover {
vertical-align: middle;
padding:5px;
}
</style>
{% endblock %}
{% block body %}
<div id="filetitle">
<h3>{{basename}}</h3>
<div id="fileaction">
<a href="{{ path("app_"~access~"_file_download",{category:category, id:id, file:file, usage:usage})}}"><i class="fa-solid fa-download"></i></a>
{%if canadd %}
&nbsp;&nbsp;&nbsp;<a href="{{ path("app_"~access~"_file_delete",{category:category, id:id, file:file, usage:usage, navigation: navigation})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa-solid fa-trash"></i></a>
{%endif%}
</div>
</div>
{% if navigation %}
{% if not next is empty %}
<a id="bigleft" href="{{ path("app_"~access~"_file_view",{category:category, id:id, file:next.Key, usage:usage, navigation: navigation})}}"><i class="fas fa-chevron-left fa-3x"></i></a>
<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 %}
{% if not prev is empty %}
<a id="bigright" href="{{ path("app_"~access~"_file_view",{category:category, id:id, file:prev.Key, usage:usage, navigation: navigation})}}"><i class="fas fa-chevron-right fa-3x"></i></a>
{% endif %}
{% endif %}
{% if isimage %}
<img id="fileimage" style="display:none" src="{{path("app_"~access~"_file_show",{category:category, id:id, file:file, usage:usage})}}">
{%else%}
<iframe src="{{path("app_"~access~"_file_show",{category:category, id:id, file:file, usage:usage})}}" style="width:100%;height:600px"></iframe>
{%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;
console.log(width);
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');
@ -112,15 +110,15 @@ h3, a, a:hover {
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 %}

View File

@ -1,27 +1,30 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification Catégorie d'Item = {{itemcategory.label}}
{% elseif mode=="submit" %}
Création Catégorie d'Item
{% if mode=="submit" %}
Création tag
{% else %}
Modification tag
{% endif %}
</h1>
<p>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_'~access~'_item') }}>Annuler</a>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_child_update',{catparent:catparent,idparent:idparent,idchild:idchild}) }}>Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_'~access~'_itemcategory_delete',{'id':itemcategory.id}) }}
class="btn btn-danger float-end"
<a href={{ path('app_childheader_delete',{catparent:catparent,idparent:idparent,idchild:idchild,id:childheader.id}) }}
class="btn btn-danger float-right"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cette catégorie ?">
data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">
Supprimer
</a>
{% endif %}
</p>
{% endif %}
<br><br>
{% if app.session.flashbag.has('error') %}
<div class='alert alert-danger' style='margin: 5px 0px'>
@ -40,21 +43,20 @@
{% endfor %}
</div>
{% endif %}
<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.label) }}
{{ form_row(form.credit) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localjavascript %}
{% endblock %}

View File

@ -0,0 +1,64 @@
{% extends 'base.html.twig' %}
{% block body %}
{% set url="/"~appAlias~"/uploads/childheader/"~childheader.child.id~"/"~childheader.filename|replace({"thumb_":""}) %}
<img id="image" class="d-block m-auto" src="{{url}}" style="max-width:100%; max-height:700px;">
<div id="navigation" style="float:left;position:absolute;top:0px;width:100%" class="d-flex align-items-stretch">
{%if imageprev %}
<a id="linkprev" href="{{ path("app_childheader_view",{id:imageprev.id}) }}" class="align-middle d-flex align-items-center justify-content-center" style="width:50%">
{% endif %}
<div class="text-left align-items-center justify-content-center" style="width:100%">
{%if imageprev %}
<div><i class="btn-link fas fa-arrow-left fa-2x"></i> </div>
{% endif %}
</div>
{%if imageprev %}
</a>
{% endif %}
{%if imagenext %}
<a id="linknext" href="{{ path("app_childheader_view",{id:imagenext.id}) }}" class="align-middle d-flex align-items-center justify-content-center" style="width:50%">
{% endif %}
<div class="text-right align-items-center justify-content-center" style="width:100%">
{%if imagenext %}
<div><i class="btn-link fas fa-arrow-right fa-2x"></i> </div>
{%endif%}
</div>
{%if imagenext %}
</a>
{% endif %}
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$('body').imagesLoaded(function() {
width=$('#mycontent').width();
$('#navigation').width(width);
height=$('#image').height();
$('#navigation').height(height);
$('body').focus();
});
$(document).keydown(function(event) {
var key = (event.keyCode ? event.keyCode : event.which);
if(key == 37) { // left
var href = $('#linkprev').attr('href');
if(href!=null) window.location.href = href;
}
else if(key == 39) {
var href = $('#linknext').attr('href');
if(href!=null) window.location.href = href;
}
});
});
</script>
{% endblock %}

View File

@ -16,7 +16,7 @@
{% if mode=="update" and not config.required %}
<a href="{{ path('app_admin_config_delete',{'id':config.id}) }}"
class="btn btn-danger float-right"
class="btn btn-danger float-end"
data-method="delete"
data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?">
Supprimer
@ -68,6 +68,11 @@
<img id="config_value_img" src="{{ path("app_minio_image",{file:"header/"~config.value}) }}" style="width:100%;margin:auto;display:block;">
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Bannière" data-modalurl="{{ path('app_all_crop01', {"type": "header", "reportinput": "#config_value" }) }}" title='Ajouter une Bannière'>Modifier</a>
</div>
{% elseif config.type=="image" %}
<div style="margin:10px auto;">
<img id="config_value_img" src="{{ path("app_minio_image",{file:config.value}) }}" style="width:100%;margin:auto;display:block;">
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Image" data-modalurl="{{ path('app_admin_config_image')}}" title='Ajouter une Image'>Modifier</a>
</div>
{% endif %}
{{ form_row(form.help) }}
</div>

View File

@ -1,4 +1,4 @@
{% extends 'base.html.twig' %}
{% extends "base.html.twig" %}
{% block encoretags %}
{{ encore_entry_link_tags('dropzone') }}
@ -8,7 +8,7 @@
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
<form
action="{{ oneup_uploader_endpoint('icon') }}"
action="{{ oneup_uploader_endpoint('image') }}"
class="dropzone"
id="mydropzone"
data-acceptedMimeTypes="image/*"
@ -18,15 +18,13 @@
</form>
{% endblock %}
{% block localscript %}
{{ encore_entry_script_tags('dropzone') }}
<script>
function dropzonesuccess( file, response ) {
parent.$("#icon_label").val("icon/"+response["file"]);
parent.$("#icon_label_img").attr("src","{{ path("app_minio_image",{file:"icon/"}) }}"+response["file"]);
parent.$("#config_value").val("image/"+response["file"]);
parent.$("#config_value_img").attr("src","{{ path("app_minio_image",{file:"image/"}) }}"+response["file"]);
closeModal();
}

View File

@ -36,6 +36,9 @@
{% elseif config.id=='colorbgbodylight' %}
{% set bgcolor = val %}
{% set color = app.session.get('colorftbodylight') %}
{% elseif config.id=='colorbgbodyimportant' %}
{% set bgcolor = val %}
{% set color = app.session.get('colorftbodydark') %}
{% elseif config.id=='colorfttitledark' %}
{% set bgcolor = app.session.get('colorbgbodydark') %}
{% set color = val %}
@ -74,6 +77,10 @@
{%if not val is empty %}
<img src="{{ path("app_minio_image",{file:"header/"~val}) }}" width="100%">
{% endif %}
{% elseif config.type=="image" %}
{%if not val is empty %}
<img src="{{ path("app_minio_image",{file:val}) }}" width="100%">
{% endif %}
{% else %}
{{ val|raw }}
{% endif %}

View File

@ -4,8 +4,6 @@
{{ encore_entry_link_tags('dropzone') }}
{% endblock %}
{% block body %}
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
<form
@ -25,8 +23,20 @@
<script>
window.parent.$(".modal-title").html("ETAPE 1 - Téléchargez votre image");
{% if idparent is defined %}
function dropzoneinit( elmt ) {
elmt.on("sending", function(file, xhr, formData) {
formData.append("folder", "{{ idparent }}");
});
}
{% endif %}
function dropzonesuccess( file, response ) {
{% if reportinput is defined %}
$(location).attr('href',"{{ path('app_all_crop02', {"type": type, "reportinput": reportinput }) }}?file="+response["file"]);
{% else %}
$(location).attr('href',"{{ path('app_cropentity02', {"type": type, "idparent": idparent }) }}?file={{idparent}}/"+response["file"]);
{% endif %}
}
function closeModal() {

View File

@ -16,8 +16,12 @@
{% set class="width:90px; height:90px;" %}
{% elseif ratio=="16:9" %}
{% set class="width:160px; height:90px;" %}
{% elseif ratio=="16:4" %}
{% set class="width:160px; height:40px;" %}
{% elseif ratio=="16:2" %}
{% set class="width:160px; height:20px;" %}
{% elseif ratio=="4:6" %}
{% set class="width:80px; height:120px;" %}
{% endif %}
<div id='preview' style='overflow:hidden; {{class}} position: absolute; top: 0px; right: 10px;'>
@ -60,27 +64,47 @@
{% elseif ratio=="16:9" %}
var scaleX = 160 / $('#form_w').val();
var scaleY = 160 / $('#form_h').val();
{% elseif ratio=="16:4" %}
var scaleX = 160 / $('#form_w').val();
var scaleY = 160 / $('#form_h').val();
{% elseif ratio=="16:2" %}
var scaleX = 160 / $('#form_w').val();
var scaleY = 160 / $('#form_h').val();
{% elseif ratio=="4:6" %}
var scaleX = 80 / $('#form_w').val();
var scaleY = 80 / $('#form_h').val();
{% elseif ratio=="none" %}
var scaleX = $('#form_ws').val();
var scaleY = $('#form_hs').val();
{% endif %}
$('#preview img').css({
width: Math.round(scaleX * $('#largeimg').width()) + 'px',
height: Math.round(scaleY * $('#largeimg').height()) + 'px',
marginLeft: '-' + Math.round(scaleX * $('#form_x').val()) + 'px',
marginTop: '-' + Math.round(scaleY * $('#form_y').val()) + 'px'
});
{% if ratio!="none" %}
$('#preview img').css({
width: Math.round(scaleX * $('#largeimg').width()) + 'px',
height: Math.round(scaleY * $('#largeimg').height()) + 'px',
marginLeft: '-' + Math.round(scaleX * $('#form_x').val()) + 'px',
marginTop: '-' + Math.round(scaleY * $('#form_y').val()) + 'px'
});
{% else %}
$('#preview img').css({
width: '0px',
height: '0px',
marginLeft: '-0px',
marginTop: '-0px'
});
{% endif %}
}
function reportThumb() {
{% if reportinput == "refresh" %}
window.parent.location.reload();
{% elseif reportinput != "none" %}
window.parent.$("{{ reportinput }}").val("thumb_{{ file }}");
window.parent.$("{{ reportinput }}_img").attr("src","{{ path("app_minio_image",{file:type~"/thumb_"~file}) }}");
{% endif %}
{%if reportinput is defined %}
{% if reportinput == "refresh" %}
window.parent.location.reload();
{% elseif reportinput != "none" %}
window.parent.$("{{ reportinput }}").val("thumb_{{ file }}");
window.parent.$("{{ reportinput }}_img").attr("src","{{ path("app_minio_image",{file:type~"/thumb_"~file}) }}");
{% endif %}
{% endif %}
closeModal();
}
@ -114,8 +138,14 @@
{% set nbratio=1 %}
{% elseif ratio=="16:9" %}
{% set nbratio=(16/9) %}
{% elseif ratio=="16:4" %}
{% set nbratio=(16/4) %}
{% elseif ratio=="16:2" %}
{% set nbratio=(16/2) %}
{% elseif ratio=="4:6" %}
{% set nbratio=0.7 %}
{% elseif ratio=="none" %}
{% set nbratio=null %}
{% endif %}
$('#largeimg').CropSelectJs('setSelectionAspectRatio',{{nbratio}});

View File

@ -1,50 +0,0 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
<style>
body { height:auto;}
#page { padding: 0px !important;}
</style>
{% endblock %}
{% block body %}
{{ form_start(form) }}
<p>
{{ form_widget(form.submit) }} <a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
</p>
{% 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 %}
{{ form_row(form.folder) }}
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
function closeModal() {
window.parent.$("#mymodalfull").modal('hide');
}
$('document').ready(function(){
$("#form_folder").focus();
{% if toclose %}
href=parent.location.href;
parent.location.href=href;
{% endif %}
});
</script>
{% endblock %}

View File

@ -1,346 +0,0 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
<style>
body { height:auto;}
#page { padding: 0px !important;}
.btn-group>.btn, .btn-group>.btn:active{
background-color: var(--colorbgbodydark);
border: var(--colorbgbodydark);
}
.btn-group>.btn:active{
background-color: var(--colorbgbodydark-darker);
border: var(--colorbgbodydark);
}
.item-small .item-subtitle, .item-list .item-subtitle {
display:block;
}
.item-small .item-subtitle {
font-size:9px;
}
.item-small img {
width:60px;
}
.item-list {
zoom:80%;
}
.item-list img {
width:40px;
}
.breadcrumb {
padding: 5px 10px;
margin: 5px 0px 5px 0px;
list-style: none;
border-radius: 4px;
background-color: var(--colorbgbodydark);
display: inline-flex;
}
.breadcrumb a {
color: var(--colorftbodydark);
}
.item-action .btn-modal {
color: inherit;
}
</style>
{% endblock %}
{% block body %}
<div id="explorer">
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
{% if canadd and not fgtrash %}
<div class="btn-group me-1" role="group" aria-label="First group">
<button type="button" class="btn btn-modal btn-primary"data-modalid="mymodalfull" data-modaltitle="Téléchargez vos Fichiers" data-modalurl="{{ path('app_'~access~'_file_upload',{'category': category, 'id': id,'type':'file','usage':usage,'folder':folder}) }}" title="Ajouter des fichiers">
<i class="fa fa-upload"></i>
</button>
<button type="button" class="btn btn-modal btn-primary"data-modalid="mymodalfull" data-modaltitle="Création Répertoire" data-modalurl="{{ path('app_'~access~'_file_folder',{'category': category, 'id': id,'usage':usage,'folder':folder}) }}" title="Ajouter un Répertoire">
<i class="fa fa-folder-plus"></i>
</button>
</div>
{% endif %}
<div class="btn-group me-1" role="group" aria-label="Second group">
{% if view=="small" %}
{%set action="list" %}
{% else %}
{%set action="small" %}
{% endif %}
<a href="{{ path('app_'~access~'_file_list',{'category': category, 'id': id,'type':'file','usage':usage,'folder':folder, 'view':action }) }}" type="button" class="btn btn-primary">
{% if view=="small" %}
<i class="fas fa-list"></i>
{% else %}
<i class="fas fa-th"></i>
{% endif %}
</a>
{% set active="" %}
{% if sort=="name" %}
{% set active="active" %}
{%endif%}
{% if order=="SORT_ASC" %}
{%set action="SORT_DESC" %}
{% else %}
{%set action="SORT_ASC" %}
{% endif %}
<a href="{{ path('app_'~access~'_file_list',{'category': category, 'id': id,'type':'file','usage':usage,'folder':folder, 'sort': 'name', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
{% if order=="SORT_ASC" %}
<i class="fas fa-long-arrow-alt-down"></i> Nom
{% else %}
<i class="fas fa-long-arrow-alt-up"></i> Nom
{% endif %}
</a>
{% set active="" %}
{% if sort=="date" %}
{% set active="active" %}
{%endif%}
{% if order=="SORT_ASC" %}
{%set action="SORT_DESC" %}
{% else %}
{%set action="SORT_ASC" %}
{% endif %}
<a href="{{ path('app_'~access~'_file_list',{'category': category, 'id': id,'usage':usage,'folder':folder, 'sort': 'date', 'order':action }) }}" type="button" class="btn btn-primary {{active}}">
{% if order=="SORT_ASC" %}
<i class="fas fa-long-arrow-alt-down"></i> Date
{% else %}
<i class="fas fa-long-arrow-alt-up"></i> Date
{% endif %}
</a>
</div>
{% if canadd %}
<div class="btn-group" role="group" aria-label="Third group">
{% if fgtrash %}
<a href="{{ path('app_'~access~'_file_purgetrash',{'category': category, 'id': id ,'usage':usage}) }}" type="button" class="btn btn-primary" data-method="delete" data-confirm="Souhaitez-vous purger votre poubelle ? Cette action sera irrévocable.">Purger la poubelle</a>
{% else %}
<a href="{{ path('app_'~access~'_file_list',{'category': category, 'id': id,'usage':usage,'folder':'file/'~category~'/'~id~'/.trash/' }) }}" type="button" class="btn btn-primary"><i class="fas fa-trash"></i></a>
{% endif %}
</div>
{% endif %}
</div>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
{% for parent in parents %}
<li class="breadcrumb-item folder" data-src="{{parent.folder}}"><a href="{{ path('app_'~access~'_file_list',{'category': category, 'id': id,'usage':usage,'folder': parent.folder }) }}">{{ parent.basename}}</a></li>
{% endfor %}
</ol>
</div>
<div class="items-list">
{% for dir in folders %}
<div class="item item-{{view}} folder" data-src="{{dir.Prefix}}" style="background-color: var(--colorbgbodydark);">
<div class="item-container">
<div class="item-content">
<a class="item-link" href="{{ path('app_'~access~'_file_list',{'category': category, 'id': id,'usage':usage,'folder':dir.Prefix }) }}">
<img height="35" src="{{ dir.thumb }}">
<div class="item-title">
<h3>{{ dir.basename }}</h3>
</div>
</a>
<div class="item-action">
{% if canadd %}
{% if fgtrash %}
<a style="display:none" onClick="restaureFile('{{dir.Prefix|e('js')|raw }}')">
<i class="fa fa-undo" title="Restaurer le fichier"></i>
</a>
<a style="display:none" onClick="delFile('{{dir.Prefix|e('js')|raw }}')">
<i class="fa fa-trash" title="Supprimer le dossier"></i>
</a>
{% else %}
<a style="display:none" class="btn-modal" title="Modifier" data-modalid="mymodalfull" data-modaltitle="Modification" data-modalurl="{{ path('app_'~access~'_file_rename',{'category': category, 'id': id,'usage':usage,'file':dir.Prefix}) }}">
<i class="fas fa-file"></i>
</a>
<a style="display:none" onClick="trashFile('{{dir.Prefix|e('js')|raw}}')">
<i class="fas fa-trash" title="Supprimer le dossier"></i>
</a>
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
{% for file in files %}
<div class="item item-{{view}} file" style="background-color: var(--colorbgbodydark);" data-src="{{file.Key}}">
<div class="item-container">
<div class="item-content">
<a class="item-link" href="{{ path('app_'~access~'_file_show',{'category': category, 'id': id,'file':file.Key }) }}" target="_blank">
<img height="35" src="{{ file.thumb }}">
<div class="item-title">
<h3>{{ file.basename }}</h3>
<div class="item-subtitle">le {{ file.LastModified|date("d/m/Y H:i")}}</div>
</div>
</a>
<div class="item-action">
{% if canadd %}
{% if fgtrash %}
<a style="display:none" onClick="restaureFile('{{file.Key|e('js')|raw }}')">
<i class="fa fa-undo" title="Restaurer le fichier"></i>
</a>
<a style="display:none" onClick="delFile('{{file.Key|e('js')|raw }}')">
<i class="fa fa-trash" title="Supprimer le dossier"></i>
</a>
{% else %}
<a style="display:none" class="btn-modal" title="Modifier" data-modalid="mymodalfull" data-modaltitle="Modification" data-modalurl="{{ path('app_'~access~'_file_rename',{'category': category, 'id': id,'usage':usage,'file':file.Key}) }}">
<i class="fas fa-file"></i>
</a>
<a style="display:none" onClick="trashFile('{{file.Key|e('js')|raw}}')">
<i class="fas fa-trash" title="Supprimer le dossier"></i>
</a>
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div id="mymodalfull" class="modal" tabindex="-1">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"></h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<iframe frameborder=0 width="100%" style="min-height:300px;"></iframe>
</div>
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$('#mymodalfull').on('shown.bs.modal', function() {
$("#framefile-{{id}}",window.parent.document).css("min-height",$("#mymodalfull").find("iframe").height()+130);
$("#framefile-{{id}}",window.parent.document).parent().css("min-height",$("#mymodalfull").find("iframe").height()+130);
});
$('#mymodalfull').on('hide.bs.modal', function() {
$("#framefile-{{id}}",window.parent.document).css("min-height","unset");
$("#framefile-{{id}}",window.parent.document).parent().css("min-height","unset");
});
$(window).on('load', function(){
$("#framefile-{{id}}",window.parent.document).css("min-height","unset");
$("#framefile-{{id}}",window.parent.document).parent().css("min-height","unset");
});
{% if canadd %}
// Trasher un fichier
function trashFile(file) {
var r = confirm("Confirmez-vous la mise à la poubelle de ce fichier ? Vous pourrez le récupèrer si besoin.");
if (r == true) {
url="{{ path('app_'~access~'_file_trash',{'category': category, 'id': id,'file':'xxx' }) }}";
url=url.replace("xxx",file);
url=url.replace(/&amp;/g,"&");
$.ajax({
method: "POST",
url: url,
success: function() {
location.reload();
}
});
}
}
// Supprimer un fichier
function delFile(file) {
var r = confirm("Confirmez-vous la suppression définitive de ce fichier ?");
if (r == true) {
url="{{ path('app_'~access~'_file_delete',{'category': category, 'id': id,'file':'xxx' }) }}";
url=url.replace("xxx",file);
url=url.replace(/&amp;/g,"&");
$.ajax({
method: "POST",
url: url,
success: function() {
location.reload();
}
});
}
}
// Restaurer un fichier
function restaureFile(file) {
url="{{ path('app_'~access~'_file_restaure',{'category': category, 'id': id,'file':'xxx' }) }}";
url=url.replace("xxx",file);
url=url.replace(/&amp;/g,"&");
$.ajax({
method: "POST",
url: url,
success: function() {
location.reload();
}
});
}
// Déplacement
{% if not fgtrash %}
$('.file').on('dragstart', function (s) {
filesource=$(this).data("src");
});
$('.folder').on('dragstart', function (s) {
filesource=$(this).data("src");
});
$('.folder')
// crucial for the 'drop' event to fire
.on('dragover', false)
.on('drop', function (e) {
// Récupérer la destination
filedestination=$(this).data("src");
// Si la source est la meme que la destination on ne fait rien
if(filesource==filedestination) return false;
url="{{ path('app_'~access~'_file_move',{'category': category, 'id': id,'source':'xxx', 'destination':'zzz' }) }}";
url=url.replace("xxx",filesource);
url=url.replace("zzz",filedestination);
url=url.replace(/&amp;/g,"&");
// On déplace l'element
$.ajax({
method: "POST",
url: url,
success: function() {
location.reload();
}
});
return false;
});
{% endif %}
{% endif %}
</script>
{% endblock %}

View File

@ -1,22 +0,0 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
<style>
body {
background-color: var(--colorbgbodydark);
}
</style>
{% endblock %}
{% block localscript %}
<script>
parent.location.reload();
</script>
{% endblock %}

View File

@ -1,74 +0,0 @@
{% extends 'base.html.twig' %}
{% block encoretags %}
{{ encore_entry_link_tags('dropzone') }}
{% endblock %}
{% block localstyle %}
<style>
body { height:auto;}
#page { padding: 0px !important;}
</style>
{% endblock %}
{% block body %}
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
<form
action="{{ oneup_uploader_endpoint('file') }}"
class="dropzone"
id="mydropzone"
{% if type=="image" %}data-acceptedMimeTypes="image/*"{% endif %}
data-maxFiles="0"
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("folder", "{{ folder }}");
});
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 forcereload %}
parent.location.reload();
{% else %}
parent.refreshPJ();
closeModal();
{% endif %}
}
});
}
function dropzonesuccess( file, response ) {
//closeModal();
}
function closeModal() {
window.parent.$("#mymodallarge").modal('hide');
window.parent.$("#mymodalfull").modal('hide');
}
</script>
{% endblock %}

View File

@ -1,21 +1,86 @@
{% extends "base.html.twig" %}
{% block body %}
{% if app.user %}
<div class="row">
<div class="col col-md6">
<h3>Chat #1</h3>
{{ render(path("app_publish_sample",{id:1})) }}
</div>
{#
https://cdn.pixabay.com/photo/2020/08/09/14/25/business-5475661_960_720.jpg
#}
{% block localstyle %}
<style>
</style>
{% endblock %}
{% block beforebody %}
<div class="herobody">
<div class="p-0 m-0" style="height:100%;background-size:cover;background-image:url({{path("app_minio_image",{file:app.session.get("appimage")})}})">
<div class="title">
<div class="d-flex align-items-center">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logodark")}) }}" style="height:120px;">
<div class="ps-3">
<h1>{{app.session.get("appname")}}</h1>
<span style="line-height:20px; display:block">{{app.session.get("appsubname")}}</span>
</div>
</div>
{% else %}
<div style="text-align:center">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logolight")}) }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
<h1 style="border:none">{{app.session.get('appname')}}</h1>
<div style="max-width:600px; text-align:justify; margin:auto ">{{app.session.get('appdescription')|raw}}</div>
</div>
{% endif %}
<div class="mt-5">
<iframe width="100%" height="315" src="https://www.youtube.com/embed/HuFdX7K6xik?controls=0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
{% if not app.session.get("appdescription") is empty %}
<div class="mt-5 p-3" style="background-color: var(--colorbgbodyimportant)">
{{app.session.get("appdescription")|raw}}
</div>
{% endif %}
</div>
<div class="navigation">
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% if app.session.get("menuheader").menuchilds is defined %}
{% for menuchild in app.session.get("menuhome").menuchilds %}
{% set active="" %}
{% set url="" %}
{% set name="" %}
{% if menuchild.childtype == "blog" %}
{% set url=path("app_child_view",{catparent:'blog', idparent:menuchild.blog.id, idchild:menuchild.blog.childs[0].id }) %}
{% set name=menuchild.blog.name %}
{% set image=(menuchild.blog.childs[0].childheaders is empty ? "" : menuchild.blog.childs[0].childheaders[0].filename) %}
{% elseif menuchild.childtype == "blogtype" %}
{% set url=path("app_typeblog_home",{id:menuchild.blogtype.id}) %}
{% set name=menuchild.blogtype.name %}
{% set image=(menuchild.blogtype.image is empty ? "" : menuchild.blogtype.image) %}
{% elseif menuchild.childtype == "page" %}
{% set url=path("app_child_view",{catparent:'page', idparent:menuchild.page.id, idchild:menuchild.page.childs[0].id }) %}
{% set name=menuchild.page.name %}
{% set image=(menuchild.page.childs[0].childheaders is empty ? "" : menuchild.page.childs[0].childheaders[0].filename) %}
{% elseif menuchild.childtype == "pagetype" %}
{% set url=path("app_typepage_home",{id:menuchild.pagetype.id}) %}
{% set name=menuchild.pagetype.name %}
{% set image=(menuchild.pagetype.image is empty ? "" : menuchild.pagetype.image) %}
{% endif %}
<a href="{{url}}" class="d-block text-center">
<div class="grid-item grid-item-size-2 d-flex align-items-stretch">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="background-image:url({{path("app_minio_image",{file:image})}}); background-size:cover;">
<div class="grid-item-title">
<span class="p-1" style="font-weight:bold; text-transform:uppercase;">
{{ name }}
</span>
</div>
</div>
</div>
</a>
{% endfor %}
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -1,78 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
{% if not inframe %}
<h1 class="page-header">
{% if mode=="update" %}
Modification Icône
{% elseif mode=="submit" %}
Création Icône
{% endif %}
</h1>
{%endif%}
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_'~access~'_icon',{'inframe':inframe}) }}>Annuler</a>
{% if mode=="update" and not issystem %}
<a href={{ path('app_'~access~'_icon_delete',{'id':icon.id,'inframe':inframe}) }}
class="btn btn-danger float-end"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cet icône ?">
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="card">
<div class="card-header">
<i class="fa fa-pencil fa-fw"></i> Informations
</div>
<div class="card-body">
<div style="width:110px; margin:10px auto;">
<img id="icon_label_img" src="{{ path("app_minio_image",{file:icon.label}) }}" style="padding:10px; width:110px;height:auto;margin:auto;display:block;margin-bottom:5px;background-color: var(--colorbgbodydark)">
{{ form_widget(form.label) }}
{% if mode=="submit" or not issystem %}
<a class="btn btn-info btn-modal" style="width:110px" data-modalid="mymodallarge" data-modaltitle="Icône" data-modalurl="{{ path('app_'~access~'_icon_upload', {"type": "icon", "reportinput": "#icon_label" }) }}" title='Ajouter un Icône'>Modifier</a>
{%endif%}
</div>
{% if mode=="submit" or not issystem %}
<div style="width:200px; margin: 10px auto;text-align:center;">
Privilégiez des images carrées de minimum 90px par 90px et avec un fond transparent
</div>
{%endif%}
{{ form_row(form.tags) }}
</div>
</div>
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
<div class="float-end" style="width:700px;max-width:100%">
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Icon",entityid:icon.id})) }}
</div>
{% endif %}
{{ form_end(form) }}
{% endblock %}

View File

@ -1,25 +0,0 @@
{% extends "base.html.twig" %}
{% block body %}
{% if not inframe %}
<h1 class="page-header">Gestion des Icônes</h1>
{% endif %}
{% if auditUse and (access=="admin" or access=="audit") %}
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Icon"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
{% endif %}
<p>
<a class="btn btn-success" href={{ path('app_'~access~'_icon_submit',{'inframe': inframe}) }}>Ajouter</a>
{% if inframe %}
<a class="btn btn-secondary" href={{ path('app_'~access~'_icon_select') }}>Fermer</a>
{% endif %}
</p>
<div class="flex wrap">
{% for icon in icons %}
<a href="{{ path('app_'~access~'_icon_update', {id : icon.id, 'inframe': inframe}) }}"><img class="icon" height="90" src="{{ path('app_minio_image',{file:icon.label}) }}"" style="padding:10px; margin-bottom:2px; background-color: var(--colorbgbodydark"></a>
{% endfor %}
</div>
{% endblock %}

View File

@ -1,70 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
<div class="row">
<div class="col-md-12" style="margin-bottom:15px">
<a onclick="window.parent.$('#mymodallarge').modal('hide');" class="btn btn-secondary">Fermer</a>
<a href="{{ path('app_'~access~'_icon',{'inframe':true}) }}" class="btn btn-secondary">Gérer les Icônes</a>
</div>
<div class="col-md-12">
<label class="control-label" for="group_label">Recherche</label>
<input type="text" id="icon_search" name="icon_search" class="form-control form-control" style="margin-bottom:15px">
{% if iconsuser is not empty %}
<h3>Mes Icônes</h3>
{% for icon in iconsuser %}
{% set tag = "" %}
{% if icon.tags %}
{% set tag = icon.tags %}
{% endif %}
{% if icon.label starts with 'icon/icon_' %}
{% set tag = tag ~ icon.label|replace({'icon/icon_':'', '.png':''}) %}
{% endif %}
<img onClick="window.parent.selIcon({{ icon.id }},'{{ path('app_minio_image',{file:icon.label}) }}')" data="{{tag}}" id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="{{ path('app_minio_image',{file:icon.label}) }}" style="cursor:pointer; padding:2px; margin-bottom:2px; background-color: var(--colorbgbodydark">
{% endfor %}
<h3 class="mt-3">Icônes Communs</h3>
{% endif %}
{% for icon in icons %}
{% set tag = "" %}
{% if icon.tags %}
{% set tag = icon.tags %}
{% endif %}
{% if icon.label starts with 'icon/icon_' %}
{% set tag = tag ~ icon.label|replace({'icon/icon_':'', '.png':''}) %}
{% endif %}
<img onClick="window.parent.selIcon({{ icon.id }},'{{ path('app_minio_image',{file:icon.label}) }}')" data="{{tag}}" id="icon-{{ icon.id }}" class="grid-item-img" height="40" src="{{ path('app_minio_image',{file:icon.label}) }}" style="cursor:pointer; padding:2px; margin-bottom:2px; background-color: var(--colorbgbodydark">
{% endfor %}
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$('document').ready(function(){
$( "#icon_search" ).focus();
});
$( "#icon_search" ).on("keyup", function() {
if($( "#icon_search" ).val()=="")
$(".grid-item-img").show();
else {
tags=$( "#icon_search" ).val().toLowerCase().split(' ');
$(".grid-item-img").hide();
tags.forEach(function(tag){
$(".grid-item-img").each(function(index) {
icontags=$( this ).attr("data");
if (typeof icontags !== 'undefined') {
if(icontags.includes(tag)) $(this).show();
}
});
});
}
});
</script>
{% endblock %}

View File

@ -67,33 +67,43 @@
{
'id': 'sidebar-portal',
'icon': 'fa fa-door-closed',
'name' : 'PORTAIL',
'name' : 'NINEBLOG',
'items' : [
{
icon: 'fa fa-copy fa-fw',
route: 'app_admin_page_template',
name: 'Modèles de Page',
icon: 'fas fa-paper-plane',
route: 'app_blog',
name: 'Blog',
},
{
icon: 'fa fa-file fa-fw',
route: 'app_admin_page_portal',
name: 'Pages',
},
icon: 'fas fa-tag',
route: 'app_typeblog',
name: 'Type de Blog',
},
{
icon: 'fa fa-desktop',
route: 'app_admin_item',
name: 'Items',
},
icon: 'fas fa-file-alt',
route: 'app_page',
name: 'Page',
},
{
icon: 'fa fa-bell',
route: 'app_admin_alert',
name: 'Annonces',
},
icon: 'fas fa-tag',
route: 'app_typepage',
name: 'Type de Page',
},
{
icon: 'fa fa-bug',
route: 'app_admin_icon',
name: 'Icônes',
},
icon: 'fas fa-bars',
route: 'app_menu',
name: 'Menu',
},
{
icon: 'fas fa-thumbtack',
route: 'app_pin',
name: 'Pin',
},
{
icon: 'fas fa-tag',
route: 'app_tag',
name: 'Tag',
},
]
},
{

View File

@ -2,6 +2,7 @@
:root{
--colorbgbodylight: {{ app.session.get('colorbgbodylight')|raw }};
--colorbgbodydark: {{ app.session.get('colorbgbodydark')|raw }};
--colorbgbodyimportant: {{ app.session.get('colorbgbodyimportant')|raw }};
--colorfttitlelight: {{ app.session.get('colorfttitlelight')|raw }};
--colorfttitledark: {{ app.session.get('colorfttitledark')|raw }};
--colorftbodylight: {{ app.session.get('colorftbodylight')|raw }};
@ -16,7 +17,9 @@
--colorbgbodylight-darker: {{ app.session.get('colorbgbodylight-darker')|raw }};
--colorbgbodydark-darker: {{ app.session.get('colorbgbodydark-darker')|raw }};
--colorfttitlelight-darker: {{ app.session.get('colorfttitlelight-darker')|raw }};
--colorfttitledark-lighter: {{ app.session.get('colorfttitledark-lighter')|raw }};
--colorbgbodydark-rgb: {{ app.session.get('colorbgbodydark-rgb')|raw }};
}

View File

@ -1,142 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification Item = {{item.title}}
{% elseif mode=="submit" %}
Création Item
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_'~access~'_item') }}>Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_'~access~'_item_delete',{'id':item.id}) }}
class="btn btn-danger float-end"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cet item ?">
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 clearfix">
<div class="col-md-8">
<div class="card">
<div class="card-header">
<i class="fas fa-pencil-alt fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.title) }}
{{ form_row(form.subtitle) }}
{{ form_row(form.url) }}
<div><em>le mot clé #login# sera remplacé par le login de l'utilisateur</em></div>
{{ form_row(form.target) }}
<div id="divhelp"><em>Attention certains sites n'acceptent pas d'être encapsulés dans une frame. Si vous ne voyez pas votre site apparaître, veuillez changer de cible.</em></div>
{{ form_row(form.essential) }}
{{ form_row(form.protected) }}
{{ form_row(form.content) }}
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-header">
<i class="fa fa-link fa-fw"></i> Affectations
</div>
<div class="card-body">
{{ form_row(form.itemcategory) }}
{{ form_row(form.roles) }}
{{ form_row(form.groups) }}
</div>
</div>
<div class="card mt-3">
<div class="card-header">
<i class="fas fa-glasses fa-fw"></i> Appararence
</div>
<div class="card-body">
{{ form_row(form.color) }}
<div id="diviconsel" class="col-md-12 text-center mb-1 mt-1" style="height:140px; padding:20px; background-color: {{ item.color ? item.color : 'var(--colorbgbodydark)' }};">
{% if item.icon %}
<img src="{{ path('app_minio_image',{file:item.icon.label}) }}" height="100" />
{% endif %}
</div>
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success btn-modal" data-modalid="mymodallarge" data-modaltitle="Icône" data-modalurl="{{ path('app_all_icon_select') }}" title='Selectionner un Icône'>Selectionner un Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher'>Détacher l'Icône</a>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$('document').ready(function(){
showhide();
});
$("#item_color").bind("change paste keyup", function() {
$("#diviconsel").css("background-color",$(this).val());
});
function selIcon(idicon,url) {
$("#item_idicon").val(idicon);
$("#diviconsel img").remove();
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$("#mymodallarge").modal("hide");
}
function delIcon() {
$("#diviconsel img").remove();
$("#item_idicon").val(null);
}
function showhide() {
$("#divhelp").hide();
if($("#item_target").val()=="frame") {
$("#divhelp").show();
}
}
</script>
{% endblock %}

View File

@ -1,230 +0,0 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
<style>
</style>
{% endblock %}
{% block body %}
<h1 class="page-header">
Gestion des Items
</h1>
<p>
<a href="{{ path('app_'~access~'_item_submit') }}" class="btn btn-success">Ajouter un Item</a>
<a href="{{ path('app_'~access~'_itemcategory_submit') }}" class="btn btn-success">Ajouter une Categorie</a>
</p>
<div class="row">
<div class="col-md-9 list-categorysitem">
{% for itemcategory in itemcategorys %}
<div class="card list-categoryitem mb-3" data-itemcategory-id="{{ itemcategory.id }}">
<div class="card-header">
<h3 class="m-0">
<a href="{{ path('app_'~access~'_itemcategory_update', { id: itemcategory.id }) }}">
<small><i class="fa fa-arrows-v" style="display: inline-block; margin-top: -26px;"></i></small>
{{ itemcategory.label }}
</a>
</h2>
</div>
<div class="card-body items-list">
{% for item in itemcategory.items %}
<div class="item item-medium
{% for group in item.groups %}{{ ' group-' ~ group.id }}{% endfor %}
{% for role in item.roles %}{{ ' group-' ~ role }}{% endfor %}"
data-item-id="{{ item.id }}" style="background-color: {{ item.color ? item.color : "var(--colorbgbodydark)" }};">
<div class="item-container">
<div class="item-content">
<a class="item-link" href="{{ path('app_'~access~'_item_update', {"id": item.id}) }}">
{% if item.icon %}
<img height="35" src="{{ path('app_minio_image',{file:item.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_pin.png"}) }}">
{% endif %}
<div class="item-title">
<h3 >{{ item.title }}</h3>
<div class="item-subtitle">{{ item.subtitle|nl2br }}</div>
</div>
</a>
<div class="item-action">
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
</div>
</div>
<div class="item-description hide">{{ item.content|raw }}</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
<div class="col-md-3">
<div class="card">
<div class="card-header">
<i class="fa fa-filter"></i>
Afficher par Rôle
</div>
<ul id="group-filter" class="list-group list-group-flush">
<a class="active list-group-item" id="allrole" style="cursor:pointer">
<i class="fa fa-users"></i>
Toutes les Rôles
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_ANONYME" style="cursor:pointer">
<i class="fa fa-user"></i>
Visiteur
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_USER" style="cursor:pointer">
<i class="fa fa-user"></i>
Utilisateur
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_MANAGER" style="cursor:pointer">
<i class="fa fa-user"></i>
Manager
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_MASTER" style="cursor:pointer">
<i class="fa fa-user"></i>
Master
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_MODO" style="cursor:pointer">
<i class="fa fa-user"></i>
Modérateur
<span class="badge bg-success float-end"></span>
</a>
<a class="list-group-item" data-role="ROLE_ADMIN" style="cursor:pointer">
<i class="fa fa-user"></i>
Administrateur
<span class="badge bg-success float-end"></span>
</a>
</ul>
</div>
<div class="card mt-3">
<div class="card-header">
<i class="fa fa-filter"></i>
Afficher par Groupe
</div>
<ul id="group-filter" class="list-group list-group-flush">
<a class="active list-group-item" style="cursor:pointer" id="allgroup">
<i class="fa fa-users"></i>
Toutes les Groupes
<span class="badge bg-success float-end"></span>
</a>
{% for group in groups %}
<a class="list-group-item" data-role="{{ group.id }}" style="cursor:pointer">
<i class="fa fa-user"></i>
{{ group.label }}
<span class="badge bg-success float-end">{{ group.items|length }}</span>
</a>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$( function() {
var changes = false;
$("#allrole").children("span").html($('.grid-item').length);
$("#allgroup").children("span").html($('.grid-item').length);
$("a[data-role='ROLE_ANONYME']").children("span").html($('.group-ROLE_ANONYME').length);
$("a[data-role='ROLE_USER']").children("span").html($('.group-ROLE_USER').length);
$("a[data-role='ROLE_MANAGER']").children("span").html($('.group-ROLE_MANAGER').length);
$("a[data-role='ROLE_MASTER']").children("span").html($('.group-ROLE_MASTER').length);
$("a[data-role='ROLE_MODO']").children("span").html($('.group-ROLE_MODO').length);
$("a[data-role='ROLE_ADMIN']").children("span").html($('.group-ROLE_ADMIN').length);
function updateItems() {
// Pour chaque catégorie
$('.list-categoryitem').each(function(i) {
// On récupère id et order
var categoryid = $(this).data('itemcategory-id');
$(this).find('input[name="itemcategory[rowOrder][]"]').val(i);
// Mise à jour en base de l'order
$.ajax({
method: "POST",
url: "{{ path('app_'~access~'_itemcategory_order') }}",
data: {
id:categoryid,
order:i
}
});
// Pour chaque item de la catégorie
$(this).find('.item').each(function(j) {
// On récupère les id
var itemid = $(this).data('item-id');
// Mise à jour en base de l'order
$.ajax({
method: "POST",
url: "{{ path('app_'~access~'_item_order') }}",
data: {
id:itemid,
categoryid:categoryid,
order:j
}
});
});
});
}
$( ".items-list" ).sortable({
connectWith: ".items-list",
placeholder: "item placeholder",
update: updateItems
});
$( ".list-categorysitem" ).sortable({
axis: "y",
placeholder: "category-list placeholder",
update: updateItems
});
$('a.list-group-item').click(function(){
$('#group-filter a.list-group-item').removeClass('active');
$(this).addClass('active');
console.log('.group-'+$(this).attr('data-role'));
if($(this).attr('data-role')){
$('.item').hide();
$('.group-'+$(this).attr('data-role')).show();
} else {
$('.item').show();
}
});
});
</script>
{% endblock %}

View File

@ -0,0 +1,103 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="submit" %}
Création blogtype
{% else %}
Modification blogtype
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_typeblog') }}>Annuler</a>
{% if mode=="update" and blogtype.id>0 %}
<a href={{ path('app_typeblog_delete',{'id':blogtype.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="card">
<div class="card-header">
<i class="fa fa-pencil-alt fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.childtype) }}
{{ form_row(form.blog) }}
{{ form_row(form.blogtype) }}
{{ form_row(form.page) }}
{{ form_row(form.pagetype) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$(document.body).on("change","#menuchild_childtype",function(){
$("#menuchild_blog").empty();
$("#menuchild_blogtype").empty();
$("#menuchild_page").empty();
$("#menuchild_pagetype").empty();
showhide();
});
function showhide() {
$("#groupfield_menuchild_blog").hide();
$("#groupfield_menuchild_blogtype").hide();
$("#groupfield_menuchild_page").hide();
$("#groupfield_menuchild_pagetype").hide();
switch ($("#menuchild_childtype").val()) {
case 'blog':
$("#groupfield_menuchild_blog").show();
break;
case 'blogtype':
$("#groupfield_menuchild_blogtype").show();
break;
case 'page':
$("#groupfield_menuchild_page").show();
break;
case 'pagetype':
$("#groupfield_menuchild_pagetype").show();
break;
}
}
showhide();
</script>
{% endblock %}

View File

@ -0,0 +1,62 @@
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
menus
</h1>
{% for menu in menus %}
<div class="card mb-3">
<div class="card-header">
{{menu.name}}
<a class="btn float-end" href="{{ path('app_menu_submit',{id:menu.id}) }}" title='Ajouter une entrée au menu'><i class="fas fa-plus"></i></a>
</div>
<ul class="list-menu list-group list-group-flush">
{% for menuchild in menu.menuchilds %}
<div class="item-menu list-group-item d-flex" data-id={{menuchild.id}}>
<i class="fa fa-arrows-up-down fa-2x fa-fw me-1"></i>
<div class="me-auto">
{% if menuchild.childtype == "blog" %}
{{menuchild.blog.name}}
{% elseif menuchild.childtype == "blogtype" %}
{{menuchild.blogtype.name}}
{% elseif menuchild.childtype == "page" %}
{{menuchild.page.name}}
{% elseif menuchild.childtype == "pagetype" %}
{{menuchild.pagetype.name}}
{% endif %}
<br><small>{{menuchild.childtype}}</small>
</div>
<a href="{{ path('app_menu_delete', { id: menuchild.id }) }}" class="ms-3">
<i class="fas fa-trash fa-2x"></i>
</a>
</div>
{% endfor %}
</ul>
</div>
{% endfor %}
{% endblock %}
{% block localscript %}
<script>
function updateOrder() {
$('.item-menu').each(function(i) {
var id = $(this).data('id');
url="{{ path('app_menu_order',{id:'xxx',order:'yyy'}) }}";
url=url.replace('xxx',id);
url=url.replace('yyy',i);
// Mise à jour en base de l'order
$.ajax({
method: "POST",
url: url,
});
});
}
$( ".list-menu" ).sortable({
axis: "y",
update: updateOrder
});
</script>
{% endblock %}

View File

@ -1,334 +0,0 @@
{% extends '@CadolesCore/base.html.twig' %}
{% set color = app.session.get('color') %}
{% set colormain = color['main'] %}
{% block pagewrapper %}
<div id="pagecontainer" style="margin: 0px -30px;"></div>
<div id="gridtemplate" style="max-width:1500px; margin:auto; margin-bottom:30px">
<div class="col-md-3">qsdfqsdfqsd</div>
<div class="col-md-9">
{% if bookmarks is not empty %}
<div class="bookmark-container">
{% if items is not empty %}
<h3 class="grid-title" data-idcategory="bookmark" style="{{ colorbodyfont }}">Favoris</h3>
{% else %}
<p></p>
{% endif %}
<div class="grid clearfix">
<div class="grid-sizer grid-small"></div>
<div class="grid-gutter-sizer"></div>
{% for bookmark in bookmarks %}
<div class="grid-item grid-small">
<div class="grid-item-content" style="background-color: {{ bookmark.color ? "#"~bookmark.color : '#'~colormain }};">
<a style="cursor:pointer" onClick="modBookmark({{ bookmark.id }})" class="item-update"><i style="color: #FFF" class="fa fa-file" title="Modifier le favori"></i></a>
{% if bookmark.target == 'frame' %}
<a class="linktosonde" data-sonde="{{ bookmark.title }}" style="cursor:pointer" onClick="showFrameitem('bookmark{{ bookmark.id }}','{{ bookmark.url }}')">
{% elseif bookmark.target == "_self" %}
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{% if access=="user" %}_top{% else %}{{ bookmark.target }}{% endif %}">
{% else %}
<a class="linktosonde" data-sonde="{{ bookmark.title }}" href="{{ bookmark.url }}" target="{{ bookmark.target }}">
{% endif %}
<div class="item-link clearfix">
<div class="grid-item-logo">
{% if bookmark.icon %}
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ bookmark.icon.label }}">
{% else %}
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
{% endif %}
</div>
<div class="grid-item-title">
<h2>{{ bookmark.title }}</h2>
<span>{{ bookmark.subtitle|nl2br }}</<span>
</div>
</div>
</a>
</div>
</div>
{% endfor %}
</div>
</div>
{% else %}
<div class="bookmark-container" style="display:none">
<h3 class="grid-title" data-idcategory="bookmark"">Favoris</h3>
<div class="grid clearfix">
<div class="grid-sizer grid-small"></div>
<div class="grid-gutter-sizer"></div>
</div>
</div>
{% endif %}
{% set mycategs = [] %}
{% for itemcategory in itemcategorys %}
{% set haveitem=false %}
{% for item in items if item.itemcategory==itemcategory %}
{% if loop.index ==1 %}
{% set mycategs = mycategs|merge({ (loop.index) : itemcategory}) %}
{% endif %}
{% endfor %}
{% endfor %}
{% for itemcategory in mycategs %}
{% set haveitem=false %}
{% for item in items if item.itemcategory==itemcategory %}
{% if loop.index ==1 %}
{% set haveitem=true %}
{% if mycategs|length > 1 or bookmarks is not empty %}
<h3 class="grid-title" data-idcategory="{{ itemcategory.id }}">{{ itemcategory.label }}</h3>
{% else %}
<p></p>
{% endif %}
<div class="grid clearfix">
<div class="grid-sizer grid-small"></div>
<div class="grid-gutter-sizer"></div>
{% endif %}
<div class="grid-item grid-small" data-idcategory="{{ item.itemcategory.id }}" data-iditem="{{ item.id }}">
<div class="grid-item-content" style="background-color: {{ item.color ? "#"~item.color : '#'~colormain }};">
{% if item.content %}
<a style="cursor:pointer" class="item-preview"><i style="color: #FFF" class="fa fa-info" title="Informations sur ce service"></i></a>
{% endif %}
{% if item.protected and not app.user %}
{% if mode_auth == "SAML" %}
<a href="{{ path('lightsaml_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
{% elseif mode_auth == "CAS" %}
<a href="{{ path('cas_sp.login') }}" {% if access=="user" %}target="_top"{% endif %}>
{% elseif mode_auth == "MYSQL" %}
<a href="{{ path('cnous_portal_user_login') }}" {% if access=="user" %}target="_top"{% endif %}>
{% endif %}
{% else %}
{% if item.target == 'frame' %}
<a class="linktosonde" data-sonde="{{ item.title }}" style="cursor:pointer" onClick="showFrameitem({{ item.id }},'{{ item.url }}')">
{% elseif item.target == "_self" %}
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url }}" target="{% if access=="user" %}_top{% else %}{{ item.target }}{% endif %}">
{% else %}
<a class="linktosonde" data-sonde="{{ item.title }}" href="{{ item.url }}" target="{{ item.target }}">
{% endif %}
{% endif %}
<div class="item-link clearfix">
<div class="grid-item-logo">
{% if item.icon %}
<img class="grid-item-img" height="110" src="/{{ alias }}/{{ item.icon.label }}">
{% else %}
<img class="grid-item-img" height="110" src="/{{ alias }}/uploads/icon/icon_pin.png">
{% endif %}
</div>
<div class="grid-item-title">
<h2>{{ item.title }}</h2>
<span>{{ item.subtitle|nl2br }}</<span>
</div>
</div>
</a>
<div class="grid-item-body" style="display:none">
{{ item.content|raw }}
</div>
</div>
</div>
{% endfor %}
{% if haveitem %}
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endblock %}
{% block localjavascript %}
$('document').ready(function(){
// Ajustement des frames
$(window).resize(function() {
AjustFrame();
});
// Création des grilles d'items
var optiongrid={columnWidth: '.grid-sizer', itemSelector: '.grid-item', gutter: '.grid-gutter-sizer'};
$('body').imagesLoaded(function() {
var grid = $('.grid').masonry(optiongrid);
});
// Preview item de bureau
$( ".grid .item-preview" ).click(function() {
if($(this).parent().children(".grid-item-body").css('display') == 'none') {
$(this).html('<i style="color: #FFF" class="fa fa-minus" title="Informations sur ce service"></i>');
heightbody=$(this).parent().children(".grid-item-body").height()+30;
heightitem=$(this).parent().parent().height();
$(this).parent().children(".grid-item-body").show();
$(this).parent().parent().css("width","100%");
$(this).parent().parent().css("height",heightitem+heightbody);
$(this).parent().children(".grid-item-content").css("height",heightitem+heightbody);
$(this).parent().children(".item-preview").css("height",heightitem+heightbody);
var grid = $('.grid').masonry(optiongrid);
}
else {
$(this).html('<i style="color: #FFF" class="fa fa-plus" title="Informations sur ce service"></i>');
$(this).parent().children(".grid-item-body").hide();
$(this).parent().parent().css("width","");
$(this).parent().parent().css("height","");
$(this).parent().children(".grid-item-content").css("height","");
$(this).parent().children(".item-preview").css("height","");
var grid = $('.grid').masonry(optiongrid);
}
});
// Sur click item à sonder
{% if activate_widsonde %}
$( ".linktosonde" ).click(function() {
title=$(this).attr("data-sonde");
//$.getScript( "{{ widsonde_url }}?appli="+title );
});
{% endif %}
});
// Ajout d'un bookmark
function addBookmark(idwidget,touser) {
var url="{{ path('cadoles_portal_user_bookmark_submit',{idpage:0,idwidget:'xx',touser:'yy'})}}";
url=url.replace('xx',idwidget);
url=url.replace('yy',touser);
$(location).attr('href', url);
}
// Modifciation d'un bookmark
function modBookmark(idbookmark) {
var url="{{ path('cadoles_portal_user_bookmark_update',{idpage:0,id:'xx'})}}";
url=url.replace('xx',idbookmark);
$(location).attr('href', url);
}
// Ajouter un item aux bookmark
function heartBookmark(iditem) {
var idbookmark;
$.ajax({
method: "POST",
url: "{{ path('cadoles_portal_user_bookmark_heart') }}",
data: {
iditem:iditem
},
success: function(idbookmark) {
location.reload();
}
});
}
// Supprimer un fichier
function delFile(directory,filename) {
var r = confirm("Confirmez-vous la suppression de ce fichier ?");
if (r == true) {
$.ajax({
method: "POST",
url: "{{ path('cadoles_core_user_file_delete') }}",
data: {
directory:directory,
filename:filename
},
success: function() {
location.reload();
}
});
}
}
// Ajustement des frames
function AjustFrame() {
$('.frameajust').iframeAutoHeight({
minHeight: 500, // Sets the iframe height to this value if the calculated value is less
heightOffset: 0, // Optionally add some buffer to the bottom
callback: function(callbackObject) { $(this).parent().css("height",callbackObject.newFrameHeight) ;}
});
if($(".frameitem").length>0) {
var heightbody = $('html').height();
var heightheader = $('.header').height();
if($('.pagemenu').css("display")=="none")
var heightmenu = 0;
else
var heightmenu = $('.pagemenu').height();
var heightframe = heightbody-heightheader-heightmenu;
$(".frameitem").height(heightframe);
}
}
// Affichage d'un Flux
function showFlux(idwidget, id) {
if(id=="all")
$(".widget[data-id="+idwidget+"]").find(".feed").show();
else {
$(".widget[data-id="+idwidget+"]").find(".feed").hide();
$(".widget[data-id="+idwidget+"]").find(".flux-"+id).show();
}
var optiongrid={columnWidth: '.grid-sizer',itemSelector: '.grid-item'};
var grid = $('.grid').masonry(optiongrid);
}
// Affichage des frames associés aux items de bureau
function resizeFrame() {
var iFrame = document.getElementById('frameContent');
var heightbody = $('html').height();
var heightheader = $('.header').height();
if($('#appmenu').css("display")=="none")
var heightmenu = 0;
else
var heightmenu = $('#appmenu').height();
var heightframe = heightbody-heightheader-heightmenu;
$(".pageframe").each(function( index ) {
$(this).height(heightframe);
});
}
function showFrameitem(id,url,forcereload) {
$(".pageframe").hide();
// Si force le rechargement et frame existante on la détruit
if(forcereload&&$("#frameitem-"+id).length)
$("#frameitem-"+id).remove();
// Si la frame en cours existe déjà on l'affiche
if($("#frameitem-"+id).length)
$("#frameitem-"+id).show();
// Sinon on la génère
else
$("#pagecontainer").append("<iframe id='frameitem-"+id+"' class='pageframe' src='"+url+"' style='border:none; width:100%'></iframe>");
resizeFrame();
}
{% endblock %}

View File

@ -1,141 +0,0 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
.thumbnail {
text-align:center;
}
.thumbnail img {
width:200px;
border: 5px solid #fff;
border-radius: 10px;
}
.caption p {
text-align:justify;
font-size:14px;
word-wrap: break-word;
}
.caption ul {
margin-top:-10px;
padding-left: 20px;
}
.caption li {
text-align:left;
font-size:14px;
word-wrap: break-word;
font-style: italic;
}
h3 {
margin-top:10px;
}
{% endblock %}
{% block body %}
<div style="width: 400px;margin: auto;text-align: center;margin-top: 10px;">
<a href="{{ path("app_home") }}">
<img src="/{{ appAlias }}/uploads/logo/{{app.session.get("logolight")}}" style="max-width: 100%; max-height:200px;">
<h1 style="text-transform:uppercase; padding-top:0px">{{ app.session.get('appname') }}</h1>
</a>
<br>
{% if not app.user and moderegistration!="none" and appMasteridentity=="SQL"%}
<a href="{{ path("app_resetpwd01") }}">Mot de passe oublié ?</a>
{% endif %}
</div>
<div class="container row m-auto">
<div class="col-lg-3">
<div class="thumbnail" style="margin-top:10px; border:none; background-color:transparent">
<img class="imgreflect" src="/{{ appAlias }}/images/thumb-01.jpg"/>
<div class="caption">
<h3 style="text-align:center">Portail<br>Profilé</h3>
<p>Tous les éléments du portail peuvent être distribués en fonction du profil de l'utilisateur.</p>
<p>Il est possible de définir le profil de l'utilisateur en fonction :
<ul>
<li>De son groupe d'appartenance</li>
<li>D'attributs Annuaire</li>
<li>D'attributs SSO</li>
</ul>
</p>
<p>En fonction du profil de l'utilisateur, il est possible de distribuer :
<ul>
<li>Des pages en onglet</li>
<li>Des Flux RSS</li>
<li>Des Annonces</li>
<li>Des Applications Web</li>
<li>Des Calendriers</li>
</ul>
</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="thumbnail" style="margin-top:10px; border:none; background-color:transparent">
<img class="imgreflect" src="/{{ appAlias }}/images/thumb-02.jpg"/>
<div class="caption">
<h3 style="text-align:center">Portail<br>Personnalisable</h3>
<p>En fonction de la configuration et de leur profil, les utilisateurs du portail sont libres de créer leur propre page.</p>
<p>Les pages de l'utilisateur pouvant prendre plusieurs formes :
<ul>
<li>Une page pointant sur l'adresse d'un autre site</li>
<li>Une page construite par l'utilisateur via l'utilisation d'un éditeur riche</li>
<li>Une page constituée de widgets qu'il dispose selon son libre choix</li>
</ul>
</p>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="thumbnail" style="margin-top:10px; border:none; background-color:transparent">
<img class="imgreflect" src="/{{ appAlias }}/images/thumb-03.jpg"/>
<div class="caption">
<h3 style="text-align:center">Portail<br>Evolutif</h3>
<p>Ninegate est évolutif dans le sens où, vous disposerez d'une large bibliothèque de widgets qui composeront vos pages.</p>
<p>Voici quelques exemples :
<ul>
<li>Widget URL</li>
<li>Widget Flux RSS</li>
<li>Widget Editeur de texte</li>
<li>Widget Gestionnaire de tâches</li>
<li>Widget Calendriers</li>
<li>Widget Favoris</li>
<li>Widget Dépôt de Fichiers</li>
<li>Et bien d'autres encore</li>
</ul>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="thumbnail" style="margin-top:10px; border:none; background-color:transparent">
<img class="imgreflect" src="/{{ appAlias }}/images/thumb-04.jpg"/>
<div class="caption">
<h3 style="text-align:center">Portail</br>Open Source</h3>
<p>Ce projet est opensource
<ul>
<li>Vous pouvez à tout moment modifier le code de votre portail</li>
<li>Distribuer {{ app.session.get('appname') }}</li>
</ul>
</p>
<p>Ninegate est développé dans le cadre du projet <a href='https://envole.ac-dijon.fr/ninegate/' target='_blank'>Envole</a>. Vous pourrez trouver le code source de Ninegate sur la <a href='https://dev-eole.ac-dijon.fr/projects/eole-eportail' target='_blank'>forge du projet</a></p>
<p>Ninegate est propulsé par la société <a href='https://cadoles.com' target='_blank'>Cadoles</a></p>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,83 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="submit" %}
Création page
{% else %}
Modification page
{% endif %}
</h1>
{{ form_widget(form.submit) }}
{% if from=="child" %}
<a class="btn btn-secondary" href={{ path('app_child',{catparent:'page',idparent:page.id}) }}>Annuler</a>
{% else %}
<a class="btn btn-secondary" href={{ path('app_page') }}>Annuler</a>
{% endif %}
{% if mode=="update" and page.id>0%}
<a href={{ path('app_page_delete',{id:page.id}) }}
class="btn btn-danger float-right"
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.pagetype) }}
</div>
</div>
</div>
<div class="col-md-6">
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("#page_name").focus();
});
</script>
{% endblock %}

View File

@ -0,0 +1,204 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
<style>
.childsize-1 {
zoom:80%;
}
.child-name {
border-color: var(--colorbgbodydark);
border-block-width: 3px;
//border-bottom-style:dotted;
}
.child-description h1, .child-description h2 {
margin-top:30px;
}
.child-sidebar {
color: var(--colorfttitlelight);
}
.child-sidebar h3 {
font-size:1.4rem;
}
.grid-sizer { width: 10% }
.grid-item {
background-color:var(--colorbgbodydark);
color: var(--colorfttitledark);
overflow:hidden;
}
.grid-image {
width:100%;
transition: transform 0.3s;
}
.grid-item-title {
background-color:var(--colorbgbodydark);
color: var(--colorfttitledark);
width:auto;
padding:15px;
text-align:center;
margin:auto;
}
.grid-item-size-1 { width: 10% }
.grid-item-size-2 { width: 20% }
.grid-item-size-3 { width: 33.333333% }
.grid-item-size-4 { width: 40% }
.grid-item-size-5 { width: 50% }
.grid-tag {font-style:italic}
</style>
{% endblock %}
{% block beforebody %}
{%if heros %}
<div class="heroheader" style="top:55px;margin-bottom:30px;display:none;" >
{% for hero in heros %}
<div class="btn btn-link p-0 m-0" style="background-image:url(/{{appAlias}}/uploads/childheader/{{hero.childid}}/{{hero.filename}})">
<img id="separateur" src="/{{appAlias}}/images/separateur-g.png">
<div style="padding-left:150px;">
<h1>
{{hero.name}}<br>
<small>
<div style="font-size:16px">{{ hero.parenttype }}</div>
<span style="font-size:20px; line-height:20px; display:block">{{ hero.subname|nl2br }}</span>
</small>
</h1>
<a class="btn btn-success" href="{{path("app_child_view",{catparent:hero.catparent,idparent:hero.parentid,idchild:hero.childid})}}">En savoir plus</a>
</div>
</div>
{%endfor%}
</div>
{% endif %}
{% endblock %}
{% block useractions %}
{% if is_granted('ROLE_ADMIN') %}
<li>
<a href="{{path("app_page_submit")}}"><i class="fa fa-plus fa-fw"></i></a>
</li>
{% endif %}
{% endblock %}
{% block body %}
<div class="container">
<h1 class="child-name pt-0 text-uppercase mb-4">Actualités</h1>
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% for page in pages %}
{% if not page.childpages is empty %}
{% set background="" %}
{% if not page.childpages[0].child.childheaders is empty and page.childpages[0].child.childheaders[0] %}
{% set background="/"~appAlias~"/uploads/childheader/"~page.childpages[0].child.id~"/"~page.childpages[0].child.childheaders[0].filename %}
{% endif %}
{% set style="height:auto;background-position: center ; background-size: cover; background-image: url("~background~")" %}
<a href="{{path("app_child_view",{catparent:'page',idparent:page.id,idchild:page.childpages[0].child.id})}}" class="d-block text-center">
<div class="grid-item grid-item-size-5 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">
<span class="p-1" style="font-weight:bold; text-transform:uppercase;">{{ page.childpages[0].child.name }}</span>
<small><br><span class="p-1" style="background-color:var(--colorbgbodylight);color:var(--colorftbodylight)">{{ page.pagetype.name }}</span></small>
<small class="p-2" style="line-height:15px; display:block;">
{% if page.childpages[0].child.subname %}
{{ page.childpages[0].child.subname|nl2br }}<br>
{% endif %}
{% for tag in page.childpages[0].child.tags %}
{% if loop.first %}<br>{%endif%}
<span class="grid-tag" data-id="{{tag.id}}">#{{tag.id}}</span>
{% endfor %}
</small>
</small>
</div>
</div>
</div>
</a>
{% endif %}
{% endfor %}
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
function resizegrid() {
height=$('.grid-item').width();
height=Math.min(height,300);
$('.grid-item').not('.grid-video').height(height)
$('.grid').masonry({
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer',
itemSelector: '.grid-item',
percentPosition: true,
horizontalOrder: false,
});
}
$(window).resize(function() {
if($('.heroheader').length) {
heighthero=$('.heroheader').width()/4;
$('.heroheader').height(heighthero);
}
resizegrid();
});
$(document).ready(function() {
if($('.heroheader').length) {
heighthero=$('.heroheader').width()/4;
$('.heroheader').height(heighthero);
$('.heroheader').show();
{% if heros|length > 1 %}
$('.heroheader').slick({
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 6000,
dots: true,
touchMove: false,
pauseOnDotsHover: true,
fade: true,
cssEase: 'linear',
prevArrow: false,
nextArrow: false,
customPaging: function(slider, i) {
return '<span class="heroheader-dot fa fa-circle fa-fw"></span>';
}
});
{% endif %}
}
resizegrid();
});
$( ".grid-item" ).hover(function() {
$( this ).children(".grid-image").css("transform","scale(1.05)");
}, function() {
$( this ).children(".grid-image").css("transform","scale(1)");
});
$( ".grid-tag" ).hover(function() {
$( this ).css("text-decoration","underline");
}, function() {
$( this ).css("text-decoration","none");
});
$( ".grid-tag" ).click(function() {
url="{{path("app_child_searchbytag",{id:"xxx"}) }}"
url=url.replace("xxx",$(this).data("id"));
document.location = url;
return false;
});
</script>
{% endblock %}

View File

@ -1,36 +1,42 @@
{% extends 'base.html.twig' %}
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
Gestion des Pages
pages
</h1>
<a href="{{ path('app_'~access~'_page_'~usage~'_submit') }}" class="btn btn-success">Ajouter une Page</a>
<div class="custom-control custom-switch float-right">
<input id="alluser" type="checkbox" class="custom-control-input">
<label id="labelalluser" class="custom-control-label" for="alluser">Afficher les pages créées par des utilisateurs</label>
</div>
<br><br>
<p><a class="btn btn-success" href={{ path('app_page_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Pages
<i class="fa fa-table fa-fw"></i> Liste des pages
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="140px" class="no-sort">Action</th>
<th>Ordre</th>
<tr>
<th width="90px" class="no-sort">Action</th>
<th class="no-string" width="70px">ID</th>
<th width="70px">Date</th>
<th width="200px">Type</th>
<th>Nom</th>
<th class="no-sort">Catégorie</th>
<th>Propriétaire</th>
</tr>
</tr>
</thead>
<tbody>
{% for page in pages %}
<tr>
<td>
<a href="{{path("app_child",{catparent:"page",idparent:page.id})}}"><i class="fa fa-file fa-2x"></i></a>
</td>
<td>{{page.id}}</td>
<td>{{page.submitdate|date("Y-m-d")}}</td>
<td>{{page.pagetype.name}}</td>
<td>{{page.name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
@ -40,51 +46,13 @@
{% block localscript %}
<script>
$(document).ready(function() {
{% if not app.session.get('alluserpage') is empty %}
var state={{ app.session.get('alluserpage') }};
if(state) {
$("#labelalluser").html("Afficher les pages non liées à un utilisateur");
$("#alluser").attr('checked', true);
}
{% endif %}
table = $('#dataTables').DataTable({
columnDefs: [ { "targets": 'no-sort', "orderable": false } ],
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
responsive: true,
iDisplayLength: 100,
order: [[ 1, "asc" ]],
processing: true,
serverSide: true,
ajax: {
"url": "{{ path('app_'~access~'_page_'~usage~'_tablelist') }}",
"data": function ( d ) {
return $.extend( {}, d, {
"alluser": $('#alluser').is(':checked')
});
}
},
drawCallback: function(settings) {
$("a[data-method='delete']").click(function(){
if( !confirm('Êtes-vous sûr de vouloir supprimer cette page ?')) {
return false;
}
});
}
order: [[ 2, "asc" ]]
});
});
$('#alluser').change(function() {
if (typeof table !== 'undefined') {
table.ajax.reload();
}
var check = $('#alluser').is(':checked');
if(check)
$("#labelalluser").html("Afficher les pages non liées à un utilisateur");
else
$("#labelalluser").html("Afficher les pages créées par des utilisateurs");
});
</script>
{% endblock %}

View File

@ -1,69 +0,0 @@
{% if not inmenu %}
{% else %}
{% for groupshared in groups %}
{% if groupshared.pagesshared|length == 1 %}
{% set page = groupshared.pagesshared[0] %}
{% set forcereload=true %}
{% if page.pagecategory.id==1 %}
{% set forcereload=page.toreload %}
{% endif %}
{% set isactive="" %}
{% if entity.id is defined and page.id==entity.id %}
{% set isactive="class='active'" %}
{% endif %}
<li id="menupage-{{page.id}}" {{ isactive }} style="cursor:pointer">
<a data-group="{{groupshared.id}}" onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{forcereload}}','{{groupshared.id}}','{{page.name}}')">
{% if page.fonticon %}
<i class="{{ page.fonticon }} fa-faw"></i>
{% else %}
<i class="fa fa-users fa-fw"></i>
{% endif %}
&nbsp;{{ groupshared.label }}
{% if page.counterread > 0 %}
<span id="badge-{{groupshared.id}}" class="badge">{{page.counterread}}</span>
{% endif %}
</a>
</li>
{% else %}
<ul id="pagesshared" class="nav navbar-top-links navbar-left">
<li class="dropdown">
<a data-group="{{groupshared.id}}" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-users fa-fw"></i>
&nbsp;{{ groupshared.label }}
<span class="caret"></span>
{% if groupshared.pagesshared[0].counterread > 0 %}
<span id="badge-{{groupshared.id}}" class="badge">{{groupshared.pagesshared[0].counterread}}</span>
{% endif %}
</a>
<ul class="dropdown-menu">
{% for page in groupshared.pagesshared %}
{% set forcereload=true %}
{% if page.pagecategory.id==1 %}
{% set forcereload=page.toreload %}
{% endif %}
{% set isactive="" %}
{% if entity.id is defined and page.id==entity.id %}
{% set isactive="class='active'" %}
{% endif %}
<li id="menupage-{{page.id}}" {{isactive}} style="cursor:pointer">
<a onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{forcereload}}','{{groupshared.id}}','{{page.name}}')">
{% if page.fonticon %}
<i class="{{ page.fonticon }} fa-faw"></i>
{% endif %}
{{ page.name }}
</a>
</li>
{% endfor %}
</ul>
</li>
</ul>
{% endif %}
{% endfor %}
{% endif %}

View File

@ -1,461 +0,0 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
<style>
body{
overflow-y:hidden
}
#page{
padding:0px !important;
overflow-y:hidden;
}
</Style>
{% endblock %}
{% block menuapp %}
<ul id="menupagesportal" class="navbar-nav">
{% for page in pagesportal %}
<li id="menupage-{{page.id}}" class="menupage nav-item" style="cursor:pointer">
<a onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','portal','{{page.pagecategory.id==1?page.toreload:true}}',null,'{{page.name}}')">
{% if page.fonticon %}
<i class="{{ page.fonticon }} fa-fw"></i>
{% elseif loop.first %}
<i class="fas fa-home fa-fw"></i>
{% else %}
<i class="fas fa-door-closed fa-fw"></i>
{% endif %}
{{ page.name }}
</a>
</li>
{% endfor %}
</ul>
<ul id="menupagesuser" class="navbar-nav">
{% for page in pagesuser %}
<li id="menupage-{{page.id}}" class="menupage nav-item" style="cursor:pointer">
<a onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','user','{{page.pagecategory.id==1?page.toreload:true}}',null,'{{page.name}}')">
{% if page.fonticon %}
<i class="{{ page.fonticon }} fa-fw"></i>
{% else %}
<i class="fas fa-user fa-fw"></i>
{% endif %}
{{ page.name }}
</a>
</li>
{% endfor %}
</ul>
{% if groups|length > 0 and groups|length < 10 %}
<ul id="menupagesgroup" class="navbar-nav">
{% for groupshared in groups %}
{% if groupshared.pagesshared|length > 1 %}
<li id="menugroup-{{groupshared.id}}" class="nav-item menupage dropdown">
<a class="dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-users fa-fw"></i>
{{ groupshared.label }}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{% endif %}
{% for page in groupshared.pagesshared %}
{% if groupshared.pagesshared|length == 1 %}
<li id="menupage-{{page.id}}" class="menupage nav-item">
{%endif%}
<a id="menupage-{{page.id}}" style="cursor:pointer" class="{{ groupshared.pagesshared|length > 1 ? "menupage dropdown-item" : "" }}" onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{page.pagecategory.id==1?page.toreload:true}}',{{groupshared.id}},'{{page.name}}')">
{% if page.fonticon %}
<i class="{{ page.fonticon }} fa-fw"></i>
{% else %}
<i class="fa fa-users fa-fw"></i>
{% endif %}
{{ page.name }}
</a>
{% if groupshared.pagesshared|length == 1 %}
</li>
{%endif%}
{% endfor %}
{% if groupshared.pagesshared|length > 1 %}
</div>
</li>
{% endif %}
{% endfor %}
</ul>
{% elseif groups|length > 0 %}
<ul id="menupagesgroup" class="navbar-nav">
<li class="nav-item" style="cursor:pointer">
<a onclick="$('#selmenu').modal('show');">
<i class="fa fa-users fa-fw"></i> Mes Groupes
</a>
</li>
</ul>
{% endif %}
{% endblock %}
{% block menuuser %}
{% if canadd and app.user %}
<a id="menusubmit" style="cursor:pointer" onclick="submitPage()" title='Ajouter une page'><i class='fa fa-plus fa-fw'></i></a>
{% endif %}
<a id="menuupdate" style="cursor:pointer;display:none" onclick="updatePage()" title='Modifier une page'><i class='fa fa-file fa-fw'></i></a>
<a id="menushare" style="cursor:pointer;display:none" onclick="sharePage()" title='Partager une page'><i class='fa fa-share-alt fa-fw'></i></a>
<a id="menudelete" style="cursor:pointer;display:none" onclick="deletePage()" title='Supprimer une page'><i class='fa fa-trash fa-fw'></i></a>
<a id="menuwidgetuser" class="btn-modal" style='cursor:pointer' data-modalid='selwidgetuser' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a></li>
<a id="menuwidgetgroup" class="btn-modal" style='cursor:pointer' data-modalid='selwidgetgroup' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a></li>
{% endblock %}
{% block body %}
<div id="pagecontainer"></div>
<div id="selmenu" class="modal fade" role="dialog">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div id="mymodalheader" class="modal-header">
<h4 class="modal-title">SELECTIONNER UNE PAGE</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="pagesportal" style="display:none">
{% for page in pagesportal %}
{%if loop.first %}
<div class="card mb-3">
<div class="card-header">PAGES PORTAIL</div>
<ul class="list-group list-group-flush">
{%endif%}
<a class="list-group-item" onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','portal','{{page.pagecategory.id==1?page.toreload:true}}',null,'{{page.name}}')">
{% if page.fonticon %}
<i class="{{ page.fonticon }} fa-fw"></i>
{% elseif loop.first %}
<i class="fas fa-home fa-fw"></i>
{% else %}
<i class="fas fa-door-closed fa-fw"></i>
{% endif %}
{{ page.name }}
</a>
{%if loop.last %}
</ul></div>
{%endif%}
{% endfor %}
</div>
<div id="pagesuser" style="display:none">
{% for page in pagesuser %}
{%if loop.first %}
<div class="card mb-3">
<div class="card-header">PAGES PERSONNEL</div>
<ul class="list-group list-group-flush">
{%endif%}
<a class="list-group-item" onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','user','{{page.pagecategory.id==1?page.toreload:true}}',null,'{{page.name}}')">
{% if page.fonticon %}
<i class="{{ page.fonticon }} fa-fw"></i>
{% else %}
<i class="fas fa-user fa-fw"></i>
{% endif %}
{{ page.name }}
</a>
{%if loop.last %}
</ul></div>
{%endif%}
{% endfor %}
</div>
<div id="pagesgroup">
{% for groupshared in groups %}
{%if loop.first %}
<div class="card mb-3">
<div class="card-header">PAGES GROUPE DE TRAVAIL</div>
<ul class="list-group list-group-flush">
{%endif%}
{% for page in groupshared.pagesshared %}
<a class="list-group-item" onClick="showPage({{ page.id }},{{ page.pagecategory.id }},'{{ page.canupdate }}','group','{{page.pagecategory.id==1?page.toreload:true}}',{{groupshared.id}},'{{page.name}}')">
{% if page.fonticon %}
<i class="{{ page.fonticon }} fa-fw"></i>
{% else %}
<i class="fas fa-users fa-fw"></i>
{% endif %}
{{page.name == groupshared.label ? page.name : groupshared.label~" - "~page.name}}
</a>
{% endfor %}
{%if loop.last %}
</ul></div>
{%endif%}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div id="selwidgetuser" class="modal fade" role="dialog">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div id="mymodalheader" class="modal-header">
<h4 class="modal-title">SELECTIONNER UN WIDGET</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<table id="dataTablesuser" class="table table-striped table-bordered table-hover" style="width:100%">
<thead>
<tr>
<th class="no-sort" width="80px"></th>
<th width="100px">Nom</th>
<th class="no-sort" width="500px">Description</th>
</tr>
</thead>
<tbody>
{% for widget in widgetsuser %}
<tr>
<td>
<a onClick="selWidget({{ widget.id }},'user')" style="cursor:pointer;">
<img id="widgettype-{{ widget.id }}" class="grid-item-img" height="40" src="{{path('app_minio_image',{file:widget.icon.label}) }}" style="padding:2px">
</a>
</td>
<td>{{ widget.name }}</td>
<td>{{ widget.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="selwidgetgroup" class="modal fade" role="dialog">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div id="mymodalheader" class="modal-header">
<h4 class="modal-title">SELECTIONNER UN WIDGET</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<table id="dataTablesgroup" class="table table-striped table-bordered table-hover" style="width:100%">
<thead>
<tr>
<th class="no-sort" width="80px"></th>
<th width="100px">Nom</th>
<th class="no-sort" width="500px">Description</th>
</tr>
</thead>
<tbody>
{% for widget in widgetsgroup %}
<tr>
<td>
<a onClick="selWidget({{ widget.id }},'group')" style="cursor:pointer;">
<img id="widgettype-{{ widget.id }}" class="grid-item-img" height="40" src="{{path('app_minio_image',{file:widget.icon.label}) }}" style="padding:2px">
</a>
</td>
<td>{{ widget.name }}</td>
<td>{{ widget.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
var idpage;
$('document').ready(function(){
// Afficher la page courrante
{% for page in pagesportal %}
{% if page.id==entity.id %}
showPage({{ page.id }}, {{ page.pagecategory.id }},'{{ page.canupdate }}','portal',false,null,'{{page.name}}');
{% endif %}
{% endfor %}
{% for page in pagesuser %}
{% if page.id==entity.id %}
showPage({{ page.id }}, {{ page.pagecategory.id }},'{{ page.canupdate }}','user',false,null,'{{page.name}}');
{% endif %}
{% endfor %}
{% for groupshared in groups %}
{% for page in groupshared.pagesshared %}
{% if page.id==entity.id %}
showPage({{ page.id }}, {{ page.pagecategory.id }},'{{ page.canupdate }}','group',true,{{groupshared.id}},'{{page.name}}');
{% endif %}
{% endfor %}
{% endfor %}
// Rendre les pages user déplacable
$("#menupagesuser").sortable({
axis: "x",
forcePlaceholderSize: true,
placeholder: "placeholder",
update: function( event, ui ) {
$('#pagesuser li').each(function(order) {
var idpage=$(this).attr('id').replace("menupage-","");
$.ajax({
method: "POST",
url: "{{ path('app_'~access~'_page_user_order') }}",
data: {
id:idpage,
order:order
}
});
});
}
});
// Initialisation du tableau des widgets selectionnable à la création
$('.table').DataTable({
columnDefs: [ { "targets": 'no-sort', "orderable": false }, { "targets": 0, "className": "text-center" } ],
iDisplayLength: 10,
order: [[ 1, "asc" ]],
scrollX: false,
});
});
// Affichage des frames associés aux items de bureau
function showItemframe(id,url,forcereload) {
$(".pageframereload").remove();
$(".pageframe").hide();
// Si force le rechargement et frame existante on la détruit
if(forcereload&&$("#frameitem-"+id).length)
$("#frameitem-"+id).remove();
// Si la frame en cours existe déjà on l'affiche
if($("#frameitem-"+id).length)
$("#frameitem-"+id).show();
// Sinon on la génère
else {
var myclass="";
if(forcereload) myclass="pageframereload";
$("#pagecontainer").append("<iframe onload='this.contentWindow.focus()' id='frameitem-"+id+"' class='pageframe "+myclass+"' src='"+url+"' style='border:none; width:100%'></iframe>");
}
Resize();
}
// Affichages des pages
function showPage(id,catid,canupdate,usage,forcereload,groupid,pagename) {
// Sauvegarder la page en cours
idpage=id;
// Cacher toutes les pages
$(".pageframereload").remove();
$(".pageframe").hide();
$(".dropdown-menu").hide();
// Rendre actif le page en cours dans le menu
$(".menupage").removeClass("active");
$(".dropdown-toggle").removeClass("active");
$("#menupage-"+id).addClass("active");
$("#menugroup-"+groupid).addClass("active");
if(usage=="portal")
var url="{{ path('app_all_page_portal_view',{id:'xx'}) }}";
else if(usage=="user")
var url="{{ path('app_all_page_user_view',{id:'xx'}) }}";
else
var url="{{ path('app_all_page_group_view',{id:'xx'}) }}";
url=url.replace('xx',id);
passurl="{{ path('app_home',{id:'xx'}) }}";
passurl=passurl.replace('xx',id);
history.pushState('data to be passed', 'Title of the page', passurl);
// Si force le rechargement et frame existante on la détruit
if(forcereload&&$("#page-"+id).length)
$("#page-"+id).remove();
// Si la frame en cours existe déjà on l'affiche
if($("#page-"+id).length)
$("#page-"+id).show();
// Sinon on la génère
else {
var myclass="";
if(forcereload) myclass="pageframereload";
$("#pagecontainer").append("<iframe onload='this.contentWindow.focus()' id='page-"+id+"' data-category='"+catid+"' class='pageframe "+myclass+"' src='"+url+"' style='border:none; width:100%'></iframe>");
}
// Cacher les actions possibles sur la page
$("#menuupdate").hide();
$("#menushare").hide();
$("#menudelete").hide();
$("#menuwidgetuser").hide();
$("#menuwidgetgroup").hide();
if(canupdate) {
$("#menuupdate").show();
$("#menudelete").show();
}
// Si page de type widget on affiche la selection des widgets à insérer
if($("#page-"+id).data('category')==2&&canupdate) {
if(usage=="user") $("#menuwidgetuser").show();
if(usage=="group") $("#menuwidgetgroup").show();
}
Resize();
}
function submitPage() {
var url="{{ path('app_'~access~'_page_user_submit') }}";
$(location).attr('href',url);
}
function updatePage() {
if($("#page-"+idpage).length) {
var url="{{ path('app_'~access~'_page_user_update',{id:'xx'}) }}";
url=url.replace('xx',idpage);
$(location).attr('href',url);
}
}
function deletePage() {
if($("#page-"+idpage).length) {
if (confirm('Êtes-vous sûr de vouloir supprimer ?')) {
var url="{{ path('app_'~access~'_page_user_delete',{id:'xx'}) }}";
url=url.replace('xx',idpage);
$(location).attr('href',url);
}
}
}
// Création d'un widget selectionné
function selWidget(idwidgettype,usage) {
var url="{{ path('app_all_pagewidget_widget_sumbit',{idpage:'yy',idwidgettype:'xx',usage:'zz'})}}";
url=url.replace('xx',idwidgettype);
url=url.replace('yy',idpage);
url=url.replace('zz',usage);
$(".modal").modal("hide");
$("#page-"+idpage).attr("src",url);
};
</script>
{% endblock %}

View File

@ -1,88 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1>
Nouvelle Page
</h1>
<p>
{{ form_widget(form.submit) }}
{% if access=="admin" %}
<a class="btn btn-secondary" href="{{ path('app_admin_page_portal') }}">Annuler</a>
{% else %}
<a class="btn btn-secondary" href="{{ path('app_home') }}">Annuler</a>
{% endif %}
</p>
{% 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="card">
<div class="card-header">
<i class="fa fa-pencil fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.name) }}
{{ form_row(form.pagecategory) }}
{{ form_row(form.usage) }}
{% if form.user is defined %}
{{ form_row(form.user) }}
{% endif %}
{{ form_row(form.page) }}
{{ form_row(form.groups) }}
{{ form_row(form.roworder) }}
{{ form_row(form.fonticon) }}
{{ form_row(form.maxwidth) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$('document').ready(function(){
hideshow();
});
$(document.body).on("change","#page_submit_pagecategory",function(){
hideshow();
});
$(document.body).on("change","#page_submit_usage",function(){
hideshow();
});
function hideshow() {
if($("#page_submit_pagecategory").val()==2)
$("#groupfield_page_submit_page").show();
else {
$("#groupfield_page_submit_page").hide();
}
if($("#page_submit_usage").val()=="group")
$("#groupfield_page_submit_groups").show();
else {
$("#groupfield_page_submit_groups").hide();
}
}
</script>
{% endblock %}

View File

@ -1,72 +0,0 @@
{% extends '@CadolesCore/base.html.twig' %}
{% block pagewrapper %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification Page Editeur = {{entity.name}}
{% elseif mode=="submit" %}
Création Page Editeur
{% endif %}
</h1>
<p>
{{ form_widget(form.submit) }}
{% if access=="config" %}
<a class="btn btn-default" href="{{ path('cadoles_portal_config_page_view',{id:entity.id}) }}">Annuler</a>
{% else %}
<a class="btn btn-default" href="{{ path('cadoles_core_home',{id:entity.id}) }}">Annuler</a>
{% endif %}
{% if mode=="update" %}
<a href={{ path('cadoles_portal_'~access~'_page_delete',{'id':entity.id}) }}
class="btn btn-danger pull-right"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cette page ?">
Supprimer
</a>
{% endif %}
</p>
{% 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="form-group row clearfix">
{% if form.roles is defined %}
<div class="col-md-8">
{% else %}
<div class="col-md-12">
{% endif %}
{{ form_row(form.name) }}
{{ form_row(form.roworder) }}
{{ form_row(form.fonticon) }}
{{ form_row(form.maxwidth) }}
{{ form_row(form.html) }}
</div>
{% if form.roles is defined %}
<div class="col-md-4">
{{ form_row(form.user) }}
{{ form_row(form.roles) }}
{{ form_row(form.groups) }}
</div>
{% endif %}
</div>
{{ form_end(form) }}
{% endblock %}

View File

@ -1,66 +0,0 @@
{% extends '@CadolesCore/base.html.twig' %}
{% block pagewrapper %}
{{ form_start(form) }}
<h1 class="page-header">
Modification Page {{ entity.pagecategory.name}} = {{entity.name}}
</h1>
<p>
{{ form_widget(form.submit) }}
{% if access=="config" %}
<a class="btn btn-default" href="{{ path('cadoles_portal_config_page_view',{id:entity.id}) }}">Annuler</a>
{% else %}
<a class="btn btn-default" href="{{ path('cadoles_core_home',{id:entity.id}) }}">Annuler</a>
{% endif %}
{% if mode=="update" %}
<a href={{ path('cadoles_portal_'~access~'_page_delete',{'id':entity.id}) }}
class="btn btn-danger pull-right"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cette page ?">
Supprimer
</a>
{% endif %}
</p>
{% 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="form-group row clearfix">
{% if form.roles is defined %}
<div class="col-md-8">
{% else %}
<div class="col-md-12">
{% endif %}
{{ form_row(form.name) }}
{{ form_row(form.roworder) }}
{{ form_row(form.fonticon) }}
</div>
{% if form.roles is defined %}
<div class="col-md-4">
{{ form_row(form.user) }}
{{ form_row(form.roles) }}
{{ form_row(form.groups) }}
</div>
{% endif %}
</div>
{{ form_end(form) }}
{% endblock %}

View File

@ -1,76 +0,0 @@
{% extends '@CadolesCore/base.html.twig' %}
{% block pagewrapper %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification Page URL = {{entity.name}}
{% elseif mode=="submit" %}
Création Page URL
{% endif %}
</h1>
<p>
{{ form_widget(form.submit) }}
{% if access=="config" %}
<a class="btn btn-default" href="{{ path('cadoles_portal_config_page_view',{id:entity.id}) }}">Annuler</a>
{% else %}
<a class="btn btn-default" href="{{ path('cadoles_core_home',{id:entity.id}) }}">Annuler</a>
{% endif %}
{% if mode=="update" %}
<a href={{ path('cadoles_portal_'~access~'_page_delete',{'id':entity.id}) }}
class="btn btn-danger pull-right"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cette page ?">
Supprimer
</a>
{% endif %}
</p>
{% 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="form-group row clearfix">
{% if form.roles is defined %}
<div class="col-md-8">
{% else %}
<div class="col-md-12">
{% endif %}
{{ form_row(form.name) }}
{{ form_row(form.url) }}
<em>le mot clé #login# sera remplacé par le login de l'utilisateur</em><br>
<em>Attention certains sites n'acceptent pas d'être encapsulés dans une frame.<br><br></em>
{{ form_row(form.toreload) }}
{{ form_row(form.roworder) }}
{{ form_row(form.fonticon) }}
{{ form_row(form.maxwidth) }}
</div>
{% if form.roles is defined %}
<div class="col-md-4">
{{ form_row(form.user) }}
{{ form_row(form.roles) }}
{{ form_row(form.groups) }}
</div>
{% endif %}
</div>
{{ form_end(form) }}
{% endblock %}

View File

@ -1,552 +0,0 @@
{% extends 'base.html.twig' %}
{% block localstyle %}
<style>
#gridtemplate {
border: 1px solid #cdcdcd;
padding:20px;
margin: 0px;
}
#gridtemplate .row {
height: 500px;
border: 1px solid #cdcdcd;
margin: 0px 0px 20px 0px;
background-color: #c8f7c5;
}
#gridtemplate .rowcontainer {
float:left;
width:90%;
height:80%;
}
#gridtemplate .rowcontainer .row {height:33.333333333333333%; margin:0px}
#gridtemplate .rowcontainer .maxright, #gridtemplate .rowcontainer .maxleft {height:90% !important; width:20% !important; }
#gridtemplate .rowcontainer .rowcontainer {width:60% !important;}
#gridtemplate .rowcontainer .addRow {display:none;}
#gridtemplate .rowcontainer .colcontainer {padding:5px;}
#gridtemplate .addRow {
width: 100%;
height: 10%;
padding: 2px;
max-height: 30px
}
#gridtemplate .delRow {
height:100%;
width: 5%;
background-color: #e74c3c;
color: #fff;
text-align:center;
float: left;
cursor: pointer;
}
#gridtemplate .delRow i {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
#gridtemplate .colcontainer {
width:90%;
height:100% !important;
float:left;
padding:15px;
}
#gridtemplate .colcontainer .col {
border: 1px solid #cdcdcd;
height:100%;
padding: 0px;
background-color:#fff;
}
#gridtemplate .addCol {
height:100%;
width: 5%;
background-color: #2c3e50;
color: #fff;
text-align:center;
float: right;
cursor: pointer;
}
#gridtemplate .addCol i {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
#gridtemplate .colcontainer .col .delCol {
height:10%;
width: 100%;
background-color: #e74c3c;
color: #fff;
text-align:center;
float: right;
cursor: pointer;
}
#gridtemplate .colcontainer .col .delCol i {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
#gridtemplate .colcontainer .col .maxleft {
height:80%;
width: 5%;
background-color: #2c3e50;
color: #fff;
text-align:center;
float: left;
cursor: pointer;
}
#gridtemplate .colcontainer .col .maxleft i {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
#gridtemplate .colcontainer .col .maxright {
height:80%;
width: 5%;
background-color: #2c3e50;
color: #fff;
text-align:center;
float: right;
cursor: pointer;
}
#gridtemplate .colcontainer .col .maxright i {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
</style>
{% endblock %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
{% if usage=="template" %}
Modification Modèle de Page = {{page.name}}
{% else %}
Modification Page Widget = {{page.name}}
{% endif %}
{% elseif mode=="submit" %}
Création Page Widget
{% endif %}
</h1>
<p>
{{ form_widget(form.submit) }}
{% if access=="admin" %}
<a class="btn btn-secondary" href="{{ path('app_'~access~'_page_'~usage~'_view',{id:page.id}) }}">Annuler</a>
{% else %}
<a class="btn btn-secondary" href="{{ path('app_home',{id:page.id}) }}">Annuler</a>
{% endif %}
{% if mode=="update" %}
<a href={{ path('app_'~access~'_page_'~usage~'_delete',{'id':page.id}) }}
class="btn btn-danger float-end"
data-method="delete" data-csrf="_token:{{ 'csrf' }}"
data-confirm="Êtes-vous sûr de vouloir supprimer cette page ?">
Supprimer
</a>
{% endif %}
</p>
{% 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="form-group row clearfix">
{% if form.roles is defined %}
<div class="col-md-8">
{% else %}
<div class="col-md-12">
{% endif %}
<div class="card">
<div class="card-header">
<i class="fa fa-pencil fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.name) }}
{{ form_row(form.roworder) }}
{{ form_row(form.fonticon) }}
{{ form_row(form.maxwidth) }}
{{ form_row(form.template) }}
</div>
</div>
</div>
{% if form.roles is defined %}
<div class="col-md-4">
<div class="card">
<div class="card-header">
<i class="fa fa-link fa-fw"></i> Affectations
</div>
<div class="card-body">
{{ form_row(form.user) }}
{{ form_row(form.roles) }}
{{ form_row(form.groups) }}
</div>
</div>
</div>
{% endif %}
</div>
<div class="card mt-3">
<div class="card-header">
<i class="fas fa-table-columns fa-fw"></i> Template de Mise en Page
</div>
<div class="card-body">
<div id="gridtemplate">
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
var defcol = [];
defcol[1] = ["col-12"];
defcol[2] = ["col-6","col-6"];
defcol[3] = ["col-4","col-4","col-4"];
defcol[4] = ["col-3","col-3","col-3","col-3"];
defcol[5] = ["col-4","col-2","col-2","col-2","col-2"];
defcol[6] = ["col-2","col-2","col-2","col-2","col-2","col-2"];
var defaultcol = ""
defaultcol+="<div class='delCol'>";
defaultcol+="<i class='fa fa-trash'></i>";
defaultcol+="</div>";
defaultcol+="<div class='maxleft'>";
defaultcol+="<i class='fa fa-chevron-left'></i>";
defaultcol+="</div>";
defaultcol+="<div class='rowcontainer'>";
defaultcol+="</div>";
defaultcol+="<div class='maxright'>";
defaultcol+="<i class='fa fa-chevron-right'></i>";
defaultcol+="</div>";
defaultcol+="<a class='addRow btn btn-info'>Ajouter une Ligne</a>";
$('document').ready(function(){
// Template de base
if($(page_update_widget_template).val()=="") {
myrow ="<div class='row'>";
myrow+="<div class='delRow'><i class='fa fa-trash'></i></div>";
myrow+="<div class='row colcontainer'>";
myrow+="<div class='col col-4'>"+defaultcol+"</div>"
myrow+="<div class='col col-4'>"+defaultcol+"</div>"
myrow+="<div class='col col-4'>"+defaultcol+"</div>"
myrow+="</div>"
myrow+="<div class='addCol'><i class='fa fa-plus'></i></div>";
myrow+="</div>"
$("#gridtemplate").append(myrow);
}
// Interprétation du template sauvegardé
else {
var json = jQuery.parseJSON($(page_update_widget_template).val());
var mygrid="";
$.each(json.rows, function( index, rownv01 ) {
mygrid+="<div class='row'>";
mygrid+="<div class='delRow'><i class='fa fa-trash'></i></div>";
mygrid+="<div class='row colcontainer'>";
$.each(rownv01.cols, function( index, colnv01 ) {
mygrid+="<div class='col col-"+colnv01.size+"'>";
mygrid+="<div class='delCol'>";
mygrid+="<i class='fa fa-trash'></i>";
mygrid+="</div>";
mygrid+="<div class='maxleft'>";
mygrid+="<i class='fa fa-chevron-left'></i>";
mygrid+="</div>";
mygrid+="<div class='rowcontainer'>";
$.each(colnv01.rows, function( index, rownv02 ) {
mygrid+="<div class='row'>";
mygrid+="<div class='delRow'><i class='fa fa-trash'></i></div>";
mygrid+="<div class='row colcontainer'>";
$.each(rownv02.cols, function( index, colnv02 ) {
mygrid+="<div class='col col-"+colnv02.size+"'>"+defaultcol+"</div>";
});
mygrid+="</div>";
mygrid+="<div class='addCol'><i class='fa fa-plus'></i></div>";
mygrid+="</div>";
});
mygrid+="</div>";
mygrid+="<div class='maxright'>";
mygrid+="<i class='fa fa-chevron-right'></i>";
mygrid+="</div>";
mygrid+="<a class='addRow btn btn-info'>Ajouter une Ligne</a>";
mygrid+="</div>";
});
mygrid+="</div>";
mygrid+="<div class='addCol'><i class='fa fa-plus'></i></div>";
mygrid+="</div>";
});
$("#gridtemplate").append(mygrid);
}
$("#gridtemplate").append("<a class='addRow btn btn-info'>Ajouter une Ligne</a>");
// Ajout d'une ligne
$(document).on('click','.addRow', function(event){
lastrow=$(this).parent().children('.row').last();
parentid=$(this).parent().attr("id");
if(parentid=="gridtemplate") {
nbrow=$(this).parent().children('.row').length;
nbmax=5;
}
else {
nbrow=$(this).parent().children(".rowcontainer").children('.row').length;
nbmax=4;
}
nbrow++;
if(nbrow==nbmax)
alert("Vous ne pouvez pas insérer plus de "+(nbmax-1)+" lignes");
else {
myrow ="<div class='row'>";
myrow+="<div class='delRow'><i class='fa fa-trash'></i></div>";
myrow+="<div class='row colcontainer'>";
myrow+="<div class='col col-4'>"+defaultcol+"</div>"
myrow+="<div class='col col-4'>"+defaultcol+"</div>"
myrow+="<div class='col col-4'>"+defaultcol+"</div>"
myrow+="</div>"
myrow+="<div class='addCol'><i class='fa fa-plus'></i></div>";
myrow+="</div>"
if(lastrow.length)
lastrow.after(myrow);
else
$(this).parent().children(".rowcontainer").append(myrow);
}
});
// Suppression d'une ligne
$(document).on('click','.delRow', function(event){
// On compte le nombre de row de ce niveau et on bloque s'il en reste plus qu'une et que l'on est sur le premier niveau de ligne
if($( this ).parent().parent().children(".row").length==1 && $( this ).parent().parent().attr("id")=="gridtemplate")
{
alert("Votre page doit avoir au minimum une ligne");
}
// Si ce n'est pas le cas on la supprime
else {
$( this ).parent().remove();
}
});
// Ajout d'une Colonne
$(document).on('click','.addCol', function(event){
// On récupère la ligne
row=$( this ).parent();
colcontainer=row.children(".colcontainer");
// On compte le nombre de colonne
nbcol=colcontainer.children(".col").length;
nbcol++;
if(nbcol>6) {
alert("Votre page ne peut avoir plus de 6 colonnes");
}
else {
// Pour chaque colonne on applique la répartition de taille en fonction du nombre de colonne total
colcontainer.children('.col').each(function( index ) {
$(this).removeClass();
$(this).attr("class","col "+defcol[nbcol][index]);
});
// On ajoute une colonne après la derniere colonne de la ligne
lastcol=colcontainer.children('.col').last();
lastcol.after("<div class='col "+defcol[nbcol][nbcol-1]+"'>"+defaultcol+"</div>");
}
});
// Suppression d'une Colonne
$(document).on('click','.delCol', function(event){
// On récupère la colonne
col=$( this ).parent();
colcontainer=col.parent();
// On compte le nombre de colonne
nbcol=colcontainer.children(".col").length;
nbcol--;
if(nbcol<1) {
alert("Au minimum 1 colonne");
}
else {
// On détruit la colonne
col.remove();
// Pour chaque colonne on applique la répartition de taille en fonction du nombre de colonne total
colcontainer.children('.col').each(function( index ) {
$(this).removeClass();
$(this).attr("class","col "+defcol[nbcol][index]);
});
}
});
// Agrandissement colonne sur la droite
$(document).on('click','.maxright', function(event){
// On récupère la colonne
col=$( this ).parent();
colcontainer=col.parent();
// On recherche la colonne suivante
colnext=col.next();
if(colnext.length) {
// uniquement si taille de la colonne suivant n'est pas col-1
if(colnext.attr("class")!="col col-1") {
// On récupére la taille de la colonne suivante et en cours
taillenext=parseInt(colnext.attr("class").replace("col-","").replace("col ",""));
taille=parseInt(col.attr("class").replace("col-","").replace("col ",""));
// On applique la nouvelle taille à la colonne en cours
col.removeClass();
col.attr("class","col col-"+(taille+1));
// On applique la nouvelle taille à la colonne suivante
colnext.removeClass();
colnext.attr("class","col col-"+(taillenext-1));
}
}
});
// Agrandissement colonne sur la gauche
$(document).on('click','.maxleft', function(event){
console.log("here");
// On récupère la colonne
col=$( this ).parent();
colcontainer=col.parent();
// On recherche la colonne suivante
colprev=col.prev();
if(colprev.length) {
// uniquement si taille de la colonne précédente n'est pas col-1
if(colprev.attr("class")!="col col-1") {
console.log(colprev.attr("class"));
// On récupére la taille de la colonne précédente et en cours
tailleprev=parseInt(colprev.attr("class").replace("col-","").replace("col ",""));
taille=parseInt(col.attr("class").replace("col-","").replace("col ",""));
console.log(taille);
// On applique la nouvelle taille à la colonne en cours
col.removeClass();
col.attr("class","col col-"+(taille+1));
// On applique la nouvelle taille à la colonne suivante
colprev.removeClass();
colprev.attr("class","col col-"+(tailleprev-1));
}
}
});
// Sur validation formulaire
$( "form" ).submit(function( event ) {
//event.preventDefault();
template='{"rows":[';
// Pour chaque ligne de niveau 01 de la grille
nbrownv01=$("#gridtemplate").children('.row').length;
$("#gridtemplate").children('.row').each(function( index ) {
template+='{';
template+='"id":'+index+',';
// Pour chaque colonne de la ligne de niveau 01
nbcolnv01=$(this).children('.colcontainer').children('.col').length;
template+='"cols":[';
$(this).children('.colcontainer').children('.col').each(function( index ) {
template+='{';
template+='"id":'+index+',';
template+='"size": '+parseInt($(this).attr("class").replace("col-","").replace("col ",""))+',';
// Pour chaque ligne de niveau 02
template+='"rows":[';
nbrownv02=$(this).children('.rowcontainer').children('.row').length;
$(this).children('.rowcontainer').children('.row').each(function( index ) {
template+='{';
template+='"id":'+index+',';
nbcolnv02=$(this).children('.colcontainer').children('.col').length;
template+='"cols":[';
$(this).children('.colcontainer').children('.col').each(function( index ) {
template+='{';
template+='"id":'+index+',';
template+='"size": '+parseInt($(this).attr("class").replace("col-","").replace("col ",""));
template+='}';
if(index+1<nbcolnv02) template+=',';
});
template+=']';
template+='}';
if(index+1<nbrownv02) template+=',';
});
template+=']';
template+='}';
if(index+1<nbcolnv01) template+=',';
});
template+=']';
template+='}';
if(index+1<nbrownv01) template+=',';
});
template+=']}';
$("#page_update_widget_template").val(template);
});
});
</script>
{% endblock %}

View File

@ -1,23 +0,0 @@
{% extends '@CadolesCore/base.html.twig' %}
{% block pagewrapper %}
{% if access=="config" %}
<div class="pagemenu">
<a href="{{ path('cadoles_portal_config_page_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_page_update', {id:entity.id}) }}' title='Modifier la page'><i class='fa fa-cog fa-fw'></i></a>
<a href='{{ path('cadoles_portal_config_page_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer la page'><i class='fa fa-trash fa-fw'></i></a>
</div>
{% endif %}
<div style="{% if entity.maxwidth>0%} max-width:{{ entity.maxwidth }}px; margin:auto; {% else %} margin: 30px 0px; {% endif %}">
{{ entity.html | raw }}
</div>
{% endblock %}
{% block localjavascript %}
$('document').ready(function(){
});
{% endblock %}

View File

@ -1,59 +0,0 @@
{% extends '@CadolesCore/base.html.twig' %}
{% block localstyle %}
#pageiframe { margin: 0px -30px;}
{% endblock %}
{% if app.user %}
{% set username = app.user.username %}
{% else %}
{% set username = "" %}
{% endif %}
{% block pagewrapper %}
{% if access=="config" %}
<div class="pagemenu">
<a href="{{ path('cadoles_portal_config_page_view', {id:entity.id})}}">{{ entity.name }}</a>
<a href='{{ path('cadoles_portal_config_page_update', {id:entity.id}) }}' title='Modifier la page'><i class='fa fa-cog fa-fw'></i></a>
<a href='{{ path('cadoles_portal_config_page_delete', { id: entity.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer la page'><i class='fa fa-trash fa-fw'></i></a>
</div>
{% endif %}
<div id="pageiframe" style="{% if entity.maxwidth>0%} max-width:{{ entity.maxwidth }}px; margin:auto; {% endif %}">
<iframe onload='this.contentWindow.focus()' src="{{entity.url|replace({'#login#': username})}}" id="frameContent" style="border:none;" width="100%" height="100%"></iframe>
</div>
{% endblock %}
{% block localjavascript %}
$(window).resize(function() {
resizeFrame();
});
$('document').ready(function(){
resizeFrame();
});
function resizeFrame() {
$("body").css("overflow-y","hidden");
$(".col-md-10").css("padding","0");
var iFrame = document.getElementById('frameContent');
var heightbody = $('html').height();
var heightheader = $('.header').height();
if($('.pagemenu').css("display")=="none")
var heightmenu = 0;
else
var heightmenu = $('.pagemenu').height();
var heightframe = heightbody-heightheader-heightmenu;
if($("#frameContent").length>0) {
$("#frameContent").height(heightframe);
}
}
{% endblock %}

View File

@ -1,598 +0,0 @@
{% extends 'base.html.twig' %}
{% block menuuser %}
{% if access=="admin" %}
<li><a href='{{ path('app_'~access~'_page_'~usage~'_update', {id:page.id}) }}' title='Modifier la page'><i class='fa fa-cog fa-fw'></i></a></li>
<li><a href='{{ path('app_'~access~'_page_'~usage~'_delete', { id: page.id }) }}' data-method='delete' data-confirm='Êtes-vous sûr de vouloir supprimer ?' title='Supprimer la page'><i class='fa fa-trash fa-fw'></i></a></li>
<li><a class="btn-modal" style='cursor:pointer' data-modalid='selwidget' title='Ajouter un widget'><i class='fa fa-cubes fa-fw'></i></a></li>
{% endif %}
{% endblock %}
{% block body %}
<div id="widget-container" style="{% if page.maxwidth>0%} max-width:{{ page.maxwidth }}px; margin:auto; {% endif %}">
</div>
<div id="tolocalize" style="display:none">
{% for pagewidget in page.pagewidgets %}
<a href="{{ url(pagewidget.widget.routeview|replace({'_admin_':'_'~access~'_'}),{id:pagewidget.id,usage:usage}) }}"></a>
{{ render(url(pagewidget.widget.routeview|replace({'_admin_':'_'~access~'_'}),{id:pagewidget.id,usage:usage})) }}
{% endfor %}
</div>
{% if access!="all" %}
<div id="selwidget" class="modal fade" role="dialog">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div id="mymodalheader" class="modal-header">
<h4 class="modal-title">SELECTIONNER UN WIDGET</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<a onclick="$('#selwidget').modal('hide');" class="btn btn-secondary mb-3">
Annuler
</a>
<table id="dataTables" class="table table-striped table-bordered table-hover" style="width:100%">
<thead>
<tr>
<th class="no-sort" width="80px"></th>
<th width="100px">Nom</th>
<th class="no-sort" width="500px">Description</th>
</tr>
</thead>
<tbody>
{% for widget in widgets %}
<tr>
<td>
<a onClick="selWidget({{ widget.id }})" style="cursor:pointer;">
<img id="widgettype-{{ widget.id }}" class="grid-item-img" height="40" src="{{path('app_minio_image',{file:widget.icon.label}) }}" style="padding:2px">
</a>
</td>
<td>{{ widget.name }}</td>
<td>{{ widget.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{% block localscript %}
<script>
// Ajustement des frames
$(window).resize(function() {
AjustFrame();
Masonry();
});
$('document').ready(function(){
// Initialisation du tableau des widgets selectionnable à la création
$('#dataTables').DataTable({
columnDefs: [ { "targets": 'no-sort', "orderable": false }, { "targets": 0, "className": "text-center" } ],
iDisplayLength: 10,
order: [[ 1, "asc" ]],
//responsive: false,
scrollX: false,
});
// Création de la grille des widgets
var template = '{{ page.template | raw }}';
// Template de base
if(template=="") {
myrow ="<div>";
myrow+="<div class='row colcontainer no-gutters'>";
myrow+="<div id='R1C1' class='col col-lg-4'></div>"
myrow+="<div id='R1C2' class='col col-lg-4'></div>"
myrow+="<div id='R1C3' class='col col-lg-4'></div>"
myrow+="</div>"
$("#widget-container").append(myrow);
}
// Interprétation du template sauvegardé
else {
var json = jQuery.parseJSON(template);
var mygrid="";
var row01=0;
$.each(json.rows, function( index, rownv01 ) {
row01++;
col01=0;
mygrid+="<div>";
mygrid+="<div class='row colcontainer no-gutters'>";
$.each(rownv01.cols, function( index, colnv01 ) {
col01++;
var row02=0;
mygrid+="<div id='R"+row01+"C"+col01+"' class='mycol col-lg-"+colnv01.size+"'>";
mygrid+="<div class='rowcontainer'>";
$.each(colnv01.rows, function( index, rownv02 ) {
row02++;
col02=0;
mygrid+="<div>";
mygrid+="<div class='row colcontainer no-gutters'>";
$.each(rownv02.cols, function( index, colnv02 ) {
col02++;
mygrid+="<div id='R"+row01+"C"+col01+"R"+row02+"C"+col02+"' class='mycol col-lg-"+colnv02.size+"'></div>";
});
mygrid+="</div>";
mygrid+="</div>";
});
mygrid+="</div>";
mygrid+="</div>";
});
mygrid+="</div>";
mygrid+="</div>";
});
$("#widget-container").append(mygrid);
}
// On déplace les widgets à leur emplacement
$("#tolocalize").children(".widget").each(function( element ) {
if($('#'+$(this).attr("loc")).length)
$(this).appendTo('#'+$(this).attr("loc"));
else
$(this).appendTo('#R1C1');
});
// On ajoute un widget vide à chaque colonne
$("#widget-container .col").each(function(element) {
$("<div class='widgetempty'>&nbsp;</div>").appendTo($(this));
});
{% if canupdate %}
// Mettre une taille mini de colonne sinon on ne pourra pas déplacer le widget dans la colonne
$(".colcontainer .col").css("min-height","80px");
// Rendre les widgets déplacable
$("#widget-container .mycol").sortable({
connectWith: "#widget-container .mycol",
handle: '.widget-sortable',
placeholder: "widgetplaceholder",
tolerance: "pointer",
cursor: "move",
opacity: 0.6,
start: function( event, ui ) {
ui.placeholder.css("height",ui.item.height());
$(".widgetbody").hide();
$(".colcontainer .mycol").css("border","1px solid #cdcdcd");
//$(".colcontainer .mycol").css("padding","15px");
$(".colcontainer .mycol").css("min-height","200px");
ui.placeholder.css("margin-right","-15px");
ui.placeholder.css("margin-left","-15px");
ui.placeholder.css("margin-bottom","30px");
},
stop: function( event, ui ) {
$(".widgetbody").show();
$(".colcontainer .mycol").css("border","none");
$(".colcontainer .mycol").css("padding-bottom","");
$(".colcontainer .mycol").css("min-height","");
},
update: updateLocalisation
});
{% endif %}
// Sur le click des titres de widgets ouvrir / fermer le widget
$( ".widget-header .widget-title" ).click(function() {
showhideWidget(this);
});
$( ".widget-header .widget-logo" ).click(function() {
showhideWidget(this);
});
// balise h des widget editor
$(".widget-editor .widgetbody :header").css("color",$(".widgetbody").css("color"));
// Création des slick
Slick();
// Masonry
Masonry();
});
// function slick
function Slick() {
$('.widget-body .slick').each(function() {
if(!$(this).parent().hasClass("widget-adjust"))
$(this).height($(this).parent().height());
height=$(this).height();
$(this).slick({
dots: true,
infinite: true,
fade: true,
cssEase: 'linear',
autoplay: true,
autoplaySpeed: $(this).data("slicktime"),
});
});
$('.widget-body .slick-slide ').each(function() {
if(!$(this).parent().parent().parent().hasClass("widget-adjust"))
$(this).height($(this).parent().parent().parent().height());
});
}
function Masonry() {
$('.masonry').imagesLoaded(function() {
$('.widget-body .masonry').each(function() {
$(this).show();
var perc;
if($(this).width() >= 1500) perc="14,285714286%";
else if($(this).width() >= 1200) perc="16,666666667%";
else if($(this).width() >= 1000) perc="20%";
else if($(this).width() >= 800) perc="25%";
else if($(this).width() >= 500) perc="33.333333333%";
else if($(this).width() >= 350) perc="50%";
else perc="100%";
$(".masonry-item",$(this)).each(function() {
$(this).css("width",perc.toString().replace(",","."));
});
$(".masonry-sizer",$(this)).each(function() {
$(this).css("width",perc.toString().replace(",","."));
});
$(this).masonry({
itemSelector: '.masonry-item',
columnWidth: '.masonry-sizer',
percentPosition: true,
});
});
});
}
// Cacher afficher le menu des widgets
$(".widget").hover(function() {
if($(this).find(".widget-menu").length) {
$(this).find(".widget-menu").show();
}
});
$( ".widget" ).mouseleave(function() {
$(this).find(".widget-menu").hide();
});
function showhideWidget(elem) {
widget=$(elem).parent().parent();
idwidget= widget.data("id");
if(widget.children(".widget-body").css("display")=='block')
value=false;
else
value=true;
{% if app.user %}
$.ajax({
method: "POST",
url: "{{ path('app_all_preference') }}",
data: {
id:idwidget,
key:'widgetshowhide',
value:value
},
success: function(idbookmark) {
// on récupère le parent widget conteneur
widget=$(elem).parent().parent();
widget.find(".widget-body" ).toggle();
}
});
{% endif %}
}
// Modification de la localisation d'un widget
function updateLocalisation() {
$('.colcontainer .mycol').each(function(index) {
var idloc=$(this).attr('id');
$(this).children(".widget").each(function(order){
var idwidget=$(this).data('id');
$.ajax({
method: "POST",
url: "{{ path('app_'~access~'_pagewidget_order') }}",
data: {
idwidget:idwidget,
order:order,
idloc:idloc
}
});
});
});
// On remasone
Masonry();
}
// Création d'un widget selectionné
function selWidget(idwidgettype) {
var url="{{ path('app_'~access~'_pagewidget_widget_sumbit',{idpage:page.id,idwidgettype:'xx',usage:usage})}}";
url=url.replace('xx',idwidgettype);
$(location).attr('href', url);
};
// Modifciation d'un widget
function modWidget(idwidget) {
var url="{{ path('app_'~access~'_pagewidget_widget_update',{idpage:page.id,idwidget:'xx',usage:usage})}}";
url=url.replace('xx',idwidget);
url=url.replace(/&amp;/g,"&");
$(location).attr('href', url);
}
// Suppression d'un widget
function delWidget(idwidget) {
var txt;
var r = confirm("ATTENTION\nConfirmez-vous la suppression de ce widget ?\n\nL'ensemble du contenu sera définitivement perdu !!");
if (r == true) {
url="{{ path('app_'~access~'_pagewidget_delete',{idwidget:'xx'}) }}";
url=url.replace('xx',idwidget);
$.ajax({
method: "POST",
url: url,
});
$(".widget[data-id="+idwidget+"]").remove();
}
}
// Changer widget
function changeWidget(idwidget,key,value) {
{% if app.user %}
if(key=="modedesktop") {
value=value+1;
if(value==5) value=0;
}
$.ajax({
method: "POST",
url: "{{ path('app_all_preference') }}",
data: {
id:idwidget,
key:key,
value:value
},
success: function() {
location.reload();
}
});
{% endif %}
}
// Ajout d'un bookmark
function addBookmark(idwidget,touser) {
var url="{{ path('app_'~access~'_bookmark_submit',{idpage:page.id,idwidget:'yy',touser:'zz',usage:usage})}}";
url=url.replace('yy',idwidget);
url=url.replace('zz',touser);
url=url.replace(/&amp;/g,"&");
$(location).attr('href', url);
}
// Modifciation d'un bookmark
function modBookmark(idbookmark,idwidget,touser) {
var url="{{ path('app_'~access~'_bookmark_update',{id:'xx',idpage:page.id,idwidget:'yy',touser:'zz',usage:usage})}}";
url=url.replace('xx',idbookmark);
url=url.replace('yy',idwidget);
url=url.replace('zz',touser);
url=url.replace(/&amp;/g,"&");
$(location).attr('href', url);
}
// Ajouter un item aux bookmark
function heartBookmark(iditem) {
var idbookmark;
$.ajax({
method: "POST",
url: "{{ path('app_'~access~'_bookmark_heart') }}",
data: {
iditem:iditem
},
success: function(idbookmark) {
location.reload();
}
});
}
// Supprimer un bookmark
function delBookmark(idbookmark,idwidget,touser) {
if (confirm('Êtes-vous sûr de vouloir supprimer ce favoris ?')) {
var url="{{ path('app_'~access~'_bookmark_delete',{id:'xx',idpage:page.id,idwidget:'yy',touser:'zz',usage:usage})}}";
url=url.replace('xx',idbookmark);
url=url.replace('yy',idwidget);
url=url.replace('zz',touser);
url=url.replace(/&amp;/g,"&");
$.ajax({
method: "POST",
url: url,
success: function(idbookmark) {
location.reload();
}
});
}
}
// Ajouter image
function addImage(idwidget) {
var url="{{ path('app_'~access~'_file_upload',{category:'pagewidget', id:'yy', type:'image', usage:usage})}}";
url=url.replace('yy',idwidget);
url=url.replace(/&amp;/g,"&");
$("#mymodallarge .modal-title").text("Téléchargement");
$("#mymodallarge iframe").attr("src",url);
$("#mymodallarge").modal("show");
}
// Supprimer un fichier
function delFile(idwidget,file,navigation=false) {
var url="{{ path('app_'~access~'_file_delete',{category:'pagewidget', id:'yy', file:'zz', navigation: 'xx', usage:usage})}}";
url=url.replace('yy',idwidget);
url=url.replace('zz',file);
url=url.replace('xx',navigation);
var r = confirm("Confirmez-vous la suppression de ce fichier ?");
if (r == true) {
$.ajax({
method: "POST",
url:url,
data: {
directory:directory,
filename:filename
},
success: function() {
location.reload();
}
});
}
}
function viewFile(idwidget,file,navigation=false) {
file=file.replace(".thumb/","");
var url="{{ path('app_'~access~'_file_view',{category:'pagewidget', id:'yy', file:'zz', navigation: 'xx', usage:usage})}}";
url=url.replace('yy',idwidget);
url=url.replace('zz',file);
url=url.replace('xx',navigation);
url=url.replace(/&amp;/g,"&");
$(location).attr('href', url);
}
// Liste des slides
function listSlide(idwidget) {
var url="{{ path('app_'~access~'_pagewidgetslide_list',{idwidget:'xx',usage:usage})}}";
url=url.replace('xx',idwidget);
url=url.replace(/&amp;/g,"&");
$(location).attr('href', url);
}
// Forum ckeditor
function ckeditor(idwidget) {
var url="{{ path('app_'~access~'_pagewidget_ckeditor',{idwidget:'xx',usage:usage})}}";
url=url.replace('xx',idwidget);
url=url.replace(/&amp;/g,"&");
$(location).attr('href', url);
}
// Ajustement des frames
function AjustFrame() {
if($(".itemframe").length>0) {
$(".itemframe").css("height",$(window).height()-$(".header").height());
}
}
// Affichage des frames associés aux items de bureau
function showItemframe(id,url,forcereload) {
{% if access=="all" %}
parent.showItemframe(id,url,forcereload);
{% else %}
$("#page").hide();
$("body").css("overflow-y","hidden");
if($("#itemframe-"+id).length) {
if(forcereload) {
$("#itemframe-"+id).attr("src",url);
}
$("#itemframe-"+id).show();
}
else {
$("#page").before("<iframe id='itemframe-"+id+"' class='itemframe' src='"+url+"'></iframe>");
}
AjustFrame();
{% endif %}
}
// Affichage des items d'une catégorie
function showItemCat(idwidget, id) {
$(".widget[data-id="+idwidget+"]").find("#itemsearch").val("");
$(".widget[data-id="+idwidget+"]").find(".item").hide();
$(".widget[data-id="+idwidget+"]").find(".itemcategory-title").hide();
if(id=="all") {
$(".widget[data-id="+idwidget+"]").find(".item").show();
$(".widget[data-id="+idwidget+"]").find(".itemcategory-title").show();
}
else if(id=="fav") {
$(".widget[data-id="+idwidget+"]").find(".item[data-idcategory="+id+"]").show();
$(".widget[data-id="+idwidget+"]").find(".itemcategory-title[data-idcategory="+id+"]").show();
}
else {
$(".widget[data-id="+idwidget+"]").find(".item[data-idcategory="+id+"]").show();
$(".widget[data-id="+idwidget+"]").find(".itemcategory-title[data-idcategory="+id+"]").show();
}
}
// Affichage des items d'une catégorie
function searchItem(idwidget, label) {
$(".widget[data-id="+idwidget+"]").find(".bookmark-container").show();
$(".widget[data-id="+idwidget+"]").find(".itemcategory-container").show();
if(label=="") {
$(".widget[data-id="+idwidget+"]").find(".itemcategory-title").show();
$(".widget[data-id="+idwidget+"]").find(".item").show();
}
else {
$(".widget[data-id="+idwidget+"]").find(".itemcategory-title").hide();
$(".widget[data-id="+idwidget+"]").find(".item").hide();
items=$(".widget[data-id="+idwidget+"]").find(".item[data-title*='"+label.toLowerCase()+"']");
if(items.length) {
items.show();
items.each(function() {
category=$(this).data("idcategory");
$(".widget[data-id="+idwidget+"]").find(".itemcategory-title[data-idcategory="+category+"]").show();
});
}
}
}
// Place un message en lu
function hideAlert(id) {
$.ajax({
method: "POST",
url: "{{ path('app_all_alert_read') }}",
data: {
id:id
},
success: function() {
$("#alert-"+id).remove();
}
});
}
</script>
{% endblock %}

View File

@ -1,58 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
<h1 class="page-header">
Gestion des Modèles de Page
</h1>
<p>
<a href="{{ path('app_'~access~'_template_submit') }}" class="btn btn-success">Ajouter un Modèle</a>
</p>
{% 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 %}
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Modèles
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="140px" class="no-sort">Action</th>
<th>Ordre</th>
<th>Nom</th>
<th>Pour</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$('#dataTables').DataTable({
columnDefs: [ { "targets": 'no-sort', "orderable": false } ],
responsive: true,
iDisplayLength: 100,
order: [[ 1, "asc" ]],
processing: true,
serverSide: true,
ajax: "{{ path('app_'~access~'_page_template_tablelist') }}",
});
});
</script>
{% endblock %}

View File

@ -0,0 +1,108 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="submit" %}
Création pagetype
{% else %}
Modification pagetype
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_typepage') }}>Annuler</a>
{% if mode=="update" and pagetype.id>0%}
<a href={{ path('app_typepage_delete',{'id':pagetype.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="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.sortby) }}
{{ form_row(form.description) }}
{% set image= "noimage.png" %}
{% if pagetype.image %}
{% set image= pagetype.image %}
{% endif %}
<center>
<img class="mt-3" id="pagetype_image_img" src="{{ path("app_minio_image", {file:image}) }}" style="width:100%;"><br>
{{ form_widget(form.image) }}
<a class="btn btn-info btn-modal" style="width:90px" data-modalid="mymodallarge" data-modaltitle="Image" data-modalurl="{{ path('app_typepage_upload') }}" title='Ajouter une image'>Modifier</a>
</center>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
function formatState (opt) {
if (!opt.id) {
return opt.text.toUpperCase();
}
var optimage = $(opt.element).attr('data-image');
console.log(optimage)
if(!optimage){
return opt.text.toUpperCase();
} else {
var $opt = $(
'<span><img src="' + optimage + '" height="30px" /> ' + opt.text.toUpperCase() + '</span>'
);
return $opt;
}
};
$(document).ready(function() {
$("#pagetype_icon > option").each(function(index) {
if(index>0) {
$(this).attr("data-image","/{{ appAlias }}/images/marker/"+$(this).html());
}
});
$("#pagetype_icon").select2({
templateResult: formatState,
templateSelection: formatState
});
});
</script>
{% endblock %}

View File

@ -0,0 +1,55 @@
{% extends "base.html.twig" %}
{% block localstyle %}
{% endblock %}
{% block beforebody %}
<div class="herobody">
<div class="p-0 m-0" style="height:100%;background-size:cover;background-image:url({{path("app_minio_image",{file:pagetype.image})}}">
<div class="title">
<div class="d-flex align-items-center">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logodark")}) }}" style="height:120px;">
<div class="ps-3">
<h1>{{pagetype.name}}</h1>
</div>
</div>
{% if not pagetype.description is empty %}
<div class="mt-5 p-3" style="max-width: 1000px; margin:auto; background-color: var(--colorbgbodyimportant)">
{{pagetype.description|raw}}
</div>
{% endif %}
</div>
<div class="navigation">
<div class="grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{% for page in pagetype.pages %}
{% set url=path("app_child_view",{catparent:'page', idparent:page.id, idchild:page.childs[0].id }) %}
{% set name=page.name %}
{% set image=(page.childs[0].childheaders is empty ? "" : page.childs[0].childheaders[0].filename) %}
<a href="{{url}}" class="d-block text-center">
<div class="grid-item grid-item-size-2 d-flex align-items-stretch">
<div class="grid-image d-flex align-items-center pr-2 pl-2" style="background-image:url({{path("app_minio_image",{file:image})}}); background-size:cover;">
<div class="grid-item-title">
<span class="p-1" style="font-weight:bold; text-transform:uppercase;">
{{ name }}
</span>
</div>
</div>
</div>
</a>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,52 @@
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
pagetypes
</h1>
<p><a class="btn btn-success" href={{ path('app_typepage_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des pagetypes
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="90px" class="no-sort">Action</th>
<th>Nom</th>
</tr>
</thead>
<tbody>
{% for pagetype in pagetypes %}
<tr>
<td>
<a href="{{path("app_typepage_update",{id:pagetype.id})}}"><i class="fa fa-file fa-2x"></i></a>
</td>
<td>{{pagetype.name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</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: [[ 2, "asc" ]]
});
});
</script>
{% endblock %}

View File

@ -0,0 +1,38 @@
{% extends "base.html.twig" %}
{% block encoretags %}
{{ encore_entry_link_tags('dropzone') }}
{% endblock %}
{% block body %}
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
<form
action="{{ oneup_uploader_endpoint('image') }}"
class="dropzone"
id="mydropzone"
data-acceptedMimeTypes="image/*"
data-maxFiles=1
style="margin-top:10px">
</form>
{% endblock %}
{% block localscript %}
{{ encore_entry_script_tags('dropzone') }}
<script>
function dropzoneinit( elmt ) {
}
function dropzonesuccess( file, response ) {
parent.$("#pagetype_image").val("image/"+response["file"]);
parent.$("#pagetype_image_img").attr("src","{{ path("app_minio_image",{file:"image/"}) }}"+response["file"]);
closeModal();
}
function closeModal() {
window.parent.$("#mymodallarge").modal('hide');
}
</script>
{% endblock %}

View File

@ -1,115 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
Modification Widget
</h1>
<p>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href="{{ path('app_'~access~'_page_'~usage~'_view',{id:idpage}) }}">Annuler</a>
</p>
{% 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="card">
<div class="card-header"><i class="fas fa-pencil-alt fa-fw"></i> Informations</div>
<div id="col1" class="card-body">
{{ form_row(form.ckeditor) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$(".control-label").each(function( element ) {
var loc = $(this).attr('loc');
if (typeof loc !== typeof undefined && loc !== false) {
$(this).parent().appendTo("#"+loc);
}
});
$("#col2").children(".form-group").each(function( element ) {
$(this).css("zoom","80%");
});
$("#col3").children(".form-group").each(function( element ) {
$(this).css("zoom","80%");
});
$("#col4").children(".form-group").each(function( element ) {
$(this).css("zoom","80%");
});
showhide();
});
$("#pagewidget_colorheaderback").bind("change paste keyup", function() {
$("#diviconsel").css("background-color",$(this).val());
});
$("#pagewidget_autoajust").change(function() {
showhide();
});
$("#pagewidget_viewheader").change(function() {
showhide();
});
function selIcon(idicon,url) {
$("#pagewidget_idicon").val(idicon);
$("#diviconsel img").remove();
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$("#mymodallarge").modal("hide");
}
function delIcon() {
$("#diviconsel img").remove();
$("#diviconsel").append("<img src='{{ path("app_minio_image",{file:entity.widget.icon.label}) }}'>");
$("#diviconsel img").attr("height","100px");
$("#pagewidget_idicon").val(null);
}
function showhide() {
if($("#pagewidget_autoajust").val()==1) {
$("#groupfield_pagewidget_height").hide();
}
else {
$("#groupfield_pagewidget_height").show();
}
if($("#pagewidget_viewheader").val()==1) {
$("#groupfield_pagewidget_colorheaderback").show();
$("#groupfield_pagewidget_colorheaderfont").show();
$("#groupfield_pagewidget_opened").show();
}
else {
$("#groupfield_pagewidget_colorheaderback").hide();
$("#groupfield_pagewidget_colorheaderfont").hide();
$("#groupfield_pagewidget_opened").hide();
$("#pagewidget_opened").val(1);
}
}
</script>
{% endblock %}

View File

@ -1,172 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" or mode=="updatetemplate" %}
Modification Widget
{% elseif mode=="submit" or mode=="submittemplate" %}
Création Widget
{% endif %}
</h1>
<p>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href="{{ path('app_'~access~'_page_'~usage~'_view',{id:idpage}) }}">Annuler</a>
</p>
{% 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 col-8">
<div class="card">
<div class="card-header"><i class="fas fa-pencil-alt fa-fw"></i> Informations</div>
<div id="col1" class="card-body">
{{ form_row(form.name) }}
</div>
</div>
</div>
<div class="col col-4">
<div class="card">
<div class="card-header"><i class="fas fa-pencil-alt fa-fw"></i> Informations</div>
<div class="card-body">
<div id="diviconsel" class="col-md-12 text-center mb-1 mt-1" style="height:140px; padding:20px; background-color: {{ entity.colorheaderback ? entity.colorheaderback : 'var(--colorbgbodydark)' }};">
{% if entity.icon.label %}
<img src="{{ path('app_minio_image',{file:entity.icon.label}) }}" height="100" />
{% endif %}
</div>
<div class="col-md-12" style="text-align:center;padding:0px">
{{ form_row(form.idicon) }}
<a class="btn btn-success btn-modal" data-modalid="mymodallarge" data-modaltitle="Icône" data-modalurl="{{ path('app_all_icon_select') }}" title='Selectionner un Icône'>Selectionner un Icône</a>
<a class="btn btn-danger" onClick="delIcon()" title='Détacher'>Détacher l'Icône</a>
</div>
</div>
</div>
</div>
<div class="col col-12 mt-3">
<div class="card">
<div class="card-header"><i class="fas fa-pencil-alt fa-fw"></i> Informations</div>
<div class="card-body">
<div class="row">
<div id="col2" class="col col-4">
{{ form_row(form.autoajust) }}
{{ form_row(form.height) }}
{{ form_row(form.border) }}
{{ form_row(form.opened) }}
</div>
<div id="col3" class="col col-4">
{{ form_row(form.viewheader) }}
{{ form_row(form.colorheaderback) }}
{{ form_row(form.colorheaderfont) }}
{{ form_row(form.colorbodyback) }}
{{ form_row(form.colorbodyfont) }}
</div>
<div id="col4" class="col col-4">
</div>
<div id="col5" class="col col-md-12" style="clear:both">
{{ form_widget(form) }}
</div>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$(".control-label").each(function( element ) {
var loc = $(this).attr('loc');
if (typeof loc !== typeof undefined && loc !== false) {
$(this).parent().appendTo("#"+loc);
}
});
$("#col2").children(".form-group").each(function( element ) {
$(this).css("zoom","80%");
});
$("#col3").children(".form-group").each(function( element ) {
$(this).css("zoom","80%");
});
$("#col4").children(".form-group").each(function( element ) {
$(this).css("zoom","80%");
});
showhide();
});
$("#pagewidget_colorheaderback").bind("change paste keyup", function() {
$("#diviconsel").css("background-color",$(this).val());
});
$("#pagewidget_autoajust").change(function() {
showhide();
});
$("#pagewidget_viewheader").change(function() {
showhide();
});
function selIcon(idicon,url) {
$("#pagewidget_idicon").val(idicon);
$("#diviconsel img").remove();
$("#diviconsel").append("<img src='"+url+"'>");
$("#diviconsel img").attr("height","100px");
$("#mymodallarge").modal("hide");
}
function delIcon() {
$("#diviconsel img").remove();
$("#diviconsel").append("<img src='{{ path("app_minio_image",{file:entity.widget.icon.label}) }}'>");
$("#diviconsel img").attr("height","100px");
$("#pagewidget_idicon").val(null);
}
function showhide() {
if($("#pagewidget_autoajust").val()==1) {
$("#groupfield_pagewidget_height").hide();
}
else {
$("#groupfield_pagewidget_height").show();
}
if($("#pagewidget_viewheader").val()==1) {
$("#groupfield_pagewidget_colorheaderback").show();
$("#groupfield_pagewidget_colorheaderfont").show();
$("#groupfield_pagewidget_opened").show();
}
else {
$("#groupfield_pagewidget_colorheaderback").hide();
$("#groupfield_pagewidget_colorheaderfont").hide();
$("#groupfield_pagewidget_opened").hide();
$("#pagewidget_opened").val(1);
}
}
</script>
{% endblock %}

View File

@ -1,42 +0,0 @@
{% set widgetname="alert" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetbody %}
{% for alert in alerts %}
{% if loop.first %}
<div class="items-list">
{% endif %}
<div class="item item-list" id="alert-{{alert.id}}" style="color:var(--colorftbodydark); background: {{ alert.alertcategory.color ? alert.alertcategory.color : 'var(--colorbgbodydark)' }};">
<div class="item-container">
<div class="item-content">
<div class="item-link">
{% if alert.alertcategory.icon %}
<img height="35" src="{{ path('app_minio_image',{file:alert.alertcategory.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_megaphone.png"}) }}">
{% endif %}
<div class="item-title">
<h3 >{{ alert.title }}</h3>
</div>
</div>
<div class="item-action">
{% if alert.fghideable and app.user %}
<a onClick="hideAlert({{alert.id}})" style="cursor:pointer;" title="Ne plus afficher"><i class="fa fa-eye-slash"></i></a>
{%endif%}
</div>
</div>
<div class="item-description">
{{ alert.content|raw }}
</div>
</div>
</div>
{% if loop.last %}
</div>
{% endif %}
{% endfor %}
{% endblock %}

View File

@ -1,101 +0,0 @@
{% import "Pagewidget/constants.twig" as constants %}
{% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %}
{%if mini %}
<div class="widget widget-mini widget-blog" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
<div class="widgetheader">
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
{% if entity.icon %}
<img src="/{{ appAlias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
{% else %}
<img src="/{{ appAlias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
{% endif %}
</a>
</div>
</div>
{% else %}
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-blog" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
<div class="widgetmenu">
{% if canupdate %}
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
{% if access=="config" %}
<a title="Gérer mes Blogs" href='{{ path('app_config_blog') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-th fa-fw"></i></a>
{% else %}
{% if canadd %}
{% set idblog = "" %}
{% set url= path('app_user_blogarticle_submit') %}
{% if usage=="group" and firstblog is defined %}
{% set url= path('app_user_blogarticle_submit',{idblog:firstblog,page:entity.page.id}) %}
{% endif %}
<a title="Créer un Article" onClick="showFrameitem('blog','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
{% endif %}
{% set url= path('app_user_blog_view') %}
{% if usage=="group" and firstblog is defined %}
{% set url= path('app_user_blog_view',{id:firstblog}) %}
{% endif %}
<a title="Voir mes Blogs" onClick="showFrameitem('blog','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-th fa-fw"></i></a>
{% endif %}
{% if look=="list" %}
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% else %}
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
</div>
<div class="widgetheader" style="{{ stylewidgetheader }}">
{% if entity.icon %}
<img src="/{{ appAlias }}/{{ entity.icon.label }}" class="logo"/>
{% else %}
<img src="/{{ appAlias }}/uploads/icon/icon_pin.png" class="logo"/>
{% endif %}
<span class="title">{{ entity.name }}</span>
</div>
{% if blogarticles|length >= 1 %}
<div class="widgetbody" style="{{ stylewidgetbody }}">
<div class="grid clearfix">
{% for blogarticle in blogarticles %}
{% if loop.index==1 %}
<div class="grid-sizer grid-preview"></div>
<div class="grid-gutter-sizer grid-preview-gutter-sizer"></div>
{% endif %}
<div class="grid-item grid-preview" style="{{ stylewidgetbodyreverse }};">
<div class="grid-item-content">
<a href onClick="showFrameitem('blog','{{ path('app_'~access~'_blogarticle_view',{'id':blogarticle.id}) }}',true)">
{% if blogarticle.image is not empty %}
<div class="grid-item-logo">
<img class="grid-item-vignette" src="/{{appAlias}}/{{blogarticle.image|replace({"/blogarticle/":"/blogarticle/thumb-"})}}" width="100%">
</div>
{% endif %}
<div class="caption" style="{{ stylewidgetbodyreverse }};">
<div class="grid-item-title" style="{{ stylewidgetbodyreverse }};">
<h2>{{blogarticle.name }}</h2>
<small>publié par {{ blogarticle.user.username }} le {{ blogarticle.submit|date("d/m/Y à H:i") }}<br>dans le blog {{blogarticle.blog.name }}</small>
</div>
</div>
</a>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% endif %}

View File

@ -1,90 +0,0 @@
{% set widgetname="bookmark" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetaction %}
{% if canadd %}
<i class="fas fa-text-height" title="Changer taille des items" onClick="changeWidget({{ entity.id }},'modedesktop',{{modedesktop}})"></i>
{% endif %}
{% endblock %}
{% block widgetbody %}
<div class="items-list">
{% for bookmark in bookmarks %}
{% set havebookmark=true %}
{% if bookmark.item %}
{% set bookmarktitle = bookmark.item.title %}
{% set bookmarksubtitle = bookmark.item.subtitle %}
{% set bookmarkbackgroundcolor = bookmark.item.color ? bookmark.item.color : app.session.get('colorbgbodydark')|raw %}
{% set bookmarktarget = bookmark.item.target %}
{% set bookmarkurl = ( bookmark.item.protected and not app.user ? path("app_login") : bookmark.item.url|replace({'#login#': username}) ) %}
{% set bookmarkcontent = bookmark.item.content %}
{% set bookmarkicon = (bookmark.item.icon ? bookmark.item.icon.label : "icon/icon_pin.png") %}
{% else %}
{% set bookmarktitle = bookmark.title %}
{% set bookmarksubtitle = bookmark.subtitle %}
{% set bookmarkbackgroundcolor = bookmark.color ? bookmark.color : app.session.get('colorbgbodydark')|raw %}
{% set bookmarktarget = bookmark.target %}
{% set bookmarkurl = bookmark.url|replace({'#login#': username}) %}
{% set bookmarkcontent = null %}
{% set bookmarkicon = bookmark.icon ? bookmark.icon.label : "icon/icon_pin.png" %}
{% endif %}
<div class="item {{itemsize}}" style="background-color: {{ bookmarkbackgroundcolor }};" data-idcategory="bookmark" data-title="{{bookmarktitle|lower}}">
<div class="item-container">
<div class="item-content">
{% if bookmarktarget == 'frame' %}
<a class="item-link" onClick="showItemframe('bookmark{{ bookmark.id }}','{{ bookmarkurl }}')">
{% else %}
<a class="item-link" href="{{ bookmarkurl }}" target="{{bookmarktarget }}">
{% endif %}
<img height="35" src="{{ path('app_minio_image',{file:bookmarkicon}) }}">
<div class="item-title">
<h3 >{{ bookmarktitle }}</h3>
<div class="item-subtitle">{{ bookmarksubtitle|nl2br }}</div>
</div>
</a>
<div class="item-action">
{% if canadd %}
{% if bookmark.item %}
<a style="display:none" onClick="delBookmark({{ bookmark.id }},{{ entity.id }},false)"><i class="item-heart fas fa-heart-crack"></i></a>
{% else %}
<a style="display:none" onClick="modBookmark({{ bookmark.id }},{{ entity.id }},false)"><i class="item-mod fas fa-file"></i></a>
<a style="display:none" onClick="delBookmark({{ bookmark.id }},{{ entity.id }},false)"><i class="item-trash fas fa-trash"></i></a>
{% endif %}
{% endif %}
{% if bookmarkcontent %}
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
{% endif %}
</div>
</div>
<div class="item-description hide">{{ bookmarkcontent|raw }}</div>
</div>
</div>
{% endfor %}
{% if canadd %}
<div class="item {{ itemsize }}" style="background-color: var(--colorbgbodydark);" data-idcategory="bookmark">
<div class="item-container">
<div class="item-content">
<a class="item-link" onClick="addBookmark({{ entity.id }},false)">
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_add.png"}) }}">
<div class="item-title">
<h3 >Ajouter</h3>
<div class="item-subtitle">Ajouter un Lien</div>
</div>
</a>
<div class="item-action">
</div>
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -1,100 +0,0 @@
{% import "Pagewidget/constants.twig" as constants %}
{% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
{%if mini %}
<div class="widget widget-mini widget-calendar" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
<div class="widgetheader">
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
{% if entity.icon %}
<img src="/{{ appAlias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
{% else %}
<img src="/{{ appAlias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
{% endif %}
</a>
</div>
</div>
{% else %}
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-calendar" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
<div class="widgetmenu">
{% if canupdate %}
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
{% if access=="config" %}
<a title="Gérer mes Calendriers" href='{{ path('app_config_calendar') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-paper-plane fa-fw"></i></a>
{% else %}
{% set url= path('app_'~access~'_calendar_view') %}
{% if usage=="group" and firstcalendar is defined %}
{% set url= path('app_'~access~'_calendar_view',{id:firstcalendar}) %}
{% endif %}
<a title="Ajouter / Modifier un Evènement" onClick="showFrameitem('calendar','{{ url }}',true)" style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
{% endif %}
{% if look=="list" %}
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% else %}
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
</div>
<div class="widgetheader" style="{{ stylewidgetheader }}">
{% if entity.icon %}
<img src="/{{ appAlias }}/{{ entity.icon.label }}" class="logo"/>
{% else %}
<img src="/{{ appAlias }}/uploads/icon/icon_pin.png" class="logo"/>
{% endif %}
<span class="title">{{ entity.name }}</span>
</div>
{% set firstflux="" %}
{% if events|length >= 1 %}
<div class="widgetbody" style="{{ stylewidgetbody }}">
{% set monthsel = "" %}
{% for i in 0..(nbday-1) %}
{% set dateeventstart = 'now'|date_modify("+"~i~" day midnight") %}
{% set dateeventend = 'now'|date_modify("+"~(i+1)~" day midnight") %}
{% set fgaffday=false %}
{% for event in events %}
{% if event.start< dateeventend and event.end>=dateeventstart %}
{% if monthsel == "" or dateeventstart|date("Y-m")!=monthsel %}
{% set monthsel = dateeventstart|date("Y-m") %}
{% set libmonth = constants.libmonth(dateeventstart|date("m")) %}
<h3>{{ libmonth ~ " " ~ dateeventstart|date("Y") }}</h3>
{% endif %}
{% if not fgaffday %}
{% set fgaffday=true %}
{% set libday = constants.libday(dateeventstart|date("N")) %}
<div style="margin-top:15px; font-weight:bold; font-size:18px;">{{ libday ~ " " ~ dateeventstart|date("d/m/Y") }}</div>
{% endif %}
<div class="widget-event" style="background-color:{{ event.color }}; color: #FFF; padding:2px;" title="{{ event.description }}">
{{ event.name }} =
{% if not event.allDay %}
{{ event.start | date("H:i") }} -
{%endif%}
{{ event.title }}
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% if url is defined %}
<div style="cursor:pointer; text-align: right; margin-top:20px;"><a onClick="showFrameitem('calendar','{{url }}',true)" style="{{ stylewidgetbody }}">Voir mes Agendas</a></div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}

View File

@ -1,28 +0,0 @@
{% set widgetname="editor" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetaction %}
{% if canadd %}
<i class="fa fa-pencil fa-fw" title="Modifier votre texte" onClick="ckeditor({{ entity.id }})"></i>
{% endif %}
{% endblock %}
{% block widgetbody %}
{% if html is empty and canadd %}
<div class="p-5 text-center">
<i title="Modifier votre texte" class="fa fa-pencil fa-5x" onClick="ckeditor({{ entity.id }})" style="cursor:pointer"></i><br>
Modifier votre texte
</div>
{% else %}
<div class="ckeditor-content">
{{ html | raw }}
</div>
{% endif %}
{% endblock %}

View File

@ -1,15 +0,0 @@
{% set widgetname="file" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetaction %}
{% if canupdate %}
<i class="fa fa-plus fa-fw" title="Ajouter Images" title="Ajouter Fichiers" onClick="addFile({{ entity.id }})"></i>
{% endif %}
{% endblock %}
{% block widgetbody %}
<iframe id="framefile-{{id}}" src="{{ path("app_"~access~"_file_list",{'category':category,'id':id, 'usage':usage, 'view':view}) }}" class="{% if entity.autoajust %}localframe {% endif %}" style="width:100%"></iframe>
{% endblock %}

View File

@ -1,141 +0,0 @@
{% set theme = app.session.get('theme') %}
{% if theme is not empty %}
{{ include('@Theme/'~theme~'/function.html.twig') }}
{% endif %}
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
{% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
{% set color = app.session.get('color') %}
{% set colorbodyfont = entity.colorbodyfont %}
{% if colorbodyfont is null %}
{% set colorbodyfont = color['fontcolorhover'] %}
{% endif %}
{% set colorbodyback = entity.colorbodyback %}
{% if colorbodyback is null %}
{% set colorbodyback = color['main'] %}
{% endif %}
{% set colorbodyfont = entity.colorbodyfont %}
{% if colorbodyfont is null %}
{% if colorbodyback==color['fontcolorhover'] %}
{% set colorbodyfont = color['main'] %}
{% else %}
{% set colorbodyfont = color['fontcolorhover'] %}
{% endif %}
{% endif %}
{% if modelist==0 %}
{% set stylegrid="grid-preview" %}
{% elseif modelist==1 %}
{% set stylegrid="grid-list" %}
{% endif %}
{%if mini %}
<div class="widget widget-mini widget-flux" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
<div class="widgetheader">
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
{% if entity.icon %}
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
{% else %}
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
{% endif %}
</a>
</div>
</div>
{% else %}
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-flux" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
<div class="widgetmenu">
{% if canupdate %}
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
{% if look=="list" %}
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% else %}
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
</div>
<div class="widgetheader" style="{{ stylewidgetheader }}">
{% if entity.icon %}
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
{% else %}
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
{% endif %}
<span class="title">{{ entity.name }}</span>
</div>
{% set firstflux="" %}
<div class="widgetbody" style="{{ stylewidgetbody }} ">
{% if fluxs is defined %}
{% if fluxs|length > 1 %}
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},'all')" style="color:#{{ color['fontcolorhover'] }}; background-color: #{{ color['main'] }}">Tout</div>
{% for flux in fluxs %}
{% set stylefeed = "background-color: #" ~ color['main'] ~ ";" %}
{% if flux.color is not null %}
{% set stylefeed = "background-color: #" ~ flux.color ~ ";" %}
{% endif %}
<div class="cat-list-feed" onClick="showFlux({{ entity.id}},{{ flux.id }})" style="{{ stylefeed }} color:#{{ color['fontcolorhover'] }};">{{ flux.title }}</div>
{% endfor %}
{% endif %}
{% endif %}
<div class="grid clearfix">
{% for feed in feeds %}
{% if loop.index==1 %}
<div class="grid-sizer {{stylegrid}}"></div>
<div class="grid-gutter-sizer {{stylegrid}}-gutter-sizer"></div>
{% endif %}
{% set stylecolor = "background-color: #" ~ color['main'] ~ ";" %}
{% if feed.color is defined and feed.color is not null %}
{% set stylecolor = "background-color: #" ~ feed.color ~ ";" %}
{% endif %}
{% set stylefeed = "" %}
{% if feed.image is not null and feed.image != ""%}
{% set stylefeed = stylefeed ~ "background: url(" ~ feed.image ~ ") no-repeat center; background-size: cover;" %}
{% endif %}
<div class="grid-item {{ stylegrid }} feed flux-{{ feed.fluxid }}">
<div class="grid-item-content" style="{{ stylecolor }};">
<a class="linktosonde" data-sonde="Flux = {{ feed.fluxtitle }}" href="{{ feed.link }}" target="_blank">
<div class="item-link clearfix">
{% if feed.image is not empty %}
<div class="grid-item-logo">
<img class="grid-item-img" src="{{feed.image}}" width="100%">
</div>
{% endif %}
<div class="caption" style="{{ stylecolor }};">
<div class="grid-item-title">
<h2>{{ feed.title }}</h2>
{% if modelist==0 %}
<small>le {{ feed.date|date("d/m/Y à H:i") }}</small><br>
{{ feed.description | nl2br }}
{% endif %}
</div>
</div>
</div>
</a>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}

View File

@ -1,77 +0,0 @@
{% set theme = app.session.get('theme') %}
{% if theme is not empty %}
{{ include('@Theme/'~theme~'/function.html.twig') }}
{% endif %}
{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
{% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
{% set stylewidgetbodyframe = constants.mystylewidgetbodyframe(entity) %}
{% set stylewidgetbodyimage = constants.mystylewidgetbodyimage(entity) %}
{% set color = app.session.get('color') %}
{% set colorbodyback = entity.colorbodyback %}
{% if colorbodyback is null %}
{% set colorbodyback = color['main'] %}
{% endif %}
{% set colorbodyfont = entity.colorbodyfont %}
{% if colorbodyfont is null %}
{% set colorbodyfont = color['fontcolorhover'] %}
{% endif %}
{%if mini %}
<div class="widget widget-mini widget-frame" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
<div class="widgetheader">
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
{% if entity.icon %}
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
{% else %}
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
{% endif %}
</a>
</div>
</div>
{% else %}
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-frame" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
<div class="widgetmenu">
{% if canupdate %}
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
{% if look=="list" %}
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% else %}
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
</div>
{% if onheader %}
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
<iframe src="{{ path(tool,{'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" style="margin-top:30px; {{ stylewidgetbodyframe }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
</div>
{% else %}
<div class="widgetheader" style="{{ stylewidgetheader }}">
{% if entity.icon %}
<img src="/{{ alias }}/{{ entity.icon.label }}" class="logo"/>
{% else %}
<img src="/{{ alias }}/uploads/icon/icon_pin.png" class="logo"/>
{% endif %}
<span class="title">{{ entity.name }}</span>
</div>
<div class="widgetbody" style="{{ stylewidgetbody }}">
<iframe id="frame-{{directory}}" src="{{ path(tool) }}" data-color="#{{colorbodyfont}}" style="{{ stylewidgetbodyframe }}" class="{% if not entity.autoajust %}notframeajust {% endif %}"></iframe>
</div>
{% endif %}
</div>
{% endif %}

View File

@ -1,23 +0,0 @@
{% set widgetname="galery" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetaction %}
{% if canadd %}
<i class="fa fa-plus fa-fw" title="Ajouter Images" title="Ajouter Images" onClick="addImage({{ entity.id }})"></i>
{% endif %}
{% endblock %}
{% block widgetbody %}
{% if canadd %}
<a class="btn btn-sm btn-success mb-1" onClick="addImage({{ entity.id }})"><i class="fa fa-plus fa-fw" title="Ajouter Images" ></i> Ajouter des Images</a>
{% endif %}
<div class="masonry" style="display:none">
<div class="masonry-sizer" style="display:none"></div>
{% for file in files %}
<div class="masonry-item">
<a onClick="viewFile({{ entity.id }},'{{file.Key}}',true)"><img src="{{path("app_minio_image",{file:file.Key}) }}" style="width:100%;"></a>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -1,64 +0,0 @@
{% set widgetname="info" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetmenu %}
{% endblock %}
{% block widgetbody %}
{% for group in entity.page.groups %}
{% if entity.page.groups|length > 1 or not widgethaveheader %}
<h3 style="margin:0px; font-size:25px; {{colorbodyfont}} ">{{group.label}}</h3>
{% endif %}
{% if group.description %}
{{ group.description|nl2br}}
<br><br>
{% endif %}
<div class="items-list">
{% for member in group.users %}
<div class="item item-verysmall" style="background-color: var(--colorbgbodydark);">
<div class="item-container">
<div class="item-content">
<div class="item-link">
<img src="{{ path('app_minio_image',{file:"avatar/"~member.user.avatar}) }}" class="avatar" style="height:40px; width: 40px;">
<div class="item-title">
<h3>{{ member.user.lastname }} {{ member.user.firstname }}</h3>
<div class="item-subtitle" style="display:block !important">
{% if member.rolegroup==100 %}
<i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i>
{% elseif member.rolegroup==90 %}
<i class="fa fa-star"></i><i class="fa fa-star"></i>
{% elseif member.rolegroup==50 %}
<i class="fa fa-star"></i>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
{%if canupdate %}
<div class="item item-verysmall" style="background-color: var(--colorbgbodydark);">
<div class="item-container">
<div class="item-content">
<a class="item-link" href="{{path("app_all_group_users",{id:group.id,idpage:entity.page.id,usage:usage})}}" target="_top">
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_add.png"}) }}">
<div class="item-title">
<h3 >Ajouter</h3>
<div class="item-subtitle">Ajouter un Utilisateur</div>
</div>
</a>
</div>
</div>
</div>
{% endif %}
</div>
{% endfor %}
{% if entity.page.groups|length == 0 and entity.page.user %}
<center>
<img src="{{ path('app_minio_image',{file:"avatar/"~entity.page.user.avatar}) }}" class="avatar" style="height:128px; width: 128px; margin-bottom:15px">
</center>
{% endif %}
{% endblock %}

View File

@ -1,174 +0,0 @@
{% set widgetname="item" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetaction %}
{% if canadd %}
<i class="fas fa-text-height" title="Changer taille des items" onClick="changeWidget({{ entity.id }},'modedesktop',{{modedesktop}})"></i>
{% endif %}
{% endblock %}
{% block widgetbody %}
{% set havemenu=false %}
{% set havebookmark=false %}
{% if menu and withbookmark!= 2 and (canadd or bookmarks is not empty or itemcategorys|length > 1) %}
{% set havemenu=true %}
<div style="margin-bottom: 5px;">
{% if menuall %}
<div class="cat-list" onClick="showItemCat({{ entity.id}},'all')">Tout</div>
{% endif %}
{% if bookmarks is not empty or canadd %}
<div class="cat-list" onClick="showItemCat({{ entity.id}},'bookmark')"><i class="fa fa-heart"></i></div>
{% endif %}
{% for itemcategory in itemcategorys %}
<div class="cat-list" onClick="showItemCat({{ entity.id}},{{itemcategory.id}})">{{itemcategory.label}}</div>
{% endfor %}
</div>
{% endif %}
{% if search %}
{% set havemenu=true %}
<div class="input-group" style="margin-bottom: 5px;">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-search"></i>&nbsp;</span>
</div>
<input id="itemsearch" onKeyup="searchItem({{ entity.id}},$(this).val());" type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
</div>
{% endif %}
{% if (bookmarks is not empty or canadd ) and (withbookmark==0 or withbookmark==2) %}
{% if withbookmark==0 or itemcategorys|length > 1 %}
<h3 class="itemcategory-title {{not havemenu ? "mt-1" : "mt-3"}} mb-0" style="{{ entity.colorbodyfont ? "color:"~entity.colorbodyfont~";" : "color:var(--colorfttitlelight);"}}" data-idcategory="bookmark">Favoris</h3>
{% endif %}
<div class="items-list">
{% for bookmark in bookmarks %}
{% set havebookmark=true %}
{% if bookmark.item %}
{% set bookmarktitle = bookmark.item.title %}
{% set bookmarksubtitle = bookmark.item.subtitle %}
{% set bookmarkbackgroundcolor = bookmark.item.color ? bookmark.item.color : app.session.get('colorbgbodydark')|raw %}
{% set bookmarktarget = bookmark.item.target %}
{% set bookmarkurl = ( bookmark.item.protected and not app.user ? path("app_login") : bookmark.item.url|replace({'#login#': username}) ) %}
{% set bookmarkcontent = bookmark.item.content %}
{% set bookmarkicon = (bookmark.item.icon ? bookmark.item.icon.label : "icon/icon_pin.png") %}
{% else %}
{% set bookmarktitle = bookmark.title %}
{% set bookmarksubtitle = bookmark.subtitle %}
{% set bookmarkbackgroundcolor = bookmark.color ? bookmark.color : app.session.get('colorbgbodydark')|raw %}
{% set bookmarktarget = bookmark.target %}
{% set bookmarkurl = bookmark.url|replace({'#login#': username}) %}
{% set bookmarkcontent = null %}
{% set bookmarkicon = bookmark.icon ? bookmark.icon.label : "icon/icon_pin.png" %}
{% endif %}
<div class="item {{itemsize}}" style="background-color: {{ bookmarkbackgroundcolor }};" data-idcategory="bookmark" data-title="{{bookmarktitle|lower}}">
<div class="item-container">
<div class="item-content">
{% if bookmarktarget == 'frame' %}
<a class="item-link" onClick="showItemframe('bookmark{{ bookmark.id }}','{{ bookmarkurl }}')">
{% else %}
<a class="item-link" href="{{ bookmarkurl }}" target="{{bookmarktarget }}">
{% endif %}
<img height="35" src="{{ path('app_minio_image',{file:bookmarkicon}) }}">
<div class="item-title">
<h3 >{{ bookmarktitle }}</h3>
<div class="item-subtitle">{{ bookmarksubtitle|nl2br }}</div>
</div>
</a>
<div class="item-action">
{% if canadd %}
{% if bookmark.item %}
<a style="display:none" onClick="delBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-heart fas fa-heart-crack"></i></a>
{% else %}
<a style="display:none" onClick="modBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-mod fas fa-file"></i></a>
<a style="display:none" onClick="delBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-trash fas fa-trash"></i></a>
{% endif %}
{% endif %}
{% if bookmarkcontent %}
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
{% endif %}
</div>
</div>
<div class="item-description hide">{{ bookmarkcontent|raw }}</div>
</div>
</div>
{% endfor %}
{% if (canadd) %}
<div class="item {{ itemsize }}" style="background-color: var(--colorbgbodydark);" data-idcategory="bookmark">
<div class="item-container">
<div class="item-content">
<a class="item-link" onClick="addBookmark({{ entity.id }},true)">
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_add.png"}) }}">
<div class="item-title">
<h3 >Ajouter</h3>
<div class="item-subtitle">Ajouter un Favoris</div>
</div>
</a>
<div class="item-action">
</div>
</div>
</div>
</div>
{% endif %}
</div>
{% endif %}
{% for itemcategory in itemcategorys %}
{% if itemcategorys|length > 1 or havebookmark or canadd %} <h3 class="itemcategory-title {{loop.first and not havemenu and not havebookmark ? "mt-1" : "mt-3"}} mb-0" style="{{ entity.colorbodyfont ? "color:"~entity.colorbodyfont~";" : "color:var(--colorfttitlelight);"}}" data-idcategory="{{itemcategory.id}}">{{itemcategory.label}}</h3> {% endif %}
<div class="items-list">
{% for item in items %}
{% if item.itemcategory==itemcategory %}
<div class="item {{itemsize}}" style="background-color: {{ item.color ? item.color : "var(--colorbgbodydark)" }};" data-idcategory="{{item.itemcategory.id}}" data-title="{{item.title|lower}}">
<div class="item-container">
<div class="item-content">
{% set url=item.url|replace({'#login#': username}) %}
{% if item.protected and not app.user %}
{% set url=path('app_login') %}
{% endif %}
{% if item.target == 'frame' %}
<a class="item-link" onClick="showItemframe({{ item.id }},'{{ url }}')">
{% else %}
<a class="item-link" href="{{ url }}" target="{{ item.target }}">
{% endif %}
{% if item.icon %}
<img height="35" src="{{ path('app_minio_image',{file:item.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_pin.png"}) }}">
{% endif %}
<div class="item-title">
<h3 >{{ item.title }}</h3>
<div class="item-subtitle">{{ item.subtitle|nl2br }}</div>
</div>
</a>
<div class="item-action">
{% if canadd %}
<a style="display:none" onClick="heartBookmark({{ item.id }})"><i class="item-heart fa fa-heart"></i></a>
{% endif %}
{% if item.content %}
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
{% endif %}
</div>
</div>
<div class="item-description hide">{{ item.content|raw }}</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
{% endblock %}

View File

@ -1,131 +0,0 @@
{% set widgetname="itemessential" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetaction %}
{% if canadd %}
<i class="fas fa-text-height" title="Changer taille des items" onClick="changeWidget({{ entity.id }},'modedesktop',{{modedesktop}})"></i>
{% endif %}
{% endblock %}
{% block widgetbody %}
<div class="items-list">
{% for bookmark in bookmarks %}
{% set havebookmark=true %}
{% if bookmark.item %}
{% set bookmarktitle = bookmark.item.title %}
{% set bookmarksubtitle = bookmark.item.subtitle %}
{% set bookmarkbackgroundcolor = bookmark.item.color ? bookmark.item.color : app.session.get('colorbgbodydark')|raw %}
{% set bookmarktarget = bookmark.item.target %}
{% set bookmarkurl = ( bookmark.item.protected and not app.user ? path("app_login") : bookmark.item.url|replace({'#login#': username}) ) %}
{% set bookmarkcontent = bookmark.item.content %}
{% set bookmarkicon = (bookmark.item.icon ? bookmark.item.icon.label : "icon/icon_pin.png") %}
{% else %}
{% set bookmarktitle = bookmark.title %}
{% set bookmarksubtitle = bookmark.subtitle %}
{% set bookmarkbackgroundcolor = bookmark.color ? bookmark.color : app.session.get('colorbgbodydark')|raw %}
{% set bookmarktarget = bookmark.target %}
{% set bookmarkurl = bookmark.url|replace({'#login#': username}) %}
{% set bookmarkcontent = null %}
{% set bookmarkicon = bookmark.icon ? bookmark.icon.label : "icon/icon_pin.png" %}
{% endif %}
<div class="item {{itemsize}}" style="background-color: {{ bookmarkbackgroundcolor }};" data-idcategory="bookmark" data-title="{{bookmarktitle|lower}}">
<div class="item-container">
<div class="item-content">
{% if bookmarktarget == 'frame' %}
<a class="item-link" onClick="showItemframe('bookmark{{ bookmark.id }}','{{ bookmarkurl }}')">
{% else %}
<a class="item-link" href="{{ bookmarkurl }}" target="{{bookmarktarget }}">
{% endif %}
<img height="35" src="{{ path('app_minio_image',{file:bookmarkicon}) }}">
<div class="item-title">
<h3 >{{ bookmarktitle }}</h3>
<div class="item-subtitle">{{ bookmarksubtitle|nl2br }}</div>
</div>
</a>
<div class="item-action">
{% if canadd %}
{% if bookmark.item %}
<a style="display:none" onClick="delBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-heart fas fa-heart-crack"></i></a>
{% else %}
<a style="display:none" onClick="modBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-mod fas fa-file"></i></a>
<a style="display:none" onClick="delBookmark({{ bookmark.id }},{{ entity.id }},true)"><i class="item-trash fas fa-trash"></i></a>
{% endif %}
{% endif %}
{% if bookmarkcontent %}
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
{% endif %}
</div>
</div>
<div class="item-description hide">{{ bookmarkcontent|raw }}</div>
</div>
</div>
{% endfor %}
{% for item in items %}
<div class="item {{itemsize}}" style="background-color: {{ item.color ? item.color : "var(--colorbgbodydark)" }};" data-idcategory="{{item.itemcategory.id}}" data-title="{{item.title|lower}}">
<div class="item-container">
<div class="item-content">
{% set url=item.url|replace({'#login#': username}) %}
{% if item.protected and not app.user %}
{% set url=path('app_login') %}
{% endif %}
{% if item.target == 'frame' %}
<a class="item-link" onClick="showItemframe({{ item.id }},'{{ url }}')">
{% else %}
<a class="item-link" href="{{ url }}" target="{{ item.target }}">
{% endif %}
{% if item.icon %}
<img height="35" src="{{ path('app_minio_image',{file:item.icon.label}) }}">
{% else %}
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_pin.png"}) }}">
{% endif %}
<div class="item-title">
<h3 >{{ item.title }}</h3>
<div class="item-subtitle">{{ item.subtitle|nl2br }}</div>
</div>
</a>
<div class="item-action">
{% if canadd %}
<a style="display:none" onClick="heartBookmark({{ item.id }})"><i class="item-heart fa fa-heart"></i></a>
{% endif %}
{% if item.content %}
<a style="display:none"><i class="item-info fas fa-circle-info"></i></a>
{% endif %}
</div>
</div>
<div class="item-description hide">{{ item.content|raw }}</div>
</div>
</div>
{% endfor %}
<div class="item {{ itemsize }}" style="background-color: var(--colorbgbodydark);" data-idcategory="bookmark">
<div class="item-container">
<div class="item-content">
<a class="item-link" href="{{path("app_all_page_application")}}">
<img height="35" src="{{ path('app_minio_image',{file:"icon/icon_add.png"}) }}">
<div class="item-title">
<h3 >Voir Plus</h3>
<div class="item-subtitle">Voir toutes les Applications</div>
</div>
</a>
<div class="item-action">
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,23 +0,0 @@
{% set widgetname="link" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetbody %}
{% set url=url|replace({'#login#': username}) %}
{% if target == 'frame' %}
<a class="item-link" onClick="showItemframe(link{{ entity.id }}','{{ url }}')">
{% else %}
<a class="item-link" href="{{ url }}" target="{{ target }}">
{% endif %}
{% if entity.icon %}
<img src="{{ path('app_minio_image',{file:entity.icon.label}) }}" style="max-width: 90%; width:128px; height: auto; display: block; margin: auto; padding-top: 10px;" />
{% else %}
<img src=""{{ path('app_minio_image',{file:"icon/icon_pin.png"}) }}" style="max-width: 90%; width:128px; height: auto; display: block; margin: auto; padding-top: 10px;" />
{% endif %}
<div class="text-center mt-3 pb-1" style="font-size: 22px; font-family: var(--fonttitle); {{colorbodyfont}} !important">{{ entity.name }}</div>
</a>
{% endblock %}

View File

@ -1,133 +0,0 @@
{% import "Pagewidget/constants.twig" as constants %}
{% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
{% set stylewidgetbodyreverse = constants.mystylewidgetbodyreverse(entity) %}
<style>
</style>
{%if mini %}
<div class="widget widget-mini widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}">
<div class="widgetheader">
<a style="cursor:pointer" onClick="bigWidget({{entity.id}})">
{% if entity.icon %}
<img src="/{{ appAlias }}/{{ entity.icon.label }}" class="logo" title="{{ entity.name }}"/>
{% else %}
<img src="/{{ appAlias }}/uploads/icon/icon_pin.png" class="logo" title="{{ entity.name }}"/>
{% endif %}
</a>
</div>
</div>
{% else %}
<div class="widget {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} widget-project" data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ stylewidget }}" height="{{ entity.height }}px">
<div class="widgetmenu">
{% if canupdate %}
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
{% if access=="config" %}
<a href='{{ path('app_config_project') }}' style="{{ stylewidgetmenu }}"><i class="fa fa-plus fa-fw"></i></a>
{% elseif app.user %}
{% set idproject = "" %}
{% set urladd= path('app_user_projecttask_submit') %}
{% set urlview= path('app_user_project_view') %}
{% if usage=="group" and firstproject is defined %}
{% set urladd= path('app_user_projecttask_submit',{idproject:firstproject,page:entity.page.id}) %}
{% set urlview= path('app_user_project_view',{id:firstproject}) %}
{% endif %}
<a onClick="showFrameitem('project','{{ urladd }}',true)" style="{{ stylewidgetmenu }}" title="Ajouter une Tâche"><i class="fa fa-plus fa-fw"></i></a>
<a onClick="showFrameitem('project','{{ urlview }}',true)" style="{{ stylewidgetmenu }}" title="Gérer mes Tâches"><i class="fa fa-th fa-fw"></i></a>
{% endif %}
{% if look=="list" %}
<i class="glyphicon glyphicon-resize-small" title="Réduire le Widget" onClick="smallWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% else %}
<i class="glyphicon glyphicon-resize-full" title="Agrandir le Widget" onClick="bigWidget({{ entity.id }})" style="{{ stylewidgetmenu }}"></i>
{% endif %}
</div>
<div class="widgetheader" style="{{ stylewidgetheader }}">
{% if entity.icon %}
<img src="/{{ appAlias }}/{{ entity.icon.label }}" class="logo"/>
{% else %}
<img src="/{{ appAlias }}/uploads/icon/icon_pin.png" class="logo"/>
{% endif %}
<span class="title">{{ entity.name }}</span>
</div>
{% if projecttasks|length >= 1 %}
<div class="widgetbody" style="{{ stylewidgetbody }}">
<div class="grid clearfix">
{% for projecttask in projecttasks %}
{% if loop.index==1 %}
<div class="grid-sizer grid-list"></div>
<div class="grid-gutter-sizer"></div>
{% endif %}
<div class="grid-item grid-list">
{% set colortask = color['main'] %}
{% if projecttask.projecttasktag %}
{% set colortask = projecttask.projecttasktag.color %}
{% endif %}
<div class="grid-item-content" style="background-color:#{{ colortask }}; {%if not entity.border%}padding:5px;{%endif%}">
<a title="Voir la Tâche" href="{{ path('app_'~access~'_projecttask_view',{'id':projecttask.id,page:entity.page.id}) }}">
<div class="item-link clearfix">
<div class="grid-item-logo" style="width:10%; margin:0px; text-align: center;">
{% if projecttask.user is empty %}
<img class='grid-item-img avatar' src="/{{ appAlias }}/uploads/avatar/{{ projecttask.owner.avatar }}" style="width:55px; height:auto">
{% else %}
<img class='grid-item-img avatar' src="/{{ appAlias }}/uploads/avatar/{{ projecttask.user.avatar }}" style="width:55px; height:auto">
{% endif %}
</div>
<div class="grid-item-title" style="width:90%; position:initial; display: inline-block; padding:0px">
<h2 style="line-height:18px;height:auto;padding-left:5px;">{{projecttask.name}}</h2>
<div style="font-size:9px; display:inline-block; width:40%;padding-left:5px;">Affectée à
{% if projecttask.user is empty %}
{{ projecttask.owner.username }}
{% else %}
{{ projecttask.user.username }}
{% endif %}
<br>Crée le {{ projecttask.submit|date("d/m/Y à H:i") }}
<br>Dans le projet {{projecttask.project.name }}
</div>
<div style="text-align: right; font-size:9px; display:inline-block; width:35%;">
Priorité = {{ projecttask.priority }}</br>
Avant le = {{ projecttask.end|date("d/m/Y") }}</br>
{% if projecttask.projecttasktag %}
Type = {{ projecttask.projecttasktag.name }}<br>
{% endif %}
{% if projecttask.projecttaskstatus %}
Statut = {{ projecttask.projecttaskstatus.name }}<br>
{% endif %}
</div>
<div style="margin-top:-5px; text-align: right; display:inline-block; width:20%;">
<div style="font-size:35px; line-height:30px">
{{ projecttask.percentage }}<i style="font-size:12px">%</i>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% endif %}

View File

@ -1,52 +0,0 @@
{% set widgetname="slide" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetaction %}
{% if canadd %}
<i title="Gérer le Carrousel" class="fa fa-th" onClick="listSlide({{ entity.id }})"></i>
{% endif %}
{% endblock %}
{% block widgetbody %}
{% set intervalmilli = interval * 1000 %}
<div class="{{ (slides|length > 1 ? "slick" : "") }}" data-slicktime='{{ intervalmilli }}'>
{% if slides is empty and canadd %}
<div class="pt-5 text-center">
<i title="Gérer le Carrousel" class="fa fa-th fa-5x" onClick="listSlide({{ entity.id }})" style="cursor:pointer"></i><br>
Gérer le Carrousel
</div>
{% endif %}
{% for slide in slides %}
{% if slide.url is not empty %}
{% set url=slide.url|replace({'#login#': username}) %}
{% if slide.target == 'frame' %}
<a class="item-link" onClick="showItemframe(slide{{ slide.id }}','{{ url }}')">
{% else %}
<a class="item-link" href="{{ url }}" target="{{ slide.target }}">
{% endif %}
{% endif %}
<div style="background-image:url({{ path("app_minio_image",{file:slide.image}) }}); background-size:cover; background-position: center; min-height:200px;{{(entity.autoajust ? "" : "height:"~entity.height~"px;")}}">
<div class="p-3">
{% if slide.title is not empty %}
<h1 class="slicktitle" style="{{colorbodyfont}};">{{slide.title}}</h1>
{% endif %}
{% if slide.subtitle is not empty %}
<span class="slicksubtitle" style="{{colorbodyfont}};">{{slide.subtitle}}</span>
{% endif %}
</div>
</div>
{% if slide.url is not empty %}
</a>
{% endif %}
{% endfor %}
</div>
{% endblock %}

View File

@ -1,11 +0,0 @@
{% set widgetname="url" %}
{% extends 'Pagewidget/widget.twig' %}
{% block widgetbody %}
{% if imagemedia %}
<img src="{{ url|replace({'#login#': username}) }}" width="100%" >
{% else %}
<iframe src="{{ url|replace({'#login#': username}) }}" class="{% if entity.autoajust %}frameajust {% endif %}" style="width:100%"></iframe>
{% endif %}
{% endblock %}

View File

@ -1,101 +0,0 @@
{% set widgethaveheader=entity.viewheader %}
{% if widgetname=="alert" and canupdate and alerts|length ==0 %}
{% set widgethaveheader=true %}
{% endif %}
{% if widgetname=="item" and canupdate and items|length==0 and withbookmark==1 %}
{% set widgethaveheader=true %}
{% endif %}
{% if widgetname=="bookmark" and canadd and bookmarks|length==0 %}
{% set widgethaveheader=true %}
{% endif %}
{% if widgetname=="editor" and canadd and html is empty %}
{% set widgethaveheader=true %}
{% endif %}
{% set viewwidget=true %}
{% if not widgethaveheader and widgetname=="alert" and not canupdate and alerts|length ==0 %}
{% set viewwidget=false %}
{% endif %}
{% if not widgethaveheader and widgetname=="item" and not canupdate and items|length ==0 and withbookmark==1 %}
{% set viewwidget=false %}
{% endif %}
{% if not widgethaveheader and widgetname=="bookmark" and not canadd and bookmarks|length ==0 %}
{% set viewwidget=false %}
{% endif %}
{% if not widgethaveheader and widgetname=="editor" and not canadd and html is empty %}
{% set viewwidget=false %}
{% endif %}
{%if widgethaveheader %}
{% set widgetstyle=(entity.colorheaderback ? "border-color:"~entity.colorheaderback~";" : "border-color:var(--colorbgbodydark);") %}
{% set widgetstylemenu=(entity.colorheaderback ? "background-color:"~entity.colorheaderback~";" : "background-color:var(--colorbgbodydark);")~(entity.colorheaderfont ? "color:"~entity.colorheaderfont~";" : "color:var(--colorfttitledark);") %}
{%else%}
{% set widgetstyle=(viewwidget ? "display:block;" : "display:none;")~(entity.colorbodyback ? "border-color:"~entity.colorbodyback~";" : "border-color:var(--colorbgbodydark);") %}
{% set widgetstylemenu="margin:-26px 0px 0px 0px; padding: 1px 10px; background-color:var(--colorbgbodydark); color: var(--colorfttitledark); border-radius: 5px;" %}
{%endif%}
{% set widgetstyleheader=(entity.colorheaderback ? "background-color:"~entity.colorheaderback~";" : "background-color:var(--colorbgbodydark);")~(entity.colorheaderfont ? "color:"~entity.colorheaderfont~";" : "color:var(--colorfttitledark);") %}
{% set widgetstylebody=(entity.colorbodyback ? "background-color:"~entity.colorbodyback~";" : "background-color:var(--colorbgbodylight);")~(entity.colorbodyfont ? "color:"~entity.colorbodyfont~";" : "color:var(--colorfttitlelight);")~(entity.isopened ? "display:block;" : "display:none;")~(widgetname=="url" ? "padding:0px;" : "")~(not widgethaveheader and not entity.border ? "padding-top: 0px;" : "")~(entity.autoajust ? "" : "height:"~entity.height~"px;") %}
{% set widgeicon= entity.icon ? path('app_minio_image',{file:entity.icon.label}) : path('app_minio_image',{file:"icon/icon_pin.png"}) %}
{% if modedesktop is defined %}
{% if modedesktop==0 %}
{% set itemsize="item-verysmall" %}
{% elseif modedesktop==1 %}
{% set itemsize="item-small" %}
{% elseif modedesktop==2 %}
{% set itemsize="item-medium" %}
{% elseif modedesktop==3 %}
{% set itemsize="item-large" %}
{% elseif modedesktop==4 %}
{% set itemsize="item-list" %}
{% endif %}
{% endif %}
{% if app.user %}
{% set username = app.user.username %}
{% else %}
{% set username = "" %}
{% endif %}
{% set colorbodyfont = "color: var(--colorfttitlelight)" %}
{% if entity.colorbodyfont is not null %}
{% set colorbodyfont = "color: " ~ entity.colorbodyfont %}
{% endif %}
<div class="widget widget-{{widgetname}} {%if entity.border %} widget-bordered {%else%} widget-notbordered {%endif%} " data-id="{{ entity.id }}" loc="{{ entity.loc }}" style="{{ widgetstyle }}">
<div class="widget-menu" style="{{ widgetstylemenu }}">
{% if canupdate and not widgethaveheader %}
<i class="widget-sortable fas fa-up-down-left-right" title="Déplacer le widget"></i>
{% endif %}
{% block widgetaction %}
{% endblock %}
{% if canupdate %}
<i class="fa fa-trash fa-fw" title="Supprimer le Widget" onClick="delWidget({{ entity.id }})" ></i>
<i class="fa fa-file fa-fw" title="Modifier le Widget" onClick="modWidget({{ entity.id }})"></i>
{% endif %}
</div>
{%if widgethaveheader %}
<div class="widget-header widget-sortable" style="{{ widgetstyleheader }}">
<img class="widget-logo" src="{{widgeicon}}" />
<span class="widget-title">{{ entity.name }}</span>
</div>
{%endif%}
<div class="widget-body {{ (entity.autoajust ? "widget-adjust" : "") }}" style="{{ widgetstylebody }};">
{% block widgetbody %}
{% endblock %}
</div>
</div>

View File

@ -1,67 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification Carrousel
{% elseif mode=="submit" %}
Création Carrousel
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href="{{ path('app_'~access~'_pagewidgetslide_list',{'idwidget':pagewidget.id,'usage':usage}) }}">Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_'~access~'_pagewidgetslide_delete',{'idwidget':pagewidget.id,'id':entity.id,'usage':usage}) }}
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 clearfix">
<div class="col-md-8">
{{ form_row(form.title) }}
{{ form_row(form.subtitle) }}
<div style="width:100%; margin:10px auto; text-align:center;">
<img id="pagewidgetslide_image_img" src="{{ path("app_minio_image",{file:entity.image}) }}" style="padding:10px; width:100%;height:auto;margin:auto;display:block;margin-bottom:5px;background-color: var(--colorbgbodydark)">
<a class="btn btn-info btn-modal" style="width:110px" data-modalid="mymodallarge" data-modaltitle="Carrousel" data-modalurl="{{ path('app_'~access~'_pagewidgetslide_upload', {"type": "slide", 'idwidget':pagewidget.id, 'usage':usage, "reportinput": "#pagewidgetslide_image" }) }}" title='Ajouter un Icône'>Modifier</a>
</div>
</div>
<div class="col-md-4">
{{ form_row(form.roworder) }}
{{ form_row(form.url) }}
<em>le mot clé #login# sera remplacé par le login de l'utilisateur</em><br><br>
{{ form_row(form.target) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}

View File

@ -1,18 +0,0 @@
{% extends 'base.html.twig' %}
{% block body %}
<h1 class="page-header">Gestion des Carrousels</h1>
<p>
<a class="btn btn-success" href={{ path('app_'~access~'_pagewidgetslide_submit',{idwidget:pagewidget.id,usage:usage}) }}>Ajouter</a>
<a class="btn btn-secondary" href="{{ path('app_'~access~'_page_'~usage~'_view',{id:pagewidget.page.id}) }}">Retour</a>
</p>
{% for pagewidgetslide in pagewidgetslides %}
<a href="{{ path('app_'~access~'_pagewidgetslide_update', {idwidget:pagewidget.id,id:pagewidgetslide.id,usage:usage}) }}">
<img id="icon_label_img" src="{{ path("app_minio_image",{file:pagewidgetslide.image}) }}" style="padding:5px; width:300px;height:auto;margin:auto;display:block;margin-bottom:5px;background-color: var(--colorbgbodydark)">
</a>
{% endfor %}
{% endblock %}

View File

@ -0,0 +1,71 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="submit" %}
Création pin
{% else %}
Modification pin
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_pin') }}>Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_pin_delete',{'id':pin.id}) }}
class="btn btn-danger float-right"
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 style="width:90px; margin:auto;">
{% set image= "noimage.png" %}
{% if pin.image %}
{% set image= pin.image %}
{% endif %}
<img id="pin_image_img" src="\{{appAlias}}\uploads\pin\{{ image }}" style="width:90px;">
{{ form_widget(form.image) }}
<bouton class="btn btn-info" style="margin:auto;margin-top:10px; margin-bottom:15px;" onClick="ModalLoad('mymodallarge','Pin','{{ path('app_crop01', {"type": "pin", "reportinput": "#pin_image" }) }}');" title='Ajouter une Image'>Modifier</bouton>
</div>
<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) }}
{{ form_row(form.description) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}

View File

@ -0,0 +1,55 @@
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
pins
</h1>
<p><a class="btn btn-success" href={{ path('app_pin_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des pins
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="90px" class="no-sort">Action</th>
<th class="no-string" width="70px">ID</th>
<th>Nom</th>
</tr>
</thead>
<tbody>
{% for pin in pins %}
<tr>
<td>
<a href="{{path("app_pin_update",{id:pin.id})}}"><i class="fa fa-file fa-2x"></i></a>
</td>
<td>{{pin.id}}</td>
<td>{{pin.name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</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" ]]
});
});
</script>
{% endblock %}

View File

@ -0,0 +1,13 @@
{% extends "base.html.twig" %}
{% block body %}
{% set image= "noimage.png" %}
{% if image %}
{% set image= pin.image %}
{% endif %}
<img id="pin_image_img" src="\{{appAlias}}\uploads\pin\{{ image }}" class="d-block m-auto" style="width:90px;margin-bottom:15px !important" >
{% if pin.subname %}<small>{{ pin.subname }}</small>{%endif%}<br><br>
{{pin.description|raw}}
{% endblock %}

View File

@ -1,15 +1,30 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
Nouveau Modèle de Page
{% if mode=="submit" %}
Création tag
{% else %}
Modification tag
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<p>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href="{{ path('app_'~access~'_page_template') }}">Annuler</a>
</p>
<a class="btn btn-secondary" href={{ path('app_tag') }}>Annuler</a>
{% if mode=="update" %}
<a href={{ path('app_tag_delete',{'id':tag.id}) }}
class="btn btn-danger float-right"
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'>
@ -35,11 +50,13 @@
</div>
<div class="card-body">
{{ form_row(form.name) }}
{{ form_row(form.parentfor) }}
{{ form_row(form.roworder) }}
{{ form_row(form.maxwidth) }}
{{ form_row(form.id) }}
{{ form_row(form.childs) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}

View File

@ -0,0 +1,52 @@
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
tags
</h1>
<p><a class="btn btn-success" href={{ path('app_tag_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des tags
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="90px" class="no-sort">Action</th>
<th>ID</th>
</tr>
</thead>
<tbody>
{% for tag in tags %}
<tr>
<td>
<a href="{{path("app_tag_delete",{id:tag.id})}}" data-method="delete" data-csrf="_token:{{ 'csrf' }}" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash fa-2x"></i></a>
</td>
<td>{{tag.id}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</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" ]]
});
});
</script>
{% endblock %}

View File

@ -83,16 +83,50 @@
{% endif %}
<nav id="menu" class="navbar navbar-expand p-0" style="{{style}}">
<a class="nav-link navbar-logo" href="{{ path('app_home')}}" style="display:none">
<a class="nav-link navbar-logo d-flex align-items-center" href="{{ path('app_home')}}" style="display:none">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logodark")}) }}">
{% if not useheader is defined or not useheader %}
<span style="padding-left:10px;font-family: var(--fonttitle); font-size: 20px; text-transform: uppercase">{{app.session.get("appname")}}</span>
{% endif %}
</a>
<a class="nav-toogle" style="display:none" ><i class="fa-solid fa-bars"></i></a>
<div id="menuapp">
<ul class="nav">
{% block menuapp %}
{% endblock %}
<ul id="menupagesportal" class="navbar-nav">
{% set path=path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')) %}
{% if app.session.get("menuheader").menuchilds is defined %}
{% for menuchild in app.session.get("menuheader").menuchilds %}
{% set active="" %}
{% set url="" %}
{% set name="" %}
{% if menuchild.childtype == "blog" %}
{% set url=path("app_child_view",{catparent:'blog', idparent:menuchild.blog.id, idchild:menuchild.blog.childs[0].id }) %}
{% set active=(url==path ? "active" : "") %}
{% set name=menuchild.blog.name %}
{% elseif menuchild.childtype == "blogtype" %}
{% set url=path("app_typeblog_home",{id:menuchild.blogtype.id}) %}
{% set active=(url==path ? "active" : "") %}
{% set name=menuchild.blogtype.name %}
{% elseif menuchild.childtype == "page" %}
{% set url=path("app_child_view",{catparent:'page', idparent:menuchild.page.id, idchild:menuchild.page.childs[0].id }) %}
{% set active=(url==path ? "active" : "") %}
{% set name=menuchild.page.name %}
{% elseif menuchild.childtype == "pagetype" %}
{% set url=path("app_typepage_home",{id:menuchild.pagetype.id}) %}
{% set active=(url==path ? "active" : "") %}
{% set name=menuchild.pagetype.name %}
{% endif %}
<li class="nav-item {{active}}" style="cursor:pointer">
<a href="{{url}}">
{{name}}
</a>
</li>
{% endfor %}
{% endif %}
</ul>
</ul>
</div>
@ -103,6 +137,8 @@
{% endblock %}
</ul>
<a class="nav-toogle pe-3" style="display:none" ><i class="fa-solid fa-bars"></i></a>
<ul id="menulink" class="nav navbar-right pe-3" style="display:none;">
{% if app.user %}
<a href="{{path("app_all_user")}}">
@ -123,7 +159,9 @@
<a href="{{path("app_all_group")}}"><i class="fas fa-users fa-fw"></i></a>
{% endif %}
{% if useheader is defined and useheader %}
<a id="switchHeader" class="btn-link" onclick="switchHeader()" title="Cacher / Afficher Bannière"><i class="fa fa-chevron-down fa-fw"></i></a>
{% endif %}
<a href="{{path("app_logout")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
{% else %}
@ -135,6 +173,9 @@
</div>
{% endif %}
{% block beforebody %}
{% endblock %}
<main>
{% if usesidebar is defined and usesidebar %}
{% if is_granted('ROLE_ADMIN') %}
@ -183,8 +224,62 @@
</div>
</div>
<div id="mymodalfull" class="modal" tabindex="-1">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-body" style="padding:0px">
<button type="button" class="btn btn-link" data-bs-dismiss="modal" aria-label="Close" style="position:absolute; right:10px;color: var(--colorftbodydark)"><i class="fas fa-close fa-2x"></i></button>
<iframe frameborder=0 width="100%" height="100%"></iframe>
</div>
</div>
</div>
</div>
<div id="selmenu" class="modal fade" role="dialog">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div id="mymodalheader" class="modal-header">
<h4 class="modal-title">MENU</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
{% set path=path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')) %}
{% if app.session.get("menuheader").menuchilds is defined %}
{% for menuchild in app.session.get("menuheader").menuchilds %}
{% set active="" %}
{% set url="" %}
{% set name="" %}
{% if menuchild.childtype == "blog" %}
{% set url=path("app_child_view",{catparent:'blog', idparent:menuchild.blog.id, idchild:menuchild.blog.childs[0].id }) %}
{% set active=(url==path ? "active" : "") %}
{% set name=menuchild.blog.name %}
{% elseif menuchild.childtype == "blogtype" %}
{% set url=path("app_typeblog_home",{id:menuchild.blogtype.id}) %}
{% set active=(url==path ? "active" : "") %}
{% set name=menuchild.blogtype.name %}
{% elseif menuchild.childtype == "page" %}
{% set url=path("app_child_view",{catparent:'page', idparent:menuchild.page.id, idchild:menuchild.page.childs[0].id }) %}
{% set active=(url==path ? "active" : "") %}
{% set name=menuchild.page.name %}
{% elseif menuchild.childtype == "pagetype" %}
{% set url=path("app_typepage_home",{id:menuchild.pagetype.id}) %}
{% set active=(url==path ? "active" : "") %}
{% set name=menuchild.pagetype.name %}
{% endif %}
<li class="nav-item {{active}}" style="cursor:pointer">
<a href="{{url}}">
{{name}}
</a>
</li>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</div>
<script>
function switchHeader() {
@ -216,11 +311,9 @@
$("#menulink").show();
$("#header").show();
}
$("main").css("height",$(window).height()-$(".header").height());
$("#page").css("height",$(window).height()-$(".header").height());
$(".pageframe").css("height",$(window).height()-$(".header").height());
$("#sidebar").css("min-height",$("body").height()-$(".header").height());
if($("#menuapp").is(":visible") && $(".nav-toogle").is(":visible")){
$("#menuapp").css("height",$(window).height()-$(".header").height());
@ -228,24 +321,84 @@
else {
$("#menuapp").css("height","auto");
}
$(".widget-body").find("iframe").each(function(){
if($(this).hasClass("frameajust")) {
console.log("here");
try {
height=this.contentWindow.document.body.scrollHeight;
} catch (error) {
height=0;
}
if(height==0) height=630;
this.style.height = height+"px";
}
else
$(this).height($(this).parent().height());
});
if($('.heroheader').length) {
heighthero=$('.heroheader').width()/4;
$('.heroheader').height(heighthero);
$('.herocredit').css({ top: (heighthero-30)+'px' });
if($('.heroheader').width()>980) $('.heroheader').show();
}
if($('.herobody').length) {
left=$('.herobody').css("padding-left").replace("px","");
console.log($(".header").height());
console.log($(window).height());
$('.herobody').css("margin-top",left-$(".header").height());
$('.herobody').height($(window).height()-(left*2));
}
resizegrid();
}
iFrameResize({ log: false,heightCalculationMethod: 'documentElementScroll' }, '.localframe');
$(document).ready(function() {
if($('.heroheader').length) {
{% if child is defined and child.childheaders|length > 1 %}
$('.heroheader').slick({
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 6000,
dots: true,
touchMove: false,
pauseOnDotsHover: true,
fade: true,
cssEase: 'linear',
prevArrow: false,
nextArrow: false,
customPaging: function(slider, i) {
return '<span class="heroheader-dot fa fa-circle fa-fw"></span>';
}
});
{% endif %}
}
$('.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>
{% block localscript %}{% endblock %}