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

Reduction de l'interface

parent 358ca910
Loading
Loading
Loading
Loading
Loading

config/merged/index.config.php

deleted100644 → 0
+0 −82
Changes for config/merged/index.config.php: 0 added lines, 82 removed lines.
Original line number Diff line number Diff line
<?php

namespace UnicaenEtat;

use UnicaenEtat\Controller\IndexController;
use UnicaenEtat\Controller\IndexControllerFactory;
use UnicaenEtat\Provider\Privilege\EtatPrivileges;
use UnicaenPrivilege\Guard\PrivilegeController;
use Laminas\Router\Http\Literal;

return [
    'bjyauthorize' => [
        'guards' => [
            PrivilegeController::class => [
                [
                    'controller' => IndexController::class,
                    'action' => [
                        'index',
                    ],
                    'privileges' => [
                        EtatPrivileges::ETAT_INDEX,
                    ],
                ],
            ],
        ],
    ],

    'router'          => [
        'routes' => [
            'unicaen-etat' => [
                'type' => Literal::class,
                'options' => [
                    'route' => '/unicaen-etat',
                    'defaults' => [
                        'controller' => IndexController::class,
                        'action' => 'index',
                    ],
                ],
                'may_terminate' => true,
                'child_routes' => [],
            ],
        ],
    ],

    'navigation' => [
        'default' => [
            'home' => [
                'pages' => [
                    'administration' => [
                        'pages' => [
                            'unicaen-etat' => [
                                'label' => 'État',
                                'route' => 'unicaen-etat',
                                'resource' => PrivilegeController::getResourceId(IndexController::class, 'index'),
                                'order'    => 5000,
                                'icon' => 'fas fa-angle-right',
                                'pages' => [
                                ],
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],

    'service_manager' => [
        'factories' => [],
    ],
    'controllers'     => [
        'factories' => [
            IndexController::class => IndexControllerFactory::class,
        ],
    ],
    'form_elements' => [
        'factories' => [],
    ],
    'hydrators' => [
        'factories' => [],
    ]

];
 No newline at end of file
+42 −0
Changes for config/module.config.php: 42 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain;
use Doctrine\ORM\Mapping\Driver\XmlDriver;
use Laminas\Router\Http\Literal;
use UnicaenEtat\Controller\EtatTypeController;
use UnicaenPrivilege\Guard\PrivilegeController;

return [
    'doctrine' => [
@@ -27,6 +30,45 @@ return [
        ],
    ],

    'router'          => [
        'routes' => [
            'unicaen-etat' => [
                'type' => Literal::class,
                'options' => [
                    'route' => '/unicaen-etat',
                    'defaults' => [
                        'controller' => IndexController::class,
                        'action' => 'index',
                    ],
                ],
                'may_terminate' => false,
                'child_routes' => [],
            ],
        ],
    ],

    'navigation' => [
        'default' => [
            'home' => [
                'pages' => [
                    'administration' => [
                        'pages' => [
                            'unicaen-etat' => [
                                'label' => 'État',
                                'route' => 'unicaen-etat/etat-type',
                                'resource' => PrivilegeController::getResourceId(EtatTypeController::class, 'index'),
                                'order'    => 5000,
                                'icon' => 'fas fa-angle-right',
                                'pages' => [
                                ],
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],

    'view_manager'    => [
        'template_path_stack' => [
            __DIR__ . '/../view',
+0 −16
Changes for src/UnicaenEtat/Controller/IndexController.php: 0 added lines, 16 removed lines.
Original line number Diff line number Diff line
<?php

namespace UnicaenEtat\Controller;

use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Model\ViewModel;

class IndexController extends AbstractActionController {

    public function indexAction() {
        return new ViewModel([
        ]);
    }

}
+0 −18
Changes for src/UnicaenEtat/Controller/IndexControllerFactory.php: 0 added lines, 18 removed lines.
Original line number Diff line number Diff line
<?php

namespace UnicaenEtat\Controller;

use Interop\Container\ContainerInterface;

class IndexControllerFactory {

    /**
     * @param ContainerInterface $container
     * @return IndexController
     */
    public function __invoke(ContainerInterface $container)
    {
        $controller = new IndexController();
        return $controller;
    }
}
 No newline at end of file
+15 −2
Changes for view/unicaen-etat/etat-categorie/index.phtml: 15 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@ $this->headTitle("Catégories d'état");
            Catégories d'état
            <span class="badge"><?php echo count($etatsCategories); ?></span>
        </h1>
    </div>
    <div class="pull-right">
        <?php /** @see \UnicaenEtat\Controller\EtatCategorieController::ajouterAction() */ ?>
        <a href="<?php echo $this->url('unicaen-etat/etat-categorie/ajouter', [], [], true); ?>"
           class="btn btn-primary action ajax-modal" data-event="modification">
@@ -25,6 +23,21 @@ $this->headTitle("Catégories d'état");
            Ajouter une catégorie d'état
        </a>
    </div>
    <div class="pull-right">

        <?php /** @see \UnicaenEtat\Controller\EtatTypeController::indexAction() */ ?>
        <a href="<?php echo $this->url('unicaen-etat/etat-type', [], [], true); ?>"
           class="btn btn-primary action">
            <span class="icon acceder"></span>
            Accéder aux types
        </a>
        <br/>
        <a href="<?php echo $this->url('unicaen-etat/etat-type/ajouter', [], [], true); ?>"
           class="btn btn-primary action disabled">
            <span class="icon acceder"></span>
            Accéder aux instances TODO
        </a>
    </div>
</div>

<div class="main">
Loading