first commit symfony 6
This commit is contained in:
94
templates/Config/edit.html.twig
Executable file
94
templates/Config/edit.html.twig
Executable file
@ -0,0 +1,94 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification CONFIGURATION
|
||||
{% elseif mode=="submit" %}
|
||||
Création CONFIGURATION
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_admin_config') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" and not config.required %}
|
||||
<a href="{{ path('app_admin_config_delete',{'id':config.id}) }}"
|
||||
class="btn btn-danger float-right"
|
||||
data-method="delete"
|
||||
data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?">
|
||||
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.id) }}
|
||||
{{ form_row(form.value) }}
|
||||
{% if config.type=="logo" %}
|
||||
<div style="width:90px; margin:10px auto;">
|
||||
{% set color = "" %}
|
||||
{% if config.id=='logodark' %}
|
||||
{% set color = app.session.get('colorbgbodydark') %}
|
||||
{% elseif config.id=='logolight' %}
|
||||
{% set color = app.session.get('colorbgbodylight') %}
|
||||
{% endif %}
|
||||
|
||||
<img id="config_value_img" src="{{ appAlias }}uploads/logo/{{ config.value }}" style="background-color: {{color}}; width:90px;height:90px; margin:auto;display:block;">
|
||||
<a class="btn btn-info btn-modal" style="width:90px" data-modalid="mymodallarge" data-modaltitle="Logo" data-modalurl="{{ path('app_admin_config_logo') }}" title='Ajouter un Logo'>Modifier</a>
|
||||
</div>
|
||||
{% elseif config.type=="header" %}
|
||||
<div style="margin:10px auto;">
|
||||
<img id="config_value_img" src="{{ appAlias }}uploads/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_user_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="{{ appAlias }}uploads/hero/{{ 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_user_crop01', {"type": "image", "reportinput": "#config_value" }) }}" title='Ajouter une Image'>Modifier</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_row(form.help) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$("#config_value_img").on('error', function(){
|
||||
var imgSrc = $(this).attr('src');
|
||||
if(imgSrc!="/{{appAlias}}/uploads/{{config.type}}/")
|
||||
$(this).attr('src',imgSrc);
|
||||
});
|
||||
$('#mymodallarge').on('hidden.bs.modal', function () {
|
||||
var imgSrc = $("#config_value_img").attr('src');
|
||||
$("#config_value_img").attr('src',imgSrc);
|
||||
});
|
||||
{% endblock %}
|
66
templates/Config/list.html.twig
Normal file
66
templates/Config/list.html.twig
Normal file
@ -0,0 +1,66 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
CONFIGURATIONS
|
||||
</h1>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 mt-4">
|
||||
<h3>Générale</h3>
|
||||
{{ render(path("app_admin_config_render",{category:"site"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mt-4">
|
||||
<h3>Couleurs des fonds de page</h3>
|
||||
{{ render(path("app_admin_config_render",{category:"colorbgbody"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mt-4">
|
||||
<h3>Polices</h3>
|
||||
{{ render(path("app_admin_config_render",{category:"font"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mt-4">
|
||||
<h3>Couleurs des titres </h3>
|
||||
{{ render(path("app_admin_config_render",{category:"colorfttitle"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mt-4">
|
||||
<h3>Couleurs de la police </h3>
|
||||
{{ render(path("app_admin_config_render",{category:"colorftbody"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mt-4">
|
||||
<h3>Logo</h3>
|
||||
{{ render(path("app_admin_config_render",{category:"logo"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 mt-4">
|
||||
<h3>Bannière</h3>
|
||||
{{ render(path("app_admin_config_render",{category:"header"})) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
35
templates/Config/logo.html.twig
Normal file
35
templates/Config/logo.html.twig
Normal file
@ -0,0 +1,35 @@
|
||||
{% 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('logo') }}"
|
||||
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 dropzonesuccess( file, response ) {
|
||||
parent.$("#config_value").val(response["file"]);
|
||||
parent.$("#config_value_img").attr("src","{{ appAlias }}uploads/logo/"+response["file"]);
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodallarge").modal('hide');
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
85
templates/Config/render.html.twig
Normal file
85
templates/Config/render.html.twig
Normal file
@ -0,0 +1,85 @@
|
||||
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
||||
<tbody>
|
||||
{% for config in configs|sort((a, b) => a.order <=> b.order) %}
|
||||
{% set continue = true %}
|
||||
{% if not config.grouped is empty %}
|
||||
|
||||
{% if app.session.get(config.grouped)==0 %}
|
||||
{% set continue = false %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{%if continue %}
|
||||
<tr>
|
||||
<td width="70px">
|
||||
{% if config.changeable %}
|
||||
<a href="{{path("app_admin_config_update",{id:config.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if not config.required %}
|
||||
<a href="{{path("app_admin_config_delete",{id:config.id})}}"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td width="50%">{{config.title}}</td>
|
||||
|
||||
{% set val = config.value %}
|
||||
{% if val is empty %}
|
||||
{% set val=app.session.get(config.id) %}
|
||||
{% endif %}
|
||||
|
||||
{% set color = "" %}
|
||||
{% set bgcolor = "" %}
|
||||
{% set otherstyle = "" %}
|
||||
{% if config.id=='colorbgbodydark' %}
|
||||
{% set bgcolor = val %}
|
||||
{% set color = app.session.get('colorftbodydark') %}
|
||||
{% elseif config.id=='colorbgbodylight' %}
|
||||
{% set bgcolor = val %}
|
||||
{% set color = app.session.get('colorftbodylight') %}
|
||||
{% elseif config.id=='colorfttitledark' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
||||
{% set color = val %}
|
||||
{% elseif config.id=='colorfttitlelight' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
||||
{% set color = val %}
|
||||
{% elseif config.id=='colorftbodydark' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
||||
{% set color = val %}
|
||||
{% elseif config.id=='colorftbodylight' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
||||
{% set color = val %}
|
||||
{% elseif config.id=='fonttitle' %}
|
||||
{% set color = app.session.get('colorfttitlelight') %}
|
||||
{% set otherstyle = "font-family: "~val~";" %}
|
||||
{% elseif config.id=='logodark' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
||||
{% set otherstyle = "text-align: center;" %}
|
||||
{% elseif config.id=='logolight' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
||||
{% set otherstyle = "text-align: center;" %}
|
||||
{% endif %}
|
||||
|
||||
<td style="overflow-wrap: anywhere; background-color: {{ bgcolor }}; color: {{color}}; {{otherstyle}}" >
|
||||
|
||||
|
||||
{% if config.type=="boolean" %}
|
||||
{% if val=="0" %} Non
|
||||
{% elseif val=="1" %} Oui
|
||||
{%endif%}
|
||||
{% elseif config.type=="logo" %}
|
||||
{%if not val is empty %}
|
||||
<img src="{{appAlias}}uploads/logo/{{ val }}" height=50px>
|
||||
{% endif %}
|
||||
{% elseif config.type=="header" %}
|
||||
{%if not val is empty %}
|
||||
<img src="{{appAlias}}uploads/header/{{ val }}" width="100%">
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ val|raw }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
58
templates/Cron/edit.html.twig
Normal file
58
templates/Cron/edit.html.twig
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification JOB
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_admin_cron') }}>Annuler</a>
|
||||
|
||||
<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.command) }}
|
||||
{{ form_row(form.jsonargument) }}
|
||||
{{ form_row(form.statut) }}
|
||||
{{ form_row(form.repeatinterval) }}
|
||||
{{ form_row(form.nextexecdate) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#command").focus();
|
||||
});
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
47
templates/Cron/list.html.twig
Normal file
47
templates/Cron/list.html.twig
Normal file
@ -0,0 +1,47 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
CRON JOBS
|
||||
</h1>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Jobs
|
||||
</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="70px" class="no-sort">Action</th>
|
||||
<th>Prochaine exécution</th>
|
||||
<th>Command</th>
|
||||
<th class="no-sort">Description</th>
|
||||
<th class="no-sort">Statut</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_admin_cron_tablelist') }}",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
16
templates/Cron/logs.html.twig
Normal file
16
templates/Cron/logs.html.twig
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
Télécharger les logs
|
||||
</h1>
|
||||
|
||||
{% if cron_activate %}
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"cron"}) }}>Log CRON</a>
|
||||
{% endif %}
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"prod"}) }}>Log PROD</a>
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"dev"}) }}>Log DEV</a>
|
||||
{% if cron_activate %}
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"dump"}) }}>Dump de la Base</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
36
templates/Crop/crop01.html.twig
Normal file
36
templates/Crop/crop01.html.twig
Normal file
@ -0,0 +1,36 @@
|
||||
{% 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(type) }}"
|
||||
class="dropzone"
|
||||
id="mydropzone"
|
||||
data-acceptedMimeTypes="image/*"
|
||||
data-maxFiles=1
|
||||
|
||||
style="margin-top:10px">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
|
||||
<script>
|
||||
window.parent.$(".modal-title").html("ETAPE 1 - Téléchargez votre image");
|
||||
|
||||
function dropzonesuccess( file, response ) {
|
||||
$(location).attr('href',"{{ path('app_user_crop02', {"type": type, "reportinput": reportinput }) }}?file="+response["file"]);
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodallarge").modal('hide');
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
125
templates/Crop/crop02.html.twig
Normal file
125
templates/Crop/crop02.html.twig
Normal file
@ -0,0 +1,125 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
img.crop-image{ width:100% }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if not submited %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
|
||||
{% if ratio=="1:1" %}
|
||||
{% set class="width:90px; height:90px;" %}
|
||||
{% elseif ratio=="16:9" %}
|
||||
{% set class="width:160px; height:90px;" %}
|
||||
{% elseif ratio=="16:2" %}
|
||||
{% set class="width:160px; height:20px;" %}
|
||||
{% endif %}
|
||||
|
||||
<div id='preview' style='overflow:hidden; {{class}} position: absolute; top: 0px; right: 10px;'>
|
||||
<img src="{{ appAlias }}uploads/{{type}}/{{ file }}" style='position: relative;' alt='Thumbnail Preview' />
|
||||
</div>
|
||||
|
||||
<div style="width:100%; margin:65px auto 0px auto;">
|
||||
<div id="largeimg" style="width:800px;margin:auto;">
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
function move(data) {
|
||||
$('#form_x').val(data.x);
|
||||
$('#form_y').val(data.y);
|
||||
$('#form_xs').val(data.xScaledToImage);
|
||||
$('#form_ys').val(data.yScaledToImage);
|
||||
|
||||
preview();
|
||||
}
|
||||
|
||||
function resize(data) {
|
||||
$('#form_w').val(data.width);
|
||||
$('#form_h').val(data.height);
|
||||
$('#form_ws').val(data.widthScaledToImage);
|
||||
$('#form_hs').val(data.heightScaledToImage);
|
||||
|
||||
preview();
|
||||
}
|
||||
|
||||
function preview(data) {
|
||||
{% if ratio=="1:1" %}
|
||||
var scaleX = 90 / $('#form_w').val();
|
||||
var scaleY = 90 / $('#form_h').val();
|
||||
{% elseif ratio=="16:9" %}
|
||||
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();
|
||||
{% 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'
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function reportThumb() {
|
||||
{% if reportinput == "refresh" %}
|
||||
window.parent.location.reload();
|
||||
{% elseif reportinput != "none" %}
|
||||
window.parent.$("{{ reportinput }}").val("thumb_{{ file }}");
|
||||
window.parent.$("{{ reportinput }}_img").attr("src","{{ appAlias }}uploads/{{ type }}/thumb_{{ file }}");
|
||||
{% endif %}
|
||||
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodallarge").modal('hide');
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
{% if submited %}
|
||||
reportThumb();
|
||||
{% else %}
|
||||
window.parent.$(".modal-title").html("ETAPE 2 - Découper votre image");
|
||||
|
||||
realheight=$('#largeimg').height();
|
||||
realwidth=$('#largeimg').width();
|
||||
|
||||
if(realheight>505) { $('#largeimg').height(505); $('#largeimg').width("auto") }
|
||||
if($('#largeimg').width() > 868) { $('#largeimg').width(868); $('#largeimg').height("auto") }
|
||||
|
||||
resizeheight=$('#largeimg').height();
|
||||
resizewidth=$('#largeimg').width();
|
||||
|
||||
$('#largeimg').CropSelectJs({
|
||||
imageSrc: "{{ appAlias }}uploads/{{type}}/{{ file }}",
|
||||
selectionResize: function(data) { resize(data); },
|
||||
selectionMove: function(data) { move(data); },
|
||||
});
|
||||
|
||||
{% if ratio=="1:1" %}
|
||||
{% set nbratio=1 %}
|
||||
{% elseif ratio=="16:9" %}
|
||||
{% set nbratio=(16/9) %}
|
||||
{% elseif ratio=="16:2" %}
|
||||
{% set nbratio=(16/2) %}
|
||||
{% endif %}
|
||||
|
||||
$('#largeimg').CropSelectJs('setSelectionAspectRatio',{{nbratio}});
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
124
templates/Form/fields.html.twig
Normal file
124
templates/Form/fields.html.twig
Normal file
@ -0,0 +1,124 @@
|
||||
{% extends 'form_div_layout.html.twig' %}
|
||||
|
||||
{# Voir https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig #}
|
||||
|
||||
{# On commence par simplement ajouter le form-group au row de nos formulaires #}
|
||||
{% block form_row -%}
|
||||
{% set attr = attr|merge({'help': (attr.help|default(true)) }) %}
|
||||
<div class="form-group {{ errors|length > 0 ? 'has-error' : '' }} mt-3">
|
||||
{{- form_label(form) }}
|
||||
{{- form_widget(form) }}
|
||||
{{ form_errors(form) }}
|
||||
</div>
|
||||
{%- endblock form_row %}
|
||||
|
||||
{# Puis on modifie très simplement nos input et textarea les plus importants pour y ajouter le class imposée par Bootstrap 3 #}
|
||||
{% block textarea_widget %}
|
||||
{% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
|
||||
{{ parent() }}
|
||||
{% endblock textarea_widget %}
|
||||
|
||||
{% block form_widget_simple %}
|
||||
{% set attr = attr|merge({'class': attr.class|default('') ~ ' form-control'}) %}
|
||||
{{ parent() }}
|
||||
{% endblock form_widget_simple %}
|
||||
|
||||
{% block form_label -%}
|
||||
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' control-label')|trim}) %}
|
||||
{% if 'checkbox' not in block_prefixes %}
|
||||
{% if label is not same as(false) -%}
|
||||
{% if not compound -%}
|
||||
{% set label_attr = label_attr|merge({'for': id}) %}
|
||||
{%- endif %}
|
||||
{% if required -%}
|
||||
{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' required')|trim}) %}
|
||||
{%- endif %}
|
||||
{% if label is empty -%}
|
||||
{% set label = name|humanize %}
|
||||
{%- endif -%}
|
||||
|
||||
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
|
||||
{{ label|trans({}, translation_domain)|raw }}
|
||||
<span class="mandatory">{% if required %}*{% endif %}</span>
|
||||
</label>
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
{%- endblock form_label %}
|
||||
|
||||
{# et enfin les erreurs #}
|
||||
{% block form_errors %}
|
||||
{% if errors|length > 0 %}
|
||||
{% if attr.help is defined and attr.help %}
|
||||
<p class="help-block text-danger">
|
||||
{% for error in errors %}
|
||||
{{ error.message }}<br />
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% else %}
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for error in errors %}
|
||||
{{ error.message|raw }}<br />
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock form_errors %}
|
||||
|
||||
{# Personnalisation des boutons #}
|
||||
{% block button_widget -%}
|
||||
{% if label is empty -%}
|
||||
{% set label = name|humanize %}
|
||||
{%- endif -%}
|
||||
{% set attr = attr|merge({'class': (attr.class|default('') ~ '')|trim}) %}
|
||||
<button type="{{ type|default('button') }}" {{ block('button_attributes') }}>{{
|
||||
label|trans({}, translation_domain) }}
|
||||
{% if type is defined and type == 'submit' -%}
|
||||
|
||||
{% endif %}
|
||||
</button>
|
||||
{%- endblock button_widget %}
|
||||
|
||||
{# Personnalisation des select #}
|
||||
{% block choice_widget_collapsed %}
|
||||
{% set attr = attr|merge({'class': (attr.class|default('') ~ ' form-control')|trim}) %}
|
||||
{{ parent() }}
|
||||
{%- endblock choice_widget_collapsed %}
|
||||
|
||||
{% block choice_widget %}
|
||||
{% if expanded %}
|
||||
<ul {{ block('widget_container_attributes') }} style="list-style: none; padding-left: 0">
|
||||
{% for child in form %}
|
||||
<li>
|
||||
{{ form_widget(child) }}
|
||||
{{ form_label(child) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{{ parent() }}
|
||||
{% endif %}
|
||||
{% endblock choice_widget %}
|
||||
|
||||
{% block checkbox_widget %}
|
||||
<label for="{{ id }}">
|
||||
<input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
|
||||
{{ label|trans({}, translation_domain) }}</label>
|
||||
{% endblock checkbox_widget %}
|
||||
|
||||
{% block radio_widget %}
|
||||
<label for="{{ id }}">
|
||||
<input type="radio" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} />
|
||||
{{ label|trans({}, translation_domain) }}
|
||||
</label>
|
||||
{% endblock radio_widget %}
|
||||
|
||||
|
||||
|
||||
{% block file_widget %}
|
||||
{% set type = type|default('file') %}
|
||||
<input type="{{ type }}" {{ block('widget_attributes') }} />
|
||||
{% endblock file_widget %}
|
98
templates/Group/edit.html.twig
Executable file
98
templates/Group/edit.html.twig
Executable file
@ -0,0 +1,98 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification Groupe = {{group.label}}
|
||||
{% elseif mode=="submit" %}
|
||||
Création Groupe
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
<a class="btn btn-secondary" href={{ path('app_'~access~'_group') }}>Annuler</a>
|
||||
{% if mode=="update" %}
|
||||
<a class="btn btn-danger float-end" href={{ path('app_'~access~'_group_delete',{id:group.id}) }} data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">Supprimer</a>
|
||||
{% endif %}
|
||||
|
||||
{% 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 mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.label) }}
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
|
||||
</div>
|
||||
|
||||
{% if form.owner is defined %}
|
||||
{{ form_row(form.owner) }}
|
||||
{% endif %}
|
||||
|
||||
{% if form.isworkgroup is defined %}
|
||||
{{ form_row(form.isworkgroup) }}
|
||||
{% endif %}
|
||||
|
||||
<div id="blockisopen">
|
||||
{{ form_row(form.isopen) }}
|
||||
</div>
|
||||
|
||||
{{ form_row(form.description) }}
|
||||
|
||||
{% if form.ldapfilter is defined %}
|
||||
{{ form_row(form.fgassoc) }}
|
||||
{{ form_row(form.ldapfilter) }}
|
||||
{% endif %}
|
||||
|
||||
{% if form.attributes is defined %}
|
||||
{{ form_row(form.fgassoc) }}
|
||||
{{ form_row(form.attributes) }}
|
||||
{% endif %}
|
||||
|
||||
{% if form.email is defined %}
|
||||
{{ form_row(form.email) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
showhide();
|
||||
});
|
||||
|
||||
$(document.body).on("change","#group_isworkgroup",function(){
|
||||
showhide();
|
||||
});
|
||||
|
||||
function showhide() {
|
||||
if($("#group_isworkgroup").val()==0) $("#blockisopen").hide();
|
||||
else $("#blockisopen").show();
|
||||
}
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
47
templates/Group/list.html.twig
Normal file
47
templates/Group/list.html.twig
Normal file
@ -0,0 +1,47 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des Groupes </h1>
|
||||
|
||||
{%if access=="admin" %}
|
||||
<p><a class="btn btn-success" href={{ path('app_'~access~'_group_submit') }}>Ajouter</a></p>
|
||||
{%elseif access=="user" and app.session.get("submitgroup") %}
|
||||
<p><a class="btn btn-success" href={{ path('app_'~access~'_group_submit') }}>Ajouter</a></p>
|
||||
{% endif %}
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Groupes
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%; font-size:11px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th>Groupe</th>
|
||||
<th>Groupe de Travail</th>
|
||||
<th>Ouvert</th>
|
||||
<th>Propriétaire</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</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~'_group_tablelist') }}",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
161
templates/Group/users.html.twig
Normal file
161
templates/Group/users.html.twig
Normal file
@ -0,0 +1,161 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Membres du Groupe = {{ group.label }}</h1>
|
||||
<a class="btn btn-secondary" href={{ path('app_'~access~'_group') }}>Fermer</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs non affectés au groupe
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTablesnotin" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th width="70px" class="no-sort">Avatar</th>
|
||||
<th width="200px">Login</th>
|
||||
<th>Email</th>
|
||||
{% if group.isworkgroup %}
|
||||
<th class="no-sort no-visible">Permissions</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs affectés au groupe
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTablesin" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th width="70px" class="no-sort">Avatar</th>
|
||||
<th width="200px">Login</th>
|
||||
<th>Email</th>
|
||||
{% if group.isworkgroup %}
|
||||
<th class="no-sort">Permissions</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#dataTablesnotin').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]],
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: "{{ path('app_'~access~'_group_usersnotin',{'id':group.id}) }}",
|
||||
});
|
||||
|
||||
$('#dataTablesin').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]],
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: {
|
||||
"url": "{{ path('app_'~access~'_group_usersin',{'id':group.id}) }}",
|
||||
"data": function ( d ) {
|
||||
return $.extend( {}, d, {
|
||||
"isworkgroup": "{{ group.isworkgroup }}"
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
function addUsers(userid) {
|
||||
url="{{ path('app_'~access~'_group_usergroup_add',{userid:"xxx",groupid:group.id}) }}";
|
||||
url=url.replace("xxx",userid);
|
||||
|
||||
$.ajax({
|
||||
rowId: 2,
|
||||
method: "POST",
|
||||
url: url,
|
||||
success: function(data, dataType)
|
||||
{
|
||||
var row=$("#dataTablesnotin").DataTable().row("#user"+userid);
|
||||
data=row.data();
|
||||
var rowNode = row.node();
|
||||
|
||||
$("#dataTablesin").DataTable().row.add(data).draw();
|
||||
row.remove().draw();
|
||||
},
|
||||
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delUsers(userid) {
|
||||
url="{{ path('app_'~access~'_group_usergroup_del',{userid:"xxx",groupid:group.id}) }}";
|
||||
url=url.replace("xxx",userid);
|
||||
|
||||
$.ajax({
|
||||
rowId: 2,
|
||||
method: "POST",
|
||||
url: url,
|
||||
data: "userid="+userid+"&groupid="+{{ group.id }},
|
||||
success: function(data, dataType)
|
||||
{
|
||||
var row=$("#dataTablesin").DataTable().row("#user"+userid);
|
||||
var rowNode = row.node();
|
||||
row.remove().draw();
|
||||
|
||||
$("#dataTablesnotin").DataTable().row.add(rowNode).draw();
|
||||
},
|
||||
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown)
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changeRole(userid) {
|
||||
url="{{ path('app_'~access~'_group_usergroup_changerole',{userid:"xxx",groupid:group.id,roleid:"yyy"}) }}";
|
||||
url=url.replace("xxx",userid);
|
||||
url=url.replace("yyy",$("#roleuser-"+userid).val());
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: url,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
18
templates/Home/docrest.html.twig
Normal file
18
templates/Home/docrest.html.twig
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
body{margin:0px !important;}
|
||||
.title{
|
||||
font-family: var(--fonttitle) !important;
|
||||
}
|
||||
.swagger-ui .info hgroup.main {margin:0px !important;}
|
||||
#swagger-ui.api-platform .info {
|
||||
max-width:100% !important;
|
||||
padding: 10px !important;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{{ render(path("app_swagger_ui")) }}
|
||||
{% endblock %}
|
82
templates/Home/home.html.twig
Normal file
82
templates/Home/home.html.twig
Normal file
@ -0,0 +1,82 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
{% if app.user %}
|
||||
<button class="btn btn-primary" onClick="send()">Send</button>
|
||||
<div id="chat"></div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
{% if app.user %}
|
||||
<script>
|
||||
|
||||
function connect() {
|
||||
channel="chat";
|
||||
id=1;
|
||||
const eventSource = new EventSource("{{ mercure('chat-1')|escape('js') }}");
|
||||
|
||||
eventSource.onopen = function(e) {
|
||||
console.log("== ONOPEN");
|
||||
sendMessage(channel,id,{command: "alive"});
|
||||
};
|
||||
|
||||
eventSource.onclose = function(e) {
|
||||
console.log("== ONCLOSE");
|
||||
sendMessage(channel,id,{command: "dead"});
|
||||
setTimeout(function() { connect(); }, 1000);
|
||||
};
|
||||
|
||||
eventSource.onmessage = event => {
|
||||
data=JSON.parse(event.data);
|
||||
ret=data.ret;
|
||||
console.log("== ONMESSAGE = "+ret.command);
|
||||
console.log(ret);
|
||||
|
||||
switch (ret.command) {
|
||||
case "alive":
|
||||
sendMessage(channel,id,{command: "meto"});
|
||||
break;
|
||||
|
||||
case "meto":
|
||||
break;
|
||||
|
||||
case "dead":
|
||||
break;
|
||||
|
||||
case "push":
|
||||
$("#chat").prepend('<div class="card mt-3"><div class="card-body">'+ret.message+'</div></div>');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$(window).on("beforeunload", function() {
|
||||
sendMessage(channel,id,{command: "dead"});
|
||||
})
|
||||
}
|
||||
connect();
|
||||
|
||||
|
||||
function sendMessage(channel,id,msg) {
|
||||
url="{{path("app_publish",{channel:'xxx',id:'yyy'})}}";
|
||||
url=url.replace('xxx',channel);
|
||||
url=url.replace('yyy',id);
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: url,
|
||||
data: {
|
||||
msg: msg
|
||||
},
|
||||
success: function(data, dataType)
|
||||
{
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function send() {
|
||||
sendMessage('chat',1,{command: "push", message:"pouet"});
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
36
templates/Home/loginLDAP.html.twig
Executable file
36
templates/Home/loginLDAP.html.twig
Executable file
@ -0,0 +1,36 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
label {
|
||||
color: var(--colorftbodylight);
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div style="text-align:center">
|
||||
<img src="{{ appAlias }}uploads/logo/{{ app.session.get('logolight') }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
|
||||
<h1 style="border:none">{{appName}}</h1>
|
||||
{{ form_start(form, {'action': path('app_loginldapcheck'), 'method': 'POST'}) }}
|
||||
<div class="card homecard mb-3" style="width:400px; margin:auto; text-align: left;">
|
||||
<div class="card-body">
|
||||
{{ form_row(form.username) }}
|
||||
{{ form_row(form.password) }}
|
||||
{{ form_row(form.submit) }}
|
||||
</div>
|
||||
</div>
|
||||
{% if appMasteridentity == "SQL"%}
|
||||
<a href="{{path("app_resetpwd01")}}" class="mt-3">Mot de passe oublié ?</a>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#login_username").focus();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
46
templates/Home/loginSQL.html.twig
Executable file
46
templates/Home/loginSQL.html.twig
Executable file
@ -0,0 +1,46 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
label {
|
||||
color: var(--colorftbodylight);
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div style="text-align:center">
|
||||
<img src="{{ appAlias }}uploads/logo/{{ app.session.get('logolight') }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
|
||||
<h1 style="border:none">{{appName}}</h1>
|
||||
<form action="{{ path('app_login') }}" method="post">
|
||||
<div class="card homecard mb-3" style="width:400px; margin:auto">
|
||||
<div class="card-body">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||
{% endif %}
|
||||
|
||||
<label for="username">Login</label>
|
||||
<input type="text" id="username" name="_username" value="{{ last_username }}" class="form-control" style="margin-bottom:15px;" />
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="_password" class="form-control" style="margin-bottom:15px;" />
|
||||
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
||||
|
||||
<input type="submit" name="login" class="btn btn-success form-control" />
|
||||
</div>
|
||||
</div>
|
||||
{% if appMasteridentity == "SQL"%}
|
||||
<a href="{{path("app_resetpwd01")}}" class="mt-3">Mot de passe oublié ?</a>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#username").focus();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
9
templates/Home/mail.html.twig
Normal file
9
templates/Home/mail.html.twig
Normal file
@ -0,0 +1,9 @@
|
||||
{% block subject %}
|
||||
{{ subject }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% autoescape %}
|
||||
<p>{{ body|raw }}</p>
|
||||
{% endautoescape %}
|
||||
{% endblock %}
|
105
templates/Include/sidebaradmin.html.twig
Normal file
105
templates/Include/sidebaradmin.html.twig
Normal file
@ -0,0 +1,105 @@
|
||||
{% set sidebar = [
|
||||
{
|
||||
'id': 'sidebar-config',
|
||||
'icon': 'fa fa-gear',
|
||||
'name' : 'CONFIGURATION',
|
||||
'items' : [
|
||||
{
|
||||
icon: 'fa fa-table',
|
||||
route: 'app_admin_config',
|
||||
name: 'Général',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': 'sidebar-organisation',
|
||||
'icon': 'fa fa-sitemap',
|
||||
'name' : 'ORGANISATION',
|
||||
'items' : [
|
||||
{
|
||||
icon: 'fa fa-building',
|
||||
route: 'app_admin_niveau01',
|
||||
name: appNiveau01label~'s',
|
||||
},
|
||||
{
|
||||
icon: 'fa fa-sitemap',
|
||||
route: 'app_admin_niveau02',
|
||||
name: appNiveau02label~'s',
|
||||
},
|
||||
{
|
||||
icon: 'fa fa-users',
|
||||
route: 'app_admin_group',
|
||||
name: 'Groupes',
|
||||
},
|
||||
{
|
||||
icon: 'fa fa-child',
|
||||
route: 'app_admin_user',
|
||||
name: 'Utilisateurs',
|
||||
},
|
||||
{
|
||||
icon: 'fa fa-edit',
|
||||
route: 'app_admin_registration',
|
||||
name: 'Inscriptions',
|
||||
},
|
||||
{
|
||||
icon: 'fa fa-tasks',
|
||||
route: 'app_admin_whitelist',
|
||||
name: 'Listes Blanche',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': 'sidebar-cron',
|
||||
'icon': 'fa fa-wrench',
|
||||
'name' : 'OUTILS',
|
||||
'items' : [
|
||||
{
|
||||
icon: 'fa fa-cogs',
|
||||
route: 'app_admin_cron',
|
||||
name: 'Cron Jobs',
|
||||
},
|
||||
|
||||
{
|
||||
icon: 'fas fa-star-of-life',
|
||||
route: 'app_rest',
|
||||
name: 'API',
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
%}
|
||||
|
||||
|
||||
<div id="sidebar" class="d-flex flex-column">
|
||||
<ul class="nav nav-pills flex-column mb-auto">
|
||||
{% for section in sidebar %}
|
||||
{% set sectionactive=false %}
|
||||
{% for item in section.items %}
|
||||
{% if item.route in app.request.get('_route') %}
|
||||
{% set sectionactive=true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="nav-link-section">
|
||||
<a class="nav-link nav-link-title" onClick="$('#sidebar .nav-link-items').hide();$(this).next().toggle();">
|
||||
<i class="{{section.icon}}"></i>
|
||||
<span>{{section.name}}</span>
|
||||
</a>
|
||||
<div class="nav-link-items" style="{% if sectionactive %}display:block{%else%}display:none{%endif%}">
|
||||
{% for item in section.items %}
|
||||
{% set toshow=true %}
|
||||
{% if item.route=="app_admin_registration" and (appMasteridentity!="SQL" or appModeregistration is empty) %} {% set toshow=false %} {% endif %}
|
||||
{% if item.route=="app_admin_whitelist" and (appMasteridentity!="SQL" or appModeregistration is empty) %} {% set toshow=false %} {% endif %}
|
||||
|
||||
{%if toshow %}
|
||||
<a class="nav-link nav-link-item {% if item.route in app.request.get('_route') %}active{%endif%}" href="{{path(item.route)}}" title="{{item.name}}">
|
||||
<i class="{{item.icon}} fa-fw"></i>
|
||||
<span>{{item.name}}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
64
templates/Include/sidebarmodo.html.twig
Normal file
64
templates/Include/sidebarmodo.html.twig
Normal file
@ -0,0 +1,64 @@
|
||||
{% set sidebar = [
|
||||
{
|
||||
'id': 'sidebar-organisation',
|
||||
'icon': 'fa fa-sitemap',
|
||||
'name' : 'ORGANISATION',
|
||||
'items' : [
|
||||
{
|
||||
icon: 'fa fa-sitemap',
|
||||
route: 'app_modo_niveau02',
|
||||
name: appNiveau02label~'s',
|
||||
},
|
||||
{
|
||||
icon: 'fa fa-users',
|
||||
route: 'app_modo_group',
|
||||
name: 'Groupes',
|
||||
},
|
||||
{
|
||||
icon: 'fa fa-child',
|
||||
route: 'app_modo_user',
|
||||
name: 'Utilisateurs',
|
||||
},
|
||||
{
|
||||
icon: 'fa fa-edit',
|
||||
route: 'app_modo_registration',
|
||||
name: 'Inscriptions',
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
%}
|
||||
|
||||
|
||||
<div id="sidebar" class="d-flex flex-column">
|
||||
<ul class="nav nav-pills flex-column mb-auto">
|
||||
{% for section in sidebar %}
|
||||
{% set sectionactive=false %}
|
||||
{% for item in section.items %}
|
||||
{% if item.route in app.request.get('_route') %}
|
||||
{% set sectionactive=true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="nav-link-section">
|
||||
<a class="nav-link nav-link-title" onClick="$('#sidebar .nav-link-items').hide();$(this).next().toggle();">
|
||||
<i class="{{section.icon}}"></i>
|
||||
<span>{{section.name}}</span>
|
||||
</a>
|
||||
<div class="nav-link-items" style="{% if sectionactive %}display:block{%else%}display:none{%endif%}">
|
||||
{% for item in section.items %}
|
||||
{% set toshow=true %}
|
||||
{% if item.route=="app_modo_registration" and (appMasteridentity!="SQL" or appModeregistration is empty) %} {% set toshow=false %} {% endif %}
|
||||
|
||||
{%if toshow %}
|
||||
<a class="nav-link nav-link-item {% if item.route in app.request.get('_route') %}active{%endif%}" href="{{path(item.route)}}" title="{{item.name}}">
|
||||
<i class="{{item.icon}} fa-fw"></i>
|
||||
<span>{{item.name}}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
24
templates/Include/style.css.twig
Normal file
24
templates/Include/style.css.twig
Normal file
@ -0,0 +1,24 @@
|
||||
<style>
|
||||
:root{
|
||||
--colorbgbodylight: {{ app.session.get('colorbgbodylight')|raw }};
|
||||
--colorbgbodydark: {{ app.session.get('colorbgbodydark')|raw }};
|
||||
--colorfttitlelight: {{ app.session.get('colorfttitlelight')|raw }};
|
||||
--colorfttitledark: {{ app.session.get('colorfttitledark')|raw }};
|
||||
--colorftbodylight: {{ app.session.get('colorftbodylight')|raw }};
|
||||
--colorftbodydark: {{ app.session.get('colorftbodydark')|raw }};
|
||||
--fontbody: "{{ app.session.get('fontbody')|raw }}";
|
||||
--fonttitle: "{{ app.session.get('fonttitle')|raw }}";
|
||||
--fontsizeh1: {{ app.session.get('fontsizeh1')~"px"|raw }};
|
||||
--fontsizeh2: {{ app.session.get('fontsizeh2')~"px"|raw }};
|
||||
--fontsizeh3: {{ app.session.get('fontsizeh3')~"px"|raw }};
|
||||
--fontsizeh4: {{ app.session.get('fontsizeh4')~"px"|raw }};
|
||||
--lineheighth1:{{app.session.get("fontsizeh1")-10}}px;
|
||||
|
||||
--colorbgbodylight-darker: {{ app.session.get('colorbgbodylight-darker')|raw }};
|
||||
--colorbgbodydark-darker: {{ app.session.get('colorbgbodydark-darker')|raw }};
|
||||
--colorfttitlelight-darker: {{ app.session.get('colorfttitlelight-darker')|raw }};
|
||||
|
||||
--header: url("\{{ appAlias }}\uploads\header\{{ app.session.get('headerimage')|raw }}");
|
||||
--colorbgbodydark-rgb: {{ app.session.get('colorbgbodydark-rgb')|raw }};
|
||||
}
|
||||
</style>
|
120
templates/Niveau01/edit.html.twig
Executable file
120
templates/Niveau01/edit.html.twig
Executable file
@ -0,0 +1,120 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification {{ appNiveau01label }} = {{niveau01.label}}
|
||||
{% elseif mode=="submit" %}
|
||||
Création {{ appNiveau01label }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
<a class="btn btn-secondary" href={{ path('app_admin_niveau01') }}>Annuler</a>
|
||||
{% if mode=="update" %}
|
||||
<a class="btn btn-danger float-end" href={{ path('app_admin_niveau01_delete',{id:niveau01.id}) }} data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">Supprimer</a>
|
||||
{% endif %}
|
||||
|
||||
{% 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 mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.label) }}
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
|
||||
</div>
|
||||
|
||||
{% if form.ldapfilter is defined %}
|
||||
{{ form_row(form.fgassocldap) }}
|
||||
|
||||
<div id="block_ldapfilter">
|
||||
{{ form_row(form.ldapfilter) }}
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Exemple = (cn=monniveau01)<br>
|
||||
La recherche pour retrouver l'entrée annuaire se fera via la branche présente en parametre d'environnement LDAP_BASENIVEAU01<br>
|
||||
On rattachera les utilisateurs membres de cette entrée via le parametre d'environnement LDAP_GROUPMEMBER<br>
|
||||
Si aucun niveau01 est trouvé pour un utilisateur il sera rattaché au niveau01 avec l'id -1<br>
|
||||
Si un utilisateur est membre de plusieurs niveau01 annuaire, il sera rattaché au dernier niveau01 trouvé dans l'annuaire
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form.attributes is defined %}
|
||||
{{ form_row(form.fgassocsso) }}
|
||||
|
||||
<div id="block_attributs">
|
||||
{{ form_row(form.attributes) }}
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Exemple = {"user_groups" : "monniveau01"}<br>
|
||||
user_groups étant le parametre d'environnement CAS_GROUP
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$('document').ready(function(){
|
||||
fgaff=($("#niveau01_ldapfilter").val()!="");
|
||||
if(!fgaff) {
|
||||
$("#block_ldapfilter").hide();
|
||||
$("#niveau01_fgassocldap").val(0);
|
||||
}
|
||||
|
||||
$( "#niveau01_fgassocldap").change(function() {
|
||||
|
||||
if($("#niveau01_fgassocldap").val()==0) {
|
||||
$("#block_ldapfilter").hide();
|
||||
$("#niveau01_ldapfilter").val("");
|
||||
}
|
||||
else {
|
||||
$("#block_ldapfilter").show();
|
||||
$("#label_niveau01_ldapfilter").show();
|
||||
}
|
||||
});
|
||||
|
||||
fgaff=($("#niveau01_attributes").val()!="");
|
||||
if(!fgaff) {
|
||||
$("#block_attributs").hide();
|
||||
$("#niveau01_fgassocsso").val(0);
|
||||
}
|
||||
|
||||
$( "#niveau01_fgassocsso").change(function() {
|
||||
|
||||
if($("#niveau01_fgassocsso").val()==0) {
|
||||
$("#block_attributs").hide();
|
||||
$("#niveau01_attributes").val("");
|
||||
}
|
||||
else {
|
||||
$("#block_attributs").show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
47
templates/Niveau01/list.html.twig
Normal file
47
templates/Niveau01/list.html.twig
Normal file
@ -0,0 +1,47 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des {{ appNiveau01label }}s </h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_admin_niveau01_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des {{ appNiveau01label }}s
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%; font-size:11px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th>{{appNiveau01label}}</th>
|
||||
{% if appMasteridentity=="LDAP" or appSynchro=="LDAP2NINE" %}
|
||||
<th class="no-sort">Filtre LDAP</th>
|
||||
{% endif %}
|
||||
|
||||
{% if appMasteridentity=="SSO" %}
|
||||
<th class="no-sort">Attributs SSO</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</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_admin_niveau01_tablelist') }}",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
60
templates/Niveau02/edit.html.twig
Executable file
60
templates/Niveau02/edit.html.twig
Executable file
@ -0,0 +1,60 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification {{ appNiveau02label }} = {{niveau02.label}}
|
||||
{% elseif mode=="submit" %}
|
||||
Création {{ appNiveau02label }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
<a class="btn btn-secondary" href={{ path('app_'~access~'_niveau02') }}>Annuler</a>
|
||||
{% if mode=="update" %}
|
||||
<a class="btn btn-danger float-end" href={{ path('app_'~access~'_niveau02_delete',{id:niveau02.id}) }} data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">Supprimer</a>
|
||||
{% endif %}
|
||||
|
||||
{% 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 mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.niveau01) }}
|
||||
|
||||
{{ form_row(form.label) }}
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
|
||||
</div>
|
||||
|
||||
{% if form.ldapfilter is defined %}
|
||||
{{ form_row(form.ldapfilter) }}
|
||||
{% endif %}
|
||||
|
||||
{% if form.attributes is defined %}
|
||||
{{ form_row(form.attributes) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
41
templates/Niveau02/list.html.twig
Normal file
41
templates/Niveau02/list.html.twig
Normal file
@ -0,0 +1,41 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des {{ appNiveau02label }}s </h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_'~access~'_niveau02_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des {{ appNiveau02label }}s
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%; font-size:11px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th>{{appNiveau01label}}</th>
|
||||
<th>{{appNiveau02label}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</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~'_niveau02_tablelist') }}",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
222
templates/Registration/edit.html.twig
Executable file
222
templates/Registration/edit.html.twig
Executable file
@ -0,0 +1,222 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
.captcha_image {
|
||||
display:block;
|
||||
}
|
||||
#alertpassword input,#alertpassword label { display:none }
|
||||
#alertpassword .form-group {margin:0px !important }
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% if appModeregistration!="none" %}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Confirmation à l'Utilisateur = {{ registration.username }}
|
||||
{% elseif mode=="submit" %}
|
||||
Inscription
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
{% if mode=="update" %}
|
||||
{{ form_widget(form.save) }}
|
||||
<a class="btn btn-secondary" href="mailto:{{registration.email}}?subject= {{app.session.get('appname')}} : à propos de votre inscription">Envoyer un mail</a>
|
||||
<a class="btn btn-secondary" href={{ path('app_'~access~'_registration') }}>Annuler</a>
|
||||
<a class="btn btn-danger float-end" href={{ path('app_'~access~'_registration_delete',{id:registration.id}) }} data-method="delete" 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 | raw }}<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 | raw }}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if mode=="send" %}
|
||||
<div class='alert alert-info' style='margin: 5px 0px'>
|
||||
<strong>Information</strong><br>
|
||||
Cette action permet de générer une nouvelle clé de validation et de renouveller la date d'expiration de cette clé.<br>
|
||||
Un email sera envoyé à l'utilisateur
|
||||
</div>
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
{% if mode=="update" %}
|
||||
<div class="col-sm-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-key fa-fw"></i> Notes Administrateur
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_widget(form.note) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%endif%}
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-key fa-fw"></i> Connexion
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.username) }}
|
||||
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Formatez votre login sous la forme prenom.nom dans la mesure du possible<br>
|
||||
Taille minimum = 5 caractères<br>
|
||||
Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _<br>
|
||||
</div>
|
||||
|
||||
{% if form.password is defined %}
|
||||
{{ form_row(form.password) }}
|
||||
<div id="alertpassword">{{ form_row(form.passwordplain) }}</div>
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Le mot de passe doit comporter au moins 8 caractères, avec obligatoirement des lettres, chiffres et caractères spéciaux.
|
||||
</div>
|
||||
|
||||
{% if form.captcha is defined %}
|
||||
{{ form_row(form.captcha) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Motivations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.motivation) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil fa-fw"></i> Informations
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.niveau01) }}
|
||||
{{ form_row(form.niveau02) }}
|
||||
{{ form_row(form.firstname) }}
|
||||
{{ form_row(form.lastname) }}
|
||||
{{ form_row(form.email) }}
|
||||
<div class='alert alert-info alert-email' style='display:none; font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Votre mail ne fait pas partie des mails professonniels pré-inscrits dans {{app.session.get("appname")}}.<br>
|
||||
S'il s'agit de votre mail professionnel vous devez compléter le formulaire "Motivations" pour que l'administrateur de {{app.session.get("appname")}} valide votre demannde d'inscription.
|
||||
</div>
|
||||
{{ form_row(form.isvisible) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-sitemap fa-fw"></i> Organisation
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.job) }}
|
||||
{{ form_row(form.position) }}
|
||||
{{ form_row(form.postaladress) }}
|
||||
{{ form_row(form.telephonenumber) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document.body).on("change","#registration_niveau01",function(){
|
||||
$("#registration_niveau02").empty();
|
||||
select2niveau02();
|
||||
});
|
||||
|
||||
function select2niveau02() {
|
||||
$('#registration_niveau02').select2({
|
||||
theme: 'bootstrap4',
|
||||
language: "fr",
|
||||
ajax: {
|
||||
data: function (params) {
|
||||
var query = {
|
||||
niveau01: $("#registration_niveau01").val(),
|
||||
}
|
||||
return query;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document.body).on("focusout","#registration_email",function(){
|
||||
console.log("pouet");
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_whitelist_is') }}",
|
||||
data: {
|
||||
email:$("#registration_email").val(),
|
||||
},
|
||||
success: function(data) {
|
||||
if(data=="KO") {
|
||||
$("#registration_motivation").attr("required","required");
|
||||
$(".alert-email").show();
|
||||
$("label[for='registration_motivation']").text("Motivation *");
|
||||
}
|
||||
else {
|
||||
$("#registration_motivation").removeAttr("required");
|
||||
$(".alert-email").hide();
|
||||
$("label[for='registration_motivation']").text("Motivation");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function hideshow() {
|
||||
|
||||
$('#registration_niveau02').select2({
|
||||
theme: 'bootstrap4',
|
||||
language: "fr",
|
||||
ajax: {
|
||||
data: function (params) {
|
||||
var query = {
|
||||
niveau01: $("#registration_niveau01").val(),
|
||||
}
|
||||
return query;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
if(!$("#paneloption").find(".card-body").find("label").length) $("#paneloption").hide();
|
||||
hideshow();
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
33
templates/Registration/info.html.twig
Normal file
33
templates/Registration/info.html.twig
Normal file
@ -0,0 +1,33 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Inscriptions</h1>
|
||||
|
||||
<div style="padding-top:50px;max-width: 1000px; margin:auto; font-size:18px;">
|
||||
<div class='alert alert-{{ mode }}' style='margin: 5px 0px'>
|
||||
{% autoescape %}
|
||||
<p>{{ info|raw }}</p>
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
|
||||
<script>
|
||||
{% if mode=="success" %}
|
||||
$(document).ready(function() {
|
||||
// Redirection vers la mire d'authentification
|
||||
setTimeout(function(){
|
||||
{% if redirectto is defined and redirectto is not null %}
|
||||
window.location.href="{{ redirectto }}";
|
||||
{% else %}
|
||||
window.location.href="{{ path("app_login") }}";
|
||||
{% endif %}
|
||||
}, 6000);
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
44
templates/Registration/list.html.twig
Normal file
44
templates/Registration/list.html.twig
Normal file
@ -0,0 +1,44 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des Inscriptions</h1>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Inscription
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%; font-size:11px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th width="200px">Login</th>
|
||||
<th>Email</th>
|
||||
<th>{{ appNiveau01label }}</th>
|
||||
<th>Statut</th>
|
||||
<th>Expire le</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~'_registration_tablelist') }}",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
54
templates/Registration/resetpwd01.html.twig
Executable file
54
templates/Registration/resetpwd01.html.twig
Executable file
@ -0,0 +1,54 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
Réinitialisation du mot de passe
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
{% if form.captcha is defined %}
|
||||
{{ form_label(form.captcha) }}
|
||||
{{ form_widget(form.captcha) }}
|
||||
{% 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-key fa-fw"></i> Etape 01
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_label(form.email) }}
|
||||
{{ form_widget(form.email) }}
|
||||
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top: -10px;'>
|
||||
Veuillez saisir l'adresse mail que vous avez utilisé pour votre compte.<br>
|
||||
Vous recevrez un lien permettant de réinitialiser votre mot de passe.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
62
templates/Registration/resetpwd02.html.twig
Executable file
62
templates/Registration/resetpwd02.html.twig
Executable file
@ -0,0 +1,62 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
.captcha_image {
|
||||
display:block;
|
||||
}
|
||||
#alertpassword input,#alertpassword label { display:none }
|
||||
#alertpassword .form-group {margin:0px !important }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
Réinitialisation du mot de passe
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
{% if form.captcha is defined %}
|
||||
{{ form_label(form.captcha) }}
|
||||
{{ form_widget(form.captcha) }}
|
||||
{% 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-key fa-fw"></i> Etape 02
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.password) }}
|
||||
<div id="alertpassword">{{ form_row(form.passwordplain) }}</div>
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Le mot de passe doit comporter au moins 8 caractères, avec obligatoirement des lettres, chiffres et caractères spéciaux.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
482
templates/User/edit.html.twig
Executable file
482
templates/User/edit.html.twig
Executable file
@ -0,0 +1,482 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
#alertpassword input,#alertpassword label { display:none }
|
||||
#alertpassword .form-group {margin:0px !important }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if access=="admin" or access=="modo" %}
|
||||
{% if mode=="update" %}
|
||||
Modification Utilisateur = {{ user.username}}
|
||||
{% else %}
|
||||
Création Utilisateur
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Profil
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
{% if access=="admin" or access=="modo" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_'~access~'_user') }}>Annuler</a>
|
||||
{% if mode=="update" %}
|
||||
{% if access=="admin" %}
|
||||
<a class="btn btn-danger float-end" href={{ path('app_'~access~'_user_delete',{id:user.id}) }} data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">Supprimer</a>
|
||||
{% else %}
|
||||
{% if not user.hasrole("ROLE_ADMIN") and not user.hasrole("ROLE_MODO") %}
|
||||
<a class="btn btn-danger float-end" href={{ path('app_'~access~'_user_delete',{id:user.id}) }} data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">Supprimer</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a class="btn btn-secondary" href={{ path('app_home') }}>Annuler</a>
|
||||
{% endif %}
|
||||
|
||||
{% 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 | raw }}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<br>
|
||||
{% 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 | raw }}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-sm-12">
|
||||
<div style="width:90px; margin:auto;">
|
||||
{% set avatar= "noavatar.png" %}
|
||||
{% if user.avatar %}
|
||||
{% set avatar= user.avatar %}
|
||||
{% endif %}
|
||||
<img id="user_avatar_img" src="{{ avatar|urlavatar }}" style="max-width:90px;background-color:var(--colorbgbodydark);">
|
||||
{{ form_widget(form.avatar) }}
|
||||
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Avatar" data-modalurl="{{ path('app_user_crop01', {"type": "avatar", "reportinput": "#user_avatar" }) }}" title='Ajouter un Avatar'>Modifier</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-sm-6">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-key fa-fw"></i> Connexion
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.username) }}
|
||||
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Formatez votre login sous la forme prenom.nom dans la mesure du possible<br>
|
||||
Taille minimum = 5 caractères<br>
|
||||
Caractères interdits = accent, espace, caractères spéciaux sauf @ . - _<br>
|
||||
</div>
|
||||
|
||||
{% if form.password is defined %}
|
||||
{{ form_row(form.password) }}
|
||||
<div id="alertpassword">{{ form_row(form.passwordplain) }}</div>
|
||||
<div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top:-2px; border-radius:0px 0px 0.25rem 0.25rem'>
|
||||
Le mot de passe doit comporter au moins 8 caractères, avec obligatoirement des lettres, chiffres et caractères spéciaux.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if form.roles is defined %}
|
||||
{{ form_row(form.roles) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if access=="admin" %}
|
||||
<div id="cardmodos" class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-users fa-fw"></i> {{ appNiveau01label }}s Modérés
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<bouton class="btn btn-success" data-bs-toggle="modal" data-bs-target="#modomodal" title='Ajouter'>Ajouter</bouton>
|
||||
<br><br>
|
||||
{% endif %}
|
||||
|
||||
{{ form_widget(form.linkmodos) }}
|
||||
|
||||
<div class="dataTable_wrapper">
|
||||
<table id="tbllinkmodo" class="table table-striped table-bordered table-hover dataTable" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px">Action</th>
|
||||
<th>{{ appNiveau01label }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for modo in user.modos %}
|
||||
<tr id="linkmodo{{ modo.niveau01.id }}">
|
||||
<td><a style="cursor:pointer"><i class="fa fa-trash fa-fw" onclick="removeLinkModo({{ modo.niveau01.id }})"></i></a></td>
|
||||
<td>
|
||||
{{ modo.niveau01.label }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil fa-fw"></i> Motivations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.motivation) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if access=="admin" or access=="modo"%}
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-key fa-fw"></i> Notes Administrateur / Modérateur
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_widget(form.note) }}
|
||||
</div>
|
||||
</div>
|
||||
{%endif%}
|
||||
|
||||
<div id="panelvisite" class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-user fa-fw"></i> Visite
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.visitedate) }}
|
||||
{{ form_row(form.visitecpt) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.niveau01) }}
|
||||
{{ form_row(form.niveau02) }}
|
||||
{{ form_row(form.firstname) }}
|
||||
{{ form_row(form.lastname) }}
|
||||
{{ form_row(form.email) }}
|
||||
{{ form_row(form.isvisible) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-users fa-fw"></i> Groupes
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<bouton class="btn btn-success" data-bs-toggle="modal" data-bs-target="#groupmodal" title='Ajouter'>Inscription à un Groupe</bouton>
|
||||
<br><br>
|
||||
|
||||
{{ form_widget(form.linkgroups) }}
|
||||
|
||||
<table id="tbllinkgroup" class="table table-striped table-bordered table-hover dataTable" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px">Action</th>
|
||||
<th>Groupe</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for usergroup in user.groups %}
|
||||
<tr id="linkgroup{{ usergroup.group.id }}">
|
||||
{% set canleave = true %}
|
||||
{% if usergroup.group.id<0 or usergroup.group.owner==user %}
|
||||
{% set canleave = false %}
|
||||
{% elseif access!="admin" and access!="modo"%}
|
||||
{% if not usergroup.group.isworkgroup and not usergroup.group.isopen %}
|
||||
{% set canleave = false %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if canleave %}
|
||||
<td><a style="cursor:pointer" title="Se Désinscrire"><i class="fa fa-sign-out-alt fa-fw" onclick="removeLinkGroup({{ usergroup.group.id }})"></i></a></td>
|
||||
{% else %}
|
||||
<td></td>
|
||||
{% endif %}
|
||||
|
||||
<td>
|
||||
{{ usergroup.group.label }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-sitemap fa-fw"></i> Organisation
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.job) }}
|
||||
{{ form_row(form.position) }}
|
||||
{{ form_row(form.postaladress) }}
|
||||
{{ form_row(form.telephonenumber) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="groupmodal" class="modal fade bs-item-modal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">AJOUTER UN GROUPE</h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<table id="tbllistgroup" class="table table-striped table-bordered table-hover" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th style="width:500px" >Groupe</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% set listidgroup = [] %}
|
||||
{% for usergroup in user.groups %}
|
||||
{% set listidgroup = listidgroup|merge([usergroup.group.id]) %}
|
||||
{% endfor %}
|
||||
|
||||
{% for group in listgroups %}
|
||||
{% if group.id in listidgroup %}
|
||||
{% set style = "display:none;" %}
|
||||
{% else %}
|
||||
{% set style = "" %}
|
||||
{% endif %}
|
||||
|
||||
<tr id="listgroup{{ group.id }}" style="{{ style }}">
|
||||
<td><a style="cursor:pointer"><i class="fa fa-plus fa-fw" onclick="addLinkGroup({{ group.id }})"></i></a></td>
|
||||
<td id="listgrouplabel{{ group.id }}">
|
||||
{{ group.label }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="modomodal" class="modal fade bs-item-modal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">AJOUTER UN {{ appNiveau01label|upper }}</h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<table id="tbllistmodo" class="table table-striped table-bordered table-hover" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th style="width:500px" >{{ appNiveau01label }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% set listidmodo = [] %}
|
||||
{% for usermodo in user.modos %}
|
||||
{% set listidmodo = listidmodo|merge([usermodo.niveau01.id]) %}
|
||||
{% endfor %}
|
||||
|
||||
{% for niveau01 in listmodos %}
|
||||
{% if niveau01.id in listidmodo %}
|
||||
{% set style = "display:none;" %}
|
||||
{% else %}
|
||||
{% set style = "" %}
|
||||
{% endif %}
|
||||
|
||||
<tr id="listmodo{{ niveau01.id }}" style="{{ style }}">
|
||||
<td><a style="cursor:pointer"><i class="fa fa-plus fa-fw" onclick="addLinkModo({{ niveau01.id }})"></i></a></td>
|
||||
<td id="listmodolabel{{ niveau01.id }}">
|
||||
{{ niveau01.label }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#user_password_first").val("");
|
||||
select2niveau02();
|
||||
|
||||
{% if access=="modo" %}
|
||||
$("label[for='user_roles_0']").hide();
|
||||
$("label[for='user_roles_1']").hide();
|
||||
{% endif %}
|
||||
|
||||
});
|
||||
|
||||
$(document.body).on("change","#user_niveau01",function(){
|
||||
$("#user_niveau02").empty();
|
||||
select2niveau02();
|
||||
});
|
||||
|
||||
function select2niveau02() {
|
||||
$('#user_niveau02').select2({
|
||||
theme: 'bootstrap4',
|
||||
language: "fr",
|
||||
ajax: {
|
||||
data: function (params) {
|
||||
var query = {
|
||||
niveau01: $("#user_niveau01").val(),
|
||||
}
|
||||
return query;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// Init Group
|
||||
var linkgroups="";
|
||||
{% for usergroup in user.groups %}
|
||||
linkgroups+={{ usergroup.group.id }}+",";
|
||||
{% endfor %}
|
||||
$("#user_linkgroups").val(linkgroups);
|
||||
|
||||
// Init Modo
|
||||
var linkmodos="";
|
||||
{% for modo in user.modos %}
|
||||
linkmodos+={{ modo.niveau01.id }}+",";
|
||||
{% endfor %}
|
||||
$("#user_linkmodos").val(linkmodos);
|
||||
|
||||
|
||||
$('#tbllistgroup').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
processing: true,
|
||||
order: [[ 1, "asc" ]],
|
||||
});
|
||||
|
||||
$('#tbllistmodo').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
processing: true,
|
||||
order: [[ 1, "asc" ]],
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function removeLinkGroup(id) {
|
||||
if (confirm("Désirez vous vraiment vous désinscrire de ce groupe ?")) {
|
||||
// On supprime la ligne du tableau
|
||||
$("#linkgroup"+id).remove();
|
||||
|
||||
// On supprime l'id de la liste
|
||||
$("#user_linkgroups").val($("#user_linkgroups").val().replace(id+",",""));
|
||||
|
||||
// On rend visible la ligne de liste complète
|
||||
$("#listgroup"+id).show();
|
||||
}
|
||||
}
|
||||
|
||||
function addLinkGroup(id) {
|
||||
// On cache la ligne du tableau
|
||||
$("#listgroup"+id).hide();
|
||||
|
||||
// On ajoute l'id de la liste
|
||||
$("#user_linkgroups").val($("#user_linkgroups").val()+id+",");
|
||||
|
||||
// On ajoute la ligne de liste des liens
|
||||
html ="<tr id='linkgroup"+id+"'>";
|
||||
html+="<td><a style='cursor:pointer' title='Se Désinscrire'><i class='fa fa-sign-out fa-fw' onclick='removeLinkGroup("+id+")'></i></a></td>";
|
||||
html+="<td>"+$("#listgrouplabel"+id).html()+"</td>";
|
||||
html+="</tr>";
|
||||
|
||||
$('#tbllinkgroup .dataTables_empty').remove();
|
||||
$('#tbllinkgroup > tbody').append(html);
|
||||
|
||||
// On ferme automatiquement la modal s'il n'y a plus de ligne dans le tableau
|
||||
if($("#tbllistgroup tr:visible").length==1) {
|
||||
$("#groupmodal").modal('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function removeLinkModo(id) {
|
||||
// On supprime la ligne du tableau
|
||||
$("#linkmodo"+id).remove();
|
||||
|
||||
// On supprime l'id de la liste
|
||||
$("#user_linkmodos").val($("#user_linkmodos").val().replace(id+",",""));
|
||||
|
||||
// On rend visible la ligne de liste complète
|
||||
$("#listmodo"+id).show();
|
||||
}
|
||||
|
||||
function addLinkModo(id) {
|
||||
// On cache la ligne du tableau
|
||||
$("#listmodo"+id).hide();
|
||||
|
||||
// On ajoute l'id de la liste
|
||||
$("#user_linkmodos").val($("#user_linkmodos").val()+id+",");
|
||||
|
||||
// On ajoute la ligne de liste des liens
|
||||
html ="<tr id='linkmodo"+id+"'>";
|
||||
html+="<td><a style='cursor:pointer'><i class='fa fa-trash fa-fw' onclick='removeLinkModo("+id+")'></i></a></td>";
|
||||
html+="<td>"+$("#listmodolabel"+id).html()+"</td>";
|
||||
html+="</tr>";
|
||||
|
||||
$('#tbllinkmodo .dataTables_empty').remove();
|
||||
$('#tbllinkmodo > tbody').append(html);
|
||||
|
||||
// On ferme automatiquement la modal s'il n'y a plus de ligne dans le tableau
|
||||
if($("#tbllistmodo tr:visible").length==1) {
|
||||
$("#modomodal").modal('hide');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
64
templates/User/list.html.twig
Normal file
64
templates/User/list.html.twig
Normal file
@ -0,0 +1,64 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{% if access=="admin" or access=="modo" %}
|
||||
<h1 class="page-header">Gestion des Utilisateurs</h1>
|
||||
{% if appMasteridentity=="SQL" or not appSynchroPurgeUser %}
|
||||
<a class="btn btn-success" href={{ path('app_'~access~'_user_submit') }}>Ajouter</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%; font-size:11px;">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if access=="admin" or access=="modo"%}
|
||||
<th class="no-sort">Action</th>
|
||||
{% endif %}
|
||||
|
||||
<th class="no-sort">Avatar</th>
|
||||
<th>Login</th>
|
||||
<th>Nom</th>
|
||||
<th>Prénom</th>
|
||||
<th>Email</th>
|
||||
<th>Téléphone</th>
|
||||
<th>{{ appNiveau01label }}</th>
|
||||
<th class="no-sort">{{ appNiveau02label }}</th>
|
||||
<th>Visite</th>
|
||||
<th>Rôle</th>
|
||||
<th class="no-sort">Groupes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
{% if access=="admin" %}
|
||||
order: [[ 2, "asc" ]],
|
||||
ajax: "{{ path('app_admin_user_tablelist') }}",
|
||||
{% elseif access=="modo" %}
|
||||
order: [[ 2, "asc" ]],
|
||||
ajax: "{{ path('app_modo_user_tablelist') }}",
|
||||
{% else %}
|
||||
order: [[ 1, "asc" ]],
|
||||
ajax: "{{ path('app_user_user_tablelist') }}",
|
||||
{% endif %}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
54
templates/Whitelist/edit.html.twig
Executable file
54
templates/Whitelist/edit.html.twig
Executable file
@ -0,0 +1,54 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification Liste Blanche = {{ whitelist.label }}
|
||||
{% elseif mode=="submit" %}
|
||||
Création Liste Blanche
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
<a class="btn btn-secondary" href={{ path('app_admin_whitelist') }}>Annuler</a>
|
||||
{% if mode=="update" %}
|
||||
<a class="btn btn-danger float-end" href={{ path('app_admin_whitelist_delete',{id:whitelist.id}) }} data-method="delete" 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_label(form.label) }}
|
||||
{{ form_widget(form.label) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
{% endblock %}
|
42
templates/Whitelist/list.html.twig
Normal file
42
templates/Whitelist/list.html.twig
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des Listes Blanche</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_admin_whitelist_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Listes Blanche
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="dataTable_wrapper">
|
||||
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%; font-size:11px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="70px" class="no-sort">Action</th>
|
||||
<th>Label</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_admin_whitelist_tablelist') }}",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
194
templates/base.html.twig
Normal file
194
templates/base.html.twig
Normal file
@ -0,0 +1,194 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
|
||||
<title>{% block title %}{{app.session.get("appname")}}{% endblock %}</title>
|
||||
<link rel="shortcut icon" href="{{ appAlias }}uploads/logo/{{app.session.get("logolight")}}" />
|
||||
|
||||
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{% block encoretags %}{% endblock encoretags %}
|
||||
<script src="{{ asset('bundles/tetranzselect2entity/js/select2entity.js') }}"></script>
|
||||
|
||||
{{ include('Include/style.css.twig') }}
|
||||
{% block localstyle %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% if (useheader is defined and useheader) or (usemenu is defined and usemenu) %}
|
||||
<div class="header sticky-top">
|
||||
{% if useheader is defined and useheader and (app.session.get("fgheader") or not app.user) %}
|
||||
<div id="header" class="d-flex align-items-center" style="height:{{app.session.get("headerheight")}}px; background-image: linear-gradient(90deg,rgba(var(--colorbgbodydark-rgb),1),rgba(var(--colorbgbodydark-rgb),0.1)),url({{appAlias}}{{app.session.get("headerimage")}});background-size:cover">
|
||||
<a href="{{ path('app_home')}}">
|
||||
<img src="{{ appAlias }}uploads/logo/{{app.session.get("logodark")}}" style="height:{{app.session.get("headerheight")-20}}px;margin-left:10px; max-height:120px;">
|
||||
</a>
|
||||
|
||||
<h1 class="flex-grow-1">
|
||||
<a href="{{ path('app_home')}}">
|
||||
{{app.session.get("appname")}}
|
||||
</a>
|
||||
<br>
|
||||
<small>{{app.session.get("appsubname")}}</small>
|
||||
</h1>
|
||||
|
||||
<div class="pe-3">
|
||||
<nav class="nav">
|
||||
{% if app.user %}
|
||||
<a class="nav-link" href="{{path("app_user_user")}}" title="Mon Profil">
|
||||
<img src="{{app.user.avatar|urlavatar}}" class="avatar" style="width:35px;height:35px;">
|
||||
</a>
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<a class="nav-link" href="{{path("app_admin_home")}}" title="Console d'Administration"><i class="fa fa-cog fa-2x"></i></a>
|
||||
{% elseif is_granted('ROLE_MODO') %}
|
||||
<a class="nav-link" href="{{path("app_modo_home")}}" title="Console d'Administration"><i class="fa fa-cog fa-2x"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if app.session.get("showannuaire") %}
|
||||
<a class="nav-link" href="{{path("app_user_users")}}" title="Annuaire des Utilisateurs"><i class="fas fa-address-book fa-2x"></i></a>
|
||||
{% endif %}
|
||||
|
||||
<a class="nav-link" href="{{path("app_user_group")}}" title="Gestion des Groupes de Travail"><i class="fas fa-users fa-2x"></i></a>
|
||||
|
||||
<a id="switchHeader" class="nav-link" onclick="switchHeader()" title="Cacher / Afficher Bannière"><i class="fa fa-chevron-up fa-2x"></i></a>
|
||||
<a class="nav-link" href="{{path("app_logout")}}" title="Déconnexion"><i class="fa fa-sign-out-alt fa-2x"></i></a>
|
||||
{% else %}
|
||||
{% if appModeregistration!="none" and appModeregistration!="" and appMasteridentity=="SQL"%}
|
||||
<a class="nav-link" href="{{ path('app_registration') }}" title="Inscription"><i class="fa fa-user-plus fa-2x fa-fw"></i></a>
|
||||
{% endif %}
|
||||
<a class="nav-link" href="{{path("app_login")}}" title="Connexion"><i class="fa fa-sign-in-alt fa-2x"></i></a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
||||
{% if app.user %}
|
||||
<div id="nameuser" style="text-align:right; margin-top:5px"><a href="{{ path('app_user_user') }}" title="Mon Profil">{{ app.user.firstname }} {{ app.user.lastname }}</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if (usemenu is defined and usemenu) or not app.session.get("fgheader") %}
|
||||
{%set style="display:flex"%}
|
||||
{% else %}
|
||||
{%set style="display:none"%}
|
||||
{% 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">
|
||||
<img src="{{ appAlias }}uploads/logo/{{app.session.get("logodark")}}">
|
||||
</a>
|
||||
|
||||
<a class="nav-link " href="{{ path('app_home')}}">Accueil</a>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul id="menuuser" class="nav navbar-right pe-3">
|
||||
{% block menuuser %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
|
||||
<ul id="menulink" class="nav navbar-right pe-3" style="display:none;">
|
||||
{% if app.user %}
|
||||
<a href="{{path("app_user_user")}}">
|
||||
<img src="{{app.user.avatar|urlavatar}}" class="avatar" style="width:25px; height:25px; margin-top:-3px; margin-right:3px;">
|
||||
</a>
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<a href="{{path("app_admin_home")}}"><i class="fa fa-cog fa-fw"></i></a>
|
||||
{% elseif is_granted('ROLE_MODO') %}
|
||||
<a class="nav-link" href="{{path("app_modo_home")}}"><i class="fa fa-cog"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if app.session.get("showannuaire") %}
|
||||
<a href="{{path("app_user_users")}}"><i class="fas fa-address-book fa-fw"></i></a>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{path("app_user_group")}}"><i class="fas fa-users fa-fw"></i></a>
|
||||
|
||||
<a id="switchHeader" class="btn-link" onclick="switchHeader()" title="Cacher / Afficher Bannière"><i class="fa fa-chevron-down fa-fw"></i></a>
|
||||
|
||||
<a href="{{path("app_logout")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
|
||||
{% else %}
|
||||
<a href="{{path("app_login")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<main>
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
{{ include('Include/sidebaradmin.html.twig') }}
|
||||
{% elseif is_granted('ROLE_MODO') %}
|
||||
{{ include('Include/sidebarmodo.html.twig') }}
|
||||
{% endif %}
|
||||
{%endif%}
|
||||
|
||||
<div id="page" class="p-4">
|
||||
{%if maxsize is defined %}<div style="max-width:{{maxsize}}px;margin:0 auto;">{%endif%}
|
||||
{% block body %}{% endblock %}
|
||||
{%if maxsize is defined %}</div>{%endif%}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<div id="mymodal" class="modal" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div id="mymodalheader" class="modal-header">
|
||||
<h4 class="modal-title"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<iframe frameborder=0 width="100%" height="600px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mymodallarge" class="modal" tabindex="-1">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<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%" height="700px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function switchHeader() {
|
||||
{% if app.user %}
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
id:0,
|
||||
key:'fgheader',
|
||||
value: !($("#header").is(":visible"))
|
||||
},
|
||||
success: function() {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
}
|
||||
</script>
|
||||
|
||||
{% block localscript %}{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user