]> git.agnieray.net Git - galette.git/blob - galette/includes/routes/groups.routes.php
25c277392a84f0f715cb75aa230974d160087014
[galette.git] / galette / includes / routes / groups.routes.php
1 <?php
2
3 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5 /**
6 * Groups related routes
7 *
8 * PHP version 5
9 *
10 * Copyright © 2014 The Galette Team
11 *
12 * This file is part of Galette (http://galette.tuxfamily.org).
13 *
14 * Galette is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * Galette is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
26 *
27 * @category Routes
28 * @package Galette
29 *
30 * @author Johan Cwiklinski <johan@x-tnd.be>
31 * @copyright 2014 The Galette Team
32 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
33 * @version SVN: $Id$
34 * @link http://galette.tuxfamily.org
35 * @since 0.8.2dev 2014-11-27
36 */
37
38 use Galette\Controllers\Crud;
39 use Galette\Controllers\PdfController;
40
41 use Galette\Entity\Adherent;
42 use Galette\Entity\Group;
43 use Galette\Repository\Groups;
44 use Galette\Repository\Members;
45
46 $app->get(
47 '/groups[/{id:\d+}]',
48 Crud\GroupsController::class . ':list'
49 )->setName('groups')->add($authenticate);
50
51 $app->get(
52 '/group/add/{name}',
53 Crud\GroupsController::class . ':doAdd'
54 )->setName('add_group')->add($authenticate);
55
56 $app->post(
57 '/group/edit/{id:\d+}',
58 Crud\GroupsController::class . ':doEdit'
59 )->setName('doEditGroup')->add($authenticate);
60
61 $app->get(
62 '/group/remove/{id:\d+}',
63 Crud\GroupsController::class . ':confirmDelete'
64 )->setName('removeGroup')->add($authenticate);
65
66 $app->post(
67 '/group/remove/{id:\d+}',
68 Crud\GroupsController::class . ':delete'
69 )->setName('doRemoveGroup')->add($authenticate);
70
71 $app->get(
72 '/pdf/groups[/{id:\d+}]',
73 PdfController::class . ':group'
74 )->setName('pdf_groups')->add($authenticate);
75
76 $app->post(
77 '/ajax/group',
78 Crud\GroupsController::class . ':getGroup'
79 )->setName('ajax_group')->add($authenticate);
80
81 $app->post(
82 '/ajax/unique-groupname',
83 Crud\GroupsController::class . ':checkUniqueness'
84 )->setName('ajax_groupname_unique')->add($authenticate);
85
86 $app->post(
87 '/ajax/groups',
88 Crud\GroupsController::class . ':simpleList'
89 )->setName('ajax_groups')->add($authenticate);
90
91 $app->post(
92 '/ajax/groups/reorder',
93 Crud\GroupsController::class . ':reorder'
94 )->setName('ajax_groups_reorder')->add($authenticate);