init
This commit is contained in:
101
templates/Category/edit.html.twig
Executable file
101
templates/Category/edit.html.twig
Executable file
@ -0,0 +1,101 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification CATEGORIE
|
||||
{% elseif mode=="submit" %}
|
||||
Création CATEGORIE
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_category') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" and category.id >= 0 %}
|
||||
<a href="{{ path('app_category_delete',{'id':category.id}) }}"
|
||||
class="btn btn-danger float-right"
|
||||
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_row(form.order) }}
|
||||
{{ form_row(form.name) }}
|
||||
|
||||
{{ form_row(form.usecategoryconfig) }}
|
||||
<div id="blockconfig">
|
||||
{{ form_row(form.appthumbwidth) }}
|
||||
{{ form_row(form.appthumbheight) }}
|
||||
{{ form_row(form.appthumbfilter) }}
|
||||
<div id="blockfilter">
|
||||
{{ form_row(form.appthumbfiltergrayscale) }}
|
||||
{{ form_row(form.appthumbfilteropacity) }}
|
||||
{{ form_row(form.appthumbfiltersepia) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function showhide() {
|
||||
if($("#category_usecategoryconfig").val()==0) {
|
||||
$("#blockconfig").hide();
|
||||
}
|
||||
else {
|
||||
$("#blockconfig").show();
|
||||
|
||||
if($("#category_appthumbfilter").val()==0) {
|
||||
$("#blockfilter").hide();
|
||||
}
|
||||
else {
|
||||
$("#blockfilter").show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$( "#category_usecategoryconfig" ).change(function() {
|
||||
showhide();
|
||||
});
|
||||
|
||||
$( "#category_appthumbfilter" ).change(function() {
|
||||
showhide();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
showhide();
|
||||
$("#category_order").focus();
|
||||
});
|
||||
{% endblock %}
|
54
templates/Category/list.html.twig
Normal file
54
templates/Category/list.html.twig
Normal file
@ -0,0 +1,54 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
CATEGORIES
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_category_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Catégories
|
||||
</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 width="70px">Ordre</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categorys %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_category_update",{id:category.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% if category.id >=0 %}
|
||||
<a href="{{path("app_category_delete",{id:category.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{category.order}}</td>
|
||||
<td>{{category.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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 %}
|
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_config') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" and not config.required %}
|
||||
<a href="{{ path('app_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" style="width:90px" onClick="ModalLoad('extraLargeModal','Logo','{{ path('app_config_logo') }}');" title='Ajouter un Logo'>Modifier</a>
|
||||
</div>
|
||||
{% elseif config.type=="hero" %}
|
||||
<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" style="width:100%" onClick="ModalLoad('extraLargeModal','Carrousel','{{ path('app_crop01', {"type": "hero", "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" style="width:100%" onClick="ModalLoad('extraLargeModal','Image','{{ path('app_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);
|
||||
});
|
||||
$('#extraLargeModal').on('hidden.bs.modal', function () {
|
||||
var imgSrc = $("#config_value_img").attr('src');
|
||||
$("#config_value_img").attr('src',imgSrc);
|
||||
});
|
||||
{% endblock %}
|
71
templates/Config/list.html.twig
Normal file
71
templates/Config/list.html.twig
Normal file
@ -0,0 +1,71 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
CONFIGURATIONS
|
||||
</h1>
|
||||
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<h3>Générale</h3>
|
||||
{{ render(path("app_config_render",{category:"site"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Couleurs des fonds de page</h3>
|
||||
{{ render(path("app_config_render",{category:"colorbgbody"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Polices</h3>
|
||||
{{ render(path("app_config_render",{category:"font"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Couleurs des titres </h3>
|
||||
{{ render(path("app_config_render",{category:"colorfttitle"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Couleurs de la police </h3>
|
||||
{{ render(path("app_config_render",{category:"colorftbody"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Logo</h3>
|
||||
{{ render(path("app_config_render",{category:"logo"})) }}
|
||||
|
||||
<h3>Social</h3>
|
||||
{{ render(path("app_config_render",{category:"social"})) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Carrousel</h3>
|
||||
{{ render(path("app_config_render",{category:"hero"})) }}
|
||||
|
||||
<h3>Image</h3>
|
||||
{{ render(path("app_config_render",{category:"image"})) }}
|
||||
</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 %}
|
42
templates/Config/logo.html.twig
Normal file
42
templates/Config/logo.html.twig
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block encorelinktags %}
|
||||
{{ encore_entry_link_tags('dropzone') }}
|
||||
{% endblock encorelinktags %}
|
||||
|
||||
{% block body %}
|
||||
<h3 class="page-header">Téléchargez votre Logo</h3>
|
||||
<a class="btn btn-default" 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 encorescripttags %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function dropzoneinit( elt ) {
|
||||
}
|
||||
|
||||
function dropzonesuccess( file, response ) {
|
||||
parent.$("#config_value").val(response["file"]);
|
||||
parent.$("#config_value_img").attr("src","/{{ appAlias }}/uploads/logo/"+response["file"]);
|
||||
}
|
||||
|
||||
function dropzonequeuecomplete(file) {
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#extraLargeModal").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
92
templates/Config/render.html.twig
Normal file
92
templates/Config/render.html.twig
Normal file
@ -0,0 +1,92 @@
|
||||
<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_config_update",{id:config.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if not config.required %}
|
||||
<a href="{{path("app_config_delete",{id:config.id})}}"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td width="50%">{{config.title}}</td>
|
||||
|
||||
{% set color = "" %}
|
||||
{% set bgcolor = "" %}
|
||||
{% set otherstyle = "" %}
|
||||
{% if config.id=='colorbgbodydark' %}
|
||||
{% set bgcolor = config.value %}
|
||||
{% set color = app.session.get('colorfttitledark') %}
|
||||
{% elseif config.id=='colorbgbodylight' %}
|
||||
{% set bgcolor = config.value %}
|
||||
{% set color = app.session.get('colorfttitlelight') %}
|
||||
{% elseif config.id=='colorfttitledark' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
||||
{% set color = config.value %}
|
||||
{% elseif config.id=='colorfttitlelight' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
||||
{% set color = config.value %}
|
||||
{% elseif config.id=='colorftbodydark' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
||||
{% set color = config.value %}
|
||||
{% elseif config.id=='colorftbodylight' %}
|
||||
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
||||
{% set color = config.value %}
|
||||
{% 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;" %}
|
||||
{% elseif config.type=='hero' %}
|
||||
{% set otherstyle = "text-align: center;" %}
|
||||
{% elseif config.type=='image' %}
|
||||
{% set otherstyle = "text-align: center;" %}
|
||||
{% endif %}
|
||||
|
||||
<td style="overflow-wrap: anywhere; background-color: {{ bgcolor }}; color: {{color}}; {{otherstyle}}" >
|
||||
{% if config.type=="thumbwidth" %}
|
||||
{% if config.value=="0" %} Variable
|
||||
{% elseif config.value=="1" %} 10%
|
||||
{% elseif config.value=="2" %} 20%
|
||||
{%endif%}
|
||||
{% elseif config.type=="thumbheight" %}
|
||||
{% if config.value=="0" %} Carrée
|
||||
{% elseif config.value=="1" %} Proportionnelle
|
||||
{%endif%}
|
||||
{% elseif config.type=="boolean" %}
|
||||
{% if config.value=="0" %} Non
|
||||
{% elseif config.value=="1" %} Oui
|
||||
{%endif%}
|
||||
{% elseif config.type=="logo" %}
|
||||
{%if not config.value is empty %}
|
||||
<img src="/{{appAlias}}/uploads/logo/{{ config.value }}" height=50px>
|
||||
{% endif %}
|
||||
{% elseif config.type=="hero" %}
|
||||
{%if not config.value is empty %}
|
||||
<img src="/{{appAlias}}/uploads/hero/{{ config.value }}" style="max-width:100%">
|
||||
{% endif %}
|
||||
{% elseif config.type=="image" %}
|
||||
{%if not config.value is empty %}
|
||||
<img src="/{{appAlias}}/uploads/image/{{ config.value }}" style="max-width:100%">
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ config.value|raw }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
59
templates/Cron/edit.html.twig
Normal file
59
templates/Cron/edit.html.twig
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
{% 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_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.repeatcall) }}
|
||||
{{ form_row(form.repeatinterval) }}
|
||||
{{ form_row(form.nextexecdate) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#command").focus();
|
||||
});
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
54
templates/Cron/list.html.twig
Normal file
54
templates/Cron/list.html.twig
Normal file
@ -0,0 +1,54 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
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>Description</th>
|
||||
<th>Statut</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for cron in crons %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_cron_update",{id:cron.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td>{{cron.nextexecdate|date("d/m/Y H:i")}}</td>
|
||||
<td>{{cron.command}}</td>
|
||||
<td>{{cron.description}}</td>
|
||||
<td>{{cron.statutlabel}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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 %}
|
||||
|
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 appCron %}
|
||||
<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 appCron %}
|
||||
<a class="btn btn-secondary" href={{ path("app_cron_getlog",{"id":"dump"}) }}>Dump de la Base</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
40
templates/Crop/crop01.html.twig
Normal file
40
templates/Crop/crop01.html.twig
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block encorelinktags %}
|
||||
{{ encore_entry_link_tags('dropzone') }}
|
||||
{% endblock encorelinktags %}
|
||||
|
||||
{% block body %}
|
||||
<h3 class="page-header">Téléchargez votre Logo</h3>
|
||||
<a class="btn btn-default" 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 encorescripttags %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function dropzoneinit( elt ) {
|
||||
}
|
||||
|
||||
function dropzonesuccess( file, response ) {
|
||||
$(location).attr('href',"{{ path('app_crop02', {"type": type, "reportinput": reportinput }) }}?file="+response["file"]);
|
||||
}
|
||||
|
||||
function dropzonequeuecomplete(file) {
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#extraLargeModal").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
118
templates/Crop/crop02.html.twig
Normal file
118
templates/Crop/crop02.html.twig
Normal file
@ -0,0 +1,118 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
.crop-image { width:100% }
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{{ 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) }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block localjavascript %}
|
||||
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" %}
|
||||
console.log("ici");
|
||||
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.$("#extraLargeModal").modal('hide');
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
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 nbratio=="16:2" %}
|
||||
{% set class=(16/2) %}
|
||||
{% endif %}
|
||||
|
||||
$('#largeimg').CropSelectJs('setSelectionAspectRatio',{{nbratio}});
|
||||
|
||||
|
||||
});
|
||||
{% endblock %}
|
175
templates/Form/fields.html.twig
Normal file
175
templates/Form/fields.html.twig
Normal file
@ -0,0 +1,175 @@
|
||||
{% 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' : '' }}">
|
||||
{{- 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 attributs des boutons #}
|
||||
{% block button_attributes -%}
|
||||
{% if type is defined and type == 'submit' -%}
|
||||
{% set class = 'btn-primary' %}
|
||||
{% else %}
|
||||
{% set class = 'btn-default' %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set attr = attr|merge({'class': (attr.class|default('') ~ ' btn ' ~ class)|trim}) %}
|
||||
{{ parent() }}
|
||||
{%- endblock button_attributes %}
|
||||
|
||||
|
||||
{# 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 %}
|
||||
|
||||
{# Inline date marcro #}
|
||||
{% macro date_form_widget(form) %}
|
||||
<div class="col col-xs-4">
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{# Inline date #}
|
||||
{% block date_widget %}
|
||||
{% if widget == 'single_text' %}
|
||||
{{ block('form_widget_simple') }}
|
||||
{% else %}
|
||||
{% import _self as self %}
|
||||
<div class="row">
|
||||
{{ date_pattern|replace({
|
||||
'{{ year }}': self.date_form_widget(form.year),
|
||||
'{{ month }}': self.date_form_widget(form.month),
|
||||
'{{ day }}': self.date_form_widget(form.day),
|
||||
})|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock date_widget %}
|
||||
|
||||
{# Inline date_time
|
||||
{% block time_widget %}
|
||||
{% if widget == 'single_text' %}
|
||||
{{ block('form_widget_simple') }}
|
||||
{% else %}
|
||||
{% import _self as self %}
|
||||
<div class="row">
|
||||
{{ time_pattern|replace({
|
||||
'{{ hour }}': self.date_form_widget(form.hour),
|
||||
'{{ minute }}': self.date_form_widget(form.minute),
|
||||
})|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock time_widget %}
|
||||
#}
|
||||
|
||||
{% block file_widget %}
|
||||
{% set type = type|default('file') %}
|
||||
<input type="{{ type }}" {{ block('widget_attributes') }} />
|
||||
{% endblock file_widget %}
|
64
templates/Group/edit.html.twig
Executable file
64
templates/Group/edit.html.twig
Executable file
@ -0,0 +1,64 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification GROUPE
|
||||
{% elseif mode=="submit" %}
|
||||
Création GROUPE
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_group') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" and group-id>=0 %}
|
||||
<a href="{{ path('app_group_delete',{'id':group.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.name) }}
|
||||
{{ form_row(form.users) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#group_name").focus();
|
||||
});
|
||||
{% endblock %}
|
52
templates/Group/list.html.twig
Normal file
52
templates/Group/list.html.twig
Normal file
@ -0,0 +1,52 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
GROUPES
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_group_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Groupes
|
||||
</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>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for group in groups %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_group_update",{id:group.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% if group.id >=0 %}
|
||||
<a href="{{path("app_group_delete",{id:group.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{group.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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 %}
|
7
templates/Home/admin.html.twig
Normal file
7
templates/Home/admin.html.twig
Normal file
@ -0,0 +1,7 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
36
templates/Home/feed.xml.twig
Executable file
36
templates/Home/feed.xml.twig
Executable file
@ -0,0 +1,36 @@
|
||||
{% autoescape %}
|
||||
{% set sessionconfigs = app.session.get('configs') %}
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>{{ app.session.get('appname') }}</title>
|
||||
<link>{{ absolute_url(path("app_home")) }}</link>
|
||||
<description>{{ app.session.get('appname') }} - {{app.session.get('appsubname') }}</description>
|
||||
{% for feed in feeds %}
|
||||
{% set url = absolute_url(path(feed.path,{"idcat":feed.idcat,"id":feed.id}))|replace({'http://': 'https://'}) %}
|
||||
<item>
|
||||
<guid><![CDATA[{{url}}]]></guid>
|
||||
<title>{{ app.session.get('appname') }} - {{feed.name}}</title>
|
||||
<author>{{ app.session.get('appname') }}</author>
|
||||
<categories>{{ feed.cat }}</categories>
|
||||
<pubDate>{{feed.pubtime|date('D, d M Y H:i:s O')}}</pubDate>
|
||||
<link><![CDATA[{{url}}]]></link>
|
||||
<description><![CDATA[
|
||||
<a href="{{ url }}"><img src='{{ "https://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/thumbori_"~feed.illustration }}'></p>
|
||||
<h3>{{feed.name}}</h3>
|
||||
|
||||
{% autoescape 'html' %}
|
||||
<div class="desc">
|
||||
{{feed.description|raw }}
|
||||
</div>
|
||||
{% endautoescape %}
|
||||
|
||||
]]></description>
|
||||
<enclosure url="{{ "https://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/thumbori_"~feed.illustration }}" rel="thumb" />
|
||||
<enclosure url="{{ "https://"~appWeburl~"/"~appAlias~"/uploads/"~feed.type~"/"~feed.illustration }}" rel="big" />
|
||||
</item>
|
||||
{% endfor %}
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
{% endautoescape %}
|
492
templates/Home/home.html.twig
Normal file
492
templates/Home/home.html.twig
Normal file
@ -0,0 +1,492 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
#main {
|
||||
padding: 0px;
|
||||
display:none;
|
||||
margin-bottom:200px;
|
||||
}
|
||||
|
||||
{% if app.session.get("appthumbfilter")=="1" %}
|
||||
.cssfilter {
|
||||
filter: grayscale({{app.session.get("appthumbfiltergrayscale")}}%) opacity({{app.session.get("appthumbfilteropacity")}}%) sepia({{app.session.get("appthumbfiltersepia")}}%);
|
||||
transition: -webkit-filter 0.1s;
|
||||
}
|
||||
|
||||
.cssfilter:hover {
|
||||
filter: unset;
|
||||
-webkit-filter: unset;
|
||||
-moz-filter: unset;
|
||||
-o-filter: unset;
|
||||
-ms-filter: unset;
|
||||
|
||||
-webkit-transition: -webkit-filter 0.1s;
|
||||
transition: -webkit-filter 0.1s;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% for category in categorys|sort((a, b) => a.order <=> b.order) %}
|
||||
{% if category.usecategoryconfig and category.appthumbfilter %}
|
||||
.cssfilter-{{category.id}} {
|
||||
filter: grayscale({{category.appthumbfiltergrayscale}}%) opacity({{category.appthumbfilteropacity}}%) sepia({{category.appthumbfiltersepia}}%);
|
||||
transition: -webkit-filter 0.1s;
|
||||
}
|
||||
|
||||
.cssfilter-{{category.id}}:hover {
|
||||
filter: unset;
|
||||
-webkit-filter: unset;
|
||||
-moz-filter: unset;
|
||||
-o-filter: unset;
|
||||
-ms-filter: unset;
|
||||
|
||||
-webkit-transition: -webkit-filter 0.1s;
|
||||
transition: -webkit-filter 0.1s;
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<!-- FOLIOMENU -----------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
|
||||
<div class="foliomenu">
|
||||
<a href="#top"><img src="/{{ appAlias }}/uploads/logo/{{ app.session.get("logodark") }}" class="logo"></a>
|
||||
|
||||
<div>
|
||||
{% for category in categorys|sort((a, b) => a.order <=> b.order) %}
|
||||
{% if not category.illustrations is empty %}
|
||||
<i class="fa fa-circle fa-fw"></i> <a href="#{{ category.name }}">{{category.name}}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if not webzines is empty %}
|
||||
<i class="fa fa-circle fa-fw"></i> <a href="#webzine">Webzines</a>
|
||||
{% endif %}
|
||||
<i class="fa fa-circle fa-fw"></i> <a href="#link">Liens</a>
|
||||
<i class="fa fa-circle fa-fw"></i> <a href="#contact">Contact</a>
|
||||
</div>
|
||||
|
||||
<div class="float-right">
|
||||
{% if app.user %}
|
||||
<a href="{{path("app_user_profil")}}">
|
||||
<img src="{{app.user.avatar|urlavatar}}" class="avatar">
|
||||
</a>
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<a href={{ path("app_illustration") }} class="btn btn-link" title="Configuration">
|
||||
<i class="fa fa-cog fa-fw"></i>
|
||||
</a>
|
||||
<a href="/arnocompta" class="btn btn-link" title="Compta">
|
||||
<i class="fas fa-euro-sign fa-fw"></i>
|
||||
</a>
|
||||
<a href={{ path("app_illustration_submit") }} class="btn btn-link" title="Créer une Illustration">
|
||||
<i class="fa fa-paint-brush fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
||||
<i class="fa fa-sign-out-alt fa-fw"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
||||
<i class="fa fa-sign-in-alt fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="foliotop">
|
||||
<a href="#top"><i class="fa fa-chevron-up"></i></a>
|
||||
</div>
|
||||
|
||||
<!-- HEROHEADER ------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
<div id="top" class="heroheader" displaynone>
|
||||
{%if not app.session.get("hero01") is empty %}
|
||||
<div class="cssfilter" style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero01")}})"></div>
|
||||
{%endif%}
|
||||
|
||||
{%if not app.session.get("hero02") is empty %}
|
||||
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero02")}})"></div>
|
||||
{%endif%}
|
||||
|
||||
{%if not app.session.get("hero03") is empty %}
|
||||
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero03")}})"></div>
|
||||
{%endif%}
|
||||
|
||||
{%if not app.session.get("hero04") is empty %}
|
||||
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero04")}})"></div>
|
||||
{%endif%}
|
||||
|
||||
{%if not app.session.get("hero05") is empty %}
|
||||
<div class="cssfilter"style="background-image:url(/{{appAlias}}/uploads/hero/{{app.session.get("hero05")}})"></div>
|
||||
{%endif%}
|
||||
</div>
|
||||
|
||||
<div class="herofloatmenu" style="position: absolute; top: 0px; right: 10px;">
|
||||
{% if app.user %}
|
||||
<a href="{{path("app_user_profil")}}">
|
||||
<img src="{{app.user.avatar|urlavatar}}" class="avatar">
|
||||
</a>
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<a href={{ path("app_illustration") }} class="btn btn-link" title="Configuration">
|
||||
<i class="fa fa-cog fa-fw"></i>
|
||||
</a>
|
||||
<a href="/arnocompta" class="btn btn-link" title="Compta">
|
||||
<i class="fas fa-euro-sign fa-fw"></i>
|
||||
</a>
|
||||
<a href={{ path("app_illustration_submit") }} class="btn btn-link" title="Créer une Illustration">
|
||||
<i class="fa fa-paint-brush fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href={{ path("app_logout") }} class="btn btn-link" title="Déconnexion">
|
||||
<i class="fa fa-sign-out-alt fa-fw"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href={{ path("app_login") }} class="btn btn-link" title="Connexion">
|
||||
<i class="fa fa-sign-in-alt fa-fw"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="herobox"></div>
|
||||
<div class="herotitle">
|
||||
<h1>{{ app.session.get("appname") }}</h1>
|
||||
|
||||
<div class="heromenu" >
|
||||
{% if not app.session.get("appsubname") is empty %}
|
||||
<i style="font-size:80%;">{{ app.session.get("appsubname") }}</i><br>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<div class="linkmenu" style="clear:both">
|
||||
{% if app.session.get('email') is not empty %}
|
||||
<a href="mailto:{{ app.session.get('email') }}" target="_blank" title="Email"><i class="fas fa-envelope fa-2x"></i></a>
|
||||
{% endif %}
|
||||
{% if app.session.get('facebook') is not empty %}
|
||||
<a href="{{ app.session.get('facebook') }}" target="_blank" title="Facebook"><i class="fab fa-facebook fa-2x"></i></a>
|
||||
{% endif %}
|
||||
{% if app.session.get('instagram') is not empty %}
|
||||
<a href="{{ app.session.get('instagram') }}" target="_blank" title="Instagram"><i class="fab fa-instagram fa-2x"></i></a>
|
||||
{% endif %}
|
||||
{% if app.session.get('twitter') is not empty %}
|
||||
<a href="{{ app.session.get('twitter') }}" target="_blank" title="Twitter"><i class="fab fa-twitter fa-2x"></i></a>
|
||||
{% endif %}
|
||||
{% if app.session.get('google') is not empty %}
|
||||
<a href="{{ app.session.get('google') }}" target="_blank" title="Google"><i class="fab fa-google-plus fa-2x"></i></a>
|
||||
{% endif %}
|
||||
{% if app.session.get('youtube') is not empty %}
|
||||
<a href="{{ app.session.get('youtube') }}" target="_blank" title="Youtube"><i class="fab fa-youtube fa-2x"></i></a>
|
||||
{% endif %}
|
||||
<a href="{{ path("app_feed") }}" target="_blank" title="RSS"><i class="fa fa-rss-square fa-2x"></i></a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="catmenu">
|
||||
{% for category in categorys|sort((a, b) => a.order <=> b.order) %}
|
||||
{% if not category.illustrations is empty %}
|
||||
<a href="#{{ category.name }}"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> {{category.name}}</a><br>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if not webzines is empty %}
|
||||
<a href="#webzine"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Webzines</a><br>
|
||||
{% endif %}
|
||||
<a href="#link"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Liens</a><br>
|
||||
<a href="#contact"><i class="fa fa-arrow-circle-right fa-fw facatmenu"></i> Contact</a><br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="herologo">
|
||||
<img src="/{{ appAlias }}/uploads/logo/{{ app.session.get('logodark') }}">
|
||||
</div>
|
||||
|
||||
<!-- GRID ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
{% set style="margin:30px" %}
|
||||
{% if app.session.get("appmaxthumbwidth")!="0" %}
|
||||
{% set style="max-width:"~app.session.get("appmaxthumbwidth")~"px; margin:30px auto;" %}
|
||||
{% endif %}
|
||||
<div class="grid" style="{{ style }}">
|
||||
<div class="grid-sizer"></div>
|
||||
<div class="gutter-sizer"></div>
|
||||
|
||||
{% for category in categorys|sort((a, b) => a.order <=> b.order) %}
|
||||
{% if not category.illustrations is empty %}
|
||||
<div id="{{ category.name }}" class="grid-item grid-item-full"><h1 class="mt-5">{{ category.name }}</h1></div>
|
||||
{% for illustration in category.illustrations %}
|
||||
{% set appthumbwidth=app.session.get("appthumbwidth") %}
|
||||
{% set appthumbheight=app.session.get("appthumbheight") %}
|
||||
{% if category.usecategoryconfig %}
|
||||
{% set appthumbwidth=category.appthumbwidth %}
|
||||
{% set appthumbheight=category.appthumbheight %}
|
||||
{% endif %}
|
||||
|
||||
{% if appthumbwidth==0 %}
|
||||
{% set class="" %}
|
||||
{% if loop.index < 40 %}
|
||||
{% if loop.index == 1 %}
|
||||
{% set class="grid-item-size-4" %}
|
||||
{% elseif loop.index is divisible by(28) %}
|
||||
{% set class="grid-item-size-4" %}
|
||||
{% elseif loop.index is divisible by(7) %}
|
||||
{% set class="grid-item-size-2" %}
|
||||
{% elseif loop.index is divisible by(46) %}
|
||||
{% set class="grid-item-size-4" %}
|
||||
{% endif %}
|
||||
{% elseif loop.index > 48 %}
|
||||
{% if loop.index == 49 %}
|
||||
{% set class="grid-item-size-4" %}
|
||||
{% elseif (loop.index-49) is divisible by(28) %}
|
||||
{% set class="grid-item-size-4" %}
|
||||
{% elseif (loop.index-49) is divisible by(7) %}
|
||||
{% set class="grid-item-size-2" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elseif appthumbwidth==1 %} {% set class="" %}
|
||||
{% elseif appthumbwidth==2 %} {% set class="grid-item-size-2" %}
|
||||
{% endif %}
|
||||
|
||||
{%if appthumbheight==0 %}
|
||||
{% set class=class~" grid-item-size-square" %}
|
||||
{% elseif appthumbheight==1 %}
|
||||
{% set class=class~" grid-item-size-proportion" %}
|
||||
{% else %}
|
||||
{% set class=class~" grid-item-size-page" %}
|
||||
{% endif %}
|
||||
|
||||
{% set source="thumb_"~illustration.illustration %}
|
||||
{% if appthumbheight!=0 %}
|
||||
{% set source="thumbori_"~illustration.illustration %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ path("app_illustration_view",{"idcat":category.id,"id":illustration.id}) }}">
|
||||
<div id="illustration{{illustration.id}}" class="grid-item grid-item-size {{class}} cssfilter cssfilter-{{category.id}} no-cache-bg" data-width="{{illustration.width}}" data-background-image="/{{ appAlias }}/uploads/illustration/{{source}}" data-height="{{illustration.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}");">
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- WEBZINE ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
|
||||
{% if not webzines is empty %}
|
||||
<div id="webzine" class="grid-item grid-item-full"><h1 class="mt-5">Webzines</h1></div>
|
||||
{% endif %}
|
||||
|
||||
{% set setname="" %}
|
||||
{% for webzine in webzines %}
|
||||
{% if not webzine.webzinepages is empty %}
|
||||
{% if setname!=webzine.set %}
|
||||
{% if not webzine.set is empty %}
|
||||
<div id="webzine" class="grid-item grid-item-full"><h2 class="mt-3 pl-3">{{webzine.set}}</h2></div>
|
||||
{% endif %}
|
||||
{% set setname=webzine.set %}
|
||||
{% endif %}
|
||||
{% set page=webzine.webzinepages[0] %}
|
||||
{% set source="thumbori_"~page.illustration %}
|
||||
{% set class=" grid-item-size-2 grid-item-size-page" %}
|
||||
|
||||
<a href="{{ path("app_webzine_view",{"idcat":webzine.id,"id":page.id}) }}">
|
||||
<div id="webzine{{webzine.id}}" class="grid-item grid-item-size {{class}} cssfilter no-cache-bg" data-width="{{page.width}}" data-background-image="/{{ appAlias }}/uploads/webzine/{{source}}" data-height="{{page.height}}" style="height:auto;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- LINK ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
<div id="link" class="grid-item grid-item-full"><h1 class="mt-5">Liens</h1></div>
|
||||
|
||||
<div class="grid-item grid-item-size grid-item-size-3 grid-item-size-square cssfilter" style="height:200px;background-position: center; background-size: cover; background-image: url(/{{ appAlias }}/uploads/image/{{ app.session.get("imglink")}});">
|
||||
</div>
|
||||
|
||||
<div class="grid-item grid-item-size grid-item-size-6 grid-item-size-noresize linkurl" style="padding:0px 15px;">
|
||||
{% for link in links|sort((a, b) => a.order <=> b.order) %}
|
||||
<a href="{{link.url}}" target="_blank">{{ link.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- CONTACT ------------------------------------------------------------------------------------------------------------------------------------------------------!-->
|
||||
<div id="contact" class="grid-item grid-item-full"><h1 class="mt-5">Contact</h1></div>
|
||||
|
||||
<div class="grid-item grid-item-size grid-item-size-3 grid-item-size-square cssfilter" style="height:200px;background-position: center; background-size: cover; background-image: url(/{{ appAlias }}/uploads/image/{{ app.session.get("imgcontact")}});">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="grid-item grid-item-size grid-item-size-6 grid-item-size-noresize" style="padding:0px 15px;">
|
||||
<h3>{{ app.session.get("appname")}}</h3>
|
||||
{% if not app.session.get("appsubname") is empty %}
|
||||
{{ app.session.get("appsubname")}}<br>
|
||||
{%endif%}
|
||||
{% if not app.session.get("appdescription") is empty %}
|
||||
|
||||
<small><br>{{ app.session.get("appdescription")|raw}}</small><br>
|
||||
|
||||
{%endif%}
|
||||
|
||||
<br>
|
||||
|
||||
{% if app.session.get('email') is not empty %}
|
||||
<i class="fas fa-envelope"></i> Email = <a href="mailto:{{ app.session.get('email') }}" target="_blank" title="Email">{{ app.session.get('email') }}</a><br>
|
||||
{% endif %}
|
||||
{% if app.session.get('facebook') is not empty %}
|
||||
<i class="fab fa-facebook"></i> Facebook = <a href="{{ app.session.get('facebook') }}" target="_blank" title="Facebook">{{ app.session.get('facebook') }}</a><br>
|
||||
{% endif %}
|
||||
{% if app.session.get('instagram') is not empty %}
|
||||
<i class="fab fa-instagram"></i> Instagram = <a href="{{ app.session.get('instagram') }}" target="_blank" title="Instagram">{{ app.session.get('instagram') }}</a><br>
|
||||
{% endif %}
|
||||
{% if app.session.get('twitter') is not empty %}
|
||||
<i class="fab fa-twitter"></i> Twitter = <a href="{{ app.session.get('twitter') }}" target="_blank" title="Twitter">{{ app.session.get('twitter') }}</a><br>
|
||||
{% endif %}
|
||||
{% if app.session.get('google') is not empty %}
|
||||
<i class="fab fa-google-plus"></i> Google = <a href="{{ app.session.get('google') }}" target="_blank" title="Google">{{ app.session.get('google') }}</a><br>
|
||||
{% endif %}
|
||||
{% if app.session.get('youtube') is not empty %}
|
||||
<i class="fab fa-youtube"></i> Youtube = <a href="{{ app.session.get('youtube') }}" target="_blank" title="Youtube">{{ app.session.get('youtube') }}</a><br>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function getNoCacheBgElements() {
|
||||
return document.querySelectorAll('.no-cache-bg');
|
||||
}
|
||||
|
||||
function loadBgImageForElement(element) {
|
||||
element.style['background-image'] =
|
||||
'url('+ element.attributes['data-background-image'].value + '?' + (new Date()).getTime() +')';
|
||||
}
|
||||
|
||||
function loadBgImages() {
|
||||
for(
|
||||
var i = 0, elements = getNoCacheBgElements();
|
||||
i < elements.length;
|
||||
loadBgImageForElement(elements[i]), i++
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
window.onload = function() {
|
||||
loadBgImages();
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('body').imagesLoaded(function() {
|
||||
height=Math.max(500,$(window).height());
|
||||
$('.heroheader').height(height);
|
||||
$('.herologo').css({ top: (height-250) +'px' });
|
||||
|
||||
$('.heroheader').slick({
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
autoplay: true,
|
||||
autoplaySpeed: 6000,
|
||||
dots: true,
|
||||
touchMove: false,
|
||||
pauseOnDotsHover: true,
|
||||
fade: true,
|
||||
cssEase: 'linear',
|
||||
prevArrow: false,
|
||||
nextArrow: false,
|
||||
customPaging: function(slider, i) {
|
||||
return '<span class="heroheader-dot fa fa-circle fa-fw"></span>';
|
||||
}
|
||||
});
|
||||
|
||||
$("#main").show();
|
||||
|
||||
|
||||
resizeThumb();
|
||||
|
||||
|
||||
$('.grid').masonry({
|
||||
columnWidth: '.grid-sizer',
|
||||
gutter: '.gutter-sizer',
|
||||
itemSelector: '.grid-item',
|
||||
percentPosition: true,
|
||||
horizontalOrder: false,
|
||||
});
|
||||
|
||||
if (location.hash) {
|
||||
console.log(location.hash);
|
||||
$(document).scrollTop( $(location.hash).offset().top -60);
|
||||
// = location.hash;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
$(window).scroll();
|
||||
height=Math.max(500,$(window).height());
|
||||
$('.heroheader').height(height);
|
||||
$('.herologo').css({ top: (height-250) +'px' });
|
||||
resizeThumb();
|
||||
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
if($(window).width()>=980) {
|
||||
// set distance user needs to scroll before we start fadeIn
|
||||
if ($(this).scrollTop() > 300) {
|
||||
if($('.foliomenu').is(":hidden")) $('.foliomenu').show();
|
||||
} else {
|
||||
if($('.foliomenu').is(":visible")) $('.foliomenu').hide();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if($('.foliomenu').is(":hidden")) $('.foliomenu').show();
|
||||
}
|
||||
|
||||
if ($(this).scrollTop() > 300) {
|
||||
if($('.foliotop').is(":hidden")) $('.foliotop').show();
|
||||
} else {
|
||||
if($('.foliotop').is(":visible")) $('.foliotop').hide();
|
||||
}
|
||||
});
|
||||
|
||||
function resizeThumb() {
|
||||
{% if app.session.get("appmaxthumbwidth")!="0" %}
|
||||
width=$(window).width();
|
||||
maxwidth={{ app.session.get("appmaxthumbwidth") }};
|
||||
|
||||
if(maxwidth+30>width) {
|
||||
$(".grid").css("max-width","none");
|
||||
$(".grid").css("margin","30px");
|
||||
}
|
||||
else {
|
||||
$(".grid").css("max-width","{{ app.session.get("appmaxthumbwidth") }}px");
|
||||
$(".grid").css("margin","30px auto");
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
$(".grid-item-size").each(function() {
|
||||
if(!$(this).hasClass("grid-item-size-noresize")) {
|
||||
if($(this).hasClass("grid-item-size-square")) {
|
||||
$(this).height($(this).width());
|
||||
}
|
||||
else if($(this).hasClass("grid-item-size-proportion")) {
|
||||
var width=$(this).width();
|
||||
var oriwidth=$(this).data("width")
|
||||
if(oriwidth>0) {
|
||||
pourcentage=width*100/oriwidth;
|
||||
height=$(this).data("height")*pourcentage/100;
|
||||
$(this).height(height);
|
||||
}
|
||||
else {
|
||||
$(this).height($(this).width());
|
||||
}
|
||||
}
|
||||
else {
|
||||
$(this).height($(this).width()*30/21);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
39
templates/Home/login.html.twig
Executable file
39
templates/Home/login.html.twig
Executable file
@ -0,0 +1,39 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
label {
|
||||
color: var(--colorftbodylight);
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div style="text-align:center">
|
||||
<img src="/{{ appAlias }}/uploads/logo/{{ app.session.get('logodark') }}" style="height:120px;margin-top:10px;">
|
||||
<h1 style="border:none">{{appName}}</h1>
|
||||
<form action="{{ path('app_login') }}" method="post">
|
||||
<div class="card homecard" 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>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#username").focus();
|
||||
});
|
||||
{% 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 %}
|
91
templates/Illustration/edit.html.twig
Executable file
91
templates/Illustration/edit.html.twig
Executable file
@ -0,0 +1,91 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification ILLUSTRATION
|
||||
{% elseif mode=="submit" %}
|
||||
Création ILLUSTRATION
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
{% if by=="console" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_illustration') }}>Annuler</a>
|
||||
{% else %}
|
||||
<a class="btn btn-secondary" href={{ path('app_home') }}>Annuler</a>
|
||||
{% endif %}
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_illustration_delete',{'id':illustration.id, 'by':by}) }}"
|
||||
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="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.category) }}
|
||||
{{ form_row(form.description) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Illustration
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_widget(form.illustration) }}
|
||||
{{ form_widget(form.width) }}
|
||||
{{ form_widget(form.height) }}
|
||||
<a class="btn btn-info" style="width:100%; margin-bottom:10px" onClick="ModalLoad('extraLargeModal','Illustration','{{ path('app_illustration_upload') }}');" title='Ajouter une banière'>Télécharger une Illustration</a>
|
||||
<img id="illustration_illustration_img" src="/{{ appAlias }}/uploads/illustration/{{illustration.illustration}}" style="width:100%;margin:auto;display:block;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#illustration_order").focus();
|
||||
});
|
||||
{% endblock %}
|
83
templates/Illustration/list.html.twig
Normal file
83
templates/Illustration/list.html.twig
Normal file
@ -0,0 +1,83 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
ILLUSTRATIONS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_illustration_submit',{by:'console'}) }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Illustrations
|
||||
</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 width="70px" class="no-sort">Miniature</th>
|
||||
<th width="70px">Date</th>
|
||||
<th width="100px">Catégorie</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for illustration in illustrations %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_illustration_update",{id:illustration.id,by:'console'})}}"><i class="fa fa-file"></i></a>
|
||||
{% if illustration.id >=0 %}
|
||||
<a href="{{path("app_illustration_delete",{id:illustration.id,by:'console'})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
<a style="cursor:pointer" onClick="ModalLoad('extraLargeModal','Illustration','{{ path('app_illustration_crop',{"type":"illustration","reportinput":"refresh","by":"console"}) }}?file={{illustration.illustration}}');"><i class="fa fa-arrows-alt" aria-hidden="true"></i></a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
{% set appthumbheight=app.session.get("appthumbheight") %}
|
||||
{% if illustration.category.usecategoryconfig %}
|
||||
{% set appthumbwidth=illustration.category.appthumbwidth %}
|
||||
{% set appthumbheight=illustration.category.appthumbheight %}
|
||||
{% endif %}
|
||||
|
||||
{% set source="thumb_"~illustration.illustration %}
|
||||
{% if appthumbheight!=0 %}
|
||||
{% set source="thumbori_"~illustration.illustration %}
|
||||
{% endif %}
|
||||
|
||||
{% if appthumbheight==0 %}
|
||||
{% set height=90 %}
|
||||
{% elseif appthumbheight==1 %}
|
||||
{% set height=illustration.height*90/illustration.width %}
|
||||
{% else %}
|
||||
{% set height=30*90/21 %}
|
||||
{% endif %}
|
||||
|
||||
<div style="width:90px; height:{{ height }}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}");">
|
||||
|
||||
</td>
|
||||
<td>{{ illustration.submittime|date("Y-m-d H:i") }}</td>
|
||||
<td>{{ illustration.category.name }}</td>
|
||||
<td>{{ illustration.name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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: [[ 2, "desc" ]]
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
102
templates/Illustration/slide.html.twig
Executable file
102
templates/Illustration/slide.html.twig
Executable file
@ -0,0 +1,102 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block metablock %}
|
||||
<meta property="og:title" content="{{ appName }} - Slide" />
|
||||
<meta property="og:url" content="{{ absolute_url(path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params'))) }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
#main {
|
||||
padding: 0px;
|
||||
display:none;
|
||||
margin-bottom:200px;
|
||||
}
|
||||
|
||||
/* Image */
|
||||
#illustration_illustration_img, #kadavresky_kadavresky_img, #album_photo_img,#webzine_page_img{
|
||||
margin: 30px auto 0px auto;
|
||||
display:block;
|
||||
/*box-shadow: 0px 0px 5px 1px rgba(255, 255, 255, 0.45);*/
|
||||
}
|
||||
</style>
|
||||
|
||||
<img style="display:none;" id="illustration_illustration_img" src="/{{ appAlias }}/uploads/illustration/{{illustrations[0].illustration}}">
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
var posImg=0
|
||||
var tbimg=[]
|
||||
|
||||
function shuffle(array) {
|
||||
let currentIndex = array.length, randomIndex;
|
||||
|
||||
// While there remain elements to shuffle.
|
||||
while (currentIndex > 0) {
|
||||
|
||||
// Pick a remaining element.
|
||||
randomIndex = Math.floor(Math.random() * currentIndex);
|
||||
currentIndex--;
|
||||
|
||||
// And swap it with the current element.
|
||||
[array[currentIndex], array[randomIndex]] = [
|
||||
array[randomIndex], array[currentIndex]];
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
function resizeImage() {
|
||||
console.log("resize")
|
||||
height=$(window).height()-70;
|
||||
$("#illustration_illustration_img").css({height:height,width:'auto'});
|
||||
|
||||
width=$(window).width()-90;
|
||||
if($("#illustration_illustration_img").width()>width)
|
||||
$("#illustration_illustration_img").css({width:width,height:'auto'});
|
||||
|
||||
height=$("#illustration_illustration_img").height();
|
||||
$("#bigright").css({height:height,"line-height":height+"px"});
|
||||
$("#bigleft").css({height:height,"line-height":height+"px"});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
{% for illustration in illustrations %}
|
||||
tbimg.push("{{illustration.illustration}}");
|
||||
{% endfor %}
|
||||
|
||||
tbimg=shuffle(tbimg)
|
||||
$('body').imagesLoaded(function() {
|
||||
resizeImage();
|
||||
$("#illustration_illustration_img").fadeIn();
|
||||
});
|
||||
|
||||
var intervalId = window.setInterval(function(){
|
||||
posImg++;
|
||||
img=tbimg[posImg];
|
||||
console.log(img);
|
||||
url="/{{ appAlias }}/uploads/illustration/xxx";
|
||||
url=url.replace("xxx",img);
|
||||
|
||||
$("#illustration_illustration_img").fadeOut();
|
||||
$("#illustration_illustration_img").promise().done(function(){
|
||||
$("#illustration_illustration_img").hide();
|
||||
$("#illustration_illustration_img").attr("src",url);
|
||||
/*
|
||||
resizeImage();
|
||||
$("#illustration_illustration_img").fadeIn();
|
||||
*/
|
||||
});
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
$('#illustration_illustration_img').on("load",function() {
|
||||
resizeImage();
|
||||
$("#illustration_illustration_img").fadeIn();
|
||||
});
|
||||
|
||||
|
||||
$(window).resize(function() {
|
||||
resizeImage();
|
||||
});
|
||||
{% endblock %}
|
44
templates/Illustration/upload.html.twig
Normal file
44
templates/Illustration/upload.html.twig
Normal file
@ -0,0 +1,44 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block encorelinktags %}
|
||||
{{ encore_entry_link_tags('dropzone') }}
|
||||
{% endblock encorelinktags %}
|
||||
|
||||
{% block body %}
|
||||
<h3 class="page-header">Téléchargez votre Illustration</h3>
|
||||
<a class="btn btn-default" onClick="closeModal();">Annuler</a>
|
||||
|
||||
<form
|
||||
action="{{ oneup_uploader_endpoint('illustration') }}"
|
||||
class="dropzone"
|
||||
id="mydropzone"
|
||||
data-acceptedMimeTypes="image/*"
|
||||
data-maxFiles=1
|
||||
data-resizeWidth:2500,
|
||||
style="margin-top:10px">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block encorescripttags %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function dropzoneinit( elt ) {
|
||||
}
|
||||
|
||||
function dropzonesuccess( file, response ) {
|
||||
parent.$("#illustration_illustration").val(response["file"]);
|
||||
parent.$("#illustration_width").val(response["width"]);
|
||||
parent.$("#illustration_height").val(response["height"]);
|
||||
parent.$("#illustration_name").val(response["originalname"]);
|
||||
parent.$("#illustration_illustration_img").attr("src","/{{ appAlias }}/uploads/illustration/"+response["file"]);
|
||||
}
|
||||
function dropzonequeuecomplete(file) {
|
||||
closeModal();
|
||||
}
|
||||
function closeModal() {
|
||||
window.parent.$("#extraLargeModal").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
||||
|
122
templates/Illustration/view.html.twig
Executable file
122
templates/Illustration/view.html.twig
Executable file
@ -0,0 +1,122 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block metablock %}
|
||||
<meta property="og:title" content="{{ appName }} - {{ illustration.category.name }} - {{ illustration.name }}" />
|
||||
<meta property="og:description" content="le {{ illustration.submittime|date('d/m/Y H:i') }}" />
|
||||
<meta property="og:url" content="{{ absolute_url(path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params'))) }}" />
|
||||
<meta property="og:image" content="{{ absolute_url("/"~appAlias~"/uploads/illustration/"~illustration.illustration) }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
#main {
|
||||
padding: 0px;
|
||||
display:none;
|
||||
margin-bottom:200px;
|
||||
}
|
||||
|
||||
/* Image */
|
||||
#illustration_illustration_img, #kadavresky_kadavresky_img, #album_photo_img,#webzine_page_img{
|
||||
margin: 30px auto 0px auto;
|
||||
display:block;
|
||||
/*box-shadow: 0px 0px 5px 1px rgba(255, 255, 255, 0.45);*/
|
||||
}
|
||||
|
||||
#bigright{
|
||||
position:absolute;
|
||||
top:30px;
|
||||
right:0px;
|
||||
width:45%;
|
||||
height:100%;
|
||||
line-height:100%;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
padding:5px;
|
||||
}
|
||||
#bigleft{
|
||||
position:absolute;
|
||||
top:30px;
|
||||
left:0px;
|
||||
width:45%;
|
||||
height:100%;
|
||||
vertical-align: middle;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.menuview a {
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
{% if not next is empty %}
|
||||
<a id="bigleft" href="{{ path("app_illustration_view",{"idcat":next[0].category.id,"id":next[0].id})}}"><i class="fas fa-chevron-left fa-3x"></i></a>
|
||||
{% endif %}
|
||||
{% if not prev is empty %}
|
||||
<a id="bigright" href="{{ path("app_illustration_view",{"idcat":prev[0].category.id,"id":prev[0].id})}}"><i class="fas fa-chevron-right fa-3x"></i></a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<img style="display:none;" id="illustration_illustration_img" src="/{{ appAlias }}/uploads/illustration/{{illustration.illustration}}">
|
||||
|
||||
|
||||
<div class="container mb-5">
|
||||
<div class="text-center menuview" style="font-size:25px">
|
||||
<a id="up" href="{{ path("app_home")}}#illustration{{illustration.id}}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||
<a download="{{ illustration.name }}.{{ pathinfo.extension }}" href="/{{ appAlias }}/uploads/illustration/{{illustration.illustration}}"><i class="fa fa-download" aria-hidden="true"></i></a>
|
||||
|
||||
{% if is_granted("ROLE_ADMIN") %}
|
||||
<a id="update" href="{{ path("app_illustration_update",{"id":illustration.id})}}"><i class="fa fa-file" aria-hidden="true"></i></a>
|
||||
<a id="delete" href="{{ path("app_illustration_delete",{"id":illustration.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
<a id="recadre" style="cursor:pointer" onClick="ModalLoad('extraLargeModal','Illustration','{{ path('app_illustration_crop',{"type":"illustration","reportinput":"none"}) }}?file={{illustration.illustration}}');"><i class="fa fa-arrows-alt" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-center" style="clear:both;"><h3>{{ illustration.name }}</h3><small>le {{ illustration.submittime|date('d/m/Y H:i') }}</div>
|
||||
|
||||
<div class="illustration_description" style="clear:both;max-width: 350px;margin: auto; text-align: justify;">
|
||||
{% autoescape 'html' %}
|
||||
{{ illustration.description|raw }}
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function resizeImage() {
|
||||
height=$(window).height()-70;
|
||||
$("#illustration_illustration_img").css({height:height,width:'auto'});
|
||||
|
||||
width=$(window).width()-90;
|
||||
if($("#illustration_illustration_img").width()>width)
|
||||
$("#illustration_illustration_img").css({width:width,height:'auto'});
|
||||
|
||||
height=$("#illustration_illustration_img").height();
|
||||
$("#bigright").css({height:height,"line-height":height+"px"});
|
||||
$("#bigleft").css({height:height,"line-height":height+"px"});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('body').imagesLoaded(function() {
|
||||
resizeImage();
|
||||
$("#illustration_illustration_img").fadeIn();
|
||||
});
|
||||
});
|
||||
|
||||
$("body").keydown(function(e) {
|
||||
if(e.keyCode == 37) { // left
|
||||
var href = $('#bigleft').attr('href');
|
||||
if(href!=null) window.location.href = href;
|
||||
}
|
||||
else if(e.keyCode == 39) {
|
||||
var href = $('#bigright').attr('href');
|
||||
if(href!=null) window.location.href = href;
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
resizeImage();
|
||||
});
|
||||
{% endblock %}
|
23
templates/Include/javascript.js.twig
Normal file
23
templates/Include/javascript.js.twig
Normal file
@ -0,0 +1,23 @@
|
||||
$(document).ready(function() {
|
||||
var doit = true;
|
||||
|
||||
$("a[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
doit = confirm($(this).data('confirm'));
|
||||
if(!doit) return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("button[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
doit = confirm($(this).data('confirm'));
|
||||
if(!doit) return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function ModalLoad(idmodal,title,path) {
|
||||
$("#"+idmodal+" .modal-header h4").text(title);
|
||||
$("#"+idmodal+" iframe").attr("src",path);
|
||||
$("#"+idmodal).modal("show");
|
||||
}
|
64
templates/Include/sidebar.html.twig
Normal file
64
templates/Include/sidebar.html.twig
Normal file
@ -0,0 +1,64 @@
|
||||
<div id="sidebar" class="collapse">
|
||||
<ul class="nav">
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<br>
|
||||
<li class="title">Administration</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_illustration")}}">
|
||||
<i class="fas fa-image"></i> Illustrations
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_category")}}">
|
||||
<i class="fa fa-folder"></i> Catégories Illustrations
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_webzine")}}">
|
||||
<i class="fas fa-book-open"></i> Webzine
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_link")}}">
|
||||
<i class="fas fa-link"></i> Liens
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_config")}}">
|
||||
<i class="fa fa-cog"></i> Configurations
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_user")}}">
|
||||
<i class="fa fa-user"></i> Utilisateurs
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{path("app_group")}}">
|
||||
<i class="fa fa-users"></i> Groupes
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if appCron %}
|
||||
<li>
|
||||
<a href="{{path("app_cron")}}">
|
||||
<i class="fa fa-cogs"></i> Jobs
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class="last">
|
||||
<a href="{{path("app_cron_log")}}">
|
||||
<i class="fa fa-list-alt"></i> Logs / Dump
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
102
templates/Include/style.css.twig
Normal file
102
templates/Include/style.css.twig
Normal file
@ -0,0 +1,102 @@
|
||||
: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 }}";
|
||||
}
|
||||
|
||||
/* COLOR BODY */
|
||||
|
||||
body {
|
||||
background-color: var(--colorbgbodylight);
|
||||
color: var(--colorftbodylight);
|
||||
}
|
||||
|
||||
body .navbar.bg-dark {
|
||||
background-color: var(--colorbgbodydark)!important;
|
||||
}
|
||||
|
||||
body #sidebar {
|
||||
background-color: var(--colorbgbodydark);
|
||||
}
|
||||
|
||||
body #sidebar .title {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body #sidebar .nav a {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body h1, body h2, body h3 {
|
||||
color: var(--colorfttitlelight);
|
||||
}
|
||||
|
||||
body a, btn-link {
|
||||
color: var(--colorfttitlelight);
|
||||
}
|
||||
|
||||
body .nav a{
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* COLOR BODY HOME */
|
||||
|
||||
body.monocolor {
|
||||
background-color: var(--colorbgbodydark);
|
||||
color: var(--colorftbodydark);
|
||||
}
|
||||
|
||||
body.monocolor .navbar.bg-dark {
|
||||
background-color: var(--colorbgbodydark)!important;
|
||||
}
|
||||
|
||||
body.monocolor #sidebar {
|
||||
background-color: var(--colorbgbodydark);
|
||||
}
|
||||
|
||||
body.monocolor #sidebar .title {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor #sidebar .nav a {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor h1, body.monocolor h2, body.monocolor h3 {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor a {
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
body.monocolor .nav a{
|
||||
color: var(--colorfttitledark);
|
||||
}
|
||||
|
||||
a.btn {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* FONT */
|
||||
body {
|
||||
font-family: var(--fontbody);
|
||||
}
|
||||
|
||||
h1,h2,h3, .navbar-brand {
|
||||
font-family: var(--fonttitle);
|
||||
}
|
||||
|
||||
{% if not useheader is defined or not useheader %}
|
||||
#main {padding:0px}
|
||||
{%endif%}
|
65
templates/Link/edit.html.twig
Executable file
65
templates/Link/edit.html.twig
Executable file
@ -0,0 +1,65 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification LIEN
|
||||
{% elseif mode=="submit" %}
|
||||
Création LIEN
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
<a class="btn btn-secondary" href={{ path('app_link') }}>Annuler</a>
|
||||
|
||||
{% if mode=="update" and link.id >= 0 %}
|
||||
<a href="{{ path('app_link_delete',{'id':link.id}) }}"
|
||||
class="btn btn-danger float-right"
|
||||
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_row(form.order) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.url) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#link_order").focus();
|
||||
});
|
||||
{% endblock %}
|
56
templates/Link/list.html.twig
Normal file
56
templates/Link/list.html.twig
Normal file
@ -0,0 +1,56 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
LIENS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_link_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Liens
|
||||
</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 width="70px">Ordre</th>
|
||||
<th>Nom</th>
|
||||
<th>URL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for link in links %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_link_update",{id:link.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% if link.id >=0 %}
|
||||
<a href="{{path("app_link_delete",{id:link.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{link.order}}</td>
|
||||
<td>{{link.name}}</td>
|
||||
<td><a href="{{link.url}}" target="_blank">{{link.url}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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 %}
|
129
templates/User/edit.html.twig
Executable file
129
templates/User/edit.html.twig
Executable file
@ -0,0 +1,129 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification UTILISATEUR
|
||||
{% elseif mode=="submit" %}
|
||||
Création UTILISATEUR
|
||||
{% elseif mode=="profil" %}
|
||||
Profil UTILISATEUR
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
{% if mode=="profil" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_home') }}>Annuler</a>
|
||||
{% else %}
|
||||
<a class="btn btn-secondary" href={{ path('app_user') }}>Annuler</a>
|
||||
{% endif %}
|
||||
|
||||
{% if mode=="update" and user.id>=0 %}
|
||||
<a href="{{ path('app_user_delete',{'id':user.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 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 }}" class="avatar big" >
|
||||
{{ form_widget(form.avatar) }}
|
||||
<a class="btn btn-info" style="width:100%; margin-bottom:15px;" onClick="ModalLoad('extraLargeModal','Avatar','{{ path('app_crop01', {"type": "avatar", "reportinput": "user_avatar" }) }}');" title='Ajouter un avatar'>Modifier</a>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.username) }}
|
||||
{% if form.password is defined %}
|
||||
{{ form_row(form.password) }}
|
||||
{%endif%}
|
||||
{{ form_row(form.lastname) }}
|
||||
{{ form_row(form.firstname) }}
|
||||
{{ form_row(form.email) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if form.roles is defined %}
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Organisation
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.groups) }}
|
||||
{{ form_row(form.roles) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%endif%}
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
<div id="extraLargeModal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="frameModal" frameborder=0 width="100%" height="700px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#user_password_first").val("");
|
||||
$("#user_login").focus();
|
||||
});
|
||||
|
||||
$("#user_avatar_img").on('load', function() {
|
||||
|
||||
})
|
||||
$("#user_avatar_img").on('error', function(){
|
||||
var imgSrc = $(this).attr('src');
|
||||
if(imgSrc!="/{{appAlias}}/uploads/avatar/")
|
||||
$(this).attr('src',imgSrc);
|
||||
});
|
||||
{% endblock %}
|
78
templates/User/list.html.twig
Normal file
78
templates/User/list.html.twig
Normal file
@ -0,0 +1,78 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
UTILISATEURS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_user_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs
|
||||
</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 width="70px" class="no-sort">Avatar</th>
|
||||
<th>Login</th>
|
||||
<th>Prénom</th>
|
||||
<th>Nom</th>
|
||||
<th>Rôles</th>
|
||||
<th>Groupes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_user_update",{id:user.id})}}"><i class="fa fa-file"></i></a>
|
||||
{% if user.id >=0 %}
|
||||
<a href="{{path("app_user_delete",{id:user.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><img id="user_avatar_img" src="{{ user.avatar|urlavatar }}" class="avatar" ></td>
|
||||
<td>{{user.username}}</td>
|
||||
<td>{{user.firstname}}</td>
|
||||
<td>{{user.lastname}}</td>
|
||||
<td>
|
||||
{%for role in user.roles %}
|
||||
{%if role=="ROLE_ADMIN" %}
|
||||
Administrateur<br>
|
||||
{%elseif role=="ROLE_MODO" %}
|
||||
Modérateur<br>
|
||||
{%elseif role=="ROLE_MASTER" %}
|
||||
Master<br>
|
||||
{%elseif role=="ROLE_USER" %}
|
||||
Utilisateur<br>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% for group in user.groups %}
|
||||
{{ group.name }}<br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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: [[ 2, "asc" ]]
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
152
templates/Webzine/edit.html.twig
Executable file
152
templates/Webzine/edit.html.twig
Executable file
@ -0,0 +1,152 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block localstyle %}
|
||||
.webzinepages { text-align:center }
|
||||
.webzinepages div { padding:5px ; margin:5px;}
|
||||
.webzinepages img {
|
||||
width: 100px;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
<h1 class="page-header">
|
||||
{% if mode=="update" %}
|
||||
Modification WEBZINE
|
||||
{% elseif mode=="submit" %}
|
||||
Création WEBZINE
|
||||
{% endif %}
|
||||
</h1>
|
||||
|
||||
{{ form_widget(form.submit) }}
|
||||
|
||||
{% if by=="console" %}
|
||||
<a class="btn btn-secondary" href={{ path('app_webzine') }}>Annuler</a>
|
||||
{% else %}
|
||||
<a class="btn btn-secondary" href={{ path('app_home') }}>Annuler</a>
|
||||
{% endif %}
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_webzine_delete',{'id':webzine.id, 'by':by}) }}"
|
||||
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="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Informations
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.set) }}
|
||||
{{ form_row(form.order) }}
|
||||
{{ form_row(form.mode) }}
|
||||
{{ form_row(form.description) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Planches
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<a class="btn btn-info" style="width:100%; margin-bottom:10px" onClick="ModalLoad('extraLargeModal','Planches','{{ path('app_webzine_upload') }}');" title='Ajouter des Planches'>Télécharger les Planches du Webzine</a>
|
||||
|
||||
<div class="webzinepages">
|
||||
{% for page in webzine.webzinepages %}
|
||||
<div id="div_{{ page.illustration|replace({'.':''}) }}">
|
||||
<img id="{{ page.illustration }}" src="/{{ appAlias }}/uploads/webzine/thumbori_{{ page.illustration }}"><br>
|
||||
<a style="cursor:pointer" onclick="removeLinkPage('{{ page.illustration }}')"><i class='fa fa-trash fa-fw'></i></a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
$("#webzine_name").focus();
|
||||
|
||||
var linkpages="";
|
||||
{% for page in webzine.webzinepages %}
|
||||
if(linkpages=="")
|
||||
linkpages+="{{ page.illustration }}";
|
||||
else
|
||||
linkpages+=",{{ page.illustration }}";
|
||||
{% endfor %}
|
||||
|
||||
$("#webzine_linkpages").val(linkpages);
|
||||
|
||||
$(".webzinepages").sortable({
|
||||
tolerance: 'pointer',
|
||||
revert: '100',
|
||||
opacity: 0.6,
|
||||
forceHelperSize: true,
|
||||
delay: 50,
|
||||
itemSelector: 'img',
|
||||
axis: "y",
|
||||
cursor: "move",
|
||||
|
||||
update: function( event, ui )
|
||||
{
|
||||
var order = [];
|
||||
$('.webzinepages img').each( function(e) {
|
||||
order.push($(this).attr('id'));
|
||||
});
|
||||
|
||||
var positions = order.join(',');
|
||||
$("#webzine_linkpages").val(positions);
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
function removeLinkPage(id) {
|
||||
// On supprime la ligne
|
||||
$("#div_"+id.replace(".","")).remove();
|
||||
console.log($("#div_"+id.replace(".","")).attr("id"));
|
||||
|
||||
// On supprime l'id de la liste
|
||||
$("#webzine_linkpages").val($("#webzine_linkpages").val().replace(id+",",""));
|
||||
$("#webzine_linkpages").val($("#webzine_linkpages").val().replace(","+id,""));
|
||||
$("#webzine_linkpages").val($("#webzine_linkpages").val().replace(id,""));
|
||||
}
|
||||
|
||||
{% endblock %}
|
64
templates/Webzine/list.html.twig
Normal file
64
templates/Webzine/list.html.twig
Normal file
@ -0,0 +1,64 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
WEBZINES
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_webzine_submit',{by:'console'}) }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Webzines
|
||||
</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 width="70px" class="no-sort">Miniature</th>
|
||||
<th width="100px">Serie</th>
|
||||
<th>Nom</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for webzine in webzines %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{path("app_webzine_update",{id:webzine.id,by:'console'})}}"><i class="fa fa-file"></i></a>
|
||||
{% if webzine.id >=0 %}
|
||||
<a href="{{path("app_webzine_delete",{id:webzine.id,by:'console'})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if not webzine.webzinepages is empty %}
|
||||
{% set source="thumbori_"~webzine.webzinepages[0].illustration %}
|
||||
{% set height=30*90/21 %}
|
||||
|
||||
<div style="width:90px; height:{{ height }}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ webzine.set }} #{{ webzine.order| format_number({min_integer_digit:'2'})}}</td>
|
||||
<td>{{ webzine.name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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: [[ 2, "desc" ]]
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
54
templates/Webzine/upload.html.twig
Normal file
54
templates/Webzine/upload.html.twig
Normal file
@ -0,0 +1,54 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block encorelinktags %}
|
||||
{{ encore_entry_link_tags('dropzone') }}
|
||||
{% endblock encorelinktags %}
|
||||
|
||||
{% block body %}
|
||||
<h3 class="page-header">Téléchargez vos Planches</h3>
|
||||
<a class="btn btn-default" onClick="closeModal();">Annuler</a>
|
||||
|
||||
<form
|
||||
action="{{ oneup_uploader_endpoint('webzine') }}"
|
||||
class="dropzone"
|
||||
id="mydropzone"
|
||||
data-acceptedMimeTypes="image/*"
|
||||
data-resizeWidth:2500,
|
||||
style="margin-top:10px">
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block encorescripttags %}
|
||||
{{ encore_entry_script_tags('dropzone') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function dropzoneinit( elt ) {
|
||||
}
|
||||
|
||||
function dropzonesuccess( file, response ) {
|
||||
var val = parent.$("#webzine_linkpages").val();
|
||||
if(val=="")
|
||||
parent.$("#webzine_linkpages").val(response["file"]);
|
||||
else
|
||||
parent.$("#webzine_linkpages").val(val+","+response["file"]);
|
||||
|
||||
html="";
|
||||
html+="<div id='div_"+response["file"].replace(".","")+"'>";
|
||||
html+="<img id='"+response["file"]+"' src='/{{ appAlias }}/uploads/webzine/thumb_"+response["file"]+"'>";
|
||||
html+="<br>";
|
||||
html+="<a style='cursor:pointer' onclick='removeLinkPage(\""+response["file"]+"\")'><i class='fa fa-trash fa-fw'></i></a>";
|
||||
html+="</div>";
|
||||
|
||||
parent.$(".webzinepages").append($(html));
|
||||
}
|
||||
|
||||
function dropzonequeuecomplete(file) {
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#extraLargeModal").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
||||
|
143
templates/Webzine/view.html.twig
Executable file
143
templates/Webzine/view.html.twig
Executable file
@ -0,0 +1,143 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block metablock %}
|
||||
<meta property="og:title" content="{{ appName }} - Webzine - {{ page.webzine.name }}" />
|
||||
<meta property="og:description" content="le {{ page.webzine.submittime|date('d/m/Y H:i') }}" />
|
||||
<meta property="og:url" content="{{ absolute_url(path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params'))) }}" />
|
||||
<meta property="og:image" content="{{ absolute_url("/"~appAlias~"/uploads/webzine/"~page.illustration) }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block localstyle %}
|
||||
<style>
|
||||
#main {
|
||||
padding: 0px;
|
||||
display:none;
|
||||
margin-bottom:200px;
|
||||
}
|
||||
|
||||
/* Image */
|
||||
#webzine_webzine_img, #kadavresky_kadavresky_img, #album_photo_img,#webzine_page_img{
|
||||
margin: 30px auto 0px auto;
|
||||
display:block;
|
||||
/*box-shadow: 0px 0px 5px 1px rgba(255, 255, 255, 0.45);*/
|
||||
}
|
||||
|
||||
#bigright{
|
||||
position:absolute;
|
||||
top:30px;
|
||||
right:0px;
|
||||
width:45%;
|
||||
height:100%;
|
||||
line-height:100%;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
padding:5px;
|
||||
}
|
||||
#bigleft{
|
||||
position:absolute;
|
||||
top:30px;
|
||||
left:0px;
|
||||
width:45%;
|
||||
height:100%;
|
||||
vertical-align: middle;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.menuview a {
|
||||
margin: 0px 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% if not prev is empty %}
|
||||
<a id="bigleft" href="{{ path("app_webzine_view",{"idcat":prev[0].webzine.id,"id":prev[0].id})}}"><i class="fas fa-chevron-left fa-3x"></i></a>
|
||||
{% endif %}
|
||||
{% if not next is empty %}
|
||||
<a id="bigright" href="{{ path("app_webzine_view",{"idcat":next[0].webzine.id,"id":next[0].id})}}"><i class="fas fa-chevron-right fa-3x"></i></a>
|
||||
{% endif %}
|
||||
|
||||
<img style="display:none;" id="webzine_webzine_img" src="/{{ appAlias }}/uploads/webzine/{{page.illustration}}">
|
||||
|
||||
|
||||
<div class="container mb-5">
|
||||
<div class="text-center menuview" style="font-size:25px">
|
||||
<a id="up" href="{{ path("app_home")}}#webzine{{webzine.id}}"><i class="fa fa-home" aria-hidden="true"></i></a>
|
||||
<a download="{{ webzine.name }}-{{page.order}}.{{ pathinfo.extension }}" href="/{{ appAlias }}/uploads/webzine/{{page.illustration}}"><i class="fa fa-download" aria-hidden="true"></i></a>
|
||||
|
||||
{% if is_granted("ROLE_ADMIN") %}
|
||||
<a id="update" href="{{ path("app_webzine_update",{"id":webzine.id})}}"><i class="fa fa-file" aria-hidden="true"></i></a>
|
||||
<a id="delete" href="{{ path("app_webzine_delete",{"id":webzine.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-center" style="clear:both;">
|
||||
<h3>{{ webzine.name }} - {{ page.order }}</h3>
|
||||
<small>le {{ webzine.submittime|date('d/m/Y H:i') }}</small><br>
|
||||
|
||||
{% for page in webzine.webzinepages %}
|
||||
{% set height=30*90/21 %}
|
||||
<a href="{{ path("app_webzine_view",{"idcat":webzine.id,"id":page.id}) }}">
|
||||
<div style="display: inline-block; width:90px; height:{{height}}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/thumbori_{{page.illustration}}"></div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
{% if sets|length > 1 %}
|
||||
{% set height=30*90/21 %}
|
||||
<h3 class="mt-3">Dans la même série</h3>
|
||||
{% for set in sets %}
|
||||
{% if not set.webzinepages is empty %}
|
||||
<a href="{{ path("app_webzine_view",{"idcat":set.id,"id":set.webzinepages[0].id}) }}">
|
||||
<div style="display: inline-block; width:90px; height:{{height}}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/thumbori_{{set.webzinepages[0].illustration}}"></div>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="webzine_description" style="clear:both;max-width: 350px;margin: auto; text-align: justify;">
|
||||
<small>
|
||||
{% autoescape 'html' %}
|
||||
{{ webzine.description|raw }}
|
||||
{% endautoescape %}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
function resizeImage() {
|
||||
height=$(window).height()-70;
|
||||
$("#webzine_webzine_img").css({height:height,width:'auto'});
|
||||
|
||||
width=$(window).width()-90;
|
||||
if($("#webzine_webzine_img").width()>width)
|
||||
$("#webzine_webzine_img").css({width:width,height:'auto'});
|
||||
|
||||
height=$("#webzine_webzine_img").height();
|
||||
$("#bigright").css({height:height,"line-height":height+"px"});
|
||||
$("#bigleft").css({height:height,"line-height":height+"px"});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('body').imagesLoaded(function() {
|
||||
resizeImage();
|
||||
$("#webzine_webzine_img").fadeIn();
|
||||
});
|
||||
});
|
||||
|
||||
$("body").keydown(function(e) {
|
||||
if(e.keyCode == 37) { // left
|
||||
var href = $('#bigleft').attr('href');
|
||||
if(href!=null) window.location.href = href;
|
||||
}
|
||||
else if(e.keyCode == 39) {
|
||||
var href = $('#bigright').attr('href');
|
||||
if(href!=null) window.location.href = href;
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
resizeImage();
|
||||
});
|
||||
{% endblock %}
|
165
templates/base.html.twig
Normal file
165
templates/base.html.twig
Normal file
@ -0,0 +1,165 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
|
||||
<title>{% block title %}{{app.session.get("appname")}}{% endblock %}</title>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
{% block metablock %}
|
||||
{% endblock %}
|
||||
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{% block encorelinktags %}
|
||||
{% endblock encorelinktags %}
|
||||
<link rel="shortcut icon" href="/{{ appAlias }}/uploads/logo/{{app.session.get("logolight")}}" />
|
||||
<link href="/{{ appAlias }}/styles/css/font.css" rel="stylesheet" media="screen" />
|
||||
<link href="/{{ appAlias }}/styles/css/style.css" rel="stylesheet" media="screen" />
|
||||
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{% block encorescripttags %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
{{ include('Include/style.css.twig') }}
|
||||
|
||||
{% block localstyle %}
|
||||
|
||||
{% endblock %}
|
||||
</style>
|
||||
|
||||
{% set class="" %}
|
||||
{% if usemonocolor is defined and usemonocolor %}
|
||||
{% set class="monocolor" %}
|
||||
{% endif %}
|
||||
|
||||
<body class={{ class }}>
|
||||
|
||||
{% if useheader is defined and useheader %}
|
||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark">
|
||||
<a class="navbar-brand" href="{{ path('app_home')}}">
|
||||
<img src="/{{ appAlias }}/uploads/logo/{{app.session.get("logodark")}}" style="height:30px;margin-top:-3px;">
|
||||
{{app.session.get("appname")}}
|
||||
</a>
|
||||
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#sidebar" aria-controls="sidebar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
{% if app.user %}
|
||||
<li>
|
||||
<a href="{{path("app_user_profil")}}">
|
||||
<img src="{{app.user.avatar|urlavatar}}" class="avatar">
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<li>
|
||||
<a href="{{path("app_illustration")}}"><i class="fa fa-cog fa-fw"></i></a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href={{ path("app_illustration_submit",{'by':'console'}) }} title="Créer une Illustration">
|
||||
<i class="fa fa-paint-brush fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
{% if app.user %}
|
||||
{% if appAuth=="MYSQL" %}
|
||||
<a href="{{path("app_logout")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
|
||||
{% elseif appAuth=="CAS" %}
|
||||
<a href="{{path("app_logoutcas")}}"><i class="fa fa-sign-out-alt fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if appAuth=="MYSQL" %}
|
||||
<a href="{{path("app_login")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
|
||||
{% elseif appAuth=="CAS" %}
|
||||
<a href="{{path("app_logincas")}}"><i class="fa fa-sign-in-alt fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<main id="main" class="container-fluid">
|
||||
{% set contentsidebar="" %}
|
||||
{% if usesidebar is defined and usesidebar %}
|
||||
{% set contentsidebar="contentsidebar" %}
|
||||
{{ include('Include/sidebar.html.twig') }}
|
||||
{%endif%}
|
||||
|
||||
|
||||
<div id="mycontent" class="content {{contentsidebar}}">
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div id="mymodal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<iframe id="framemodal" frameborder=0 width="100%" height="600px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="extraLargeModal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="frameModal" frameborder=0 width="100%" height="700px"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block localexternalscript %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<script>
|
||||
{{ include('Include/javascript.js.twig') }}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(".pick-a-color").spectrum(
|
||||
{
|
||||
type: "text",
|
||||
showAlpha: false
|
||||
}
|
||||
);
|
||||
|
||||
{% block localjavascript %}
|
||||
{% endblock %}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user