Commit dd951827 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Affichage

parent b0fdfc70
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -91,13 +91,13 @@ if (isset($options['affichages']) AND isset($options['affichages']['width'])) $w
            <th> Structure </th>
        <?php endif; ?>
        <?php if ($displayDate) : ?>
            <th style="width:15rem;"> Date</th>
            <th data-type="num" style="width:15rem;"> Date</th>
        <?php endif; ?>
        <?php if ($displayLieu) : ?>
            <th> Lieu</th>
        <?php endif; ?>
        <?php if ($displayEtat) : ?>
            <th style="min-width:6rem;"> État </th>
            <th data-type="num" style="min-width:6rem;"> État </th>
        <?php endif; ?>
        <?php if ($displayAction) : ?>
        <?php if (!$dropdowns) : ?>
@@ -142,7 +142,7 @@ if (isset($options['affichages']) AND isset($options['affichages']['width'])) $w
            </td>
        <?php endif; ?>
        <?php if ($displayDate) : ?>
            <td>
            <td data-order="<?php echo $entretien->getDateEntretien()->getTimestamp(); ?>">
                <?php echo $entretien->getDateEntretien()->format('d/m/Y H:i'); ?>
            </td>
        <?php endif; ?>
@@ -150,7 +150,7 @@ if (isset($options['affichages']) AND isset($options['affichages']['width'])) $w
            <td> <?php echo $entretien->getLieu(); ?> </td>
        <?php endif; ?>
        <?php if ($displayEtat) : ?>
            <td style="text-align: center;"> <?php echo $this->etatinstance($entretien->getEtatActif()); ?> </td>
            <td data-order="<?php echo ($entretien->getEtatActif())?$entretien->getEtatActif()->getType()->getOrdre():9999; ?>" style="text-align: center;"> <?php echo $this->etatinstance($entretien->getEtatActif()); ?> </td>
        <?php endif; ?>
        <?php if ($displayAction) : ?>
        <td class="action">
+13 −2
Original line number Diff line number Diff line
@@ -74,11 +74,22 @@ class AdministrationController extends AbstractActionController

    public function templateAction() : ViewModel
    {
        $templates = $this->getTemplateService()->getTemplatesByNamespace('Formation\Provider\Template');
        $namespace = 'Formation\Provider\Template';

        $type = $this->params()->fromQuery('type');
        $type = ($type !== '')?$type:null;

        $templates = $this->getTemplateService()->getTemplatesByTypeAndNamespaces($type, $namespace);
        $namespaces = [$namespace];
        $types = $this->getTemplateService()->getTypes();

        $vm =  new ViewModel([
            'title' => 'Gestion des templates',
            'templates' => $templates,
            'title' => "Gestion des templates",
            'namespaces' => $namespaces,
            'types' => $types,
            'namespace' => $namespace,
            'type' => $type,
        ]);
        $vm->setTemplate('unicaen-renderer/template/index');
        return $vm;