Commit 9431788f authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Page de recherche de rapports annuels ; amélioration de la page de dépôt de rapport annuel.

parent 5ab30faf
Loading
Loading
Loading
Loading
+1 −0
Changes for composer.json: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
        "ext-imagick":                   "*",
        "ext-readline":                  "*",
        "ext-gettext":                   "*",
        "ext-zip":                       "*",
        "unicaen/app":                   "^1.3",
        "unicaen/auth":                  "^1.3",
        "unicaen/faq":                   "^1.0",
+5 −3
Changes for module/Application/config/module.config.php: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
<?php

namespace Application;

use Application\Assertion\AssertionAbstractFactory;
use Application\Cache\MemcachedFactory;
use Application\Controller\Factory\IndexControllerFactory;
@@ -8,7 +10,8 @@ use Application\Event\UserAuthenticatedEventListenerFactory;
use Application\Event\UserRoleSelectedEventListener;
use Application\Form\Factory\EcoleDoctoraleFormFactory;
use Application\Navigation\NavigationFactoryFactory;
use Application\RouteMatchInjector;
use Application\Search\Filter\Provider\SearchFilterProviderService;
use Application\Search\Filter\Provider\SearchFilterProviderServiceFactory;
use Application\Service\AuthorizeServiceAwareInitializer;
use Application\Service\Role\RoleService;
use Application\Service\Role\RoleServiceFactory;
@@ -16,8 +19,6 @@ use Application\Service\ServiceAwareInitializer;
use Application\Service\Url\UrlServiceFactory;
use Application\Service\UserContextServiceAwareInitializer;
use Application\Service\UserContextServiceFactory;
use Application\SourceCodeStringHelper;
use Application\SourceCodeStringHelperFactory;
use Application\View\Helper\EscapeTextHelper;
use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain;
use Doctrine\DBAL\Driver\OCI8\Driver as OCI8;
@@ -197,6 +198,7 @@ return array(
            'Sygal\Memcached'                => MemcachedFactory::class,
            'RoleService' => RoleServiceFactory::class,
            SourceCodeStringHelper::class => SourceCodeStringHelperFactory::class,
            SearchFilterProviderService::class => SearchFilterProviderServiceFactory::class,
        ),
        'abstract_factories' => [
            AssertionAbstractFactory::class,
+9 −13
Changes for module/Application/config/others/fichier-these.config.php: 9 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ return [
                    'action'     => [
                        'apercevoir-page-de-couverture',
                    ],
                    'role' => ThesePrivileges::THESE_TELECHARGEMENT_FICHIER,
                    'privileges' => ThesePrivileges::THESE_TELECHARGEMENT_FICHIER,
                ],
                [
                    'controller' => 'Application\Controller\FichierThese',
@@ -85,15 +85,14 @@ return [
                'options'       => [
                    'route' => '/[:language/]fichier',
                    'defaults'      => [
                        '__NAMESPACE__' => 'Application\Controller',
                        'controller' => 'FichierThese',
                        'controller' => 'Application\Controller\FichierThese',
                        'language'   => 'fr_FR',
                    ],
                ],
                'may_terminate' => false,
                'child_routes'  => [
                    'deposes' => [
                        'type'          => 'Segment',
                        'type'          => 'Literal',
                        'options'       => [
                            'route' => '/deposes',
                            'defaults'      => [
@@ -108,11 +107,14 @@ return [
                            'constraints'   => [
                                'these' => '\d+',
                            ],
                            'defaults' => [
                                'controller' => 'Application\Controller\FichierThese', // indispensable ! :-?
                            ],
                        ],
                        'may_terminate' => false,
                        'child_routes'  => [
                            'lister-fichiers'     => [
                                'type'     => 'Segment',
                                'type'     => 'Literal',
                                'options'  => [
                                    'route' => '/lister-fichiers',
                                    'defaults' => [
@@ -122,7 +124,7 @@ return [
                                ],
                            ],
                            'televerser'  => [
                                'type'     => 'Segment',
                                'type'     => 'Literal',
                                'options'  => [
                                    'route' => '/televerser',
                                    'defaults' => [
@@ -157,7 +159,7 @@ return [
                                ],
                            ],
                            'apercevoir-page-de-couverture' => [
                                'type'        => 'Segment',
                                'type'        => 'Literal',
                                'options'     => [
                                    'route' => '/apercevoir-page-de-couverture',
                                    'defaults'    => [
@@ -219,12 +221,6 @@ return [
                                'order'    => 100,
                                'resource' => PrivilegeController::getResourceId('Application\Controller\FichierThese', 'deposes'),
                            ],
                            'rapport-annuel' => [
                                'label'    => 'Rapport annuel',
                                'route'    => 'fichier/deposes',
                                'order'    => 100,
                                'resource' => PrivilegeController::getResourceId('Application\Controller\FichierThese', 'deposes'),
                            ],
                        ],
                    ],
                ],
+19 −9
Changes for module/Application/config/others/fichier.config.php: 19 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ return [
                    ],
                    'privileges' => FichierPrivileges::FICHIER_COMMUN_TELECHARGER,
                ],

                [
                    'controller' => 'Application\Controller\Fichier',
                    'action'     => [
@@ -59,6 +58,13 @@ return [
                        FichierPrivileges::FICHIER_COMMUN_TELECHARGER,
                    ],
                ],
                [
                    'controller' => 'Application\Controller\Fichier',
                    'action'     => [
                        'telecharger-permanent',
                    ],
                    'roles' => [],
                ],
                [
                    'controller' => 'Application\Controller\Fichier',
                    'action'     => [
@@ -79,8 +85,7 @@ return [
                'options'       => [
                    'route' => '/[:language/]fichier',
                    'defaults'      => [
                        '__NAMESPACE__' => 'Application\Controller',
                        'controller' => 'FichierThese',
                        'controller' => 'Application\Controller\Fichier',
                        'language'   => 'fr_FR',
                    ],
                ],
@@ -94,11 +99,19 @@ return [
                                'fichier' => '[a-zA-Z0-9-]+',
                            ],
                            'defaults'      => [
                                'controller' => 'Fichier',
                                'action' => 'telecharger',
                            ],
                        ],
                    ],
                    'telecharger-permanent' => [
                        'type'          => 'Segment',
                        'options'       => [
                            'route' => '/telecharger/permanent/:idPermanent',
                            'defaults'      => [
                                'action' => 'telecharger-permanent',
                            ],
                        ],
                    ],
                    'supprimer' => [
                        'type'          => 'Segment',
                        'options'       => [
@@ -107,27 +120,24 @@ return [
                                'fichier' => '[a-zA-Z0-9-]+',
                            ],
                            'defaults'      => [
                                'controller' => 'Fichier',
                                'action' => 'supprimer',
                            ],
                        ],
                    ],
                    'televerser-fichiers-communs' => [
                        'type'          => 'Segment',
                        'type'          => 'Literal',
                        'options'       => [
                            'route' => '/televerser-fichiers-communs',
                            'defaults'      => [
                                'controller' => 'Fichier',
                                'action' => 'televerser-fichiers-communs',
                            ],
                        ],
                    ],
                    'lister-fichiers-communs' => [
                        'type'          => 'Segment',
                        'type'          => 'Literal',
                        'options'       => [
                            'route' => '/lister-fichiers-communs',
                            'defaults'      => [
                                'controller' => 'Fichier',
                                'action' => 'lister-fichiers-communs',
                            ],
                        ],
+101 −16
Changes for module/Application/config/others/rapport-annuel.config.php: 101 added lines, 16 removed lines.
Original line number Diff line number Diff line
@@ -3,10 +3,15 @@
namespace Application;

use Application\Controller\Factory\RapportAnnuelControllerFactory;
use Application\Controller\Factory\RapportAnnuelRechercheControllerFactory;
use Application\Controller\RapportAnnuelController;
use Application\Controller\RapportAnnuelRechercheController;
use Application\Form\Factory\RapportAnnuelFormFactory;
use Application\Form\RapportAnnuelForm;
use Application\Provider\Privilege\RapportAnnuelPrivileges;
use Application\Search\Controller\SearchControllerPluginFactory;
use Application\Service\RapportAnnuel\RapportAnnuelSearchService;
use Application\Service\RapportAnnuel\RapportAnnuelSearchServiceFactory;
use Application\Service\RapportAnnuel\RapportAnnuelService;
use Application\Service\RapportAnnuel\RapportAnnuelServiceFactory;
use UnicaenAuth\Guard\PrivilegeController;
@@ -24,10 +29,12 @@ return [
                'allow' => [
                    [
                        'privileges' => [
                            RapportAnnuelPrivileges::RAPPORT_ANNUEL_TELECHARGER,
                            RapportAnnuelPrivileges::RAPPORT_ANNUEL_TELEVERSER,
                            RapportAnnuelPrivileges::RAPPORT_ANNUEL_TELECHARGER,
                            RapportAnnuelPrivileges::RAPPORT_ANNUEL_SUPPRIMER,
                        ],
                        'resources'  => ['RapportAnnuel'],
                        'assertion' => 'Assertion\\RapportAnnuel',
                    ],
                ],
            ],
@@ -37,18 +44,49 @@ return [
                [
                    'controller' => RapportAnnuelController::class,
                    'action'     => [
                        'lister',
                        'consulter',
                    ],
                    'privileges' => RapportAnnuelPrivileges::RAPPORT_ANNUEL_CONSULTER,
                    'assertion' => 'Assertion\\RapportAnnuel',
                ],
                [
                    'controller' => RapportAnnuelController::class,
                    'action'     => [
                        'telecharger',
                    ],
                    'privileges' => RapportAnnuelPrivileges::RAPPORT_ANNUEL_TELECHARGER,
                    'assertion' => 'Assertion\\RapportAnnuel',
                ],
                [
                    'controller' => RapportAnnuelController::class,
                    'action'     => [
                        'ajouter',
                        'supprimer',
                    ],
                    'privileges' => RapportAnnuelPrivileges::RAPPORT_ANNUEL_TELEVERSER,
                    'assertion' => 'Assertion\\RapportAnnuel',
                ],
                [
                    'controller' => RapportAnnuelController::class,
                    'action'     => [
                        'supprimer',
                    ],
                    'privileges' => RapportAnnuelPrivileges::RAPPORT_ANNUEL_SUPPRIMER,
                    'assertion' => 'Assertion\\RapportAnnuel',
                ],
                [
                    'controller' => RapportAnnuelRechercheController::class,
                    'action'     => [
                        'index',
                        'filters',
                    ],
                    'privileges' => RapportAnnuelPrivileges::RAPPORT_ANNUEL_RECHERCHER,
                ],
                [
                    'controller' => RapportAnnuelRechercheController::class,
                    'action'     => [
                        'telecharger-zip',
                    ],
                    'privileges' => RapportAnnuelPrivileges::RAPPORT_ANNUEL_TELECHARGER_ZIP,
                ],
            ],
        ],
@@ -56,7 +94,7 @@ return [
    'router' => [
        'routes' => [
            'rapport-annuel' => [
                'type'          => 'Segment',
                'type'          => 'Literal',
                'options'       => [
                    'route' => '/rapport-annuel',
                    'defaults'      => [
@@ -65,25 +103,56 @@ return [
                ],
                'may_terminate' => false,
                'child_routes'  => [
                    'rechercher' => [
                        'type'          => 'Segment',
                    'recherche' => [
                        'type'          => 'Literal',
                        'options'       => [
                            'route' => '/recherche',
                            'defaults'      => [
                                'action' => 'recherche',
                                'controller' => RapportAnnuelRechercheController::class,
                            ],
                        ],
                        'may_terminate' => false,
                        'child_routes'  => [
                            'index' => [
                                'type'          => 'Literal',
                                'options'       => [
                                    'route' => '/',
                                    'defaults'      => [
                                        'action' => 'index',
                                    ],
                                ],
                            ],
                            'filters' => [
                                'type'          => 'Literal',
                                'options'       => [
                                    'route'       => '/filters',
                                    'defaults'    => [
                                        'action' => 'filters',
                                    ],
                                ],
                            ],
                            'telecharger-zip'     => [
                                'type'     => 'Literal',
                                'options'  => [
                                    'route' => '/telecharger-zip',
                                    'defaults' => [
                                        'action' => 'telecharger-zip',
                                        /* @see RapportAnnuelRechercheController::telechargerZipAction() */
                                    ],
                                ],
                            ],
                    'lister'     => [
                        ],
                    ],
                    'consulter'     => [
                        'type'     => 'Segment',
                        'options'  => [
                            'route' => '/lister/:these',
                            'route' => '/consulter/:these',
                            'constraints'   => [
                                'these' => '\d+',
                            ],
                            'defaults' => [
                                'action' => 'lister',
                                /* @see RapportAnnuelController::listerAction() */
                                'action' => 'consulter',
                                /* @see RapportAnnuelController::consulterAction() */
                            ],
                        ],
                    ],
@@ -100,6 +169,19 @@ return [
                            ],
                        ],
                    ],
                    'telecharger' => [
                        'type'          => 'Segment',
                        'options'       => [
                            'route' => '/telecharger/:rapportAnnuel',
                            'constraints' => [
                                'rapportAnnuel' => '\d+',
                            ],
                            'defaults'      => [
                                'action' => 'telecharger',
                                /* @see RapportAnnuelController::telechargerAction() */
                            ],
                        ],
                    ],
                    'supprimer' => [
                        'type'        => 'Segment',
                        'options'     => [
@@ -125,9 +207,10 @@ return [
                        'pages' => [
                            'rapport-annuel' => [
                                'label'    => 'Rapports annuels',
                                'route'    => 'rapport-annuel/recherche',
                                'route'    => 'rapport-annuel/recherche/index',
                                'order'    => 100,
                                'resource' => PrivilegeController::getResourceId(RapportAnnuelController::class, 'recherche'),
                                'resource' => PrivilegeController::getResourceId(RapportAnnuelRechercheController::class, 'index'),
                                'privilege' => RapportAnnuelPrivileges::RAPPORT_ANNUEL_RECHERCHER,
                            ],
                        ],
                    ],
@@ -138,18 +221,20 @@ return [
    'service_manager' => [
        'factories' => [
            RapportAnnuelService::class => RapportAnnuelServiceFactory::class,
            //RapportAnnuelSearchService::class => RapportAnnuelSearchServiceFactory::class,
            RapportAnnuelSearchService::class => RapportAnnuelSearchServiceFactory::class,
        ],
    ],
    'controllers' => [
        'factories' => [
            RapportAnnuelController::class => RapportAnnuelControllerFactory::class,
            //RapportAnnuelRechercheController::class => RapportAnnuelRechercheControllerFactory::class,
            RapportAnnuelRechercheController::class => RapportAnnuelRechercheControllerFactory::class,
        ],
    ],
    'controller_plugins' => [
        'invokables' => [
            'urlRapportAnnuel' => UrlRapportAnnuel::class,
        ],
        'factories' => [
            'searchControllerPlugin' => SearchControllerPluginFactory::class,
        ],
    ],
    'form_elements'   => [
Loading