Skip to content
Snippets Groups Projects
Commit 2fac10cd authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Ajustements mineurs

parent 2c450002
No related branches found
No related tags found
No related merge requests found
Pipeline #16162 passed
...@@ -34,12 +34,11 @@ return [ ...@@ -34,12 +34,11 @@ return [
'administration' => [ 'administration' => [
'pages' => [ 'pages' => [
'contenu' => [ 'contenu' => [
'label' => 'Contenu', 'label' => 'Templates et macros',
'route' => 'contenu', 'route' => 'contenu/template',
'resource' => PrivilegeController::getResourceId(IndexController::class, 'index'), 'resource' => PrivilegeController::getResourceId(IndexController::class, 'index'),
'order' => 10001, 'order' => 10001,
'pages' => [ 'icon' => 'fas fa-angle-right',
],
], ],
], ],
], ],
......
...@@ -171,7 +171,7 @@ Dépendance à **UnicaenPrivilege** ...@@ -171,7 +171,7 @@ Dépendance à **UnicaenPrivilege**
```php ```php
<?php <?php
use UnicaenAuth\Guard\PrivilegeController; use UnicaenPrivilege\Guard\PrivilegeController;
use UnicaenRenderer\Controller\IndexController; use UnicaenRenderer\Controller\IndexController;
use UnicaenRenderer\Controller\MacroController; use UnicaenRenderer\Controller\MacroController;
use UnicaenRenderer\Controller\RenduController; use UnicaenRenderer\Controller\RenduController;
......
...@@ -203,7 +203,7 @@ class MacroService { ...@@ -203,7 +203,7 @@ class MacroService {
{ {
$macros = $this->getMacros(); $macros = $this->getMacros();
$result = "let macros = [\n"; $result = "macros = [\n";
foreach ($macros as $macro) { foreach ($macros as $macro) {
$result .= " { title:'" . $macro->getCode() . "', description:'" . strip_tags(str_replace("'","\'",$macro->getDescription())) . "', content:'VAR[" . $macro->getCode() . "]' },\n"; $result .= " { title:'" . $macro->getCode() . "', description:'" . strip_tags(str_replace("'","\'",$macro->getDescription())) . "', content:'VAR[" . $macro->getCode() . "]' },\n";
} }
......
...@@ -46,7 +46,6 @@ $this->headTitle($title); ...@@ -46,7 +46,6 @@ $this->headTitle($title);
<?php if ($canAjouter) : ?> <?php if ($canAjouter) : ?>
<a href="<?php echo $this->url('contenu/macro/ajouter', [], [], true); ?>" <a href="<?php echo $this->url('contenu/macro/ajouter', [], [], true); ?>"
class="btn btn-primary action ajax-modal" data-event="modification"> class="btn btn-primary action ajax-modal" data-event="modification">
<span class="icon ajouter"></span>
<span class="icon icon-ajouter"></span> <span class="icon icon-ajouter"></span>
Ajouter une macro Ajouter une macro
</a> </a>
...@@ -54,7 +53,6 @@ $this->headTitle($title); ...@@ -54,7 +53,6 @@ $this->headTitle($title);
<a href="<?php echo $this->url('contenu/macro/generer-json', [], [], true); ?>" <a href="<?php echo $this->url('contenu/macro/generer-json', [], [], true); ?>"
class="btn btn-primary action ajax-modal"> class="btn btn-primary action ajax-modal">
<span class="icon code"></span>
<span class="icon icon-code"></span> <span class="icon icon-code"></span>
Générer le JSON des macros Générer le JSON des macros
</a> </a>
...@@ -84,9 +82,7 @@ $this->headTitle($title); ...@@ -84,9 +82,7 @@ $this->headTitle($title);
<td> <td>
<?php echo $macro->getCode(); ?> <?php echo $macro->getCode(); ?>
<?php if ($macro->getDescription() !== null) : ?> <?php if ($macro->getDescription() !== null) : ?>
<span class="icon information" data-toggle="tooltip" data-html="true" <span class="icon icon-information" data-bs-toggle="tooltip" data-bs-html="true"
title="<?php echo $macro->getDescription(); ?>"></span>
<span class="icon icon-information" data-toggle="tooltip" data-html="true"
title="<?php echo $macro->getDescription(); ?>"></span> title="<?php echo $macro->getDescription(); ?>"></span>
<?php endif; ?> <?php endif; ?>
</td> </td>
...@@ -99,17 +95,17 @@ $this->headTitle($title); ...@@ -99,17 +95,17 @@ $this->headTitle($title);
<td class="text-end"> <td class="text-end">
<?php if ($canModifier) : ?> <?php if ($canModifier) : ?>
<a href="<?php echo $this->url('contenu/macro/modifier', ['macro' => $macro->getId()], [], true); ?>" <a href="<?php echo $this->url('contenu/macro/modifier', ['macro' => $macro->getId()], [], true); ?>"
class="ajax-modal" data-event="modification" data-toggle="tooltip" data-html="true" class="ajax-modal" data-event="modification" data-bs-toggle="tooltip" data-bs-html="true"
title="Modification de la macro <span class='highlight macro'><?php echo $macro->getCode(); ?></span>" title="Modification de la macro <span class='highlight macro'><?php echo $macro->getCode(); ?></span>"
> >
<span class="icon editer"></span><span class="icon icon-editer"></span></a> <span class="icon icon-editer"></span></a>
<?php endif; ?> <?php endif; ?>
<?php if ($canSupprimer) : ?> <?php if ($canSupprimer) : ?>
<a href="<?php echo $this->url('contenu/macro/supprimer', ['macro' => $macro->getId()], [], true); ?>" <a href="<?php echo $this->url('contenu/macro/supprimer', ['macro' => $macro->getId()], [], true); ?>"
class="ajax-modal" data-event="modification" data-toggle="tooltip" data-html="true" class="ajax-modal" data-event="modification" data-bs-toggle="tooltip" data-bs-html="true"
title="Suppression de la macro <span class='highlight macro'><?php echo $macro->getCode(); ?></span>" title="Suppression de la macro <span class='highlight macro'><?php echo $macro->getCode(); ?></span>"
> >
<span class="icon detruire text-danger"></span><span class="icon icon-supprimer text-danger"></span></a> <span class="icon icon-supprimer text-danger"></span></a>
<?php endif; ?> <?php endif; ?>
</td> </td>
</tr> </tr>
......
...@@ -36,10 +36,11 @@ ...@@ -36,10 +36,11 @@
<div class="col-md-7"> <div class="col-md-7">
<div class="form-group"> <div class="form-group">
<button class="btn btn-primary" id="filter"> <button class="btn btn-primary" id="filter">
<span class="icon filtrer"></span> <span class="icon icon-filtrer"></span>
Filtrer Filtrer
</button> </button>
<button class="btn btn-primary" id="clear"> <button class="btn btn-primary" id="clear">
<span class="icon icon-erase"></span>
Effacer Effacer
</button> </button>
</div> </div>
......
...@@ -68,7 +68,7 @@ $canSupprimer = $this->isAllowed(DocumentcontenuPrivileges::getResourceId(Docume ...@@ -68,7 +68,7 @@ $canSupprimer = $this->isAllowed(DocumentcontenuPrivileges::getResourceId(Docume
</td> </td>
<td> <?php echo $rendu->getDate()->format('d/m/Y à H:i:s'); ?> </td> <td> <?php echo $rendu->getDate()->format('d/m/Y à H:i:s'); ?> </td>
<td> <td>
<span title="<?php echo $rendu->getSujet(); ?>" data-toggle="tooltip" data-html="true"> <span title="<?php echo $rendu->getSujet(); ?>" data-bs-toggle="tooltip" data-bs-html="true">
<?php <?php
$sujet = $rendu->getSujet(); $sujet = $rendu->getSujet();
if (strlen($sujet) > 50) $sujet = substr($rendu->getSujet(), 0, 46) . " ..."; if (strlen($sujet) > 50) $sujet = substr($rendu->getSujet(), 0, 46) . " ...";
...@@ -80,18 +80,18 @@ $canSupprimer = $this->isAllowed(DocumentcontenuPrivileges::getResourceId(Docume ...@@ -80,18 +80,18 @@ $canSupprimer = $this->isAllowed(DocumentcontenuPrivileges::getResourceId(Docume
<?php if ($canVoir) : ?> <?php if ($canVoir) : ?>
<?php /** @see \UnicaenRenderer\Controller\RenduController::afficherAction() */ ?> <?php /** @see \UnicaenRenderer\Controller\RenduController::afficherAction() */ ?>
<a href="<?php echo $this->url('contenu/rendu/afficher', ['rendu' => $rendu->getId()], [], true); ?>" <a href="<?php echo $this->url('contenu/rendu/afficher', ['rendu' => $rendu->getId()], [], true); ?>"
title="Afficher le rendu" data-toggle="tooltip" data-html="true" title="Afficher le rendu" data-bs-toggle="tooltip" data-bs-html="true"
class="ajax-modal" class="ajax-modal"
> >
<span class="icon voir"></span><span class="icon icon-voir"></span></a> <span class="icon icon-voir"></span></a>
<?php endif; ?> <?php endif; ?>
<?php if ($canSupprimer) : ?> <?php if ($canSupprimer) : ?>
<?php /** @see \UnicaenRenderer\Controller\RenduController::supprimerAction() */ ?> <?php /** @see \UnicaenRenderer\Controller\RenduController::supprimerAction() */ ?>
<a href="<?php echo $this->url('contenu/rendu/supprimer', ['rendu' => $rendu->getId()], [], true); ?>" <a href="<?php echo $this->url('contenu/rendu/supprimer', ['rendu' => $rendu->getId()], [], true); ?>"
title="Supprimer le rendu" data-toggle="tooltip" data-html="true" title="Supprimer le rendu" data-bs-toggle="tooltip" data-bs-html="true"
class="ajax-modal" data-event="modification" class="ajax-modal" data-event="modification"
> >
<span class="icon detruire text-danger"></span><span class="icon icon-supprimer text-danger"></span></a> <span class="icon icon-supprimer text-danger"></span></a>
<?php endif; ?> <?php endif; ?>
</td> </td>
</tr> </tr>
......
...@@ -44,7 +44,6 @@ $this->headTitle($title); ...@@ -44,7 +44,6 @@ $this->headTitle($title);
<?php /** @see \UnicaenRenderer\Controller\TemplateController::ajouterAction() */ ?> <?php /** @see \UnicaenRenderer\Controller\TemplateController::ajouterAction() */ ?>
<a href="<?php echo $this->url('contenu/template/ajouter', [], [], true); ?>" <a href="<?php echo $this->url('contenu/template/ajouter', [], [], true); ?>"
class="btn btn-primary action ajax-modal" data-event="modification"> class="btn btn-primary action ajax-modal" data-event="modification">
<span class="icon ajouter"></span>
<span class="icon icon-ajouter"></span> <span class="icon icon-ajouter"></span>
Ajouter un template Ajouter un template
</a> </a>
...@@ -72,10 +71,8 @@ $this->headTitle($title); ...@@ -72,10 +71,8 @@ $this->headTitle($title);
<td> <td>
<?php echo $template->getCode(); ?> <?php echo $template->getCode(); ?>
<?php if ($template->getDescription() !== null) : ?> <?php if ($template->getDescription() !== null) : ?>
<span class="icon information" title="<?php echo $template->getDescription(); ?>"
data-toggle="tooltip" data-html="true"></span>
<span class="icon icon-information" title="<?php echo $template->getDescription(); ?>" <span class="icon icon-information" title="<?php echo $template->getDescription(); ?>"
data-toggle="tooltip" data-html="true"></span> data-bs-toggle="tooltip" data-bs-html="true"></span>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
...@@ -86,21 +83,21 @@ $this->headTitle($title); ...@@ -86,21 +83,21 @@ $this->headTitle($title);
<?php /** @see \UnicaenRenderer\Controller\TemplateController::afficherAction() */ ?> <?php /** @see \UnicaenRenderer\Controller\TemplateController::afficherAction() */ ?>
<a href="<?php echo $this->url('contenu/template/afficher', ['template' => $template->getId()], [], true); ?>" <a href="<?php echo $this->url('contenu/template/afficher', ['template' => $template->getId()], [], true); ?>"
class="ajax-modal"> class="ajax-modal">
<span class="icon voir"></span><span class="icon icon-voir"></span></a> <span class="icon icon-voir"></span></a>
<?php endif; ?> <?php endif; ?>
<?php if ($canModifier) : ?> <?php if ($canModifier) : ?>
<?php /** @see \UnicaenRenderer\Controller\TemplateController::modifierAction() */ ?> <?php /** @see \UnicaenRenderer\Controller\TemplateController::modifierAction() */ ?>
<a href="<?php echo $this->url('contenu/template/modifier', ['template' => $template->getId()], [], true); ?>" <a href="<?php echo $this->url('contenu/template/modifier', ['template' => $template->getId()], [], true); ?>"
class="ajax-modal" data-event="modification" class="ajax-modal" data-event="modification"
> >
<span class="icon editer"></span><span class="icon icon-editer"></span></a> <span class="icon icon-editer"></span></a>
<?php endif; ?> <?php endif; ?>
<?php if ($canDetruire) : ?> <?php if ($canDetruire) : ?>
<?php /** @see \UnicaenRenderer\Controller\TemplateController::detruireAction() */ ?> <?php /** @see \UnicaenRenderer\Controller\TemplateController::detruireAction() */ ?>
<a href="<?php echo $this->url('contenu/template/detruire', ['template' => $template->getId()], [], true); ?>" <a href="<?php echo $this->url('contenu/template/detruire', ['template' => $template->getId()], [], true); ?>"
class="ajax-modal" data-event="modification" class="ajax-modal" data-event="modification"
> >
<span class="icon detruire text-danger"></span><span class="icon icon-supprimer text-danger"></span></a> <span class="icon icon-supprimer text-danger"></span></a>
<?php endif; ?> <?php endif; ?>
</td> </td>
</tr> </tr>
...@@ -114,7 +111,9 @@ $this->headTitle($title); ...@@ -114,7 +111,9 @@ $this->headTitle($title);
$(function () { $(function () {
if (jQuery().dataTable) { if (jQuery().dataTable) {
$('#template-liste').DataTable({ $('#template-liste').DataTable({
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "Tous"]], "lengthMenu": [[50, 100, -1], [50, 100, "Tous"]],
// "paging": false,
"sroting": false,
"columnDefs": [ "columnDefs": [
{targets: 2, orderable: false, searchable: false}, {targets: 2, orderable: false, searchable: false},
], ],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment