Skip to content
Snippets Groups Projects
Commit 56e093a6 authored by Thibaut Vallee's avatar Thibaut Vallee
Browse files

Migration Laminas

parent 7284df61
No related branches found
No related tags found
1 merge request!1Laminas migration
Pipeline #15235 passed
......@@ -11,7 +11,7 @@ class MacroHydrator implements HydratorInterface {
* @param Macro $object
* @return array
*/
public function extract($object)
public function extract(object $object) : array
{
$data = [
'code' => $object->getCode(),
......
......@@ -11,7 +11,7 @@ class TemplateHydrator implements HydratorInterface {
* @param Template $object
* @return array
*/
public function extract($object)
public function extract($object) : array
{
$data = [
'code' => ($object)?$object->getCode():null,
......
......@@ -60,7 +60,6 @@ $canTemplate = $this->isAllowed(DocumenttemplatePrivileges::getResourceId(Docume
</div>
<?php endif; ?>
<?php if ($canRendu) : ?>
<h2> Gestion des rendus </h2>
......
......@@ -37,7 +37,7 @@ $this->headTitle("Index des macros");
Générer le JSON des macros
</a>
<table class="table table-condensed table-hover">
<table id='macro-liste' class="table table-condensed table-hover">
<thead>
<tr>
<th> Code </th>
......@@ -74,7 +74,7 @@ $this->headTitle("Index des macros");
class="ajax-modal" data-event="modification" data-toggle="tooltip" data-html="true"
title="Suppression de la macro <span class='highlight macro'><?php echo $macro->getCode(); ?></span>"
>
<span class="icon detruire"></span></a>
<span class="icon detruire text-danger"></span></a>
<?php endif; ?>
</td>
</tr>
......@@ -89,5 +89,28 @@ $this->headTitle("Index des macros");
event.div.modal('hide');
window.location.reload();
});
if(jQuery().dataTable) {
$('#macro-liste').DataTable({
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "Tous"]],
"columnDefs": [
{targets: 3, orderable: false, searchable: false},
],
"language": {
'lengthMenu': "Afficher _MENU_ &eacute;l&eacute;ments",
"search": "Filtre de recherche : _INPUT_",
"loadingRecords": "Chargement en cours...",
'info': "<small class=\"text-highlight\">Affichage : <strong><i class=\"far fa-list-alt\"></i> _START_ - _END_ sur _TOTAL_</strong></small>",
'infoEmpty': "",
'infoFiltered': "<small class=\"text-highlight\">(_MAX_ &eacute;l&eacute;ments au total)</small>",
'emptyTable': "Aucune donnée disponible.",
'zeroRecords': "Aucun enregistrement trouvé.",
"paginate": {
"previous": "<i class=\"fas fa-chevron-left\"></i>",
"next": "<i class=\"fas fa-chevron-right\"></i>"
}
},
});
}
});
</script>
\ No newline at end of file
......@@ -10,17 +10,16 @@
<div class="panel panel-default">
<div class="panel-heading">
<span class="icon filtrer"></span> Filtre des macros
<h2>Filtrer les macros</h2>
</div>
<div class="panel-body">
<form method="get" id="filtre" action="<?php echo $this->url(); ?>">
<div class="row">
<!-- Variable -------------------------------------------------------- -->
<div class="col-md-3">
<div class="col-md-5">
<div class="form-group">
<label for="variable">Variable associée :</label>
<select id="variable" name="variable" class="selectpicker">
<option value=""> Tous les variables </option>
<select id="variable" name="variable" class="form-control selectpicker">
<option value=""> Toutes les variables</option>
<?php foreach ($variables as $variable) : ?>
<option
value="<?php echo $variable; ?>"
......@@ -33,17 +32,16 @@
</div>
</div>
<!-- BOUTON -->
<div class="col-md-3">
<br/>
<div class="pull-right">
<button class="btn btn-primary" id="clear">
<span class="icon effacer"></span>
</button>
<button class="btn btn-primary" id="filter" style="width:20rem;">
<div class="col-md-7">
<div class="form-group">
<button class="btn btn-primary" id="filter">
<span class="icon filtrer"></span>
Filtrer
</button>
<button class="btn btn-primary" id="clear">
<span class="icon effacer"></span>
Effacer
</button>
</div>
</div>
</div>
......@@ -53,6 +51,11 @@
<script>
$(function () {
if (jQuery().selectpicker) {
$('#variable').selectpicker('render');
}
$("form#filtre").submit(function (e) {
e.preventDefault();
});
......@@ -69,4 +72,6 @@
query += "&variable=" + variableId;
window.location.href = 'macro?' + query;
});
});
</script>
\ No newline at end of file
......@@ -16,10 +16,9 @@ $canSupprimer = $this->isAllowed(DocumentcontenuPrivileges::getResourceId(Docume
<h1 class="page-header">
Index des rendus
<span class="badge"><?php echo count($rendus); ?> </span>
</h1>
<table class="table table-condensed table-hover">
<table id='rendu-liste' class="table table-condensed table-hover">
<thead>
<tr>
<th> Id</th>
......@@ -63,7 +62,7 @@ $canSupprimer = $this->isAllowed(DocumentcontenuPrivileges::getResourceId(Docume
title="Supprimer le rendu" data-toggle="tooltip" data-html="true"
class="ajax-modal" data-event="modification"
>
<span class="icon detruire"></span></a>
<span class="icon detruire text-danger"></span></a>
<?php endif; ?>
</td>
</tr>
......@@ -73,6 +72,29 @@ $canSupprimer = $this->isAllowed(DocumentcontenuPrivileges::getResourceId(Docume
<script>
$(function () {
if (jQuery().dataTable) {
$('#rendu-liste').DataTable({
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "Tous"]],
"columnDefs": [
{targets: 4, orderable: false, searchable: false},
],
"language": {
'lengthMenu': "Afficher _MENU_ &eacute;l&eacute;ments",
"search": "Filtre de recherche : _INPUT_",
"loadingRecords": "Chargement en cours...",
'info': "<small class=\"text-highlight\">Affichage : <strong><i class=\"far fa-list-alt\"></i> _START_ - _END_ sur _TOTAL_</strong></small>",
'infoEmpty': "",
'infoFiltered': "<small class=\"text-highlight\">(_MAX_ &eacute;l&eacute;ments au total)</small>",
'emptyTable': "Aucune donnée disponible.",
'zeroRecords': "Aucun enregistrement trouvé.",
"paginate": {
"previous": "<i class=\"fas fa-chevron-left\"></i>",
"next": "<i class=\"fas fa-chevron-right\"></i>"
}
},
});
}
$("body").on("modification", function (event) {
event.div.modal('hide');
window.location.reload();
......
......@@ -29,7 +29,7 @@ $this->headTitle("Index des templates");
</a>
<?php endif; ?>
<table class="table table-condensed table-hover">
<table id='template-liste' class="table table-condensed table-hover">
<thead>
<tr>
<th> Code </th>
......@@ -69,7 +69,7 @@ $this->headTitle("Index des templates");
<a href="<?php echo $this->url('contenu/template/detruire', ['template' => $template->getId()], [], true); ?>"
class="ajax-modal" data-event="modification"
>
<span class="icon detruire"></span></a>
<span class="icon detruire text-danger"></span></a>
<?php endif; ?>
</td>
</tr>
......@@ -79,6 +79,29 @@ $this->headTitle("Index des templates");
<script>
$(function() {
if(jQuery().dataTable) {
$('#template-liste').DataTable({
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "Tous"]],
"columnDefs": [
{targets: 2, orderable: false, searchable: false},
],
"language": {
'lengthMenu': "Afficher _MENU_ &eacute;l&eacute;ments",
"search": "Filtre de recherche : _INPUT_",
"loadingRecords": "Chargement en cours...",
'info': "<small class=\"text-highlight\">Affichage : <strong><i class=\"far fa-list-alt\"></i> _START_ - _END_ sur _TOTAL_</strong></small>",
'infoEmpty': "",
'infoFiltered': "<small class=\"text-highlight\">(_MAX_ &eacute;l&eacute;ments au total)</small>",
'emptyTable': "Aucune donnée disponible.",
'zeroRecords': "Aucun enregistrement trouvé.",
"paginate": {
"previous": "<i class=\"fas fa-chevron-left\"></i>",
"next": "<i class=\"fas fa-chevron-right\"></i>"
}
},
});
}
$("body").on("modification", function (event) {
event.div.modal('hide');
window.location.reload();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment