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

Ajustements mineurs

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