first commit symfony 6
This commit is contained in:
66
templates/Audit/list.html.twig
Normal file
66
templates/Audit/list.html.twig
Normal file
@ -0,0 +1,66 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
AUDIT {{ entityname }}
|
||||
</h1>
|
||||
|
||||
<div class="card mt-3" >
|
||||
<div class="card-header">
|
||||
<i class="fas fa-eye fa-fw"></i> Audit
|
||||
</div>
|
||||
|
||||
<div id="bodyaudit" class="card-body">
|
||||
<table class="table table-striped table-bordered table-hover dataTable" style="width:100%; zoom:80%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Par</th>
|
||||
<th>Action</th>
|
||||
<th>Id</th>
|
||||
<th>Détail</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for audit in audits|reverse %}
|
||||
<tr>
|
||||
<td>{{audit.datesubmit|date("d/m/Y H:i")}}</td>
|
||||
<td>{{audit.username}}</td>
|
||||
<td>{{audit.description}}</td>
|
||||
<td>{{audit.entityid}}</td>
|
||||
<td>
|
||||
<small>
|
||||
{% for key, detail in audit.detail %}
|
||||
{% if audit.description=="UPDATE" %}
|
||||
<strong>{{key}}</strong> =
|
||||
de {%if detail[0] is empty%}null {%else%}{{detail[0]|join(', ')}}{%endif%}
|
||||
à {%if detail[1] is empty%}null {%else%} {{detail[1]|join(', ')}}{%endif%}
|
||||
</br>
|
||||
{% else %}
|
||||
<strong>id</strong> {{detail}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.table').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 0, "desc" ]],
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
68
templates/Audit/render.html.twig
Normal file
68
templates/Audit/render.html.twig
Normal file
@ -0,0 +1,68 @@
|
||||
|
||||
<div class="card mt-3" >
|
||||
<div class="card-header" onClick="switchAudit()">
|
||||
<i class="fas fa-eye fa-fw"></i> Audit
|
||||
<div id="btnaudit" class="btn btn-secondary float-end btn-sm" style="font-family:var(--fontbody)">
|
||||
{%if not app.session.get("fgaudit")%}Afficher{%else%}Masquer{%endif%}</div>
|
||||
</div>
|
||||
|
||||
<div id="bodyaudit" class="card-body" style="{%if not app.session.get("fgaudit")%}display:none;{%endif%}">
|
||||
<table class="table table-striped table-bordered table-hover dataTable" style="width:100%; zoom:80%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Par</th>
|
||||
<th>Action</th>
|
||||
<th>Détail</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for audit in audits|reverse %}
|
||||
<tr>
|
||||
<td>{{audit.datesubmit|date("d/m/Y H:i")}}</td>
|
||||
<td>{{audit.username}}</td>
|
||||
<td>{{audit.description}}</td>
|
||||
<td>
|
||||
<small>
|
||||
{% for key, detail in audit.detail %}
|
||||
{% if audit.description=="UPDATE" %}
|
||||
<strong>{{key}}</strong> =
|
||||
de {%if detail[0] is empty%}null {%else%}{{detail[0]|join(', ')}}{%endif%}
|
||||
à {%if detail[1] is empty%}null {%else%} {{detail[1]|join(', ')}}{%endif%}
|
||||
</br>
|
||||
{% else %}
|
||||
<strong>id</strong> {{detail}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function switchAudit() {
|
||||
{% if app.user %}
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{ path('app_user_preference') }}",
|
||||
data: {
|
||||
id:0,
|
||||
key:'fgaudit',
|
||||
value: !($("#bodyaudit").is(":visible"))
|
||||
},
|
||||
success: function() {
|
||||
}
|
||||
});
|
||||
$("#bodyaudit").toggle();
|
||||
if($("#bodyaudit").is(":visible"))
|
||||
$("#btnaudit").html("Masquer");
|
||||
else
|
||||
$("#btnaudit").html("Afficher");
|
||||
{% endif %}
|
||||
}
|
||||
</script>
|
@ -5,6 +5,10 @@
|
||||
CONFIGURATIONS
|
||||
</h1>
|
||||
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Config"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
<br><br>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 mt-4">
|
||||
|
@ -45,6 +45,13 @@
|
||||
{{ form_row(form.nextexecdate) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
|
||||
<div class="float-end" style="width:700px;max-width:100%">
|
||||
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Cron",entityid:cron.id})) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -4,6 +4,10 @@
|
||||
<h1 class="page-header">
|
||||
CRON JOBS
|
||||
</h1>
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Cron"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
</br><br>
|
||||
{% endif %}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
@ -75,6 +75,12 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
|
||||
<div class="float-end" style="width:700px;max-width:100%">
|
||||
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Group",entityid:group.id})) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -3,12 +3,18 @@
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des Groupes </h1>
|
||||
|
||||
<p>
|
||||
{%if access=="admin" %}
|
||||
<p><a class="btn btn-success" href={{ path('app_'~access~'_group_submit') }}>Ajouter</a></p>
|
||||
<a class="btn btn-success" href={{ path('app_'~access~'_group_submit') }}>Ajouter</a>
|
||||
{%elseif access=="user" and app.session.get("submitgroup") %}
|
||||
<p><a class="btn btn-success" href={{ path('app_'~access~'_group_submit') }}>Ajouter</a></p>
|
||||
<a class="btn btn-success" href={{ path('app_'~access~'_group_submit') }}>Ajouter</a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Group"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Groupes
|
||||
|
@ -74,6 +74,12 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
|
||||
<div class="float-end" style="width:700px;max-width:100%">
|
||||
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Niveau01",entityid:niveau01.id})) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -3,7 +3,12 @@
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des {{ appNiveau01label }}s </h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_admin_niveau01_submit') }}>Ajouter</a></p>
|
||||
<p>
|
||||
<a class="btn btn-success" href={{ path('app_admin_niveau01_submit') }}>Ajouter</a>
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Niveau01"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
|
@ -56,5 +56,12 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
|
||||
<div class="float-end" style="width:700px;max-width:100%">
|
||||
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Niveau02",entityid:niveau02.id})) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
@ -3,7 +3,12 @@
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des {{ appNiveau02label }}s </h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_'~access~'_niveau02_submit') }}>Ajouter</a></p>
|
||||
<p>
|
||||
<a class="btn btn-success" href={{ path('app_'~access~'_niveau02_submit') }}>Ajouter</a>
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Niveau02"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
|
@ -144,6 +144,10 @@
|
||||
{{ form_row(form.telephonenumber) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
|
||||
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Registration",entityid:registration.id})) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -3,6 +3,13 @@
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des Inscriptions</h1>
|
||||
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Registration"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
<br>
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Inscription
|
||||
|
@ -247,10 +247,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
|
||||
{{ render(path("app_"~access~"_audit_renderid",{entityname:"User",entityid:user.id})) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="groupmodal" class="modal fade bs-item-modal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
@ -394,6 +398,7 @@
|
||||
$('#tbllistgroup').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
|
||||
responsive: true,
|
||||
scrollX: false,
|
||||
iDisplayLength: 100,
|
||||
processing: true,
|
||||
order: [[ 1, "asc" ]],
|
||||
@ -402,6 +407,7 @@
|
||||
$('#tbllistmodo').DataTable({
|
||||
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
|
||||
responsive: true,
|
||||
scrollX: false,
|
||||
iDisplayLength: 100,
|
||||
processing: true,
|
||||
order: [[ 1, "asc" ]],
|
||||
|
@ -8,6 +8,10 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"User"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
{% endif %}
|
||||
|
||||
<div class="card mt-4">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs
|
||||
|
@ -47,6 +47,12 @@
|
||||
{{ form_widget(form.label) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if auditUse and mode=="update" and (access=="admin" or access=="modo" or access=="audit") %}
|
||||
<div class="float-end" style="width:700px;max-width:100%">
|
||||
{{ render(path("app_"~access~"_audit_renderid",{entityname:"Whitelist",entityid:whitelist.id})) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -3,7 +3,12 @@
|
||||
{% block body %}
|
||||
<h1 class="page-header">Gestion des Listes Blanche</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_admin_whitelist_submit') }}>Ajouter</a></p>
|
||||
<p>
|
||||
<a class="btn btn-success" href={{ path('app_admin_whitelist_submit') }}>Ajouter</a>
|
||||
{% if auditUse and (access=="admin" or access=="audit") %}
|
||||
<a class="btn btn-secondary float-end" href="{{ path("app_"~access~"_audit_render",{entityname:"Whitelist"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
Reference in New Issue
Block a user