summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2016-03-12 00:20:18 +0100
committerLudovic Pouzenc <ludovic@pouzenc.fr>2016-03-12 00:20:18 +0100
commit37a67ea723bb6d93421591b8f3ed15738f53ed9e (patch)
tree38b58703b82eaab20975d6e648533eb44598938e
parenta6104f47f7a0534664f8f3740f303f01e7e7399e (diff)
downloadchd_gestion-37a67ea723bb6d93421591b8f3ed15738f53ed9e.zip
chd_gestion-37a67ea723bb6d93421591b8f3ed15738f53ed9e.tar.gz
chd_gestion-37a67ea723bb6d93421591b8f3ed15738f53ed9e.tar.bz2
First import.
-rw-r--r--TODO89
-rw-r--r--generator/after-bake/src/Controller/AdherentRolesController.php89
-rw-r--r--generator/after-bake/src/Controller/AdherentsController.php149
-rw-r--r--generator/after-bake/src/Controller/EquipementsController.php138
-rw-r--r--generator/after-bake/src/Controller/IpmgmtController.php107
-rw-r--r--generator/after-bake/src/Controller/IppubliquesController.php79
-rw-r--r--generator/after-bake/src/Controller/RelaisController.php122
-rw-r--r--generator/after-bake/src/Controller/ServicesController.php259
-rw-r--r--generator/after-bake/src/Controller/VillesController.php104
-rw-r--r--generator/after-bake/src/Locale/default.pot1306
-rw-r--r--generator/after-bake/src/Locale/fr_FR/default.po1305
-rw-r--r--generator/after-bake/src/Template/AdherentRoles/add.ctp46
-rw-r--r--generator/after-bake/src/Template/AdherentRoles/index.ctp66
-rw-r--r--generator/after-bake/src/Template/Adherents/edit.ctp106
-rw-r--r--generator/after-bake/src/Template/Adherents/index.ctp102
-rw-r--r--generator/after-bake/src/Template/Adherents/view.ctp235
-rw-r--r--generator/after-bake/src/Template/Equipements/index.ctp102
-rw-r--r--generator/after-bake/src/Template/Equipements/view.ctp90
-rw-r--r--generator/after-bake/src/Template/Ipmgmt/view.ctp80
-rw-r--r--generator/after-bake/src/Template/Ippubliques/index.ctp84
-rw-r--r--generator/after-bake/src/Template/Ippubliques/view.ctp79
-rw-r--r--generator/after-bake/src/Template/Layout/default.ctp79
-rw-r--r--generator/after-bake/src/Template/Relais/view.ctp90
-rw-r--r--generator/after-bake/src/Template/Services/add.ctp48
-rw-r--r--generator/after-bake/src/Template/Services/edit.ctp64
-rw-r--r--generator/after-bake/src/Template/Services/index.ctp100
-rw-r--r--generator/after-bake/src/Template/Services/migrate.ctp45
-rw-r--r--generator/after-bake/src/Template/Services/view.ctp117
-rw-r--r--generator/after-bake/src/Template/Villes/view.ctp130
-rw-r--r--generator/before-bake/config/app.php321
-rw-r--r--generator/before-bake/config/bake_extra.php162
-rw-r--r--generator/before-bake/config/bootstrap_cli.php70
-rwxr-xr-xgenerator/before-bake/maj_default_pot.sh22
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Controller/controller.ctp78
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/_empty.ctp45
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/add.ctp71
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/edit.ctp74
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/index.ctp69
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/form.ctp126
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/entity.ctp127
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/table.ctp258
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/index.ctp179
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/view.ctp215
-rw-r--r--generator/before-bake/plugins/CustomTheme/src/View/Helper/BakeExtraHelper.php65
-rw-r--r--generator/before-bake/src/View/AppView.php63
-rw-r--r--generator/before-bake/tests/TestCase/View/I18nBasicTest.php39
-rw-r--r--generator/before-bake/webroot/.htaccess6
-rw-r--r--generator/before-bake/webroot/css/local.css46
-rw-r--r--generator/before-bake/webroot/favicon.ico0
-rw-r--r--generator/composer.json45
-rwxr-xr-xgenerator/make.sh78
-rwxr-xr-xgenerator/quick.sh24
52 files changed, 7593 insertions, 0 deletions
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..4973cca
--- /dev/null
+++ b/TODO
@@ -0,0 +1,89 @@
+
+Equipements :
+ - manque un type (switch / routeur / antenne) et un filtre dessus ?
+ - filtre plein texte cassé.. et peu utile aussi
+
+Filtres :
+ - tri des colonnes avec chaines vide en dernier
+http://stackoverflow.com/questions/8510632/php-mysql-order-by-date-but-empty-dates-last-not-first
+http://stackoverflow.com/questions/2052216/mysql-orderby-a-number-empty-strings-or-0s-last
+http://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#getting-the-first-result
+
+Services :
+ - les adhésions comme ligne dans service ça fait chier, au moins visuellement. Ca oblige a ajouter de la logique du type "pas IP publique associée à une adhésion".
+
+
+Global :
+ - Logguer les actions
+ - Templater les belongsTo (reste les liens delete, le nbre de colonne est foireux, les clés sont affichées et pas résolues...)
+
+
+Adhérents
+- index : pouvoir chercher un ADT par son numéro (commencé mais ça pas marche™)
+- pb ergonomie : obligé dde chercher 2 fois l'ADT pour le modfier, puis modifier les services attachés
+- Champ adherents.date_validation déconnant : le form met par défaut la date du jour dedans donc ça ne valide rien du tout
+
+Services
+- saisie date de fin (en optionnel et non pré-repmpli à la date actuelle)
+
+Validation / transformation de format de données (téléphones +33 , mails lowercase)
+
+Fonctionnalités manquantes
+- Action pour transformer un "Intéressé" en embryon de fiche adhérent
+
+
+Bugs connus
+- generation in index() dans le EquipementController qui oublie les filtres
+- ajout de liens contextuels qui marchent pas pour des vues. WTF.
+- génération qui plante pour Adherents/view et Services/view
+
+Baking `index` view template file...
+
+Creating file /var/www/chd_gestion/src/Template/Adherents/index.ctp
+Wrote `/var/www/chd_gestion/src/Template/Adherents/index.ctp`
+Notice Error: Undefined offset: 0 in [/var/www/chd_gestion/tmp/bake/view-ctp.php, line 184]
+
+2015-12-31 16:23:17 Notice: Notice (8): Undefined offset: 0 in [/var/www/chd_gestion/tmp/bake/view-ctp.php, line 184]
+Trace:
+Cake\Error\BaseErrorHandler::handleError() - CORE/src/Error/BaseErrorHandler.php, line 140
+include - ROOT/tmp/bake/view-ctp.php, line 184
+Bake\View\BakeView::_evaluate() - ROOT/vendor/cakephp/bake/src/View/BakeView.php, line 199
+Cake\View\View::_render() - CORE/src/View/View.php, line 944
+Bake\View\BakeView::render() - ROOT/vendor/cakephp/bake/src/View/BakeView.php, line 136
+Bake\Shell\Task\BakeTemplateTask::generate() - ROOT/vendor/cakephp/bake/src/Shell/Task/BakeTemplateTask.php, line 89
+Bake\Shell\Task\TemplateTask::getContent() - ROOT/vendor/cakephp/bake/src/Shell/Task/TemplateTask.php, line 408
+Bake\Shell\Task\TemplateTask::main() - ROOT/vendor/cakephp/bake/src/Shell/Task/TemplateTask.php, line 151
+Bake\Shell\BakeShell::Bake\Shell\{closure}() - ROOT/vendor/cakephp/bake/src/Shell/BakeShell.php, line 252
+Cake\Collection\Collection::each() - CORE/src/Collection/CollectionTrait.php, line 51
+Bake\Shell\BakeShell::all() - ROOT/vendor/cakephp/bake/src/Shell/BakeShell.php, line 253
+Cake\Console\Shell::runCommand() - CORE/src/Console/Shell.php, line 436
+Cake\Console\ShellDispatcher::_dispatch() - CORE/src/Console/ShellDispatcher.php, line 212
+Cake\Console\ShellDispatcher::dispatch() - CORE/src/Console/ShellDispatcher.php, line 179
+Cake\Console\ShellDispatcher::run() - CORE/src/Console/ShellDispatcher.php, line 126
+[main] - ROOT/bin/cake.php, line 33
+
+
+
+Creating file /var/www/chd_gestion/src/Template/Services/index.ctp
+Wrote `/var/www/chd_gestion/src/Template/Services/index.ctp`
+Notice Error: Undefined offset: 0 in [/var/www/chd_gestion/tmp/bake/view-ctp.php, line 184]
+
+2015-12-31 16:23:19 Notice: Notice (8): Undefined offset: 0 in [/var/www/chd_gestion/tmp/bake/view-ctp.php, line 184]
+Trace:
+Cake\Error\BaseErrorHandler::handleError() - CORE/src/Error/BaseErrorHandler.php, line 140
+include - ROOT/tmp/bake/view-ctp.php, line 184
+Bake\View\BakeView::_evaluate() - ROOT/vendor/cakephp/bake/src/View/BakeView.php, line 199
+Cake\View\View::_render() - CORE/src/View/View.php, line 944
+Bake\View\BakeView::render() - ROOT/vendor/cakephp/bake/src/View/BakeView.php, line 136
+Bake\Shell\Task\BakeTemplateTask::generate() - ROOT/vendor/cakephp/bake/src/Shell/Task/BakeTemplateTask.php, line 89
+Bake\Shell\Task\TemplateTask::getContent() - ROOT/vendor/cakephp/bake/src/Shell/Task/TemplateTask.php, line 408
+Bake\Shell\Task\TemplateTask::main() - ROOT/vendor/cakephp/bake/src/Shell/Task/TemplateTask.php, line 151
+Bake\Shell\BakeShell::Bake\Shell\{closure}() - ROOT/vendor/cakephp/bake/src/Shell/BakeShell.php, line 252
+Cake\Collection\Collection::each() - CORE/src/Collection/CollectionTrait.php, line 51
+Bake\Shell\BakeShell::all() - ROOT/vendor/cakephp/bake/src/Shell/BakeShell.php, line 253
+Cake\Console\Shell::runCommand() - CORE/src/Console/Shell.php, line 436
+Cake\Console\ShellDispatcher::_dispatch() - CORE/src/Console/ShellDispatcher.php, line 212
+Cake\Console\ShellDispatcher::dispatch() - CORE/src/Console/ShellDispatcher.php, line 179
+Cake\Console\ShellDispatcher::run() - CORE/src/Console/ShellDispatcher.php, line 126
+[main] - ROOT/bin/cake.php, line 33
+
diff --git a/generator/after-bake/src/Controller/AdherentRolesController.php b/generator/after-bake/src/Controller/AdherentRolesController.php
new file mode 100644
index 0000000..2dae728
--- /dev/null
+++ b/generator/after-bake/src/Controller/AdherentRolesController.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * AdherentRoles Controller
+ *
+ * @property \App\Model\Table\AdherentRolesTable $AdherentRoles
+ */
+class AdherentRolesController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['Adherents', 'AdherentRoleTypes', 'Villes']
+ ];
+ $this->set('adherentRoles', $this->paginate($this->AdherentRoles));
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $adherentRole = $this->AdherentRoles->newEntity();
+ if ($this->request->is('post')) {
+ $adherentRole = $this->AdherentRoles->patchEntity($adherentRole, $this->request->data);
+ if ($this->AdherentRoles->save($adherentRole)) {
+ $this->Flash->success(__('The adherent role has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The adherent role could not be saved. Please, try again.'));
+ }
+ }
+ $defaultAdherent = is_numeric($this->request->query('a'))?$this->request->query('a'):NULL;
+ $adherents = $this->AdherentRoles->Adherents->find('list');
+ $adherentRoleTypes = $this->AdherentRoles->AdherentRoleTypes->find('list');
+ $villes = $this->AdherentRoles->Villes->find('list');
+ $this->set(compact('adherentRole', 'adherents', 'defaultAdherent', 'adherentRoleTypes', 'villes'));
+ $this->set('_serialize', ['adherentRole']);
+ }
+
+ /**
+ * Delete method
+ *
+ * @param string|null $id Adherent Role id.
+ * @return \Cake\Network\Response|null Redirects to index.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function delete($id = null)
+ {
+ $this->request->allowMethod(['post', 'delete']);
+ $adherentRole = $this->AdherentRoles->get($id);
+ if ($this->AdherentRoles->delete($adherentRole)) {
+ $this->Flash->success(__('The adherent role has been deleted.'));
+ } else {
+ $this->Flash->error(__('The adherent role could not be deleted. Please, try again.'));
+ }
+ return $this->redirect(['action' => 'index']);
+ }
+}
diff --git a/generator/after-bake/src/Controller/AdherentsController.php b/generator/after-bake/src/Controller/AdherentsController.php
new file mode 100644
index 0000000..abec8a0
--- /dev/null
+++ b/generator/after-bake/src/Controller/AdherentsController.php
@@ -0,0 +1,149 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Controller;
+
+use App\Controller\AppController;
+use Cake\Datasource\ConnectionManager;
+
+/**
+ * Adherents Controller
+ *
+ * @property \App\Model\Table\AdherentsTable $Adherents
+ */
+class AdherentsController extends AppController
+{
+
+
+ public function initialize()
+ {
+ parent::initialize();
+ if ($this->request->action === 'index') {
+ $this->loadComponent('Paginator', [ 'limit' => 15, 'order' => [ 'Adherents.id' => 'DESC' ] ]);
+ $this->loadComponent('Search.Prg');
+ }
+ }
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['AdherentTypes', 'Villes', 'AdherentStatuts', 'Civilites']
+ ];
+ $query = $this->Adherents
+ ->find('search', $this->Adherents->filterParams($this->request->query));
+ $this->set('adherents', $this->paginate($query));
+ $this->set('_serialize', ['adherents']);
+
+ $this->loadModel('Villes');
+ $this->set('villes', $this->Villes->find('list')->toArray());
+
+ //TODO : quick'n'dirty, à améliorer
+ $conn = ConnectionManager::get('default');
+ //$rawq = 'SELECT CASE WHEN COUNT(*)=0 THEN 0 ELSE ROUND(SUM(adherent_statut_id-1) * 100 / (4*COUNT(*))) END FROM adherents WHERE adherent_statut_id <> 1';
+ $rawq='
+SELECT
+ ROUND( COUNT(*) * 100 /
+ (
+ SELECT CASE WHEN COUNT(*)=0 THEN 1 ELSE COUNT(*) END
+ FROM adherents WHERE adherent_statut_id NOT IN (1,8)
+ )
+ )
+FROM adherents WHERE adherent_statut_id = 5;
+';
+ $stmt = $conn->execute($rawq);
+ $score = current($stmt->fetch());
+ $this->set('score', $score);
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Adherent id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $adherent = $this->Adherents->get($id, [
+ 'contain' => ['AdherentRoles' => ['AdherentRoleTypes', 'Villes'], 'AdherentTypes', 'Villes', 'AdherentStatuts', 'Civilites', 'Services' => ['ServiceTypes', 'ServiceStatuts'] ]
+ ]);
+ $this->set('adherent', $adherent);
+ $this->set('_serialize', ['adherent']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $adherent = $this->Adherents->newEntity();
+ if ($this->request->is('post')) {
+ $adherent = $this->Adherents->patchEntity($adherent, $this->request->data);
+ if ($this->Adherents->save($adherent)) {
+ $this->Flash->success(__('The adherent has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The adherent could not be saved. Please, try again.'));
+ }
+ }
+ $adherentTypes = $this->Adherents->AdherentTypes->find('list');
+ $villes = $this->Adherents->Villes->find('list');
+ $adherentStatuts = $this->Adherents->AdherentStatuts->find('list');
+ $civilites = $this->Adherents->Civilites->find('list');
+ $this->set(compact('adherent', 'adherentTypes', 'villes', 'adherentStatuts', 'civilites'));
+ $this->set('_serialize', ['adherent']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Adherent id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $adherent = $this->Adherents->get($id, [
+ 'contain' => ['Services' => ['ServiceTypes', 'ServiceStatuts'] ]
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $adherent = $this->Adherents->patchEntity($adherent, $this->request->data);
+ if ($this->Adherents->save($adherent)) {
+ $this->Flash->success(__('The adherent has been saved.'));
+ return $this->redirect(['action' => 'view', $adherent->id]);
+ } else {
+ $this->Flash->error(__('The adherent could not be saved. Please, try again.'));
+ }
+ }
+ $adherentTypes = $this->Adherents->AdherentTypes->find('list');
+ $villes = $this->Adherents->Villes->find('list');
+ $adherentStatuts = $this->Adherents->AdherentStatuts->find('list');
+ $civilites = $this->Adherents->Civilites->find('list');
+ $this->set(compact('adherent', 'adherentTypes', 'villes', 'adherentStatuts', 'civilites'));
+ $this->set('_serialize', ['adherent']);
+ }
+}
diff --git a/generator/after-bake/src/Controller/EquipementsController.php b/generator/after-bake/src/Controller/EquipementsController.php
new file mode 100644
index 0000000..ffc6060
--- /dev/null
+++ b/generator/after-bake/src/Controller/EquipementsController.php
@@ -0,0 +1,138 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * Equipements Controller
+ *
+ * @property \App\Model\Table\EquipementsTable $Equipements
+ */
+class EquipementsController extends AppController
+{
+
+ public function initialize()
+ {
+ parent::initialize();
+ if ($this->request->action === 'index') {
+ $this->loadComponent('Paginator', [ 'limit' => 15, 'order' => [ 'Equipements.id' => 'DESC' ] ]);
+ $this->loadComponent('Search.Prg');
+ }
+ }
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['Services', 'Ipmgmt', 'EquipementModeles', 'EquipementModes', 'Relais']
+ ];
+ $query = $this->Equipements
+ ->find('search', $this->Equipements->filterParams($this->request->query));
+ $this->set('equipements', $this->paginate($query));
+ $this->set('_serialize', ['equipements']);
+
+ $this->loadModel('EquipementModeles');
+ $this->set('equipementModeles', $this->EquipementModeles->find('list')->toArray());
+ $this->loadModel('Relais');
+ $this->set('relais', $this->Relais->find('list')->toArray());
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Equipement id.
+ * @return \Cake\Network\Response|null
+ * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $equipement = $this->Equipements->get($id, [
+ 'contain' => ['Services', 'Ipmgmt', 'EquipementModeles', 'EquipementModes', 'Relais']
+ ]);
+
+ $this->set('equipement', $equipement);
+ $this->set('_serialize', ['equipement']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $equipement = $this->Equipements->newEntity();
+ if ($this->request->is('post')) {
+ $equipement = $this->Equipements->patchEntity($equipement, $this->request->data);
+ if ($this->Equipements->save($equipement)) {
+ $this->Flash->success(__('The equipement has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The equipement could not be saved. Please, try again.'));
+ }
+ }
+ $equipements = $this->Equipements->Equipements->find('list')->order('mac');
+ $services = $this->Equipements->Services->find('list')->order(['service_type_id', 'adherent_id', 'id']);
+ $ipmgmt = $this->Equipements->Ipmgmt->find('list')->notMatching('Equipements');
+ $ipmgmt->order($ipmgmt->newExpr()->add(['INET_ATON(ip4)']));
+ $equipementModeles = $this->Equipements->EquipementModeles->find('list');
+ $equipementModes = $this->Equipements->EquipementModes->find('list');
+ $relais = $this->Equipements->Relais->find('list');
+ $this->set(compact('equipement', 'equipements', 'services', 'ipmgmt', 'equipementModeles', 'equipementModes', 'relais'));
+ $this->set('_serialize', ['equipement']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Equipement id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $equipement = $this->Equipements->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $equipement = $this->Equipements->patchEntity($equipement, $this->request->data);
+ if ($this->Equipements->save($equipement)) {
+ $this->Flash->success(__('The equipement has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The equipement could not be saved. Please, try again.'));
+ }
+ }
+ $equipements = $this->Equipements->Equipements->find('list');
+ $services = $this->Equipements->Services->find('list');
+ $ipmgmt = $this->Equipements->Ipmgmt->find('list');
+ $equipementModeles = $this->Equipements->EquipementModeles->find('list');
+ $equipementModes = $this->Equipements->EquipementModes->find('list');
+ $relais = $this->Equipements->Relais->find('list');
+ $this->set(compact('equipement', 'equipements', 'services', 'ipmgmt', 'equipementModeles', 'equipementModes', 'relais'));
+ $this->set('_serialize', ['equipement']);
+ }
+}
diff --git a/generator/after-bake/src/Controller/IpmgmtController.php b/generator/after-bake/src/Controller/IpmgmtController.php
new file mode 100644
index 0000000..7bc33f0
--- /dev/null
+++ b/generator/after-bake/src/Controller/IpmgmtController.php
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * Ipmgmt Controller
+ *
+ * @property \App\Model\Table\IpmgmtTable $Ipmgmt
+ */
+class IpmgmtController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $query = $this->Ipmgmt->find();
+ $expr = $query->newExpr()->add(['INET_ATON(ip4)']);
+ $query = $query->order($expr);
+ $this->set('ipmgmt', $this->paginate($query));
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Ipmgmt id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $ipmgmt = $this->Ipmgmt->get($id, [
+ 'contain' => ['Equipements'=> ['EquipementModeles'] ]
+ ]);
+ $this->set('ipmgmt', $ipmgmt);
+ $this->set('_serialize', ['ipmgmt']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $ipmgmt = $this->Ipmgmt->newEntity();
+ if ($this->request->is('post')) {
+ $ipmgmt = $this->Ipmgmt->patchEntity($ipmgmt, $this->request->data);
+ if ($this->Ipmgmt->save($ipmgmt)) {
+ $this->Flash->success(__('The ipmgmt has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The ipmgmt could not be saved. Please, try again.'));
+ }
+ }
+ $this->set(compact('ipmgmt'));
+ $this->set('_serialize', ['ipmgmt']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Ipmgmt id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $ipmgmt = $this->Ipmgmt->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $ipmgmt = $this->Ipmgmt->patchEntity($ipmgmt, $this->request->data);
+ if ($this->Ipmgmt->save($ipmgmt)) {
+ $this->Flash->success(__('The ipmgmt has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The ipmgmt could not be saved. Please, try again.'));
+ }
+ }
+ $this->set(compact('ipmgmt'));
+ $this->set('_serialize', ['ipmgmt']);
+ }
+}
diff --git a/generator/after-bake/src/Controller/IppubliquesController.php b/generator/after-bake/src/Controller/IppubliquesController.php
new file mode 100644
index 0000000..d42bc88
--- /dev/null
+++ b/generator/after-bake/src/Controller/IppubliquesController.php
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * Ippubliques Controller
+ *
+ * @property \App\Model\Table\IppubliquesTable $Ippubliques
+ */
+class IppubliquesController extends AppController
+{
+
+ public function initialize()
+ {
+ parent::initialize();
+ if ($this->request->action === 'index') {
+ $this->loadComponent('Paginator', [ 'limit' => 63 ]);
+ $this->loadComponent('Search.Prg');
+ }
+ }
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['Secteurs', 'Services']
+ ];
+ $query = $this->Ippubliques
+ ->find('search', $this->Ippubliques->filterParams($this->request->query));
+ $expr1 = $query->newExpr()->add(['ISNULL(secteur_id)']);
+ $expr2 = $query->newExpr()->add(['INET_ATON(ip4)']);
+ $query = $query->order($expr1)->order($expr2);
+ $this->set('ippubliques', $this->paginate($query));
+ $this->set('_serialize', ['ippubliques']);
+
+ $this->loadModel('Secteurs');
+ $this->set('secteurs', $this->Secteurs->find('list')->toArray());
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Ippublique id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $ippublique = $this->Ippubliques->get($id, [
+ 'contain' => ['Secteurs', 'Services' => ['Adherents', 'ServiceTypes', 'ServiceStatuts'] ]
+ ]);
+ $this->set('ippublique', $ippublique);
+ $this->set('_serialize', ['ippublique']);
+ }
+}
diff --git a/generator/after-bake/src/Controller/RelaisController.php b/generator/after-bake/src/Controller/RelaisController.php
new file mode 100644
index 0000000..a2452c3
--- /dev/null
+++ b/generator/after-bake/src/Controller/RelaisController.php
@@ -0,0 +1,122 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * Relais Controller
+ *
+ * @property \App\Model\Table\RelaisTable $Relais
+ */
+class RelaisController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['Secteurs', 'Villes']
+ ];
+ $this->set('relais', $this->paginate($this->Relais));
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Relais id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ /*
+ $customJoin = function ($q) {
+ return $q
+ ->leftJoinWith('Adherents')
+ ->select(['Adherents.id','Adherents.nom','Adherents.prenom','Adherents.raison'])
+ ->leftJoinWith('ServiceStatuts')
+ ->select(['ServiceStatuts.title']);
+ };*/
+ $relais = $this->Relais->get($id, [
+ 'contain' => [
+ 'Secteurs', 'Villes',
+ 'Equipements' => ['EquipementModeles', 'Ipmgmt'], //, 'Services' => $customJoin],
+ ]
+ ]);
+ $this->set('relais', $relais);
+ $this->set('_serialize', ['relais']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $relais = $this->Relais->newEntity();
+ if ($this->request->is('post')) {
+ $relais = $this->Relais->patchEntity($relais, $this->request->data);
+ if ($this->Relais->save($relais)) {
+ $this->Flash->success(__('The relais has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relais could not be saved. Please, try again.'));
+ }
+ }
+ $secteurs = $this->Relais->Secteurs->find('list');
+ $villes = $this->Relais->Villes->find('list');
+ $this->set(compact('relais', 'secteurs', 'villes'));
+ $this->set('_serialize', ['relais']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Relais id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $relais = $this->Relais->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $relais = $this->Relais->patchEntity($relais, $this->request->data);
+ if ($this->Relais->save($relais)) {
+ $this->Flash->success(__('The relais has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relais could not be saved. Please, try again.'));
+ }
+ }
+ $secteurs = $this->Relais->Secteurs->find('list');
+ $villes = $this->Relais->Villes->find('list');
+ $this->set(compact('relais', 'secteurs', 'villes'));
+ $this->set('_serialize', ['relais']);
+ }
+}
diff --git a/generator/after-bake/src/Controller/ServicesController.php b/generator/after-bake/src/Controller/ServicesController.php
new file mode 100644
index 0000000..a3a034b
--- /dev/null
+++ b/generator/after-bake/src/Controller/ServicesController.php
@@ -0,0 +1,259 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Controller;
+
+use App\Controller\AppController;
+use Cake\Datasource\ConnectionManager;
+use Cake\I18n\Time;
+use DateTime;
+
+/**
+ * Services Controller
+ *
+ * @property \App\Model\Table\ServicesTable $Services
+ */
+class ServicesController extends AppController
+{
+
+ public function initialize()
+ {
+ parent::initialize();
+ if ($this->request->action === 'index') {
+ $this->loadComponent('Paginator', [ 'limit' => 15, 'order' => [ 'Services.id' => 'DESC' ] ]);
+ $this->loadComponent('Search.Prg');
+ }
+ }
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['Adherents', 'ServiceTypes', 'ServiceStatuts', 'Ippubliques']
+ ];
+ $query = $this->Services
+ ->find('search', $this->Services->filterParams($this->request->query));
+ $this->set('services', $this->paginate($query));
+ $this->set('_serialize', ['services']);
+
+ $this->loadModel('ServiceTypes');
+ $this->set('serviceTypes', $this->ServiceTypes->find('list')->toArray());
+ $this->loadModel('ServiceStatuts');
+ $this->set('serviceStatuts', $this->ServiceStatuts->find('list')->toArray());
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Service id.
+ * @return \Cake\Network\Response|null
+ * @throws \Cake\Datasource\Exception\RecordNotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $service = $this->Services->get($id, [
+ 'contain' => ['Adherents', 'ServiceTypes', 'ServiceStatuts', 'Ippubliques', 'Equipements' => ['EquipementModeles','Ipmgmt']]
+ ]);
+ $this->set('service', $service);
+ $this->set('_serialize', ['service']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $service = $this->Services->newEntity();
+ //$service = $this->Services->newEntity(['date_debut' => new DateTime('now')]);
+ if ($this->request->is('post')) {
+ //FIXME il y a un pépin avec la saisie des datetime, voir si ya pas un helper / widget qui va mieux
+ $this->request->data['date_debut'] = new DateTime('now');
+
+ if ( is_numeric($this->request->data('service_type_id')) ) {
+ $serviceTypeId = $this->request->data('service_type_id');
+
+ // Utilisation du prix par défaut (pour le type de service donné)
+ $this->loadModel('ServiceTypes');
+ $serviceType = $this->ServiceTypes->get($serviceTypeId);
+ if ( $serviceType ) {
+ $this->request->data['prix_ht'] = $serviceType->prix_base_ht;
+ }
+
+ // Statut de service "Actif CHD (service_statut_id 4) si service de type Adhésion (service_type_id 1)
+ // Statut de service "Prévu" (service_statut_id 1) par défaut
+ $this->request->data['service_statut_id'] = ($serviceTypeId==1)?4:1;
+ }
+
+ $service = $this->Services->patchEntity($service, $this->request->data);
+ if ($this->Services->save($service)) {
+ $this->Flash->success(__('The service has been saved.'));
+ return $this->redirect(['controller' => 'Adherents', 'action' => 'view', $service->adherent_id]);
+ } else {
+ debug($service);
+ debug($this->request->data);
+ $this->Flash->error(__('The service could not be saved. Please, try again.'));
+ }
+ }
+
+ $defaultAdherent = NULL;
+ $defaultServiceType = 1;
+ $defaultServiceStatut = 4;
+
+ if ( is_numeric($this->request->query('a')) ) {
+ $defaultAdherent = $this->request->query('a');
+ // Services non résiliés de l'adhérent passé en argument
+ $hasOtherServices = $this->Services->find()
+ ->select('id')
+ ->where(['adherent_id =' => $defaultAdherent, 'service_statut_id !=' => 6])
+ ->first();
+ if ( $hasOtherServices ) {
+ $defaultServiceType = 2;
+ $defaultServiceStatut = 1;
+ }
+ }
+
+ $adherents = $this->Services->Adherents->find('list');
+ $serviceTypes = $this->Services->ServiceTypes->find('list');
+ $serviceStatuts = $this->Services->ServiceStatuts->find('list');
+ $ippubliques = $this->Services->Ippubliques->find('list');
+ $this->set(compact('service', 'defaultAdherent', 'adherents', 'defaultServiceType', 'serviceTypes', 'defaultServiceStatut', 'serviceStatuts', 'ippubliques'));
+ $this->set('_serialize', ['service']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Service id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $service = $this->Services->get($id, [
+ 'contain' => ['Adherents', 'ServiceTypes']
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ //FIXME : forbid change of read-only fields in the form
+ $service = $this->Services->patchEntity($service, $this->request->data);
+ if ($this->Services->save($service)) {
+ $this->Flash->success(__('The service has been saved.'));
+ return $this->redirect(['controller' => 'Adherents', 'action' => 'view', $service->adherent_id]);
+ } else {
+ $this->Flash->error(__('The service could not be saved. Please, try again.'));
+ }
+ }
+ //$adherents = $this->Services->Adherents->find('list');
+ //$serviceTypes = $this->Services->ServiceTypes->find('list');
+ $serviceStatuts = $this->Services->ServiceStatuts->find('list');
+ //$ippubliques = $this->Services->Ippubliques->find('list');
+ $this->set(compact('service', 'serviceStatuts'));
+ $this->set('_serialize', ['service']);
+ }
+
+ public function activate($id = null)
+ {
+ $this->request->allowMethod(['post']);
+ $this->loadModel('Equipements');
+ $service = $this->Services->get($id);
+ if ( $service ) {
+ if ( $service->ippublique_id === NULL && $service->service_statut_id === 1 /* Prévu */ ) {
+ //TODO : quick'n'dirty, à améliorer
+ $conn = ConnectionManager::get('default');
+ $rawq='SELECT FREE_IP(' . $service->id . ')';
+ $stmt = $conn->execute($rawq);
+ $free_ip = current($stmt->fetch());
+ // Fin quick'n'dirty
+
+ if ( strlen($free_ip) > 7 ) {
+ $patch = array(
+ 'service_statut_id' => 4, /* Actif CHD */
+ 'ippublique_id' => $free_ip,
+ 'date_debut' => new DateTime('now'),
+ );
+ $service = $this->Services->patchEntity($service, $patch);
+ if ($this->Services->save($service)) {
+ $this->Flash->success(__('The service has been saved.'));
+ } else {
+ $this->Flash->error(__('The service could not be saved. Please, try again.'));
+ }
+ } else {
+ $this->Flash->error(__('Can\'t find a free IP public address. Please make sure that equipements are associated to the service.'));
+ }
+ } else {
+ $this->Flash->error(__('Can\'t activate the service. Bad service state.'));
+ }
+ return $this->redirect(['controller' => 'Adherents', 'action' => 'view', $service->adherent_id]);
+ }
+ }
+
+ public function migrate($id = null)
+ {
+ $this->request->allowMethod(['post']);
+ $this->loadModel('Equipements');
+ $service = $this->Services->get($id, [
+ 'contain' => ['Equipements']
+ ]);
+
+ //TODO : quick'n'dirty, à améliorer
+ $conn = ConnectionManager::get('default');
+ $rawq='SELECT FREE_IP(' . $service->id . ')';
+ $stmt = $conn->execute($rawq);
+ $free_ip = current($stmt->fetch());
+ // Fin quick'n'dirty
+
+ $new_service = $this->Services->newEntity([
+ 'adherent_id' => $service->adherent_id,
+ 'service_type_id' => $service->service_type_id,
+ 'prix_ht' => $service->prix_ht,
+ 'description' => $service->description,
+ 'lat' => $service->lat,
+ 'lng' => $service->lng,
+ 'service_statut_id' => 4,
+ 'ippublique_id' => $free_ip,
+ 'date_debut' => Time::now(),
+ ]);
+
+ $service->date_fin = Time::now();
+ $service->service_statut_id = 3;
+
+ if ( (strlen($free_ip) > 7) && $this->Services->save($new_service)) {
+ $fail = false;
+ foreach ( $service->equipements as $equipement ) {
+ $equipement->service_id = $new_service->id;
+ if ( ! $this->Equipements->save($equipement) ) {
+ $fail = true;
+ }
+ }
+ if ( $fail==false && $this->Services->save($service) ) {
+ $this->Flash->success(__('The service has been saved.'));
+ return $this->redirect(['controller' => 'Adherents', 'action' => 'view', $service->adherent_id]);
+ }
+ }
+ $this->Flash->error(__('The service could not be saved. Please, try again.'));
+ $this->set(compact('service', 'new_service'));
+ $this->set('_serialize', ['service', 'new_service']);
+ }
+}
diff --git a/generator/after-bake/src/Controller/VillesController.php b/generator/after-bake/src/Controller/VillesController.php
new file mode 100644
index 0000000..296f17b
--- /dev/null
+++ b/generator/after-bake/src/Controller/VillesController.php
@@ -0,0 +1,104 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * Villes Controller
+ *
+ * @property \App\Model\Table\VillesTable $Villes
+ */
+class VillesController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->set('villes', $this->paginate($this->Villes));
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Ville id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $ville = $this->Villes->get($id, [
+ 'contain' => ['AdherentRoles' => ['Adherents', 'AdherentRoleTypes'], 'Adherents', 'Interesses', 'Relais']
+ ]);
+ $this->set('ville', $ville);
+ $this->set('_serialize', ['ville']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $ville = $this->Villes->newEntity();
+ if ($this->request->is('post')) {
+ $ville = $this->Villes->patchEntity($ville, $this->request->data);
+ if ($this->Villes->save($ville)) {
+ $this->Flash->success(__('The ville has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The ville could not be saved. Please, try again.'));
+ }
+ }
+ $this->set(compact('ville'));
+ $this->set('_serialize', ['ville']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Ville id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $ville = $this->Villes->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $ville = $this->Villes->patchEntity($ville, $this->request->data);
+ if ($this->Villes->save($ville)) {
+ $this->Flash->success(__('The ville has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The ville could not be saved. Please, try again.'));
+ }
+ }
+ $this->set(compact('ville'));
+ $this->set('_serialize', ['ville']);
+ }
+}
diff --git a/generator/after-bake/src/Locale/default.pot b/generator/after-bake/src/Locale/default.pot
new file mode 100644
index 0000000..ff82026
--- /dev/null
+++ b/generator/after-bake/src/Locale/default.pot
@@ -0,0 +1,1306 @@
+# LANGUAGE translation of CakePHP Application
+# Copyright YEAR NAME <EMAIL@ADDRESS>
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2016-01-20 20:09+0000\n"
+"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
+"Last-Translator: NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: Controller/AdherentRolesController.php:38
+msgid "The adherent role has been saved."
+msgstr ""
+
+#: Controller/AdherentRolesController.php:41
+msgid "The adherent role could not be saved. Please, try again."
+msgstr ""
+
+#: Controller/AdherentRolesController.php:64
+msgid "The adherent role has been deleted."
+msgstr ""
+
+#: Controller/AdherentRolesController.php:66
+msgid "The adherent role could not be deleted. Please, try again."
+msgstr ""
+
+#: Controller/AdherentsController.php:88;117
+msgid "The adherent has been saved."
+msgstr ""
+
+#: Controller/AdherentsController.php:91;120
+msgid "The adherent could not be saved. Please, try again."
+msgstr ""
+
+#: Controller/EquipementModelesController.php:51;76
+msgid "The equipement modele has been saved."
+msgstr ""
+
+#: Controller/EquipementModelesController.php:54;79
+msgid "The equipement modele could not be saved. Please, try again."
+msgstr ""
+
+#: Controller/EquipementsController.php:72;103
+msgid "The equipement has been saved."
+msgstr ""
+
+#: Controller/EquipementsController.php:75;106
+msgid "The equipement could not be saved. Please, try again."
+msgstr ""
+
+#: Controller/InteressesController.php:54;81
+msgid "The interesse has been saved."
+msgstr ""
+
+#: Controller/InteressesController.php:57;84
+msgid "The interesse could not be saved. Please, try again."
+msgstr ""
+
+#: Controller/IpmgmtController.php:54;79
+msgid "The ipmgmt has been saved."
+msgstr ""
+
+#: Controller/IpmgmtController.php:57;82
+msgid "The ipmgmt could not be saved. Please, try again."
+msgstr ""
+
+#: Controller/RelaisController.php:65;92
+msgid "The relais has been saved."
+msgstr ""
+
+#: Controller/RelaisController.php:68;95
+msgid "The relais could not be saved. Please, try again."
+msgstr ""
+
+#: Controller/ServicesController.php:88;138;173;226
+msgid "The service has been saved."
+msgstr ""
+
+#: Controller/ServicesController.php:93;141;175;230
+msgid "The service could not be saved. Please, try again."
+msgstr ""
+
+#: Controller/ServicesController.php:178
+msgid "Can't find a free IP public address. Please make sure that equipements are associated to the service."
+msgstr ""
+
+#: Controller/ServicesController.php:181
+msgid "Can't activate the service. Bad service state."
+msgstr ""
+
+#: Controller/VillesController.php:51;76
+msgid "The ville has been saved."
+msgstr ""
+
+#: Controller/VillesController.php:54;79
+msgid "The ville could not be saved. Please, try again."
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:3
+#: Template/AdherentRoles/index.ctp:3;21
+#: Template/Adherents/add.ctp:3
+#: Template/Adherents/edit.ctp:3
+#: Template/Adherents/index.ctp:3;46
+#: Template/Adherents/view.ctp:3;137
+#: Template/EquipementModeles/add.ctp:3
+#: Template/EquipementModeles/edit.ctp:3
+#: Template/EquipementModeles/index.ctp:3;16
+#: Template/EquipementModeles/view.ctp:3;44
+#: Template/Equipements/add.ctp:3
+#: Template/Equipements/edit.ctp:3
+#: Template/Equipements/index.ctp:3;50
+#: Template/Equipements/view.ctp:3
+#: Template/Interesses/add.ctp:3
+#: Template/Interesses/edit.ctp:3
+#: Template/Interesses/index.ctp:3;21
+#: Template/Interesses/view.ctp:3
+#: Template/Ipmgmt/index.ctp:3;16
+#: Template/Ipmgmt/view.ctp:3;37
+#: Template/Ippubliques/index.ctp:3;37
+#: Template/Ippubliques/view.ctp:3;37
+#: Template/Relais/add.ctp:3
+#: Template/Relais/edit.ctp:3
+#: Template/Relais/index.ctp:3;21
+#: Template/Relais/view.ctp:3;51
+#: Template/Services/add.ctp:3
+#: Template/Services/edit.ctp:3
+#: Template/Services/index.ctp:3;50
+#: Template/Services/migrate.ctp:3
+#: Template/Services/view.ctp:3;76
+#: Template/Villes/add.ctp:3
+#: Template/Villes/edit.ctp:3
+#: Template/Villes/index.ctp:3;23
+#: Template/Villes/view.ctp:3;35;61;88
+msgid "Actions"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:4
+#: Template/Adherents/add.ctp:7
+#: Template/Villes/add.ctp:5
+#: Template/Villes/edit.ctp:5
+#: Template/Villes/index.ctp:5
+msgid "List Adherent Roles"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:5
+#: Template/AdherentRoles/index.ctp:5
+#: Template/Adherents/add.ctp:4
+#: Template/Adherents/edit.ctp:4
+#: Template/Adherents/view.ctp:5
+#: Template/Services/add.ctp:5
+#: Template/Services/edit.ctp:5
+#: Template/Services/index.ctp:5
+#: Template/Services/migrate.ctp:7
+#: Template/Services/view.ctp:7
+#: Template/Villes/add.ctp:7
+#: Template/Villes/edit.ctp:7
+#: Template/Villes/index.ctp:7
+msgid "List Adherents"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:6
+#: Template/AdherentRoles/index.ctp:6
+#: Template/Adherents/index.ctp:4
+#: Template/Services/add.ctp:6
+#: Template/Services/edit.ctp:6
+#: Template/Services/index.ctp:6
+#: Template/Services/migrate.ctp:8
+#: Template/Services/view.ctp:8
+#: Template/Villes/add.ctp:8
+#: Template/Villes/edit.ctp:8
+#: Template/Villes/index.ctp:8
+msgid "New Adherent"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:7
+#: Template/AdherentRoles/index.ctp:7
+msgid "List Adherent Role Types"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:8
+#: Template/AdherentRoles/index.ctp:8
+msgid "New Adherent Role Type"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:9
+#: Template/AdherentRoles/index.ctp:9
+#: Template/Adherents/add.ctp:5
+#: Template/Adherents/edit.ctp:5
+#: Template/Adherents/index.ctp:5
+#: Template/Interesses/add.ctp:5
+#: Template/Interesses/edit.ctp:5
+#: Template/Interesses/index.ctp:5
+#: Template/Interesses/view.ctp:7
+#: Template/Relais/add.ctp:5
+#: Template/Relais/edit.ctp:5
+#: Template/Relais/index.ctp:5
+#: Template/Relais/view.ctp:7
+#: Template/Villes/add.ctp:4
+#: Template/Villes/edit.ctp:4
+#: Template/Villes/view.ctp:5
+msgid "List Villes"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:10
+#: Template/AdherentRoles/index.ctp:10
+#: Template/Adherents/add.ctp:6
+#: Template/Adherents/edit.ctp:6
+#: Template/Adherents/index.ctp:6
+#: Template/Interesses/add.ctp:6
+#: Template/Interesses/edit.ctp:6
+#: Template/Interesses/index.ctp:6
+#: Template/Interesses/view.ctp:8
+#: Template/Relais/add.ctp:6
+#: Template/Relais/edit.ctp:6
+#: Template/Relais/index.ctp:6
+#: Template/Relais/view.ctp:8
+#: Template/Villes/index.ctp:4
+msgid "New Ville"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:16
+msgid "Add Adherent Role"
+msgstr ""
+
+#: Template/AdherentRoles/add.ctp:23
+#: Template/Adherents/add.ctp:42
+#: Template/Adherents/edit.ctp:56
+#: Template/EquipementModeles/add.ctp:18
+#: Template/EquipementModeles/edit.ctp:18
+#: Template/Equipements/add.ctp:34
+#: Template/Equipements/edit.ctp:34
+#: Template/Interesses/add.ctp:27
+#: Template/Interesses/edit.ctp:27
+#: Template/Relais/add.ctp:23
+#: Template/Relais/edit.ctp:23
+#: Template/Services/add.ctp:25
+#: Template/Services/edit.ctp:41
+#: Template/Villes/add.ctp:25
+#: Template/Villes/edit.ctp:25
+#: View/Helper/FormHelper.php:1724
+msgid "Submit"
+msgstr ""
+
+#: Template/AdherentRoles/index.ctp:4
+#: Template/Adherents/add.ctp:8
+#: Template/Villes/add.ctp:6
+#: Template/Villes/edit.ctp:6
+#: Template/Villes/index.ctp:6
+msgid "New Adherent Role"
+msgstr ""
+
+#: Template/AdherentRoles/index.ctp:14
+msgid "Adherent Roles"
+msgstr ""
+
+#: Template/AdherentRoles/index.ctp:31
+#: Template/Adherents/view.ctp:115
+#: Template/Villes/view.ctp:68
+msgid "Delete"
+msgstr ""
+
+#: Template/AdherentRoles/index.ctp:31
+#: Template/Adherents/view.ctp:115
+#: Template/Villes/view.ctp:68
+msgid "Are you sure you want to delete # {0}?"
+msgstr ""
+
+#: Template/AdherentRoles/index.ctp:39
+#: Template/Adherents/index.ctp:70
+#: Template/EquipementModeles/index.ctp:34
+#: Template/Equipements/index.ctp:73
+#: Template/Interesses/index.ctp:44
+#: Template/Ipmgmt/index.ctp:33
+#: Template/Ippubliques/index.ctp:57
+#: Template/Relais/index.ctp:42
+#: Template/Services/index.ctp:73
+#: Template/Villes/index.ctp:42
+msgid "previous"
+msgstr ""
+
+#: Template/AdherentRoles/index.ctp:41
+#: Template/Adherents/index.ctp:72
+#: Template/EquipementModeles/index.ctp:36
+#: Template/Equipements/index.ctp:75
+#: Template/Interesses/index.ctp:46
+#: Template/Ipmgmt/index.ctp:35
+#: Template/Ippubliques/index.ctp:59
+#: Template/Relais/index.ctp:44
+#: Template/Services/index.ctp:75
+#: Template/Villes/index.ctp:44
+msgid "next"
+msgstr ""
+
+#: Template/Adherents/add.ctp:9
+#: Template/Adherents/edit.ctp:7
+#: Template/Adherents/index.ctp:7
+#: Template/Equipements/add.ctp:7
+#: Template/Equipements/edit.ctp:7
+#: Template/Equipements/index.ctp:10
+#: Template/Equipements/view.ctp:13
+#: Template/Ippubliques/index.ctp:5
+#: Template/Ippubliques/view.ctp:5
+#: Template/Services/add.ctp:4
+#: Template/Services/edit.ctp:4
+#: Template/Services/migrate.ctp:5
+#: Template/Services/view.ctp:5
+msgid "List Services"
+msgstr ""
+
+#: Template/Adherents/add.ctp:10
+#: Template/Adherents/edit.ctp:8
+#: Template/Adherents/index.ctp:8
+#: Template/Adherents/view.ctp:7
+#: Template/Equipements/add.ctp:8
+#: Template/Equipements/edit.ctp:8
+#: Template/Equipements/index.ctp:11
+#: Template/Equipements/view.ctp:14
+#: Template/Ippubliques/index.ctp:6
+#: Template/Ippubliques/view.ctp:6
+#: Template/Services/index.ctp:4
+#: Template/Services/migrate.ctp:6
+#: Template/Services/view.ctp:6
+msgid "New Service"
+msgstr ""
+
+#: Template/Adherents/add.ctp:11
+msgid "List V Relais Detail"
+msgstr ""
+
+#: Template/Adherents/add.ctp:12
+msgid "New V Relais Detail"
+msgstr ""
+
+#: Template/Adherents/add.ctp:18
+msgid "Add Adherent"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:14
+#: Template/Adherents/view.ctp:4
+msgid "Edit Adherent"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:59
+#: Template/Adherents/view.ctp:127
+#: Template/Ippubliques/view.ctp:26
+msgid "Related Services"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:63
+#: Template/Adherents/view.ctp:131
+#: Template/EquipementModeles/view.ctp:23;32
+#: Template/Interesses/view.ctp:51
+#: Template/Ipmgmt/view.ctp:23
+#: Template/Relais/view.ctp:29
+#: Template/Villes/view.ctp:29
+msgid "Id"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:64
+#: Template/Adherents/view.ctp:132
+#: Template/Ippubliques/view.ctp:32
+#: Template/Services/edit.ctp:22
+#: Template/Services/index.ctp:22;23
+#: Template/Services/view.ctp:22
+msgid "Service Type"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:65
+#: Template/Equipements/index.ctp:34;35
+#: Template/Equipements/view.ctp:37
+#: Template/Relais/index.ctp:12
+#: Template/Services/index.ctp:34;35
+msgid "Relais"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:66
+#: Template/Adherents/view.ctp:133
+#: Template/Services/index.ctp:28;29
+#: Template/Services/view.ctp:26
+msgid "Service Statut"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:67
+#: Template/Adherents/view.ctp:134
+#: Template/Services/view.ctp:30
+msgid "Ippublique"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:68
+#: Template/Adherents/view.ctp:135
+#: Template/Ippubliques/view.ctp:34
+#: Template/Services/edit.ctp:30
+#: Template/Services/view.ctp:50
+msgid "Date Debut"
+msgstr ""
+
+#: Template/Adherents/edit.ctp:69
+#: Template/Adherents/view.ctp:136
+#: Template/Ippubliques/view.ctp:35
+#: Template/Services/view.ctp:54
+msgid "Date Fin"
+msgstr ""
+
+#: Template/Adherents/index.ctp:16
+#: Template/Layout/default.ctp:46
+msgid "Adherents"
+msgstr ""
+
+#: Template/Adherents/index.ctp:23;24
+#: Template/Equipements/index.ctp:22;23
+#: Template/Ippubliques/index.ctp:17;18
+msgid "Rechercher..."
+msgstr ""
+
+#: Template/Adherents/index.ctp:29;30
+#: Template/Villes/index.ctp:16
+msgid "Villes"
+msgstr ""
+
+#: Template/Adherents/index.ctp:61
+#: Template/Adherents/view.ctp:148
+#: Template/EquipementModeles/index.ctp:25
+#: Template/EquipementModeles/view.ctp:63
+#: Template/Equipements/index.ctp:64
+#: Template/Interesses/index.ctp:35
+#: Template/Ipmgmt/index.ctp:25
+#: Template/Ipmgmt/view.ctp:49
+#: Template/Ippubliques/index.ctp:49
+#: Template/Ippubliques/view.ctp:51
+#: Template/Relais/index.ctp:33
+#: Template/Relais/view.ctp:61
+#: Template/Services/index.ctp:64
+#: Template/Services/view.ctp:88
+#: Template/Villes/index.ctp:33
+#: Template/Villes/view.ctp:46;101
+msgid "View"
+msgstr ""
+
+#: Template/Adherents/index.ctp:62
+#: Template/Adherents/view.ctp:149
+#: Template/EquipementModeles/index.ctp:26
+#: Template/EquipementModeles/view.ctp:65
+#: Template/Equipements/index.ctp:65
+#: Template/Interesses/index.ctp:36
+#: Template/Ipmgmt/view.ctp:51
+#: Template/Relais/index.ctp:34
+#: Template/Relais/view.ctp:62
+#: Template/Services/index.ctp:65
+#: Template/Services/view.ctp:89
+#: Template/Villes/index.ctp:34
+#: Template/Villes/view.ctp:47;102
+msgid "Edit"
+msgstr ""
+
+#: Template/Adherents/view.ctp:6
+msgid "New AdherentRole"
+msgstr ""
+
+#: Template/Adherents/view.ctp:14
+msgid "Adherent Statut"
+msgstr ""
+
+#: Template/Adherents/view.ctp:20
+msgid "Num Adt Ttn"
+msgstr ""
+
+#: Template/Adherents/view.ctp:27
+msgid "Adherent Type"
+msgstr ""
+
+#: Template/Adherents/view.ctp:31
+#: Template/Interesses/view.ctp:15
+msgid "Civilite"
+msgstr ""
+
+#: Template/Adherents/view.ctp:35
+#: Template/Interesses/view.ctp:19
+#: Template/Villes/view.ctp:81
+msgid "Nom"
+msgstr ""
+
+#: Template/Adherents/view.ctp:39
+#: Template/Interesses/view.ctp:23
+#: Template/Villes/view.ctp:82
+msgid "Prenom"
+msgstr ""
+
+#: Template/Adherents/view.ctp:43
+#: Template/Interesses/view.ctp:27
+#: Template/Villes/view.ctp:83
+msgid "Raison"
+msgstr ""
+
+#: Template/Adherents/view.ctp:47
+msgid "Tel Fixe1"
+msgstr ""
+
+#: Template/Adherents/view.ctp:51
+msgid "Tel Mobile1"
+msgstr ""
+
+#: Template/Adherents/view.ctp:57
+#: Template/Interesses/view.ctp:43
+#: Template/Villes/view.ctp:86
+msgid "Adresse1"
+msgstr ""
+
+#: Template/Adherents/view.ctp:61
+#: Template/Interesses/view.ctp:47
+msgid "Adresse2"
+msgstr ""
+
+#: Template/Adherents/view.ctp:65
+#: Template/Interesses/view.ctp:31
+#: Template/Relais/view.ctp:25
+msgid "Ville"
+msgstr ""
+
+#: Template/Adherents/view.ctp:69
+msgid "Mail1"
+msgstr ""
+
+#: Template/Adherents/view.ctp:73
+msgid "Mail2"
+msgstr ""
+
+#: Template/Adherents/view.ctp:77
+msgid "Tel Fixe2"
+msgstr ""
+
+#: Template/Adherents/view.ctp:81
+msgid "Tel Mobile2"
+msgstr ""
+
+#: Template/Adherents/view.ctp:88
+msgid "Proprio"
+msgstr ""
+
+#: Template/Adherents/view.ctp:92
+msgid "Nom2"
+msgstr ""
+
+#: Template/Adherents/view.ctp:96
+msgid "Prenom2"
+msgstr ""
+
+#: Template/Adherents/view.ctp:100
+#: Template/Services/view.ctp:58
+msgid "Created"
+msgstr ""
+
+#: Template/Adherents/view.ctp:104
+#: Template/Services/view.ctp:62
+msgid "Modified"
+msgstr ""
+
+#: Template/Adherents/view.ctp:112
+msgid "Role {0}"
+msgstr ""
+
+#: Template/Adherents/view.ctp:123
+#: Template/EquipementModeles/view.ctp:43
+#: Template/Equipements/view.ctp:66
+#: Template/Interesses/view.ctp:60
+#: Template/Villes/view.ctp:87
+msgid "Notes"
+msgstr ""
+
+#: Template/Adherents/view.ctp:155;184;194
+msgid "Terminate"
+msgstr ""
+
+#: Template/Adherents/view.ctp:156;185;195
+msgid "Are you sure you want to terminate # {0}?"
+msgstr ""
+
+#: Template/Adherents/view.ctp:166
+msgid "Activate"
+msgstr ""
+
+#: Template/Adherents/view.ctp:167
+msgid "Are you sure you want to activate # {0}?"
+msgstr ""
+
+#: Template/Adherents/view.ctp:172
+msgid "Migrate"
+msgstr ""
+
+#: Template/Adherents/view.ctp:173
+msgid "Are you sure you want to migrate # {0}?"
+msgstr ""
+
+#: Template/Adherents/view.ctp:180
+msgid "Suspend"
+msgstr ""
+
+#: Template/Adherents/view.ctp:181;191
+msgid "Are you sure you want to suspend # {0}?"
+msgstr ""
+
+#: Template/Adherents/view.ctp:190
+msgid "Unsuspend"
+msgstr ""
+
+#: Template/EquipementModeles/add.ctp:4
+#: Template/EquipementModeles/edit.ctp:4
+#: Template/EquipementModeles/view.ctp:5
+#: Template/Equipements/add.ctp:10
+#: Template/Equipements/edit.ctp:10
+#: Template/Equipements/index.ctp:6
+#: Template/Equipements/view.ctp:9
+msgid "List Equipement Modeles"
+msgstr ""
+
+#: Template/EquipementModeles/add.ctp:5
+#: Template/EquipementModeles/edit.ctp:5
+#: Template/EquipementModeles/index.ctp:5
+#: Template/EquipementModeles/view.ctp:7
+#: Template/Equipements/add.ctp:4;5
+#: Template/Equipements/edit.ctp:4;5
+#: Template/Equipements/view.ctp:5;15
+#: Template/Ipmgmt/index.ctp:5
+#: Template/Ipmgmt/view.ctp:7
+#: Template/Relais/add.ctp:7
+#: Template/Relais/edit.ctp:7
+#: Template/Relais/index.ctp:7
+#: Template/Relais/view.ctp:9
+#: Template/Services/add.ctp:10
+#: Template/Services/edit.ctp:8
+#: Template/Services/index.ctp:10
+#: Template/Services/migrate.ctp:12
+#: Template/Services/view.ctp:10
+msgid "List Equipements"
+msgstr ""
+
+#: Template/EquipementModeles/add.ctp:6
+#: Template/EquipementModeles/edit.ctp:6
+#: Template/EquipementModeles/index.ctp:6
+#: Template/EquipementModeles/view.ctp:8
+#: Template/Equipements/add.ctp:6
+#: Template/Equipements/edit.ctp:6
+#: Template/Equipements/index.ctp:4
+#: Template/Equipements/view.ctp:6;16
+#: Template/Ipmgmt/index.ctp:6
+#: Template/Ipmgmt/view.ctp:8
+#: Template/Relais/add.ctp:8
+#: Template/Relais/edit.ctp:8
+#: Template/Relais/index.ctp:8
+#: Template/Relais/view.ctp:10
+#: Template/Services/add.ctp:11
+#: Template/Services/edit.ctp:9
+#: Template/Services/index.ctp:11
+#: Template/Services/migrate.ctp:13
+#: Template/Services/view.ctp:11
+msgid "New Equipement"
+msgstr ""
+
+#: Template/EquipementModeles/add.ctp:12
+msgid "Add Equipement Modele"
+msgstr ""
+
+#: Template/EquipementModeles/edit.ctp:12
+#: Template/EquipementModeles/view.ctp:4
+msgid "Edit Equipement Modele"
+msgstr ""
+
+#: Template/EquipementModeles/index.ctp:4
+#: Template/EquipementModeles/view.ctp:6
+#: Template/Equipements/add.ctp:11
+#: Template/Equipements/edit.ctp:11
+#: Template/Equipements/index.ctp:7
+#: Template/Equipements/view.ctp:10
+msgid "New Equipement Modele"
+msgstr ""
+
+#: Template/EquipementModeles/index.ctp:10
+#: Template/Equipements/index.ctp:28;29
+msgid "Equipement Modeles"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:15
+msgid "Constructeur"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:19
+msgid "Modele"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:28
+#: Template/Ipmgmt/view.ctp:28
+#: Template/Relais/view.ctp:42
+#: Template/Services/view.ctp:67
+msgid "Related Equipements"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:33
+#: Template/Equipements/view.ctp:25
+#: Template/Ipmgmt/view.ctp:32
+#: Template/Relais/view.ctp:46
+#: Template/Services/view.ctp:71
+msgid "Mac"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:34
+msgid "Uplink Id"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:35
+#: Template/Ippubliques/view.ctp:30
+msgid "Service Id"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:36
+msgid "Ipmgmt Id"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:37
+msgid "Equipement Modele Id"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:38
+#: Template/Relais/view.ctp:49
+#: Template/Services/view.ctp:74
+msgid "Equipement Mode Id"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:39
+msgid "Relais Id"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:40
+#: Template/Equipements/view.ctp:53
+#: Template/Ipmgmt/view.ctp:35
+#: Template/Ippubliques/view.ctp:36
+#: Template/Services/view.ctp:34;75
+msgid "Description"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:41
+#: Template/Equipements/view.ctp:57
+msgid "Date Achat"
+msgstr ""
+
+#: Template/EquipementModeles/view.ctp:42
+#: Template/Equipements/view.ctp:61
+#: Template/Ipmgmt/view.ctp:36
+msgid "Date Hs"
+msgstr ""
+
+#: Template/Equipements/add.ctp:9
+#: Template/Equipements/edit.ctp:9
+#: Template/Equipements/index.ctp:5
+#: Template/Equipements/view.ctp:7
+#: Template/Ipmgmt/view.ctp:5
+msgid "List Ipmgmt"
+msgstr ""
+
+#: Template/Equipements/add.ctp:12
+#: Template/Equipements/edit.ctp:12
+#: Template/Equipements/index.ctp:8
+#: Template/Equipements/view.ctp:11
+#: Template/Relais/add.ctp:4
+#: Template/Relais/edit.ctp:4
+#: Template/Relais/view.ctp:5
+#: Template/Services/add.ctp:7
+#: Template/Services/index.ctp:8
+#: Template/Services/migrate.ctp:10
+#: Template/Villes/add.ctp:11
+#: Template/Villes/edit.ctp:11
+#: Template/Villes/index.ctp:11
+msgid "List Relais"
+msgstr ""
+
+#: Template/Equipements/add.ctp:13
+#: Template/Equipements/edit.ctp:13
+#: Template/Equipements/index.ctp:9
+#: Template/Equipements/view.ctp:12
+#: Template/Relais/index.ctp:4
+#: Template/Relais/view.ctp:6
+#: Template/Services/add.ctp:8
+#: Template/Services/index.ctp:9
+#: Template/Services/migrate.ctp:11
+#: Template/Villes/add.ctp:12
+#: Template/Villes/edit.ctp:12
+#: Template/Villes/index.ctp:12
+msgid "New Relais"
+msgstr ""
+
+#: Template/Equipements/add.ctp:19
+msgid "Add Equipement"
+msgstr ""
+
+#: Template/Equipements/edit.ctp:19
+#: Template/Equipements/view.ctp:4
+msgid "Edit Equipement"
+msgstr ""
+
+#: Template/Equipements/index.ctp:15
+#: Template/Layout/default.ctp:48
+msgid "Equipements"
+msgstr ""
+
+#: Template/Equipements/view.ctp:8
+#: Template/Ipmgmt/index.ctp:4
+#: Template/Ipmgmt/view.ctp:6
+msgid "New Ipmgmt"
+msgstr ""
+
+#: Template/Equipements/view.ctp:17
+msgid "List Equipement Modes"
+msgstr ""
+
+#: Template/Equipements/view.ctp:18
+msgid "New Equipement Mode"
+msgstr ""
+
+#: Template/Equipements/view.ctp:29
+#: Template/Ipmgmt/index.ctp:10
+#: Template/Relais/view.ctp:47
+#: Template/Services/view.ctp:72
+msgid "Ipmgmt"
+msgstr ""
+
+#: Template/Equipements/view.ctp:33
+#: Template/Ipmgmt/view.ctp:33
+#: Template/Relais/view.ctp:48
+#: Template/Services/view.ctp:73
+msgid "Equipement Modele"
+msgstr ""
+
+#: Template/Equipements/view.ctp:41
+msgid "Service"
+msgstr ""
+
+#: Template/Equipements/view.ctp:45
+msgid "Uplink"
+msgstr ""
+
+#: Template/Equipements/view.ctp:49
+#: Template/Ipmgmt/view.ctp:34
+msgid "Equipement Mode"
+msgstr ""
+
+#: Template/Interesses/add.ctp:4
+#: Template/Interesses/edit.ctp:4
+#: Template/Interesses/view.ctp:5
+#: Template/Villes/add.ctp:9
+#: Template/Villes/edit.ctp:9
+#: Template/Villes/index.ctp:9
+msgid "List Interesses"
+msgstr ""
+
+#: Template/Interesses/add.ctp:12
+msgid "Add Interesse"
+msgstr ""
+
+#: Template/Interesses/edit.ctp:12
+#: Template/Interesses/view.ctp:4
+msgid "Edit Interesse"
+msgstr ""
+
+#: Template/Interesses/index.ctp:4
+#: Template/Interesses/view.ctp:6
+#: Template/Villes/add.ctp:10
+#: Template/Villes/edit.ctp:10
+#: Template/Villes/index.ctp:10
+msgid "New Interesse"
+msgstr ""
+
+#: Template/Interesses/index.ctp:10
+#: Template/Layout/default.ctp:47
+msgid "Interesses"
+msgstr ""
+
+#: Template/Interesses/view.ctp:35
+#: Template/Villes/view.ctp:84
+msgid "Telephone"
+msgstr ""
+
+#: Template/Interesses/view.ctp:39
+#: Template/Villes/view.ctp:85
+msgid "Mail"
+msgstr ""
+
+#: Template/Interesses/view.ctp:55
+#: Template/Villes/view.ctp:80
+msgid "Date Demande"
+msgstr ""
+
+#: Template/Ipmgmt/view.ctp:4
+msgid "Edit Ipmgmt"
+msgstr ""
+
+#: Template/Ipmgmt/view.ctp:15
+#: Template/Ippubliques/view.ctp:13
+msgid "Ip4"
+msgstr ""
+
+#: Template/Ipmgmt/view.ctp:19
+#: Template/Ippubliques/view.ctp:17
+msgid "Ip6"
+msgstr ""
+
+#: Template/Ippubliques/index.ctp:4
+msgid "New Ippublique"
+msgstr ""
+
+#: Template/Ippubliques/index.ctp:10
+msgid "Ippubliques"
+msgstr ""
+
+#: Template/Ippubliques/index.ctp:23;24
+msgid "Secteurs"
+msgstr ""
+
+#: Template/Ippubliques/index.ctp:36
+msgid "Utilisee"
+msgstr ""
+
+#: Template/Ippubliques/index.ctp:47
+msgid "oui"
+msgstr ""
+
+#: Template/Ippubliques/index.ctp:47
+msgid "non"
+msgstr ""
+
+#: Template/Ippubliques/view.ctp:4
+#: Template/Services/add.ctp:9
+#: Template/Services/edit.ctp:7
+#: Template/Services/index.ctp:7
+#: Template/Services/migrate.ctp:9
+#: Template/Services/view.ctp:9
+msgid "List Ippubliques"
+msgstr ""
+
+#: Template/Ippubliques/view.ctp:21
+#: Template/Relais/view.ctp:21
+msgid "Secteur"
+msgstr ""
+
+#: Template/Ippubliques/view.ctp:31
+#: Template/Services/edit.ctp:18
+#: Template/Services/view.ctp:18
+#: Template/Villes/view.ctp:59
+msgid "Adherent"
+msgstr ""
+
+#: Template/Ippubliques/view.ctp:33
+msgid "Service Statut Id"
+msgstr ""
+
+#: Template/Layout/default.ctp:49
+msgid "Ip"
+msgstr ""
+
+#: Template/Relais/add.ctp:14
+msgid "Add Relais"
+msgstr ""
+
+#: Template/Relais/edit.ctp:14
+#: Template/Relais/view.ctp:4
+msgid "Edit Relais"
+msgstr ""
+
+#: Template/Relais/view.ctp:17
+#: Template/Villes/view.ctp:12;30
+msgid "Title"
+msgstr ""
+
+#: Template/Relais/view.ctp:33
+#: Template/Villes/view.ctp:33
+msgid "Gps Long"
+msgstr ""
+
+#: Template/Relais/view.ctp:37
+#: Template/Villes/view.ctp:34
+msgid "Gps Lat"
+msgstr ""
+
+#: Template/Relais/view.ctp:50
+msgid "Equipement Description"
+msgstr ""
+
+#: Template/Services/add.ctp:17
+msgid "Add Service"
+msgstr ""
+
+#: Template/Services/edit.ctp:15
+#: Template/Services/migrate.ctp:4
+#: Template/Services/view.ctp:4
+msgid "Edit Service"
+msgstr ""
+
+#: Template/Services/edit.ctp:26
+msgid "Ip4publique"
+msgstr ""
+
+#: Template/Services/index.ctp:15
+msgid "Services"
+msgstr ""
+
+#: Template/Services/view.ctp:38
+msgid "Prix Ht"
+msgstr ""
+
+#: Template/Services/view.ctp:42
+msgid "Lat"
+msgstr ""
+
+#: Template/Services/view.ctp:46
+msgid "Lng"
+msgstr ""
+
+#: Template/Villes/add.ctp:18
+msgid "Add Ville"
+msgstr ""
+
+#: Template/Villes/edit.ctp:18
+#: Template/Villes/view.ctp:4
+msgid "Edit Ville"
+msgstr ""
+
+#: Template/Villes/view.ctp:16
+msgid "Cp"
+msgstr ""
+
+#: Template/Villes/view.ctp:20
+msgid "Tel Contact"
+msgstr ""
+
+#: Template/Villes/view.ctp:25
+msgid "Related Relais"
+msgstr ""
+
+#: Template/Villes/view.ctp:31
+msgid "Secteur Id"
+msgstr ""
+
+#: Template/Villes/view.ctp:32
+msgid "Ville Id"
+msgstr ""
+
+#: Template/Villes/view.ctp:55
+msgid "Related Adherent Roles"
+msgstr ""
+
+#: Template/Villes/view.ctp:60
+msgid "Adherent role"
+msgstr ""
+
+#: Template/Villes/view.ctp:76
+msgid "Related Attente Connexions"
+msgstr ""
+
+#: Template/Error/error400.ctp:33
+#: Template/Error/error500.ctp:35
+msgid "Error"
+msgstr ""
+
+#: Template/Error/error400.ctp:35
+msgid "The requested address %s was not found on this server."
+msgstr ""
+
+#: Template/Error/error500.ctp:33
+msgid "An Internal Error Has Occurred"
+msgstr ""
+
+#: Controller/Component/AuthComponent.php:454
+msgid "You are not authorized to access that location."
+msgstr ""
+
+#: Controller/Component/CsrfComponent.php:155
+msgid "Missing CSRF token cookie"
+msgstr ""
+
+#: Controller/Component/CsrfComponent.php:159
+msgid "CSRF token mismatch."
+msgstr ""
+
+#: Error/ExceptionRenderer.php:249
+msgid "Not Found"
+msgstr ""
+
+#: Error/ExceptionRenderer.php:251
+msgid "An Internal Error Has Occurred."
+msgstr ""
+
+#: I18n/Number.php:89
+msgid "{0,number,#,###.##} KB"
+msgstr ""
+
+#: I18n/Number.php:91
+msgid "{0,number,#,###.##} MB"
+msgstr ""
+
+#: I18n/Number.php:93
+msgid "{0,number,#,###.##} GB"
+msgstr ""
+
+#: I18n/Number.php:95
+msgid "{0,number,#,###.##} TB"
+msgstr ""
+
+#: I18n/Number.php:87
+msgid "{0,number,integer} Byte"
+msgid_plural "{0,number,integer} Bytes"
+msgstr[0] ""
+msgstr[1] ""
+
+#: I18n/Time.php:271
+msgid "%s ago"
+msgstr ""
+
+#: I18n/Time.php:272
+msgid "on %s"
+msgstr ""
+
+#: I18n/Time.php:312
+msgid "just now"
+msgstr ""
+
+#: I18n/Time.php:428
+msgid "about a second ago"
+msgstr ""
+
+#: I18n/Time.php:429
+msgid "about a minute ago"
+msgstr ""
+
+#: I18n/Time.php:430
+msgid "about an hour ago"
+msgstr ""
+
+#: I18n/Time.php:431
+msgid "about a day ago"
+msgstr ""
+
+#: I18n/Time.php:432
+msgid "about a week ago"
+msgstr ""
+
+#: I18n/Time.php:433
+msgid "about a year ago"
+msgstr ""
+
+#: I18n/Time.php:442
+msgid "in about a second"
+msgstr ""
+
+#: I18n/Time.php:443
+msgid "in about a minute"
+msgstr ""
+
+#: I18n/Time.php:444
+msgid "in about an hour"
+msgstr ""
+
+#: I18n/Time.php:445
+msgid "in about a day"
+msgstr ""
+
+#: I18n/Time.php:446
+msgid "in about a week"
+msgstr ""
+
+#: I18n/Time.php:447
+msgid "in about a year"
+msgstr ""
+
+#: I18n/Time.php:401
+msgid "{0} year"
+msgid_plural "{0} years"
+msgstr[0] ""
+msgstr[1] ""
+
+#: I18n/Time.php:404
+msgid "{0} month"
+msgid_plural "{0} months"
+msgstr[0] ""
+msgstr[1] ""
+
+#: I18n/Time.php:407
+msgid "{0} week"
+msgid_plural "{0} weeks"
+msgstr[0] ""
+msgstr[1] ""
+
+#: I18n/Time.php:410
+msgid "{0} day"
+msgid_plural "{0} days"
+msgstr[0] ""
+msgstr[1] ""
+
+#: I18n/Time.php:413
+msgid "{0} hour"
+msgid_plural "{0} hours"
+msgstr[0] ""
+msgstr[1] ""
+
+#: I18n/Time.php:416
+msgid "{0} minute"
+msgid_plural "{0} minutes"
+msgstr[0] ""
+msgstr[1] ""
+
+#: I18n/Time.php:419
+msgid "{0} second"
+msgid_plural "{0} seconds"
+msgstr[0] ""
+msgstr[1] ""
+
+#: Network/Response.php:1438
+msgid "The requested file was not found"
+msgstr ""
+
+#: ORM/RulesChecker.php:49
+msgid "This value is already in use"
+msgstr ""
+
+#: ORM/RulesChecker.php:83
+msgid "This value does not exist"
+msgstr ""
+
+#: Utility/Text.php:724
+msgid "and"
+msgstr ""
+
+#: Validation/Validator.php:102
+msgid "This field is required"
+msgstr ""
+
+#: Validation/Validator.php:103
+msgid "This field cannot be left empty"
+msgstr ""
+
+#: Validation/Validator.php:663
+msgid "The provided value is invalid"
+msgstr ""
+
+#: View/Helper/FormHelper.php:924
+msgid "New %s"
+msgstr ""
+
+#: View/Helper/FormHelper.php:927
+msgid "Edit %s"
+msgstr ""
+
+#: View/Helper/HtmlHelper.php:770
+msgid "Home"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:530
+msgid "January"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:531
+msgid "February"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:532
+msgid "March"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:533
+msgid "April"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:534
+msgid "May"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:535
+msgid "June"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:536
+msgid "July"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:537
+msgid "August"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:538
+msgid "September"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:539
+msgid "October"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:540
+msgid "November"
+msgstr ""
+
+#: View/Widget/DateTimeWidget.php:541
+msgid "December"
+msgstr ""
+
diff --git a/generator/after-bake/src/Locale/fr_FR/default.po b/generator/after-bake/src/Locale/fr_FR/default.po
new file mode 100644
index 0000000..2327cfd
--- /dev/null
+++ b/generator/after-bake/src/Locale/fr_FR/default.po
@@ -0,0 +1,1305 @@
+# FRENCH translation of CakePHP Application
+# Copyright 2015-2016 CHD <postmaster@chd.sx>
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2016-01-20 20:09+0000\n"
+"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
+"Last-Translator: Nicolas Goaziou <mail@nicolasgoaziou.fr>\n"
+"Language-Team: CHD <postmaster@chd.sx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: Controller/AdherentRolesController.php:38
+msgid "The adherent role has been saved."
+msgstr "Le rôle a été enregistré."
+
+#: Controller/AdherentRolesController.php:41
+msgid "The adherent role could not be saved. Please, try again."
+msgstr "Le rôle n'a pas pu être enregistré. Veuillez ré-essayer."
+
+#: Controller/AdherentRolesController.php:64
+msgid "The adherent role has been deleted."
+msgstr "Le rôle a été supprimé."
+
+#: Controller/AdherentRolesController.php:66
+msgid "The adherent role could not be deleted. Please, try again."
+msgstr "Le rôle n'a pas pu être supprimé. Veuillez ré-essayer."
+
+#: Controller/AdherentsController.php:88;117
+msgid "The adherent has been saved."
+msgstr "L'adhérent a été enregistré."
+
+#: Controller/AdherentsController.php:91;120
+msgid "The adherent could not be saved. Please, try again."
+msgstr "L'adhérent n'a pas pu être enregistré. Veuillez ré-essayer."
+
+#: Controller/EquipementModelesController.php:51;76
+msgid "The equipement modele has been saved."
+msgstr "Le modèle a été enregistré."
+
+#: Controller/EquipementModelesController.php:54;79
+msgid "The equipement modele could not be saved. Please, try again."
+msgstr "Le modèle n'a pas pu être enregistré. Veuillez ré-essayer."
+
+#: Controller/EquipementsController.php:72;103
+msgid "The equipement has been saved."
+msgstr "L'équipement a été enregistré."
+
+#: Controller/EquipementsController.php:75;106
+msgid "The equipement could not be saved. Please, try again."
+msgstr "L'équipement n'a pas pu être enregistré. Veuillez ré-essayer."
+
+#: Controller/InteressesController.php:54;81
+msgid "The interesse has been saved."
+msgstr "L'intéressé a été enregistré."
+
+#: Controller/InteressesController.php:57;84
+msgid "The interesse could not be saved. Please, try again."
+msgstr "L'intéressé n'a pas pu être enregistré. Veuillez ré-essayer."
+
+#: Controller/IpmgmtController.php:54;79
+msgid "The ipmgmt has been saved."
+msgstr "L'adresse privée a été sauvegardée"
+
+#: Controller/IpmgmtController.php:57;82
+msgid "The ipmgmt could not be saved. Please, try again."
+msgstr "L'adresse IP privée n'a pas pu être enregistrée. Veuillez ré-essayer."
+
+#: Controller/RelaisController.php:65;92
+msgid "The relais has been saved."
+msgstr "Le relais a été enregistré."
+
+#: Controller/RelaisController.php:68;95
+msgid "The relais could not be saved. Please, try again."
+msgstr "Le relais n'a pas pu être enregistré. Veuillez ré-essayer."
+
+#: Controller/ServicesController.php:88;138;173;226
+msgid "The service has been saved."
+msgstr "Le service a été enregistré."
+
+#: Controller/ServicesController.php:93;141;175;230
+msgid "The service could not be saved. Please, try again."
+msgstr "Le service n'a pas pu être enregistré. Veuillez ré-essayer."
+
+#: Controller/ServicesController.php:178
+msgid "Can't find a free IP public address. Please make sure that equipements are associated to the service."
+msgstr "Aucune adresse IP publique disponible. Veuillez vous assurer que des équipements sont associés à ce service."
+
+#: Controller/ServicesController.php:181
+msgid "Can't activate the service. Bad service state."
+msgstr "Impossible d'activer le service."
+
+#: Controller/VillesController.php:51;76
+msgid "The ville has been saved."
+msgstr "La ville a été enregistrée."
+
+#: Controller/VillesController.php:54;79
+msgid "The ville could not be saved. Please, try again."
+msgstr "La ville n'a pas pu être enregistrée. Veuillez ré-essayer."
+
+#: Template/AdherentRoles/add.ctp:3
+#: Template/AdherentRoles/index.ctp:3;21
+#: Template/Adherents/add.ctp:3
+#: Template/Adherents/edit.ctp:3
+#: Template/Adherents/index.ctp:3;46
+#: Template/Adherents/view.ctp:3;137
+#: Template/EquipementModeles/add.ctp:3
+#: Template/EquipementModeles/edit.ctp:3
+#: Template/EquipementModeles/index.ctp:3;16
+#: Template/EquipementModeles/view.ctp:3;44
+#: Template/Equipements/add.ctp:3
+#: Template/Equipements/edit.ctp:3
+#: Template/Equipements/index.ctp:3;50
+#: Template/Equipements/view.ctp:3
+#: Template/Interesses/add.ctp:3
+#: Template/Interesses/edit.ctp:3
+#: Template/Interesses/index.ctp:3;21
+#: Template/Interesses/view.ctp:3
+#: Template/Ipmgmt/index.ctp:3;16
+#: Template/Ipmgmt/view.ctp:3;37
+#: Template/Ippubliques/index.ctp:3;37
+#: Template/Ippubliques/view.ctp:3;37
+#: Template/Relais/add.ctp:3
+#: Template/Relais/edit.ctp:3
+#: Template/Relais/index.ctp:3;21
+#: Template/Relais/view.ctp:3;51
+#: Template/Services/add.ctp:3
+#: Template/Services/edit.ctp:3
+#: Template/Services/index.ctp:3;50
+#: Template/Services/migrate.ctp:3
+#: Template/Services/view.ctp:3;76
+#: Template/Villes/add.ctp:3
+#: Template/Villes/edit.ctp:3
+#: Template/Villes/index.ctp:3;23
+#: Template/Villes/view.ctp:3;35;61;88
+msgid "Actions"
+msgstr "Actions"
+
+#: Template/AdherentRoles/add.ctp:4
+#: Template/Adherents/add.ctp:7
+#: Template/Villes/add.ctp:5
+#: Template/Villes/edit.ctp:5
+#: Template/Villes/index.ctp:5
+msgid "List Adherent Roles"
+msgstr "Liste des rôles"
+
+#: Template/AdherentRoles/add.ctp:5
+#: Template/AdherentRoles/index.ctp:5
+#: Template/Adherents/add.ctp:4
+#: Template/Adherents/edit.ctp:4
+#: Template/Adherents/view.ctp:5
+#: Template/Services/add.ctp:5
+#: Template/Services/edit.ctp:5
+#: Template/Services/index.ctp:5
+#: Template/Services/migrate.ctp:7
+#: Template/Services/view.ctp:7
+#: Template/Villes/add.ctp:7
+#: Template/Villes/edit.ctp:7
+#: Template/Villes/index.ctp:7
+msgid "List Adherents"
+msgstr "Liste des adhérents"
+
+#: Template/AdherentRoles/add.ctp:6
+#: Template/AdherentRoles/index.ctp:6
+#: Template/Adherents/index.ctp:4
+#: Template/Services/add.ctp:6
+#: Template/Services/edit.ctp:6
+#: Template/Services/index.ctp:6
+#: Template/Services/migrate.ctp:8
+#: Template/Services/view.ctp:8
+#: Template/Villes/add.ctp:8
+#: Template/Villes/edit.ctp:8
+#: Template/Villes/index.ctp:8
+msgid "New Adherent"
+msgstr "Nouvel adhérent"
+
+#: Template/AdherentRoles/add.ctp:7
+#: Template/AdherentRoles/index.ctp:7
+msgid "List Adherent Role Types"
+msgstr "Liste des types de rôles"
+
+#: Template/AdherentRoles/add.ctp:8
+#: Template/AdherentRoles/index.ctp:8
+msgid "New Adherent Role Type"
+msgstr "Nouveau type de rôle"
+
+#: Template/AdherentRoles/add.ctp:9
+#: Template/AdherentRoles/index.ctp:9
+#: Template/Adherents/add.ctp:5
+#: Template/Adherents/edit.ctp:5
+#: Template/Adherents/index.ctp:5
+#: Template/Interesses/add.ctp:5
+#: Template/Interesses/edit.ctp:5
+#: Template/Interesses/index.ctp:5
+#: Template/Interesses/view.ctp:7
+#: Template/Relais/add.ctp:5
+#: Template/Relais/edit.ctp:5
+#: Template/Relais/index.ctp:5
+#: Template/Relais/view.ctp:7
+#: Template/Villes/add.ctp:4
+#: Template/Villes/edit.ctp:4
+#: Template/Villes/view.ctp:5
+msgid "List Villes"
+msgstr "Liste des villes"
+
+#: Template/AdherentRoles/add.ctp:10
+#: Template/AdherentRoles/index.ctp:10
+#: Template/Adherents/add.ctp:6
+#: Template/Adherents/edit.ctp:6
+#: Template/Adherents/index.ctp:6
+#: Template/Interesses/add.ctp:6
+#: Template/Interesses/edit.ctp:6
+#: Template/Interesses/index.ctp:6
+#: Template/Interesses/view.ctp:8
+#: Template/Relais/add.ctp:6
+#: Template/Relais/edit.ctp:6
+#: Template/Relais/index.ctp:6
+#: Template/Relais/view.ctp:8
+#: Template/Villes/index.ctp:4
+msgid "New Ville"
+msgstr "Nouvelle ville"
+
+#: Template/AdherentRoles/add.ctp:16
+msgid "Add Adherent Role"
+msgstr "Ajouter un rôle"
+
+#: Template/AdherentRoles/add.ctp:23
+#: Template/Adherents/add.ctp:42
+#: Template/Adherents/edit.ctp:56
+#: Template/EquipementModeles/add.ctp:18
+#: Template/EquipementModeles/edit.ctp:18
+#: Template/Equipements/add.ctp:34
+#: Template/Equipements/edit.ctp:34
+#: Template/Interesses/add.ctp:27
+#: Template/Interesses/edit.ctp:27
+#: Template/Relais/add.ctp:23
+#: Template/Relais/edit.ctp:23
+#: Template/Services/add.ctp:25
+#: Template/Services/edit.ctp:41
+#: Template/Villes/add.ctp:25
+#: Template/Villes/edit.ctp:25
+#: View/Helper/FormHelper.php:1724
+msgid "Submit"
+msgstr "Envoyer"
+
+#: Template/AdherentRoles/index.ctp:4
+#: Template/Adherents/add.ctp:8
+#: Template/Villes/add.ctp:6
+#: Template/Villes/edit.ctp:6
+#: Template/Villes/index.ctp:6
+msgid "New Adherent Role"
+msgstr "Nouveau rôle"
+
+#: Template/AdherentRoles/index.ctp:14
+msgid "Adherent Roles"
+msgstr "Rôles"
+
+#: Template/AdherentRoles/index.ctp:31
+#: Template/Adherents/view.ctp:115
+#: Template/Villes/view.ctp:68
+msgid "Delete"
+msgstr "Supprimer"
+
+#: Template/AdherentRoles/index.ctp:31
+#: Template/Adherents/view.ctp:115
+#: Template/Villes/view.ctp:68
+msgid "Are you sure you want to delete # {0}?"
+msgstr "Êtes-vous certain de vouloir supprimer # {0}?"
+
+#: Template/AdherentRoles/index.ctp:39
+#: Template/Adherents/index.ctp:70
+#: Template/EquipementModeles/index.ctp:34
+#: Template/Equipements/index.ctp:73
+#: Template/Interesses/index.ctp:44
+#: Template/Ipmgmt/index.ctp:33
+#: Template/Ippubliques/index.ctp:57
+#: Template/Relais/index.ctp:42
+#: Template/Services/index.ctp:73
+#: Template/Villes/index.ctp:42
+msgid "previous"
+msgstr "précédent"
+
+#: Template/AdherentRoles/index.ctp:41
+#: Template/Adherents/index.ctp:72
+#: Template/EquipementModeles/index.ctp:36
+#: Template/Equipements/index.ctp:75
+#: Template/Interesses/index.ctp:46
+#: Template/Ipmgmt/index.ctp:35
+#: Template/Ippubliques/index.ctp:59
+#: Template/Relais/index.ctp:44
+#: Template/Services/index.ctp:75
+#: Template/Villes/index.ctp:44
+msgid "next"
+msgstr "suivant"
+
+#: Template/Adherents/add.ctp:9
+#: Template/Adherents/edit.ctp:7
+#: Template/Adherents/index.ctp:7
+#: Template/Equipements/add.ctp:7
+#: Template/Equipements/edit.ctp:7
+#: Template/Equipements/index.ctp:10
+#: Template/Equipements/view.ctp:13
+#: Template/Ippubliques/index.ctp:5
+#: Template/Ippubliques/view.ctp:5
+#: Template/Services/add.ctp:4
+#: Template/Services/edit.ctp:4
+#: Template/Services/migrate.ctp:5
+#: Template/Services/view.ctp:5
+msgid "List Services"
+msgstr "Liste des services"
+
+#: Template/Adherents/add.ctp:10
+#: Template/Adherents/edit.ctp:8
+#: Template/Adherents/index.ctp:8
+#: Template/Adherents/view.ctp:7
+#: Template/Equipements/add.ctp:8
+#: Template/Equipements/edit.ctp:8
+#: Template/Equipements/index.ctp:11
+#: Template/Equipements/view.ctp:14
+#: Template/Ippubliques/index.ctp:6
+#: Template/Ippubliques/view.ctp:6
+#: Template/Services/index.ctp:4
+#: Template/Services/migrate.ctp:6
+#: Template/Services/view.ctp:6
+msgid "New Service"
+msgstr "Nouveau service"
+
+#: Template/Adherents/add.ctp:11
+msgid "List V Relais Detail"
+msgstr "Liste des V Relais Detail"
+
+#: Template/Adherents/add.ctp:12
+msgid "New V Relais Detail"
+msgstr "Nouveau V Relais Detail"
+
+#: Template/Adherents/add.ctp:18
+msgid "Add Adherent"
+msgstr "Ajouter un adhérent"
+
+#: Template/Adherents/edit.ctp:14
+#: Template/Adherents/view.ctp:4
+msgid "Edit Adherent"
+msgstr "Modifier l'adhérent"
+
+#: Template/Adherents/edit.ctp:59
+#: Template/Adherents/view.ctp:127
+#: Template/Ippubliques/view.ctp:26
+msgid "Related Services"
+msgstr "Services associés"
+
+#: Template/Adherents/edit.ctp:63
+#: Template/Adherents/view.ctp:131
+#: Template/EquipementModeles/view.ctp:23;32
+#: Template/Interesses/view.ctp:51
+#: Template/Ipmgmt/view.ctp:23
+#: Template/Relais/view.ctp:29
+#: Template/Villes/view.ctp:29
+msgid "Id"
+msgstr "Identifiant"
+
+#: Template/Adherents/edit.ctp:64
+#: Template/Adherents/view.ctp:132
+#: Template/Ippubliques/view.ctp:32
+#: Template/Services/edit.ctp:22
+#: Template/Services/index.ctp:22;23
+#: Template/Services/view.ctp:22
+msgid "Service Type"
+msgstr "Type de service"
+
+#: Template/Adherents/edit.ctp:65
+#: Template/Equipements/index.ctp:34;35
+#: Template/Equipements/view.ctp:37
+#: Template/Relais/index.ctp:12
+#: Template/Services/index.ctp:34;35
+msgid "Relais"
+msgstr "Relais"
+
+#: Template/Adherents/edit.ctp:66
+#: Template/Adherents/view.ctp:133
+#: Template/Services/index.ctp:28;29
+#: Template/Services/view.ctp:26
+msgid "Service Statut"
+msgstr "Statut"
+
+#: Template/Adherents/edit.ctp:67
+#: Template/Adherents/view.ctp:134
+#: Template/Services/view.ctp:30
+msgid "Ippublique"
+msgstr "Adresse IP publique"
+
+#: Template/Adherents/edit.ctp:68
+#: Template/Adherents/view.ctp:135
+#: Template/Ippubliques/view.ctp:34
+#: Template/Services/edit.ctp:30
+#: Template/Services/view.ctp:50
+msgid "Date Debut"
+msgstr "Date début"
+
+#: Template/Adherents/edit.ctp:69
+#: Template/Adherents/view.ctp:136
+#: Template/Ippubliques/view.ctp:35
+#: Template/Services/view.ctp:54
+msgid "Date Fin"
+msgstr "Date de fin"
+
+#: Template/Adherents/index.ctp:16
+#: Template/Layout/default.ctp:46
+msgid "Adherents"
+msgstr "Adhérents"
+
+#: Template/Adherents/index.ctp:23;24
+#: Template/Equipements/index.ctp:22;23
+#: Template/Ippubliques/index.ctp:17;18
+msgid "Rechercher..."
+msgstr "Rechercher..."
+
+#: Template/Adherents/index.ctp:29;30
+#: Template/Villes/index.ctp:16
+msgid "Villes"
+msgstr "Villes"
+
+#: Template/Adherents/index.ctp:61
+#: Template/Adherents/view.ctp:148
+#: Template/EquipementModeles/index.ctp:25
+#: Template/EquipementModeles/view.ctp:63
+#: Template/Equipements/index.ctp:64
+#: Template/Interesses/index.ctp:35
+#: Template/Ipmgmt/index.ctp:25
+#: Template/Ipmgmt/view.ctp:49
+#: Template/Ippubliques/index.ctp:49
+#: Template/Ippubliques/view.ctp:51
+#: Template/Relais/index.ctp:33
+#: Template/Relais/view.ctp:61
+#: Template/Services/index.ctp:64
+#: Template/Services/view.ctp:88
+#: Template/Villes/index.ctp:33
+#: Template/Villes/view.ctp:46;101
+msgid "View"
+msgstr "Voir"
+
+#: Template/Adherents/index.ctp:62
+#: Template/Adherents/view.ctp:149
+#: Template/EquipementModeles/index.ctp:26
+#: Template/EquipementModeles/view.ctp:65
+#: Template/Equipements/index.ctp:65
+#: Template/Interesses/index.ctp:36
+#: Template/Ipmgmt/view.ctp:51
+#: Template/Relais/index.ctp:34
+#: Template/Relais/view.ctp:62
+#: Template/Services/index.ctp:65
+#: Template/Services/view.ctp:89
+#: Template/Villes/index.ctp:34
+#: Template/Villes/view.ctp:47;102
+msgid "Edit"
+msgstr "Modifier"
+
+#: Template/Adherents/view.ctp:6
+msgid "New AdherentRole"
+msgstr "Nouveau rôle"
+
+#: Template/Adherents/view.ctp:14
+msgid "Adherent Statut"
+msgstr "Statut"
+
+#: Template/Adherents/view.ctp:20
+msgid "Num Adt Ttn"
+msgstr "Numéro TTN"
+
+#: Template/Adherents/view.ctp:27
+msgid "Adherent Type"
+msgstr "Type"
+
+#: Template/Adherents/view.ctp:31
+#: Template/Interesses/view.ctp:15
+msgid "Civilite"
+msgstr "Civilité"
+
+#: Template/Adherents/view.ctp:35
+#: Template/Interesses/view.ctp:19
+#: Template/Villes/view.ctp:81
+msgid "Nom"
+msgstr "Nom"
+
+#: Template/Adherents/view.ctp:39
+#: Template/Interesses/view.ctp:23
+#: Template/Villes/view.ctp:82
+msgid "Prenom"
+msgstr "Prénom"
+
+#: Template/Adherents/view.ctp:43
+#: Template/Interesses/view.ctp:27
+#: Template/Villes/view.ctp:83
+msgid "Raison"
+msgstr "Raison"
+
+#: Template/Adherents/view.ctp:47
+msgid "Tel Fixe1"
+msgstr "Tél. fixe 1"
+
+#: Template/Adherents/view.ctp:51
+msgid "Tel Mobile1"
+msgstr "Tél. mobile 1"
+
+#: Template/Adherents/view.ctp:57
+#: Template/Interesses/view.ctp:43
+#: Template/Villes/view.ctp:86
+msgid "Adresse1"
+msgstr "Adresse 1"
+
+#: Template/Adherents/view.ctp:61
+#: Template/Interesses/view.ctp:47
+msgid "Adresse2"
+msgstr "Adresse 2"
+
+#: Template/Adherents/view.ctp:65
+#: Template/Interesses/view.ctp:31
+#: Template/Relais/view.ctp:25
+msgid "Ville"
+msgstr "Ville"
+
+#: Template/Adherents/view.ctp:69
+msgid "Mail1"
+msgstr "E-mail 1"
+
+#: Template/Adherents/view.ctp:73
+msgid "Mail2"
+msgstr "E-mail 2"
+
+#: Template/Adherents/view.ctp:77
+msgid "Tel Fixe2"
+msgstr "Tél. fixe 2"
+
+#: Template/Adherents/view.ctp:81
+msgid "Tel Mobile2"
+msgstr "Tél. mobile 2"
+
+#: Template/Adherents/view.ctp:88
+msgid "Proprio"
+msgstr "Propriétaire"
+
+#: Template/Adherents/view.ctp:92
+msgid "Nom2"
+msgstr "Nom 2"
+
+#: Template/Adherents/view.ctp:96
+msgid "Prenom2"
+msgstr "Prénom 2"
+
+#: Template/Adherents/view.ctp:100
+#: Template/Services/view.ctp:58
+msgid "Created"
+msgstr "Créé le"
+
+#: Template/Adherents/view.ctp:104
+#: Template/Services/view.ctp:62
+msgid "Modified"
+msgstr "Modifié le"
+
+#: Template/Adherents/view.ctp:112
+msgid "Role {0}"
+msgstr "Rôle {0}"
+
+#: Template/Adherents/view.ctp:123
+#: Template/EquipementModeles/view.ctp:43
+#: Template/Equipements/view.ctp:66
+#: Template/Interesses/view.ctp:60
+#: Template/Villes/view.ctp:87
+msgid "Notes"
+msgstr "Notes"
+
+#: Template/Adherents/view.ctp:155;184;194
+msgid "Terminate"
+msgstr "Résilier"
+
+#: Template/Adherents/view.ctp:156;185;195
+msgid "Are you sure you want to terminate # {0}?"
+msgstr "Êtes-vous certain de vouloir résilier # {0}?"
+
+#: Template/Adherents/view.ctp:166
+msgid "Activate"
+msgstr "Activer"
+
+#: Template/Adherents/view.ctp:167
+msgid "Are you sure you want to activate # {0}?"
+msgstr "Êtes-vous certain de vouloir activer # {0}?"
+
+#: Template/Adherents/view.ctp:172
+msgid "Migrate"
+msgstr "Migrer"
+
+#: Template/Adherents/view.ctp:173
+msgid "Are you sure you want to migrate # {0}?"
+msgstr "Êtes-vous certain de vouloir migrer # {0}?"
+
+#: Template/Adherents/view.ctp:180
+msgid "Suspend"
+msgstr "Suspendre"
+
+#: Template/Adherents/view.ctp:181;191
+msgid "Are you sure you want to suspend # {0}?"
+msgstr "Êtes-vous certain de vouloir suspendre # {0}?"
+
+#: Template/Adherents/view.ctp:190
+msgid "Unsuspend"
+msgstr "Reprendre"
+
+#: Template/EquipementModeles/add.ctp:4
+#: Template/EquipementModeles/edit.ctp:4
+#: Template/EquipementModeles/view.ctp:5
+#: Template/Equipements/add.ctp:10
+#: Template/Equipements/edit.ctp:10
+#: Template/Equipements/index.ctp:6
+#: Template/Equipements/view.ctp:9
+msgid "List Equipement Modeles"
+msgstr "Liste des modèles"
+
+#: Template/EquipementModeles/add.ctp:5
+#: Template/EquipementModeles/edit.ctp:5
+#: Template/EquipementModeles/index.ctp:5
+#: Template/EquipementModeles/view.ctp:7
+#: Template/Equipements/add.ctp:4;5
+#: Template/Equipements/edit.ctp:4;5
+#: Template/Equipements/view.ctp:5;15
+#: Template/Ipmgmt/index.ctp:5
+#: Template/Ipmgmt/view.ctp:7
+#: Template/Relais/add.ctp:7
+#: Template/Relais/edit.ctp:7
+#: Template/Relais/index.ctp:7
+#: Template/Relais/view.ctp:9
+#: Template/Services/add.ctp:10
+#: Template/Services/edit.ctp:8
+#: Template/Services/index.ctp:10
+#: Template/Services/migrate.ctp:12
+#: Template/Services/view.ctp:10
+msgid "List Equipements"
+msgstr "Liste des équipements"
+
+#: Template/EquipementModeles/add.ctp:6
+#: Template/EquipementModeles/edit.ctp:6
+#: Template/EquipementModeles/index.ctp:6
+#: Template/EquipementModeles/view.ctp:8
+#: Template/Equipements/add.ctp:6
+#: Template/Equipements/edit.ctp:6
+#: Template/Equipements/index.ctp:4
+#: Template/Equipements/view.ctp:6;16
+#: Template/Ipmgmt/index.ctp:6
+#: Template/Ipmgmt/view.ctp:8
+#: Template/Relais/add.ctp:8
+#: Template/Relais/edit.ctp:8
+#: Template/Relais/index.ctp:8
+#: Template/Relais/view.ctp:10
+#: Template/Services/add.ctp:11
+#: Template/Services/edit.ctp:9
+#: Template/Services/index.ctp:11
+#: Template/Services/migrate.ctp:13
+#: Template/Services/view.ctp:11
+msgid "New Equipement"
+msgstr "Nouvel équipement"
+
+#: Template/EquipementModeles/add.ctp:12
+msgid "Add Equipement Modele"
+msgstr "Ajouter un modèle"
+
+#: Template/EquipementModeles/edit.ctp:12
+#: Template/EquipementModeles/view.ctp:4
+msgid "Edit Equipement Modele"
+msgstr "Modifier le modèle"
+
+#: Template/EquipementModeles/index.ctp:4
+#: Template/EquipementModeles/view.ctp:6
+#: Template/Equipements/add.ctp:11
+#: Template/Equipements/edit.ctp:11
+#: Template/Equipements/index.ctp:7
+#: Template/Equipements/view.ctp:10
+msgid "New Equipement Modele"
+msgstr "Nouveau modèle"
+
+#: Template/EquipementModeles/index.ctp:10
+#: Template/Equipements/index.ctp:28;29
+msgid "Equipement Modeles"
+msgstr "Modèles"
+
+#: Template/EquipementModeles/view.ctp:15
+msgid "Constructeur"
+msgstr "Constructeur"
+
+#: Template/EquipementModeles/view.ctp:19
+msgid "Modele"
+msgstr "Modèle"
+
+#: Template/EquipementModeles/view.ctp:28
+#: Template/Ipmgmt/view.ctp:28
+#: Template/Relais/view.ctp:42
+#: Template/Services/view.ctp:67
+msgid "Related Equipements"
+msgstr "Équipements associés"
+
+#: Template/EquipementModeles/view.ctp:33
+#: Template/Equipements/view.ctp:25
+#: Template/Ipmgmt/view.ctp:32
+#: Template/Relais/view.ctp:46
+#: Template/Services/view.ctp:71
+msgid "Mac"
+msgstr "MAC"
+
+#: Template/EquipementModeles/view.ctp:34
+msgid "Uplink Id"
+msgstr "Identifiant ascendant"
+
+#: Template/EquipementModeles/view.ctp:35
+#: Template/Ippubliques/view.ctp:30
+msgid "Service Id"
+msgstr "Identifiant du Service"
+
+#: Template/EquipementModeles/view.ctp:36
+msgid "Ipmgmt Id"
+msgstr "Identifiant adresse privée"
+
+#: Template/EquipementModeles/view.ctp:37
+msgid "Equipement Modele Id"
+msgstr "Identifiant modèle"
+
+#: Template/EquipementModeles/view.ctp:38
+#: Template/Relais/view.ctp:49
+#: Template/Services/view.ctp:74
+msgid "Equipement Mode Id"
+msgstr "Identifiant mode"
+
+#: Template/EquipementModeles/view.ctp:39
+msgid "Relais Id"
+msgstr "Identifiant relais"
+
+#: Template/EquipementModeles/view.ctp:40
+#: Template/Equipements/view.ctp:53
+#: Template/Ipmgmt/view.ctp:35
+#: Template/Ippubliques/view.ctp:36
+#: Template/Services/view.ctp:34;75
+msgid "Description"
+msgstr "Description"
+
+#: Template/EquipementModeles/view.ctp:41
+#: Template/Equipements/view.ctp:57
+msgid "Date Achat"
+msgstr "Date d'achat"
+
+#: Template/EquipementModeles/view.ctp:42
+#: Template/Equipements/view.ctp:61
+#: Template/Ipmgmt/view.ctp:36
+msgid "Date Hs"
+msgstr "Date Hors-service"
+
+#: Template/Equipements/add.ctp:9
+#: Template/Equipements/edit.ctp:9
+#: Template/Equipements/index.ctp:5
+#: Template/Equipements/view.ctp:7
+#: Template/Ipmgmt/view.ctp:5
+msgid "List Ipmgmt"
+msgstr "Liste des adresse privées"
+
+#: Template/Equipements/add.ctp:12
+#: Template/Equipements/edit.ctp:12
+#: Template/Equipements/index.ctp:8
+#: Template/Equipements/view.ctp:11
+#: Template/Relais/add.ctp:4
+#: Template/Relais/edit.ctp:4
+#: Template/Relais/view.ctp:5
+#: Template/Services/add.ctp:7
+#: Template/Services/index.ctp:8
+#: Template/Services/migrate.ctp:10
+#: Template/Villes/add.ctp:11
+#: Template/Villes/edit.ctp:11
+#: Template/Villes/index.ctp:11
+msgid "List Relais"
+msgstr "Liste des relais"
+
+#: Template/Equipements/add.ctp:13
+#: Template/Equipements/edit.ctp:13
+#: Template/Equipements/index.ctp:9
+#: Template/Equipements/view.ctp:12
+#: Template/Relais/index.ctp:4
+#: Template/Relais/view.ctp:6
+#: Template/Services/add.ctp:8
+#: Template/Services/index.ctp:9
+#: Template/Services/migrate.ctp:11
+#: Template/Villes/add.ctp:12
+#: Template/Villes/edit.ctp:12
+#: Template/Villes/index.ctp:12
+msgid "New Relais"
+msgstr "Nouveau relais"
+
+#: Template/Equipements/add.ctp:19
+msgid "Add Equipement"
+msgstr "Ajouter un équipement"
+
+#: Template/Equipements/edit.ctp:19
+#: Template/Equipements/view.ctp:4
+msgid "Edit Equipement"
+msgstr "Modifier l'équipement"
+
+#: Template/Equipements/index.ctp:15
+#: Template/Layout/default.ctp:48
+msgid "Equipements"
+msgstr "Équipements"
+
+#: Template/Equipements/view.ctp:8
+#: Template/Ipmgmt/index.ctp:4
+#: Template/Ipmgmt/view.ctp:6
+msgid "New Ipmgmt"
+msgstr "Nouvelle adresse privée"
+
+#: Template/Equipements/view.ctp:17
+msgid "List Equipement Modes"
+msgstr "Liste des modes"
+
+#: Template/Equipements/view.ctp:18
+msgid "New Equipement Mode"
+msgstr "Nouveau mode"
+
+#: Template/Equipements/view.ctp:29
+#: Template/Ipmgmt/index.ctp:10
+#: Template/Relais/view.ctp:47
+#: Template/Services/view.ctp:72
+msgid "Ipmgmt"
+msgstr "Adresses privées"
+
+#: Template/Equipements/view.ctp:33
+#: Template/Ipmgmt/view.ctp:33
+#: Template/Relais/view.ctp:48
+#: Template/Services/view.ctp:73
+msgid "Equipement Modele"
+msgstr "Modèle"
+
+#: Template/Equipements/view.ctp:41
+msgid "Service"
+msgstr "Service"
+
+#: Template/Equipements/view.ctp:45
+msgid "Uplink"
+msgstr "Ascendant (Uplink)"
+
+#: Template/Equipements/view.ctp:49
+#: Template/Ipmgmt/view.ctp:34
+msgid "Equipement Mode"
+msgstr "Mode"
+
+#: Template/Interesses/add.ctp:4
+#: Template/Interesses/edit.ctp:4
+#: Template/Interesses/view.ctp:5
+#: Template/Villes/add.ctp:9
+#: Template/Villes/edit.ctp:9
+#: Template/Villes/index.ctp:9
+msgid "List Interesses"
+msgstr "Liste des intéressés"
+
+#: Template/Interesses/add.ctp:12
+msgid "Add Interesse"
+msgstr "Ajouté un intéressé"
+
+#: Template/Interesses/edit.ctp:12
+#: Template/Interesses/view.ctp:4
+msgid "Edit Interesse"
+msgstr "Modifier l'intéressé"
+
+#: Template/Interesses/index.ctp:4
+#: Template/Interesses/view.ctp:6
+#: Template/Villes/add.ctp:10
+#: Template/Villes/edit.ctp:10
+#: Template/Villes/index.ctp:10
+msgid "New Interesse"
+msgstr "Nouvel intéressé"
+
+#: Template/Interesses/index.ctp:10
+#: Template/Layout/default.ctp:47
+msgid "Interesses"
+msgstr "Intéressés"
+
+#: Template/Interesses/view.ctp:35
+#: Template/Villes/view.ctp:84
+msgid "Telephone"
+msgstr "Téléphone"
+
+#: Template/Interesses/view.ctp:39
+#: Template/Villes/view.ctp:85
+msgid "Mail"
+msgstr "E-mail"
+
+#: Template/Interesses/view.ctp:55
+#: Template/Villes/view.ctp:80
+msgid "Date Demande"
+msgstr "Date de demande"
+
+#: Template/Ipmgmt/view.ctp:4
+msgid "Edit Ipmgmt"
+msgstr "Modifier l'adresse privée"
+
+#: Template/Ipmgmt/view.ctp:15
+#: Template/Ippubliques/view.ctp:13
+msgid "Ip4"
+msgstr "IPv4"
+
+#: Template/Ipmgmt/view.ctp:19
+#: Template/Ippubliques/view.ctp:17
+msgid "Ip6"
+msgstr "IPv6"
+
+#: Template/Ippubliques/index.ctp:4
+msgid "New Ippublique"
+msgstr "Nouvelle adresse IP publique"
+
+#: Template/Ippubliques/index.ctp:10
+msgid "Ippubliques"
+msgstr "Adresses publiques"
+
+#: Template/Ippubliques/index.ctp:23;24
+msgid "Secteurs"
+msgstr "Secteurs"
+
+#: Template/Ippubliques/index.ctp:36
+msgid "Utilisee"
+msgstr "Utilisée"
+
+#: Template/Ippubliques/index.ctp:47
+msgid "oui"
+msgstr "oui"
+
+#: Template/Ippubliques/index.ctp:47
+msgid "non"
+msgstr "non"
+
+#: Template/Ippubliques/view.ctp:4
+#: Template/Services/add.ctp:9
+#: Template/Services/edit.ctp:7
+#: Template/Services/index.ctp:7
+#: Template/Services/migrate.ctp:9
+#: Template/Services/view.ctp:9
+msgid "List Ippubliques"
+msgstr "Liste des adresses publiques"
+
+#: Template/Ippubliques/view.ctp:21
+#: Template/Relais/view.ctp:21
+msgid "Secteur"
+msgstr "Secteur"
+
+#: Template/Ippubliques/view.ctp:31
+#: Template/Services/edit.ctp:18
+#: Template/Services/view.ctp:18
+#: Template/Villes/view.ctp:59
+msgid "Adherent"
+msgstr "Adhérent"
+
+#: Template/Ippubliques/view.ctp:33
+msgid "Service Statut Id"
+msgstr "Identifiant statut"
+
+#: Template/Layout/default.ctp:49
+msgid "Ip"
+msgstr "Adresses IP"
+
+#: Template/Relais/add.ctp:14
+msgid "Add Relais"
+msgstr "Ajouter un relais"
+
+#: Template/Relais/edit.ctp:14
+#: Template/Relais/view.ctp:4
+msgid "Edit Relais"
+msgstr "Modifier le relais"
+
+#: Template/Relais/view.ctp:17
+#: Template/Villes/view.ctp:12;30
+msgid "Title"
+msgstr "Titre"
+
+#: Template/Relais/view.ctp:33
+#: Template/Villes/view.ctp:33
+msgid "Gps Long"
+msgstr "Longitude"
+
+#: Template/Relais/view.ctp:37
+#: Template/Villes/view.ctp:34
+msgid "Gps Lat"
+msgstr "Latitude"
+
+#: Template/Relais/view.ctp:50
+msgid "Equipement Description"
+msgstr "Description de l'équipement"
+
+#: Template/Services/add.ctp:17
+msgid "Add Service"
+msgstr "Ajouter un service"
+
+#: Template/Services/edit.ctp:15
+#: Template/Services/migrate.ctp:4
+#: Template/Services/view.ctp:4
+msgid "Edit Service"
+msgstr "Modifier le service"
+
+#: Template/Services/edit.ctp:26
+msgid "Ip4publique"
+msgstr "Adresse IPv4 publique"
+
+#: Template/Services/index.ctp:15
+msgid "Services"
+msgstr "Services"
+
+#: Template/Services/view.ctp:38
+msgid "Prix Ht"
+msgstr "Prix H.T."
+
+#: Template/Services/view.ctp:42
+msgid "Lat"
+msgstr "Latitude"
+
+#: Template/Services/view.ctp:46
+msgid "Lng"
+msgstr "Longitude"
+
+#: Template/Villes/add.ctp:18
+msgid "Add Ville"
+msgstr "Ajouter une ville"
+
+#: Template/Villes/edit.ctp:18
+#: Template/Villes/view.ctp:4
+msgid "Edit Ville"
+msgstr "Modifier la ville"
+
+#: Template/Villes/view.ctp:16
+msgid "Cp"
+msgstr "CP"
+
+#: Template/Villes/view.ctp:20
+msgid "Tel Contact"
+msgstr "Tél. contact"
+
+#: Template/Villes/view.ctp:25
+msgid "Related Relais"
+msgstr "Relais associés"
+
+#: Template/Villes/view.ctp:31
+msgid "Secteur Id"
+msgstr "Identifiant secteur"
+
+#: Template/Villes/view.ctp:32
+msgid "Ville Id"
+msgstr "Identifiant ville"
+
+#: Template/Villes/view.ctp:55
+msgid "Related Adherent Roles"
+msgstr "Rôles associés"
+
+#: Template/Villes/view.ctp:60
+msgid "Adherent role"
+msgstr "Rôle"
+
+#: Template/Villes/view.ctp:76
+msgid "Related Attente Connexions"
+msgstr "Adhérents en attente de connexion associés"
+
+#: Template/Error/error400.ctp:33
+#: Template/Error/error500.ctp:35
+msgid "Error"
+msgstr "Erreur"
+
+#: Template/Error/error400.ctp:35
+msgid "The requested address %s was not found on this server."
+msgstr "L'URL %s est introuvable sur ce serveur."
+
+#: Template/Error/error500.ctp:33
+msgid "An Internal Error Has Occurred"
+msgstr "Une erreur interne s'est produite"
+
+#: Controller/Component/AuthComponent.php:454
+msgid "You are not authorized to access that location."
+msgstr "Vous n'êtes pas autorisé à accéder à cette adresse."
+
+#: Controller/Component/CsrfComponent.php:155
+msgid "Missing CSRF token cookie"
+msgstr "Cookie CSRF manquant"
+
+#: Controller/Component/CsrfComponent.php:159
+msgid "CSRF token mismatch."
+msgstr "Problème token CSRF"
+
+#: Error/ExceptionRenderer.php:249
+msgid "Not Found"
+msgstr "Non trouvé"
+
+#: Error/ExceptionRenderer.php:251
+msgid "An Internal Error Has Occurred."
+msgstr "Une erreur interne s'est produite."
+
+#: I18n/Number.php:89
+msgid "{0,number,#,###.##} KB"
+msgstr "{0,number,#,###.##} kio"
+
+#: I18n/Number.php:91
+msgid "{0,number,#,###.##} MB"
+msgstr "{0,number,#,###.##} Mio"
+
+#: I18n/Number.php:93
+msgid "{0,number,#,###.##} GB"
+msgstr "{0,number,#,###.##} Gio"
+
+#: I18n/Number.php:95
+msgid "{0,number,#,###.##} TB"
+msgstr "{0,number,#,###.##} Tio"
+
+#: I18n/Number.php:87
+msgid "{0,number,integer} Byte"
+msgid_plural "{0,number,integer} Bytes"
+msgstr[0] "{0,number,integer} octet"
+msgstr[1] "{0,number,integer} octets"
+
+#: I18n/Time.php:271
+msgid "%s ago"
+msgstr "il y a %s"
+
+#: I18n/Time.php:272
+msgid "on %s"
+msgstr "à %s"
+
+#: I18n/Time.php:312
+msgid "just now"
+msgstr "maintenant"
+
+#: I18n/Time.php:428
+msgid "about a second ago"
+msgstr "il y a environ une seconde"
+
+#: I18n/Time.php:429
+msgid "about a minute ago"
+msgstr "il y a environ une minute"
+
+#: I18n/Time.php:430
+msgid "about an hour ago"
+msgstr "il y a environ une heure"
+
+#: I18n/Time.php:431
+msgid "about a day ago"
+msgstr "il y a environ un jour"
+
+#: I18n/Time.php:432
+msgid "about a week ago"
+msgstr "il y a environ une semaine"
+
+#: I18n/Time.php:433
+msgid "about a year ago"
+msgstr "il y a environ un an"
+
+#: I18n/Time.php:442
+msgid "in about a second"
+msgstr "dans une seconde"
+
+#: I18n/Time.php:443
+msgid "in about a minute"
+msgstr "dans une minute"
+
+#: I18n/Time.php:444
+msgid "in about an hour"
+msgstr "dans une heure"
+
+#: I18n/Time.php:445
+msgid "in about a day"
+msgstr "dans un jour"
+
+#: I18n/Time.php:446
+msgid "in about a week"
+msgstr "dans une semaine"
+
+#: I18n/Time.php:447
+msgid "in about a year"
+msgstr "dans un an"
+
+#: I18n/Time.php:401
+msgid "{0} year"
+msgid_plural "{0} years"
+msgstr[0] "{0} an"
+msgstr[1] "{0} ans"
+
+#: I18n/Time.php:404
+msgid "{0} month"
+msgid_plural "{0} months"
+msgstr[0] "{0} mois"
+msgstr[1] "{0} mois"
+
+#: I18n/Time.php:407
+msgid "{0} week"
+msgid_plural "{0} weeks"
+msgstr[0] "{0} semaine"
+msgstr[1] "{0} semaines"
+
+#: I18n/Time.php:410
+msgid "{0} day"
+msgid_plural "{0} days"
+msgstr[0] "{0} jour"
+msgstr[1] "{0} jours"
+
+#: I18n/Time.php:413
+msgid "{0} hour"
+msgid_plural "{0} hours"
+msgstr[0] "{0} heure"
+msgstr[1] "{0} heures"
+
+#: I18n/Time.php:416
+msgid "{0} minute"
+msgid_plural "{0} minutes"
+msgstr[0] "{0} minute"
+msgstr[1] "{0} minutes"
+
+#: I18n/Time.php:419
+msgid "{0} second"
+msgid_plural "{0} seconds"
+msgstr[0] "{0} seconde"
+msgstr[1] "{0} secondes"
+
+#: Network/Response.php:1438
+msgid "The requested file was not found"
+msgstr "Le fichier demandé est introuvable"
+
+#: ORM/RulesChecker.php:49
+msgid "This value is already in use"
+msgstr "Cette valeur est déjà utilisée"
+
+#: ORM/RulesChecker.php:83
+msgid "This value does not exist"
+msgstr "Cette valeur n'existe pas"
+
+#: Utility/Text.php:724
+msgid "and"
+msgstr "et"
+
+#: Validation/Validator.php:102
+msgid "This field is required"
+msgstr "Ce champ est obligatoire"
+
+#: Validation/Validator.php:103
+msgid "This field cannot be left empty"
+msgstr "Ce champ ne peut être vide"
+
+#: Validation/Validator.php:663
+msgid "The provided value is invalid"
+msgstr "La valeur saisie est invalide"
+
+#: View/Helper/FormHelper.php:924
+msgid "New %s"
+msgstr "Nouveau %s"
+
+#: View/Helper/FormHelper.php:927
+msgid "Edit %s"
+msgstr "Modifier %s"
+
+#: View/Helper/HtmlHelper.php:770
+msgid "Home"
+msgstr "Accueil"
+
+#: View/Widget/DateTimeWidget.php:530
+msgid "January"
+msgstr "janvier"
+
+#: View/Widget/DateTimeWidget.php:531
+msgid "February"
+msgstr "février"
+
+#: View/Widget/DateTimeWidget.php:532
+msgid "March"
+msgstr "mars"
+
+#: View/Widget/DateTimeWidget.php:533
+msgid "April"
+msgstr "avril"
+
+#: View/Widget/DateTimeWidget.php:534
+msgid "May"
+msgstr "mai"
+
+#: View/Widget/DateTimeWidget.php:535
+msgid "June"
+msgstr "juin"
+
+#: View/Widget/DateTimeWidget.php:536
+msgid "July"
+msgstr "juillet"
+
+#: View/Widget/DateTimeWidget.php:537
+msgid "August"
+msgstr "août"
+
+#: View/Widget/DateTimeWidget.php:538
+msgid "September"
+msgstr "septembre"
+
+#: View/Widget/DateTimeWidget.php:539
+msgid "October"
+msgstr "octobre"
+
+#: View/Widget/DateTimeWidget.php:540
+msgid "November"
+msgstr "novembre"
+
+#: View/Widget/DateTimeWidget.php:541
+msgid "December"
+msgstr "décembre"
+
diff --git a/generator/after-bake/src/Template/AdherentRoles/add.ctp b/generator/after-bake/src/Template/AdherentRoles/add.ctp
new file mode 100644
index 0000000..75d9401
--- /dev/null
+++ b/generator/after-bake/src/Template/AdherentRoles/add.ctp
@@ -0,0 +1,46 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Adherent Roles'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Adherent Role Types'), ['controller' => 'AdherentRoleTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Adherent Role Type'), ['controller' => 'AdherentRoleTypes', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="adherentRoles form large-10 medium-9 columns content">
+ <?= $this->Form->create($adherentRole) ?>
+ <fieldset>
+ <legend><?= __('Add Adherent Role') ?></legend>
+ <?php
+ echo $this->Form->input('adherent_id', ['options' => $adherents, 'default' => $defaultAdherent]);
+ echo $this->Form->input('adherent_role_type_id', ['options' => $adherentRoleTypes, 'default' => 7]);
+ echo $this->Form->input('ville_id', ['options' => $villes, 'empty' => true]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
diff --git a/generator/after-bake/src/Template/AdherentRoles/index.ctp b/generator/after-bake/src/Template/AdherentRoles/index.ctp
new file mode 100644
index 0000000..4ce3305
--- /dev/null
+++ b/generator/after-bake/src/Template/AdherentRoles/index.ctp
@@ -0,0 +1,66 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Adherent Role'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Adherent Role Types'), ['controller' => 'AdherentRoleTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Adherent Role Type'), ['controller' => 'AdherentRoleTypes', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="adherentRoles index large-10 medium-9 columns content">
+ <h3><?= __('Adherent Roles') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('adherent_id') ?></th>
+ <th><?= $this->Paginator->sort('adherent_role_type_id') ?></th>
+ <th><?= $this->Paginator->sort('ville_id') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($adherentRoles as $adherentRole): ?>
+ <tr>
+ <td><?= $adherentRole->has('adherent') ? $this->Html->link($adherentRole->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $adherentRole->adherent->id]) : '' ?></td>
+ <td><?= $adherentRole->has('adherent_role_type') ? $this->Html->link($adherentRole->adherent_role_type->title, ['controller' => 'AdherentRoleTypes', 'action' => 'view', $adherentRole->adherent_role_type->id]) : '' ?></td>
+ <td><?= $adherentRole->has('ville') ? $this->Html->link($adherentRole->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherentRole->ville->id]) : '' ?></td>
+ <td class="actions">
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $adherentRole->id], ['confirm' => __('Are you sure you want to delete # {0}?', $adherentRole->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ </div>
+
+</div>
diff --git a/generator/after-bake/src/Template/Adherents/edit.ctp b/generator/after-bake/src/Template/Adherents/edit.ctp
new file mode 100644
index 0000000..388484c
--- /dev/null
+++ b/generator/after-bake/src/Template/Adherents/edit.ctp
@@ -0,0 +1,106 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Adherents'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="adherents form large-10 medium-9 columns content">
+ <?= $this->Form->create($adherent) ?>
+ <fieldset>
+ <legend><?= __('Edit Adherent') ?></legend>
+ <div class="columns medium-12 large-6">
+ <?= $this->Form->input('adherent_statut_id', ['options' => $adherentStatuts]); ?>
+ </div>
+ <div class="columns medium-12 large-6">
+ <?= $this->Form->input('num_adt_ttn'); ?>
+ </div>
+ <div class="clearfix"></div>
+ <div class="columns medium-12 large-6">
+ <?php
+ echo $this->Form->input('adherent_type_id', ['options' => $adherentTypes]);
+ echo $this->Form->input('civilite_id', ['options' => $civilites]);
+ echo $this->Form->input('nom');
+ echo $this->Form->input('prenom');
+ echo $this->Form->input('raison');
+ echo $this->Form->input('tel_fixe1');
+ echo $this->Form->input('tel_mobile1');
+ ?>
+ </div>
+ <div class="columns medium-12 large-6">
+ <?php
+ echo $this->Form->input('adresse1');
+ echo $this->Form->input('adresse2');
+ echo $this->Form->input('ville_id', ['options' => $villes]);
+ echo $this->Form->input('mail1');
+ echo $this->Form->input('mail2');
+ echo $this->Form->input('tel_fixe2');
+ echo $this->Form->input('tel_mobile2');
+ ?>
+ </div>
+ <div class="clearfix"></div>
+ <div class="columns medium-12 large-6">
+ <?php
+ echo $this->Form->input('proprio');
+ echo $this->Form->input('nom2');
+ echo $this->Form->input('prenom2');
+ ?>
+ </div>
+ <div class="columns medium-12 large-6">
+ <?= $this->Form->input('notes', ['rows' => 7]); ?>
+ </div>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+ <div class="related">
+ <h4><?= __('Related Services') ?></h4>
+ <?php if (!empty($adherent->services)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Id') ?></th>
+ <th><?= __('Service Type') ?></th>
+ <th><?= __('Relais') ?></th>
+ <th><?= __('Service Statut') ?></th>
+ <th><?= __('Ippublique') ?></th>
+ <th><?= __('Date Debut') ?></th>
+ <th><?= __('Date Fin') ?></th>
+ </tr>
+ <?php foreach ($adherent->services as $services): ?>
+ <tr>
+ <td><?= h($services->title) ?></td>
+ <td><?= h($services->service_type->title) ?></td>
+ <td><?= $services->has('relais')?h($services->relais->title):'' ?></td>
+ <td><?= h($services->service_statut->title) ?></td>
+ <td><?= h($services->ippublique_id) ?></td>
+ <td><?= h($services->date_debut) ?></td>
+ <td><?= h($services->date_fin) ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
diff --git a/generator/after-bake/src/Template/Adherents/index.ctp b/generator/after-bake/src/Template/Adherents/index.ctp
new file mode 100644
index 0000000..3a5fbaf
--- /dev/null
+++ b/generator/after-bake/src/Template/Adherents/index.ctp
@@ -0,0 +1,102 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Adherent'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?></li>
+ <li><?= $this->Form->postLink(__('Apply routing'),
+ 'https://priv.chd.sx/api/gen_conf.php',
+ ['confirm' => __('Are you sure you want to globally apply routing?')]
+ ) ?>
+ <li>
+ </ul>
+</nav>
+<div class="adherents index large-10 medium-9 columns content">
+ <!-- TODO : quick'n' dirty, à reprendre -->
+ <div style="float:right">
+ <h5>Progression&nbsp;: <?= $score ?> %</h5>
+ </div>
+ <h3><?= __('Adherents') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <?= $this->Form->create(null) . "\n" ?>
+ <thead>
+ <tr class="filter">
+ <th colspan="5">
+ <?= $this->Form->input('q', [
+ 'placeholder' => __('Rechercher...'),
+ 'empty' => __('Rechercher...')
+ ]) ?>
+ </th>
+ <th colspan="2">
+ <?= $this->Form->input('ville_id', [
+ 'placeholder' => __('Villes'),
+ 'empty' => __('Villes')
+ ]) ?>
+ </th>
+ <th class="actions">
+ <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?>
+ <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?>
+ </th>
+ </tr>
+ <tr>
+ <th><?= $this->Paginator->sort('nom') ?></th>
+ <th><?= $this->Paginator->sort('prenom') ?></th>
+ <th><?= $this->Paginator->sort('raison') ?></th>
+ <th><?= $this->Paginator->sort('tel_mobile1') ?></th>
+ <th><?= $this->Paginator->sort('adherent_type_id') ?></th>
+ <th><?= $this->Paginator->sort('ville_id') ?></th>
+ <th><?= $this->Paginator->sort('adherent_statut_id') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <?= $this->Form->end() . "\n" ?>
+ <tbody>
+ <?php foreach ($adherents as $adherent): ?>
+ <tr>
+ <td><?= h($adherent->nom) ?></td>
+ <td><?= h($adherent->prenom) ?></td>
+ <td><?= h($adherent->raison) ?></td>
+ <td><?= h($adherent->tel_mobile1) ?></td>
+ <td><?= $adherent->has('adherent_type') ? h($adherent->adherent_type->title) : '' ?></td>
+ <td><?= $adherent->has('ville') ? $this->Html->link($adherent->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherent->ville->id]) : '' ?></td>
+ <td><?= $adherent->has('adherent_statut') ? h($adherent->adherent_statut->title) : '' ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $adherent->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $adherent->id]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ </div>
+
+</div>
diff --git a/generator/after-bake/src/Template/Adherents/view.ctp b/generator/after-bake/src/Template/Adherents/view.ctp
new file mode 100644
index 0000000..74b6326
--- /dev/null
+++ b/generator/after-bake/src/Template/Adherents/view.ctp
@@ -0,0 +1,235 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Adherent'), ['action' => 'edit', $adherent->id]) ?> </li>
+ <li><?= $this->Html->link(__('List Adherents'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New AdherentRole'), ['controller' => 'AdherentRoles', 'action' => 'add', 'a' => $adherent->id]) ?> </li>
+ <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add', 'a' => $adherent->id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Apply routing'),
+ 'https://priv.chd.sx/api/gen_conf.php',
+ ['confirm' => __('Are you sure you want to globally apply routing?')]
+ ) ?>
+ <li>
+ </ul>
+</nav>
+<div class="adherents view large-10 medium-9 columns content">
+ <h3><?= h($adherent->title) ?></h3>
+ <table class="vertical-table columns medium-12 large-6">
+ <tr>
+ <th><?= __('Adherent Statut') ?></th>
+ <td><?= $adherent->adherent_statut->title ?></td>
+ </tr>
+ </table>
+ <table class="vertical-table columns medium-12 large-6">
+ <tr>
+ <th><?= __('Num Adt Ttn') ?></th>
+ <td><?= h($adherent->num_adt_ttn) ?></td>
+ </tr>
+ </table>
+ <div style="clear: both"></div>
+ <table class="vertical-table columns medium-12 large-6">
+ <tr>
+ <th><?= __('Adherent Type') ?></th>
+ <td><?= $adherent->adherent_type->title ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Civilite') ?></th>
+ <td><?= $adherent->civilite->title ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Nom') ?></th>
+ <td><?= h($adherent->nom) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Prenom') ?></th>
+ <td><?= h($adherent->prenom) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Raison') ?></th>
+ <td><?= h($adherent->raison) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Tel Fixe1') ?></th>
+ <td><?= h($adherent->tel_fixe1) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Tel Mobile1') ?></th>
+ <td><?= h($adherent->tel_mobile1) ?></td>
+ </tr>
+ </table>
+ <table class="vertical-table columns medium-12 large-6">
+ <tr>
+ <th><?= __('Adresse1') ?></th>
+ <td><?= h($adherent->adresse1) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Adresse2') ?></th>
+ <td><?= h($adherent->adresse2) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Ville') ?></th>
+ <td><?= $adherent->has('ville') ? $this->Html->link($adherent->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherent->ville->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Mail1') ?></th>
+ <td><?= h($adherent->mail1) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Mail2') ?></th>
+ <td><?= h($adherent->mail2) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Tel Fixe2') ?></th>
+ <td><?= h($adherent->tel_fixe2) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Tel Mobile2') ?></th>
+ <td><?= h($adherent->tel_mobile2) ?></td>
+ </tr>
+ </table>
+ <div style="clear: both"></div>
+ <table class="vertical-table columns medium-12 large-6">
+ <tr>
+ <th><?= __('Proprio') ?></th>
+ <td><?= h($adherent->proprio) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Nom2') ?></th>
+ <td><?= h($adherent->nom2) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Prenom2') ?></th>
+ <td><?= h($adherent->prenom2) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($adherent->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($adherent->modified) ?></td>
+ </tr>
+ </table>
+ <?php if (!empty($adherent->adherent_roles)): ?>
+ <table class="vertical-table columns medium-12 large-6">
+ <?php foreach ($adherent->adherent_roles as $k => $adherentRole): ?>
+ <tr>
+ <th><?= __('Role {0}', $k+1) ?></th>
+ <td><?= h($adherentRole->adherent_role_type->title) ?>
+ <?= $adherentRole->has('ville') ? h($adherentRole->ville->title) : '' ?>
+ <?= $this->Form->postLink(__('Delete'), ['controller' => 'AdherentRoles', 'action' => 'delete', $adherentRole->id], ['confirm' => __('Are you sure you want to delete # {0}?', $adherentRole->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ <div style="clear: both"></div>
+ <div class="row">
+ <h4><?= __('Notes') ?></h4>
+ <?= $this->Text->autoParagraph(h($adherent->notes)); ?>
+ </div>
+ <div class="related">
+ <h4><?= __('Related Services') ?></h4>
+ <?php if (!empty($adherent->services)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Id') ?></th>
+ <th><?= __('Service Type') ?></th>
+ <th><?= __('Service Statut') ?></th>
+ <th><?= __('Ippublique') ?></th>
+ <th><?= __('Date Debut') ?></th>
+ <th><?= __('Date Fin') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($adherent->services as $services): ?>
+ <tr>
+ <td><?= h($services->title) ?></td>
+ <td><?= h($services->service_type->title) ?></td>
+ <td><?= h($services->service_statut->title) ?></td>
+ <td><?= h($services->ippublique_id) ?></td>
+ <td><?= h($services->date_debut) ?></td>
+ <td><?= h($services->date_fin) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['controller' => 'Services', 'action' => 'view', $services->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Services', 'action' => 'edit', $services->id]) ?>
+ <?php
+ if ( $services->service_type_id === 1 /* Adhésion */ ) {
+ switch ($services->service_statut_id) {
+ case 4: /* Actif CHD */
+ echo $this->Form->postLink(
+ __('Terminate'), ['controller' => 'Services', 'action' => 'terminate', $services->id],
+ ['confirm' => __('Are you sure you want to terminate # {0}?', $services->id)]
+ ) . "\n";
+ break;
+ case 6: /* Résilié */
+ break;
+ }
+ } else /* Internet ... */ {
+ switch ($services->service_statut_id) {
+ case 1: /* Prévu */
+ echo $this->Form->postLink(
+ __('Activate'), ['controller' => 'Services', 'action' => 'activate', $services->id],
+ ['confirm' => __('Are you sure you want to activate # {0}?', $services->id)]
+ ) . "\n";
+ break;
+ case 2: /* Actif TTN */
+ echo $this->Form->postLink(
+ __('Migrate'), ['controller' => 'Services', 'action' => 'migrate', $services->id],
+ ['confirm' => __('Are you sure you want to migrate # {0}?', $services->id)]
+ ) . "\n";
+ break;
+ case 3: /* Migré */
+ break;
+ case 4: /* Actif CHD */
+ echo $this->Form->postLink(
+ __('Suspend'), ['controller' => 'Services', 'action' => 'suspend', $services->id],
+ ['confirm' => __('Are you sure you want to suspend # {0}?', $services->id)]
+ ) . "\n";
+ echo $this->Form->postLink(
+ __('Terminate'), ['controller' => 'Services', 'action' => 'terminate', $services->id],
+ ['confirm' => __('Are you sure you want to terminate # {0}?', $services->id)]
+ ) . "\n";
+ break;
+ case 5: /* Suspendu */
+ echo $this->Form->postLink(
+ __('Unsuspend'), ['controller' => 'Services', 'action' => 'unsuspend', $services->id],
+ ['confirm' => __('Are you sure you want to suspend # {0}?', $services->id)]
+ ) . "\n";
+ echo $this->Form->postLink(
+ __('Terminate'), ['controller' => 'Services', 'action' => 'terminate', $services->id],
+ ['confirm' => __('Are you sure you want to terminate # {0}?', $services->id)]
+ ) . "\n";
+ break;
+ case 6: /* Résilié */
+ break;
+ }
+ }
+ ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
diff --git a/generator/after-bake/src/Template/Equipements/index.ctp b/generator/after-bake/src/Template/Equipements/index.ctp
new file mode 100644
index 0000000..75d7919
--- /dev/null
+++ b/generator/after-bake/src/Template/Equipements/index.ctp
@@ -0,0 +1,102 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Equipement'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Ipmgmt'), ['controller' => 'Ipmgmt', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Equipement Modeles'), ['controller' => 'EquipementModeles', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Equipement Modele'), ['controller' => 'EquipementModeles', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="equipements index large-10 medium-9 columns content">
+ <h3><?= __('Equipements') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <?= $this->Form->create(null) . "\n" ?>
+ <thead>
+ <tr class="filter">
+ <th colspan="3">
+ <?= $this->Form->input('q', [
+ 'placeholder' => __('Adresse MAC...'),
+ 'empty' => __('Adresse MAC...')
+ ]) ?>
+ </th>
+ <th colspan="2">
+ <?= $this->Form->input('equipement_modele_id', [
+ 'placeholder' => __('Equipement Modeles'),
+ 'empty' => __('Equipement Modeles')
+ ]) ?>
+ </th>
+ <th colspan="2">
+ <?= $this->Form->input('relais_id', [
+ 'placeholder' => __('Relais'),
+ 'empty' => __('Relais')
+ ]) ?>
+ </th>
+ <th class="actions">
+ <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?>
+ <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?>
+ </th>
+ </tr>
+ <tr>
+ <th><?= $this->Paginator->sort('mac') ?></th>
+ <th><?= $this->Paginator->sort('ipmgmt_id') ?></th>
+ <th><?= $this->Paginator->sort('equipement_mode_id') ?></th>
+ <th><?= $this->Paginator->sort('equipement_modele_id') ?></th>
+ <th><?= $this->Paginator->sort('service_id') ?></th>
+ <th><?= $this->Paginator->sort('relais_id') ?></th>
+ <th><?= $this->Paginator->sort('uplink_id') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <?= $this->Form->end() . "\n" ?>
+ <tbody>
+ <?php foreach ($equipements as $equipement): ?>
+ <tr>
+ <td><?= h($equipement->mac) ?></td>
+ <td><?= $equipement->has('ipmgmt') ? $this->Html->link($equipement->ipmgmt->title, ['controller' => 'Ipmgmt', 'action' => 'view', $equipement->ipmgmt->id]) : '' ?></td>
+ <td><?= h($equipement->equipement_mode_id) ?></td>
+ <td><?= $equipement->has('equipement_modele') ? $this->Html->link($equipement->equipement_modele->title, ['controller' => 'EquipementModeles', 'action' => 'view', $equipement->equipement_modele->id]) : '' ?></td>
+ <td><?= $equipement->has('service') ? $this->Html->link($equipement->service->title, ['controller' => 'Services', 'action' => 'view', $equipement->service->id]) : '' ?></td>
+ <td><?= $equipement->has('relais') ? $this->Html->link($equipement->relais->title, ['controller' => 'Relais', 'action' => 'view', $equipement->relais->id]) : '' ?></td>
+ <td><?= $equipement->has('uplink_id') ? $this->Html->link($equipement->uplink_id, ['controller' => 'Equipements', 'action' => 'view', $equipement->uplink_id]) : '' ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $equipement->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $equipement->id]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ </div>
+
+</div>
diff --git a/generator/after-bake/src/Template/Equipements/view.ctp b/generator/after-bake/src/Template/Equipements/view.ctp
new file mode 100644
index 0000000..5f22722
--- /dev/null
+++ b/generator/after-bake/src/Template/Equipements/view.ctp
@@ -0,0 +1,90 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Equipement'), ['action' => 'edit', $equipement->id]) ?> </li>
+ <li><?= $this->Html->link(__('List Equipements'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Equipement'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Ipmgmt'), ['controller' => 'Ipmgmt', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Ipmgmt'), ['controller' => 'Ipmgmt', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Equipement Modeles'), ['controller' => 'EquipementModeles', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Equipement Modele'), ['controller' => 'EquipementModeles', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Equipement Modes'), ['controller' => 'EquipementModes', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Equipement Mode'), ['controller' => 'EquipementModes', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="equipements view large-10 medium-9 columns content">
+ <h3><?= h($equipement->id) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Mac') ?></th>
+ <td><?= h($equipement->mac) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Ipmgmt') ?></th>
+ <td><?= $equipement->has('ipmgmt') ? $this->Html->link($equipement->ipmgmt->title, ['controller' => 'Ipmgmt', 'action' => 'view', $equipement->ipmgmt->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Equipement Modele') ?></th>
+ <td><?= $equipement->has('equipement_modele') ? $this->Html->link($equipement->equipement_modele->title, ['controller' => 'EquipementModeles', 'action' => 'view', $equipement->equipement_modele->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Relais') ?></th>
+ <td><?= $equipement->has('relais') ? $this->Html->link($equipement->relais->title, ['controller' => 'Relais', 'action' => 'view', $equipement->relais->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Service') ?></th>
+ <td><?= $equipement->has('service') ? $this->Html->link($equipement->service->title, ['controller' => 'Services', 'action' => 'view', $equipement->service->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Uplink') ?></th>
+ <td><?= $equipement->has('uplink_id') ? $this->Html->link($equipement->uplink_id, ['controller' => 'Equipements', 'action' => 'view', $equipement->uplink_id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Equipement Mode') ?></th>
+ <td><?= $equipement->has('equipement_mode') ? $this->Html->link($equipement->equipement_mode->id, ['controller' => 'EquipementModes', 'action' => 'view', $equipement->equipement_mode->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Description') ?></th>
+ <td><?= h($equipement->description) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Date Achat') ?></th>
+ <td><?= h($equipement->date_achat) ?></tr>
+ </tr>
+ <tr>
+ <th><?= __('Date Hs') ?></th>
+ <td><?= h($equipement->date_hs) ?></tr>
+ </tr>
+ </table>
+ <div class="row">
+ <h4><?= __('Notes') ?></h4>
+ <?= $this->Text->autoParagraph(h($equipement->notes)); ?>
+ </div>
+</div>
diff --git a/generator/after-bake/src/Template/Ipmgmt/view.ctp b/generator/after-bake/src/Template/Ipmgmt/view.ctp
new file mode 100644
index 0000000..d2d27d4
--- /dev/null
+++ b/generator/after-bake/src/Template/Ipmgmt/view.ctp
@@ -0,0 +1,80 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Ipmgmt'), ['action' => 'edit', $ipmgmt->id]) ?> </li>
+ <li><?= $this->Html->link(__('List Ipmgmt'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Ipmgmt'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="ipmgmt view large-10 medium-9 columns content">
+ <h3><?= h($ipmgmt->title) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Ip4') ?></th>
+ <td><?= h($ipmgmt->ip4) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Ip6') ?></th>
+ <td><?= h($ipmgmt->ip6) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($ipmgmt->id) ?></td>
+ </tr>
+ </table>
+ <div class="related">
+ <h4><?= __('Related Equipements') ?></h4>
+ <?php if (!empty($ipmgmt->equipements)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Mac') ?></th>
+ <th><?= __('Equipement Modele') ?></th>
+ <th><?= __('Equipement Mode') ?></th>
+ <th><?= __('Description') ?></th>
+ <th><?= __('Date Hs') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+<!-- FIXME : ne pas prendre toutes les colonnes, rendre configurable ou faire un include d'un autre fichier Template -->
+ <?php foreach ($ipmgmt->equipements as $equipements): ?>
+ <tr>
+ <td><?= h($equipements->mac) ?></td>
+ <td><?= h($equipements->equipement_modele->title) ?></td>
+ <td><?= h($equipements->equipement_mode_id) ?></td>
+ <td><?= h($equipements->description) ?></td>
+ <td><?= h($equipements->date_hs) ?></td>
+ <td class="actions">
+<!-- FIXME : ces liens devraient être conditionnels -->
+ <?= $this->Html->link(__('View'), ['controller' => 'Equipements', 'action' => 'view', $equipements->id]) ?>
+
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Equipements', 'action' => 'edit', $equipements->id]) ?>
+
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
diff --git a/generator/after-bake/src/Template/Ippubliques/index.ctp b/generator/after-bake/src/Template/Ippubliques/index.ctp
new file mode 100644
index 0000000..72f9c25
--- /dev/null
+++ b/generator/after-bake/src/Template/Ippubliques/index.ctp
@@ -0,0 +1,84 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Ippublique'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="ippubliques index large-10 medium-9 columns content">
+ <h3><?= __('Ippubliques') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <?= $this->Form->create(null) . "\n" ?>
+ <thead>
+ <tr class="filter">
+ <th colspan="2">
+ <?= $this->Form->input('q', [
+ 'placeholder' => __('Rechercher...'),
+ 'empty' => __('Rechercher...')
+ ]) ?>
+ </th>
+ <th colspan="2">
+ <?= $this->Form->input('secteur_id', [
+ 'placeholder' => __('Secteurs'),
+ 'empty' => __('Secteurs')
+ ]) ?>
+ </th>
+ <th class="actions">
+ <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?>
+ <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?>
+ </th>
+ </tr>
+ <tr>
+ <th><?= $this->Paginator->sort('ip4') ?></th>
+ <th><?= $this->Paginator->sort('ip6') ?></th>
+ <th><?= $this->Paginator->sort('secteur_id') ?></th>
+ <th><?= __('Utilisee') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <?= $this->Form->end() . "\n" ?>
+ <tbody>
+ <?php foreach ($ippubliques as $ippublique): ?>
+ <tr>
+ <td><?= h($ippublique->ip4) ?></td>
+ <td><?= h($ippublique->ip6) ?></td>
+ <td><?= $ippublique->has('secteur') ? h($ippublique->secteur->title) : '' ?></td>
+ <td><?= count($ippublique->services) ? __('oui'): __('non') ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $ippublique->ip4]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ </div>
+
+</div>
diff --git a/generator/after-bake/src/Template/Ippubliques/view.ctp b/generator/after-bake/src/Template/Ippubliques/view.ctp
new file mode 100644
index 0000000..3082b9e
--- /dev/null
+++ b/generator/after-bake/src/Template/Ippubliques/view.ctp
@@ -0,0 +1,79 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Ippubliques'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="ippubliques view large-10 medium-9 columns content">
+ <h3><?= h($ippublique->ip4) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Ip4') ?></th>
+ <td><?= h($ippublique->ip4) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Ip6') ?></th>
+ <td><?= h($ippublique->ip6) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Secteur') ?></th>
+ <td><?= $ippublique->secteur->title ?></td>
+ </tr>
+ </table>
+ <div class="related">
+ <h4><?= __('Related Services') ?></h4>
+ <?php if (!empty($ippublique->services)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Service Id') ?></th>
+ <th><?= __('Adherent') ?></th>
+ <th><?= __('Service Type') ?></th>
+ <th><?= __('Service Statut Id') ?></th>
+ <th><?= __('Date Debut') ?></th>
+ <th><?= __('Date Fin') ?></th>
+ <th><?= __('Description') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+<!-- FIXME : ne pas prendre toutes les colonnes, rendre configurable ou faire un include d'un autre fichier Template -->
+ <?php foreach ($ippublique->services as $services): ?>
+ <tr>
+ <td><?= h($services->title) ?></td>
+ <td><?= h($services->adherent->title) ?></td>
+ <td><?= h($services->service_type->title) ?></td>
+ <td><?= h($services->service_statut->title) ?></td>
+ <td><?= h($services->date_debut) ?></td>
+ <td><?= h($services->date_fin) ?></td>
+ <td><?= h($services->description) ?></td>
+ <td class="actions">
+<!-- FIXME : ces liens devraient être conditionnels -->
+ <?= $this->Html->link(__('View'), ['controller' => 'Services', 'action' => 'view', $services->id]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
diff --git a/generator/after-bake/src/Template/Layout/default.ctp b/generator/after-bake/src/Template/Layout/default.ctp
new file mode 100644
index 0000000..bcc5f05
--- /dev/null
+++ b/generator/after-bake/src/Template/Layout/default.ctp
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.10.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+
+$cakeDescription = 'CHD Gestion';
+?>
+<!DOCTYPE html>
+<html>
+<head>
+ <?= $this->Html->charset() ?>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>
+ <?= $cakeDescription ?>:
+ <?= $this->fetch('title') ?>
+ </title>
+ <?= $this->Html->meta('icon') ?>
+
+ <?= $this->Html->css('base.css') ?>
+ <?= $this->Html->css('cake.css') ?>
+ <?= $this->Html->css('local.css') ?>
+
+ <?= $this->fetch('meta') ?>
+ <?= $this->fetch('css') ?>
+ <?= $this->fetch('script') ?>
+</head>
+<body>
+ <nav class="top-bar expanded" data-topbar role="navigation">
+ <ul class="title-area large-2 medium-3 columns">
+ <li class="name">
+ <h1><a href=""><?= $this->fetch('title') ?></a></h1>
+ </li>
+ </ul>
+ <section class="top-bar-section">
+ <ul class="right">
+ <li><?= $this->Html->link(__('Adherents'),['controller' => 'Adherents', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('Interesses'), ['controller' => 'Interesses', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('Ip'), ['controller' => 'Ippubliques', 'action' => 'index']) ?></li>
+ </ul>
+ </section>
+ </nav>
+ <?= $this->Flash->render() ?>
+ <section class="container clearfix">
+ <?= $this->fetch('content') ?>
+ </section>
+ <footer>
+ </footer>
+</body>
+</html>
diff --git a/generator/after-bake/src/Template/Relais/view.ctp b/generator/after-bake/src/Template/Relais/view.ctp
new file mode 100644
index 0000000..ee6d9af
--- /dev/null
+++ b/generator/after-bake/src/Template/Relais/view.ctp
@@ -0,0 +1,90 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Relais'), ['action' => 'edit', $relais->id]) ?> </li>
+ <li><?= $this->Html->link(__('List Relais'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relais'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="relais view large-10 medium-9 columns content">
+ <h3><?= h($relais->title) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Title') ?></th>
+ <td><?= h($relais->title) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Secteur') ?></th>
+ <td><?= $relais->secteur->title ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Ville') ?></th>
+ <td><?= $relais->has('ville') ? $this->Html->link($relais->ville->title, ['controller' => 'Villes', 'action' => 'view', $relais->ville->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($relais->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Gps Long') ?></th>
+ <td><?= $this->Number->format($relais->gps_long) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Gps Lat') ?></th>
+ <td><?= $this->Number->format($relais->gps_lat) ?></td>
+ </tr>
+ </table>
+ <div class="related">
+ <h4><?= __('Related Equipements') ?></h4>
+ <?php if (!empty($relais->equipements)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Mac') ?></th>
+ <th><?= __('Ipmgmt') ?></th>
+ <th colspan="2"><?= __('Equipement Modele') ?></th>
+ <th><?= __('Equipement Mode Id') ?></th>
+ <th><?= __('Equipement Description') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($relais->equipements as $equipements): ?>
+ <tr>
+ <td><?= h($equipements->mac) ?></td>
+ <td><?= h($equipements->ipmgmt->title) ?></td>
+ <td colspan="2"><?= h($equipements->equipement_modele->title) ?></td>
+ <td><?= h($equipements->equipement_mode_id) ?></td>
+ <td><?= h($equipements->description) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['controller' => 'Equipements', 'action' => 'view', $equipements->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Equipements', 'action' => 'edit', $equipements->id]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
diff --git a/generator/after-bake/src/Template/Services/add.ctp b/generator/after-bake/src/Template/Services/add.ctp
new file mode 100644
index 0000000..141c660
--- /dev/null
+++ b/generator/after-bake/src/Template/Services/add.ctp
@@ -0,0 +1,48 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Services'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="services form large-10 medium-9 columns content">
+ <?= $this->Form->create($service) ?>
+ <fieldset>
+ <legend><?= __('Add Service') ?></legend>
+ <?php
+ echo $this->Form->input('adherent_id', ['options' => $adherents, 'default' => $defaultAdherent]);
+ echo $this->Form->input('service_type_id', ['options' => $serviceTypes, 'default' => $defaultServiceType]);
+ //echo $this->Form->input('service_statut_id', ['options' => $serviceStatuts, 'default' => $defaultServiceStatut]);
+ echo $this->Form->input('description');
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
diff --git a/generator/after-bake/src/Template/Services/edit.ctp b/generator/after-bake/src/Template/Services/edit.ctp
new file mode 100644
index 0000000..1b8f721
--- /dev/null
+++ b/generator/after-bake/src/Template/Services/edit.ctp
@@ -0,0 +1,64 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Services'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="services form large-10 medium-9 columns content">
+ <?= $this->Form->create($service) ?>
+ <fieldset>
+ <legend><?= __('Edit Service') ?></legend>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Adherent') ?></th>
+ <td><?= $service->adherent->title ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Service Type') ?></th>
+ <td><?= $service->service_type->title ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Ip4publique') ?></th>
+ <td><?= $service->ippublique_id ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Date Debut') ?></th>
+ <td><?= h($service->date_debut) ?></tr>
+ </tr>
+ </table>
+ <?php
+ echo $this->Form->input('description');
+ echo $this->Form->input('prix_ht');
+ echo $this->Form->input('lat');
+ echo $this->Form->input('lng');
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
diff --git a/generator/after-bake/src/Template/Services/index.ctp b/generator/after-bake/src/Template/Services/index.ctp
new file mode 100644
index 0000000..5bdffc8
--- /dev/null
+++ b/generator/after-bake/src/Template/Services/index.ctp
@@ -0,0 +1,100 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Service'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="services index large-10 medium-9 columns content">
+ <h3><?= __('Services') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <?= $this->Form->create(null) . "\n" ?>
+ <thead>
+ <tr class="filter">
+ <th colspan="3">
+ <?= $this->Form->input('service_type_id', [
+ 'placeholder' => __('Service Type'),
+ 'empty' => __('Service Type')
+ ]) ?>
+ </th>
+ <th colspan="2">
+ <?= $this->Form->input('service_statut_id', [
+ 'placeholder' => __('Service Statut'),
+ 'empty' => __('Service Statut')
+ ]) ?>
+ </th>
+ <th colspan="2">
+ <?= $this->Form->input('relais_id', [
+ 'placeholder' => __('Relais'),
+ 'empty' => __('Relais')
+ ]) ?>
+ </th>
+ <th class="actions">
+ <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?>
+ <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?>
+ </th>
+ </tr>
+ <tr>
+ <th colspan="2"><?= $this->Paginator->sort('adherent_id') ?></th>
+ <th><?= $this->Paginator->sort('service_type_id') ?></th>
+ <th><?= $this->Paginator->sort('service_statut_id') ?></th>
+ <th><?= $this->Paginator->sort('ippublique_id') ?></th>
+ <th><?= $this->Paginator->sort('relais_id') ?></th>
+ <th><?= $this->Paginator->sort('prix_ht') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <?= $this->Form->end() . "\n" ?>
+ <tbody>
+ <?php foreach ($services as $service): ?>
+ <tr>
+ <td colspan="2"><?= $service->has('adherent') ? $this->Html->link($service->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $service->adherent->id]) : '' ?></td>
+ <td><?= $service->has('service_type') ? h($service->service_type->title) : '' ?></td>
+ <td><?= $service->has('service_statut') ? h($service->service_statut->title) : '' ?></td>
+ <td><?= $service->has('ippublique') ? $this->Html->link($service->ippublique->ip4, ['controller' => 'Ippubliques', 'action' => 'view', $service->ippublique->ip4]) : '' ?></td>
+ <td><?= $service->has('relais') ? $this->Html->link($service->relais->title, ['controller' => 'Relais', 'action' => 'view', $service->relais->id]) : '' ?></td>
+ <td><?= $this->Number->format($service->prix_ht) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $service->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $service->id]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ </div>
+
+</div>
diff --git a/generator/after-bake/src/Template/Services/migrate.ctp b/generator/after-bake/src/Template/Services/migrate.ctp
new file mode 100644
index 0000000..41c3cd4
--- /dev/null
+++ b/generator/after-bake/src/Template/Services/migrate.ctp
@@ -0,0 +1,45 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Service'), ['action' => 'edit', $service->id]) ?> </li>
+ <li><?= $this->Html->link(__('List Services'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Service'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="services view large-10 medium-9 columns content">
+ <h3><?= h($service->title) ?></h3>
+ <pre>
+<?php
+ print_r($service);
+ print_r($service_new);
+?>
+ </pre>
+</div>
diff --git a/generator/after-bake/src/Template/Services/view.ctp b/generator/after-bake/src/Template/Services/view.ctp
new file mode 100644
index 0000000..7ff07d6
--- /dev/null
+++ b/generator/after-bake/src/Template/Services/view.ctp
@@ -0,0 +1,117 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Service'), ['action' => 'edit', $service->id]) ?> </li>
+ <li><?= $this->Html->link(__('List Services'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Service'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="services view large-10 medium-9 columns content">
+ <h3><?= h($service->title) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Adherent') ?></th>
+ <td><?= $service->has('adherent') ? $this->Html->link($service->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $service->adherent->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Service Type') ?></th>
+ <td><?= $service->service_type->title ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Service Statut') ?></th>
+ <td><?= $service->service_statut->title ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Ippublique') ?></th>
+ <td><?= $service->has('ippublique') ? $this->Html->link($service->ippublique->title, ['controller' => 'Ippubliques', 'action' => 'view', $service->ippublique->ip4]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Description') ?></th>
+ <td><?= h($service->description) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Prix Ht') ?></th>
+ <td><?= $this->Number->format($service->prix_ht) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Lat') ?></th>
+ <td><?= $this->Number->format($service->lat) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Lng') ?></th>
+ <td><?= $this->Number->format($service->lng) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Date Debut') ?></th>
+ <td><?= h($service->date_debut) ?></tr>
+ </tr>
+ <tr>
+ <th><?= __('Date Fin') ?></th>
+ <td><?= h($service->date_fin) ?></tr>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($service->created) ?></tr>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($service->modified) ?></tr>
+ </tr>
+ </table>
+ <div class="related">
+ <h4><?= __('Related Equipements') ?></h4>
+ <?php if (!empty($service->equipements)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Mac') ?></th>
+ <th><?= __('Ipmgmt') ?></th>
+ <th><?= __('Equipement Modele') ?></th>
+ <th><?= __('Equipement Mode Id') ?></th>
+ <th><?= __('Description') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+<!-- FIXME : ne pas prendre toutes les colonnes, rendre configurable ou faire un include d'un autre fichier Template -->
+ <?php foreach ($service->equipements as $equipements): ?>
+ <tr>
+ <td><?= h($equipements->mac) ?></td>
+ <td><?= h($equipements->ipmgmt->title) ?></td>
+ <td><?= h($equipements->equipement_modele->title) ?></td>
+ <td><?= h($equipements->equipement_mode_id) ?></td>
+ <td><?= h($equipements->description) ?></td>
+ <td class="actions">
+<!-- FIXME : ces liens devraient être conditionnels -->
+ <?= $this->Html->link(__('View'), ['controller' => 'Equipements', 'action' => 'view', $equipements->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Equipements', 'action' => 'edit', $equipements->id]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
diff --git a/generator/after-bake/src/Template/Villes/view.ctp b/generator/after-bake/src/Template/Villes/view.ctp
new file mode 100644
index 0000000..ce72cc8
--- /dev/null
+++ b/generator/after-bake/src/Template/Villes/view.ctp
@@ -0,0 +1,130 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Ville'), ['action' => 'edit', $ville->id]) ?> </li>
+ <li><?= $this->Html->link(__('List Villes'), ['action' => 'index']) ?> </li>
+ </ul>
+</nav>
+<div class="villes view large-10 medium-9 columns content">
+ <h3><?= h($ville->title) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Title') ?></th>
+ <td><?= h($ville->title) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Cp') ?></th>
+ <td><?= h($ville->cp) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Tel Contact') ?></th>
+ <td><?= h($ville->tel_contact) ?></td>
+ </tr>
+ </table>
+ <div class="related">
+ <h4><?= __('Related Relais') ?></h4>
+ <?php if (!empty($ville->relais)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Id') ?></th>
+ <th><?= __('Title') ?></th>
+ <th><?= __('Secteur Id') ?></th>
+ <th><?= __('Ville Id') ?></th>
+ <th><?= __('Gps Long') ?></th>
+ <th><?= __('Gps Lat') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($ville->relais as $relais): ?>
+ <tr>
+ <td><?= h($relais->id) ?></td>
+ <td><?= h($relais->title) ?></td>
+ <td><?= h($relais->secteur_id) ?></td>
+ <td><?= h($relais->ville_id) ?></td>
+ <td><?= h($relais->gps_long) ?></td>
+ <td><?= h($relais->gps_lat) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['controller' => 'Relais', 'action' => 'view', $relais->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Relais', 'action' => 'edit', $relais->id]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+ <div class="related">
+ <h4><?= __('Related Adherent Roles') ?></h4>
+ <?php if (!empty($ville->adherent_roles)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Adherent') ?></th>
+ <th><?= __('Adherent role') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($ville->adherent_roles as $adherentRole): ?>
+ <tr>
+ <td><?= $adherentRole->has('adherent') ? $this->Html->link($adherentRole->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $adherentRole->adherent->id]) : '' ?></td>
+ <td><?= $adherentRole->has('adherent_role_type') ? $this->Html->link($adherentRole->adherent_role_type->title, ['controller' => 'AdherentRoleTypes', 'action' => 'view', $adherentRole->adherent_role_type->id]) : '' ?></td>
+ <td class="actions">
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $adherentRole->id], ['confirm' => __('Are you sure you want to delete # {0}?', $adherentRole->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+ <div class="related">
+ <h4><?= __('Related Attente Connexions') ?></h4>
+ <?php if (!empty($ville->attente_connexions)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Date Demande') ?></th>
+ <th><?= __('Nom') ?></th>
+ <th><?= __('Prenom') ?></th>
+ <th><?= __('Raison') ?></th>
+ <th><?= __('Telephone') ?></th>
+ <th><?= __('Mail') ?></th>
+ <th><?= __('Adresse1') ?></th>
+ <th><?= __('Notes') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($ville->attente_connexions as $attenteConnexions): ?>
+ <tr>
+ <td><?= h($attenteConnexions->date_demande) ?></td>
+ <td><?= h($attenteConnexions->nom) ?></td>
+ <td><?= h($attenteConnexions->prenom) ?></td>
+ <td><?= h($attenteConnexions->raison) ?></td>
+ <td><?= h($attenteConnexions->telephone) ?></td>
+ <td><?= h($attenteConnexions->mail) ?></td>
+ <td><?= h($attenteConnexions->adresse1) ?></td>
+ <td><?= h($attenteConnexions->notes) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['controller' => 'AttenteConnexions', 'action' => 'view', $attenteConnexions->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['controller' => 'AttenteConnexions', 'action' => 'edit', $attenteConnexions->id]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
diff --git a/generator/before-bake/config/app.php b/generator/before-bake/config/app.php
new file mode 100644
index 0000000..f8d0e1d
--- /dev/null
+++ b/generator/before-bake/config/app.php
@@ -0,0 +1,321 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+return [
+ /**
+ * Debug Level:
+ *
+ * Production Mode:
+ * false: No error messages, errors, or warnings shown.
+ *
+ * Development Mode:
+ * true: Errors and warnings shown.
+ */
+ 'debug' => false,
+
+ /**
+ * Configure basic information about the application.
+ *
+ * - namespace - The namespace to find app classes under.
+ * - encoding - The encoding used for HTML + database connections.
+ * - base - The base directory the app resides in. If false this
+ * will be auto detected.
+ * - dir - Name of app directory.
+ * - webroot - The webroot directory.
+ * - wwwRoot - The file path to webroot.
+ * - baseUrl - To configure CakePHP to *not* use mod_rewrite and to
+ * use CakePHP pretty URLs, remove these .htaccess
+ * files:
+ * /.htaccess
+ * /webroot/.htaccess
+ * And uncomment the baseUrl key below.
+ * - fullBaseUrl - A base URL to use for absolute links.
+ * - imageBaseUrl - Web path to the public images directory under webroot.
+ * - cssBaseUrl - Web path to the public css directory under webroot.
+ * - jsBaseUrl - Web path to the public js directory under webroot.
+ * - paths - Configure paths for non class based resources. Supports the
+ * `plugins`, `templates`, `locales` subkeys, which allow the definition of
+ * paths for plugins, view templates and locale files respectively.
+ */
+ 'App' => [
+ 'namespace' => 'App',
+ 'encoding' => 'UTF-8',
+ 'base' => false,
+ 'dir' => 'src',
+ 'webroot' => 'webroot',
+ 'wwwRoot' => WWW_ROOT,
+ // 'baseUrl' => env('SCRIPT_NAME'),
+ 'fullBaseUrl' => false,
+ 'imageBaseUrl' => 'img/',
+ 'cssBaseUrl' => 'css/',
+ 'jsBaseUrl' => 'js/',
+ 'paths' => [
+ 'plugins' => [ROOT . DS . 'plugins' . DS],
+ 'templates' => [APP . 'Template' . DS],
+ 'locales' => [APP . 'Locale' . DS],
+ ],
+ ],
+
+ /**
+ * Security and encryption configuration
+ *
+ * - salt - A random string used in security hashing methods.
+ * The salt value is also used as the encryption key.
+ * You should treat it as extremely sensitive data.
+ */
+ 'Security' => [
+ 'salt' => 'eb74ed8697b7bc31587f48bec13cdcc0460debf26cec73137e4c6d390a93de4d',
+ ],
+
+ /**
+ * Apply timestamps with the last modified time to static assets (js, css, images).
+ * Will append a querystring parameter containing the time the file was modified.
+ * This is useful for busting browser caches.
+ *
+ * Set to true to apply timestamps when debug is true. Set to 'force' to always
+ * enable timestamping regardless of debug value.
+ */
+ 'Asset' => [
+ // 'timestamp' => true,
+ ],
+
+ /**
+ * Configure the cache adapters.
+ */
+ 'Cache' => [
+ 'default' => [
+ 'className' => 'File',
+ 'path' => CACHE,
+ ],
+
+ /**
+ * Configure the cache used for general framework caching.
+ * Translation cache files are stored with this configuration.
+ */
+ '_cake_core_' => [
+ 'className' => 'File',
+ 'prefix' => 'myapp_cake_core_',
+ 'path' => CACHE . 'persistent/',
+ 'serialize' => true,
+ 'duration' => '+2 minutes',
+ ],
+
+ /**
+ * Configure the cache for model and datasource caches. This cache
+ * configuration is used to store schema descriptions, and table listings
+ * in connections.
+ */
+ '_cake_model_' => [
+ 'className' => 'File',
+ 'prefix' => 'myapp_cake_model_',
+ 'path' => CACHE . 'models/',
+ 'serialize' => true,
+ 'duration' => '+2 minutes',
+ ],
+ ],
+
+ /**
+ * Configure the Error and Exception handlers used by your application.
+ *
+ * By default errors are displayed using Debugger, when debug is true and logged
+ * by Cake\Log\Log when debug is false.
+ *
+ * In CLI environments exceptions will be printed to stderr with a backtrace.
+ * In web environments an HTML page will be displayed for the exception.
+ * With debug true, framework errors like Missing Controller will be displayed.
+ * When debug is false, framework errors will be coerced into generic HTTP errors.
+ *
+ * Options:
+ *
+ * - `errorLevel` - int - The level of errors you are interested in capturing.
+ * - `trace` - boolean - Whether or not backtraces should be included in
+ * logged errors/exceptions.
+ * - `log` - boolean - Whether or not you want exceptions logged.
+ * - `exceptionRenderer` - string - The class responsible for rendering
+ * uncaught exceptions. If you choose a custom class you should place
+ * the file for that class in src/Error. This class needs to implement a
+ * render method.
+ * - `skipLog` - array - List of exceptions to skip for logging. Exceptions that
+ * extend one of the listed exceptions will also be skipped for logging.
+ * E.g.:
+ * `'skipLog' => ['Cake\Network\Exception\NotFoundException', 'Cake\Network\Exception\UnauthorizedException']`
+ */
+ 'Error' => [
+ 'errorLevel' => E_ALL & ~E_DEPRECATED,
+ 'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
+ 'skipLog' => [],
+ 'log' => true,
+ 'trace' => true,
+ ],
+
+ /**
+ * Email configuration.
+ *
+ * By defining transports separately from delivery profiles you can easily
+ * re-use transport configuration across multiple profiles.
+ *
+ * You can specify multiple configurations for production, development and
+ * testing.
+ *
+ * Each transport needs a `className`. Valid options are as follows:
+ *
+ * Mail - Send using PHP mail function
+ * Smtp - Send using SMTP
+ * Debug - Do not send the email, just return the result
+ *
+ * You can add custom transports (or override existing transports) by adding the
+ * appropriate file to src/Mailer/Transport. Transports should be named
+ * 'YourTransport.php', where 'Your' is the name of the transport.
+ */
+ 'EmailTransport' => [
+ 'default' => [
+ 'className' => 'Mail',
+ // The following keys are used in SMTP transports
+ 'host' => 'localhost',
+ 'port' => 25,
+ 'timeout' => 30,
+ 'username' => 'user',
+ 'password' => 'secret',
+ 'client' => null,
+ 'tls' => null,
+ ],
+ ],
+
+ /**
+ * Email delivery profiles
+ *
+ * Delivery profiles allow you to predefine various properties about email
+ * messages from your application and give the settings a name. This saves
+ * duplication across your application and makes maintenance and development
+ * easier. Each profile accepts a number of keys. See `Cake\Network\Email\Email`
+ * for more information.
+ */
+ 'Email' => [
+ 'default' => [
+ 'transport' => 'default',
+ 'from' => 'you@localhost',
+ //'charset' => 'utf-8',
+ //'headerCharset' => 'utf-8',
+ ],
+ ],
+
+ /**
+ * Connection information used by the ORM to connect
+ * to your application's datastores.
+ * Drivers include Mysql Postgres Sqlite Sqlserver
+ * See vendor\cakephp\cakephp\src\Database\Driver for complete list
+ */
+ 'Datasources' => [
+ 'default' => [
+ 'className' => 'Cake\Database\Connection',
+ 'driver' => 'Cake\Database\Driver\Mysql',
+ 'persistent' => false,
+ 'host' => 'localhost',
+ 'username' => 'gestion',
+ 'password' => 'cha6fus0EiPh',
+ 'database' => 'gestion',
+ 'encoding' => 'utf8',
+ 'timezone' => 'UTC',
+ 'cacheMetadata' => true,
+ 'log' => false,
+ 'quoteIdentifiers' => false,
+ //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
+ ],
+
+ /**
+ * The test connection is used during the test suite.
+ */
+ 'test' => [
+ 'className' => 'Cake\Database\Connection',
+ 'driver' => 'Cake\Database\Driver\Mysql',
+ 'persistent' => false,
+ 'host' => 'localhost',
+ 'username' => 'gestion_test',
+ 'password' => 'cha6fus0EiPh',
+ 'database' => 'gestion_test',
+ 'encoding' => 'utf8',
+ 'timezone' => 'UTC',
+ 'cacheMetadata' => true,
+ 'log' => false,
+ 'quoteIdentifiers' => false,
+ //'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
+ ],
+ ],
+
+ /**
+ * Configures logging options
+ */
+ 'Log' => [
+ 'debug' => [
+ 'className' => 'Cake\Log\Engine\FileLog',
+ 'path' => LOGS,
+ 'file' => 'debug',
+ 'levels' => ['notice', 'info', 'debug'],
+ ],
+ 'error' => [
+ 'className' => 'Cake\Log\Engine\FileLog',
+ 'path' => LOGS,
+ 'file' => 'error',
+ 'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
+ ],
+ ],
+
+ /**
+ * Session configuration.
+ *
+ * Contains an array of settings to use for session configuration. The
+ * `defaults` key is used to define a default preset to use for sessions, any
+ * settings declared here will override the settings of the default config.
+ *
+ * ## Options
+ *
+ * - `cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'.
+ * - `cookiePath` - The url path for which session cookie is set. Maps to the
+ * `session.cookie_path` php.ini config. Defaults to base path of app.
+ * - `timeout` - The time in minutes the session should be valid for.
+ * Pass 0 to disable checking timeout.
+ * Please note that php.ini's session.gc_maxlifetime must be equal to or greater
+ * than the largest Session['timeout'] in all served websites for it to have the
+ * desired effect.
+ * - `defaults` - The default configuration set to use as a basis for your session.
+ * There are four built-in options: php, cake, cache, database.
+ * - `handler` - Can be used to enable a custom session handler. Expects an
+ * array with at least the `engine` key, being the name of the Session engine
+ * class to use for managing the session. CakePHP bundles the `CacheSession`
+ * and `DatabaseSession` engines.
+ * - `ini` - An associative array of additional ini values to set.
+ *
+ * The built-in `defaults` options are:
+ *
+ * - 'php' - Uses settings defined in your php.ini.
+ * - 'cake' - Saves session files in CakePHP's /tmp directory.
+ * - 'database' - Uses CakePHP's database sessions.
+ * - 'cache' - Use the Cache class to save sessions.
+ *
+ * To define a custom session handler, save it at src/Network/Session/<name>.php.
+ * Make sure the class implements PHP's `SessionHandlerInterface` and set
+ * Session.handler to <name>
+ *
+ * To use database sessions, load the SQL file located at config/Schema/sessions.sql
+ */
+ 'Session' => [
+ 'defaults' => 'php',
+ ],
+];
diff --git a/generator/before-bake/config/bake_extra.php b/generator/before-bake/config/bake_extra.php
new file mode 100644
index 0000000..3ff3352
--- /dev/null
+++ b/generator/before-bake/config/bake_extra.php
@@ -0,0 +1,162 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+return [
+ 'default' => [ 'actions' => [ 'index', 'view', 'add', 'edit'] ],
+ 'AdherentRoles' => [ 'actions' => [ 'index', 'add', 'delete' ] ],
+ 'AdherentRoleTypes' => [ 'actions' => [ '_empty' ] ],
+ 'AdherentStatuts' => [ 'actions' => [ '_empty' ] ],
+ 'AdherentTypes' => [ 'actions' => [ '_empty' ] ],
+ 'Civilites' => [ 'actions' => [ '_empty' ] ],
+ 'Periodicites' => [ 'actions' => [ '_empty' ] ],
+ 'Secteurs' => [ 'actions' => [ '_empty' ] ],
+ 'ServiceStatuts' => [ 'actions' => [ '_empty' ] ],
+ 'ServiceTypes' => [ 'actions' => [ '_empty' ] ],
+ 'EquipementModes' => [ 'actions' => [ '_empty' ] ],
+ 'EquipementModeles' => [
+ 'title' => [
+ 'glue' => ' ',
+ 'pieces' => ['constructeur', 'modele'],
+ ],
+ ],
+ 'Adherents' => [
+ 'title' => [
+ 'custom_code' => <<<'EOT'
+"CHD" . $this->_properties['id'] . " - " . ( $this->_properties['raison']?($this->_properties['raison'] . " (" . $this->_properties['nom'] . ")" ):($this->_properties['nom'] . " " . $this->_properties['prenom']) )
+EOT
+ ],
+ 'filters' => [
+ 'q' => [
+ 'mode' => 'like',
+ 'before' => 'true',
+ 'after' => 'true',
+ 'columns' => ['id','nom','nom2','prenom','prenom2','raison','proprio','tel_mobile1','tel_mobile2'],
+ 'colspan' => 5,
+ 'hint' => 'Rechercher...',
+ ],
+ 'ville_id' => [
+ 'mode' => 'value',
+ 'before' => 'false',
+ 'after' => 'false',
+ 'model' => 'Villes',
+ 'colspan' => 2,
+ 'hint' => 'Villes',
+ ],
+ ],
+ ],
+ 'Equipements' => [
+ 'title' => [
+ 'glue' => ' ',
+ 'pieces' => ['mac'],
+ ],
+ 'filters' => [
+ 'q' => [
+ 'mode' => 'like',
+ 'before' => 'true',
+ 'after' => 'true',
+ //'columns' => ['id', 'ipmgmt.ip4','ipmgmt.ip6', 'mac'],
+ 'columns' => ['mac'],
+ 'colspan' => 3,
+ 'hint' => 'Adresse MAC...',
+ ],
+ 'equipement_modele_id' => [
+ 'mode' => 'value',
+ 'before' => 'false',
+ 'after' => 'false',
+ 'model' => 'EquipementModeles',
+ 'colspan' => 2,
+ 'hint' => 'Equipement Modeles',
+ ],
+ 'relais_id' => [
+ 'mode' => 'value',
+ 'before' => 'false',
+ 'after' => 'false',
+ 'model' => 'Relais',
+ 'colspan' => 2,
+ 'hint' => 'Relais',
+ ],
+ ],
+ ],
+ 'Services' => [
+ 'title' => [
+ 'glue' => '-',
+ 'prefix' => 'SER',
+ 'pieces' => ['service_type_id', 'adherent_id', 'id'],
+ ],
+ 'filters' => [
+ 'service_type_id' => [
+ 'mode' => 'value',
+ 'before' => 'false',
+ 'after' => 'false',
+ 'model' => 'ServiceTypes',
+ 'colspan' => 3,
+ 'hint' => 'Service Type',
+ ],
+ 'service_statut_id' => [
+ 'mode' => 'value',
+ 'before' => 'false',
+ 'after' => 'false',
+ 'model' => 'ServiceStatuts',
+ 'colspan' => 2,
+ 'hint' => 'Service Statut',
+ ],
+ 'relais_id' => [
+ 'mode' => 'value',
+ 'before' => 'false',
+ 'after' => 'false',
+ 'model' => 'Relais',
+ 'colspan' => 2,
+ 'hint' => 'Relais',
+ ],
+ ],
+ ],
+ 'Ipmgmt' => [
+ 'actions' => [ 'index', 'view' ],
+ 'title' => [
+ 'glue' => ' ',
+ 'pieces' => ['ip4', 'ip6'],
+ ],
+ ],
+ 'Ippubliques' => [
+ 'actions' => [ 'index', 'view' ],
+ 'title' => [
+ 'glue' => ' ',
+ 'pieces' => ['ip4', 'ip6'],
+ ],
+ 'filters' => [
+ 'q' => [
+ 'mode' => 'like',
+ 'before' => 'true',
+ 'after' => 'false',
+ 'columns' => ['ip4','ip6'],
+ 'colspan' => 2,
+ 'hint' => 'Rechercher...',
+ ],
+ 'secteur_id' => [
+ 'mode' => 'value',
+ 'before' => 'false',
+ 'after' => 'false',
+ 'model' => 'Secteurs',
+ 'colspan' => 1,
+ 'hint' => 'Secteurs',
+ ],
+ ],
+ ],
+];
diff --git a/generator/before-bake/config/bootstrap_cli.php b/generator/before-bake/config/bootstrap_cli.php
new file mode 100644
index 0000000..b27c7e5
--- /dev/null
+++ b/generator/before-bake/config/bootstrap_cli.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 3.0.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+use Cake\Core\Configure;
+use Cake\Core\Exception\MissingPluginException;
+use Cake\Core\Plugin;
+use Cake\Event\Event;
+use Cake\Event\EventManager;
+use Cake\Utility\Hash;
+
+/**
+ * Additional bootstrapping and configuration for CLI environments should
+ * be put here.
+ */
+
+// Set logs to different files so they don't have permission conflicts.
+Configure::write('Log.debug.file', 'cli-debug');
+Configure::write('Log.error.file', 'cli-error');
+
+try {
+ Plugin::load('Bake');
+} catch (MissingPluginException $e) {
+ // Do not halt if the plugin is missing
+}
+
+EventManager::instance()->on('Bake.initialize', function (Event $event) {
+ // Initialize BakeExtraHelper with bake_extra.php config array
+ $view = $event->subject;
+ $extra = include(ROOT . DS . 'config' . DS . 'bake_extra.php');
+ $view->loadHelper('CustomTheme.BakeExtra', $extra);
+});
+
+EventManager::instance()->on('Bake.beforeRender', function (Event $event) {
+ $view = $event->subject;
+ $isController = strpos($event->data[0], 'Bake/Controller/controller.ctp') !== false;
+ if ($isController) {
+ // Override controller's default action list with the configured one in bake_extra.php
+ $view->set('actions', $view->BakeExtra->getActions($view->get('name')));
+ }
+});
diff --git a/generator/before-bake/maj_default_pot.sh b/generator/before-bake/maj_default_pot.sh
new file mode 100755
index 0000000..e87997e
--- /dev/null
+++ b/generator/before-bake/maj_default_pot.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+# Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+#
+# This file is part of CHD Gestion.
+#
+# CHD Gestion is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# CHD Gestion is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+#
+cd $(dirname $0)
+bin/cake i18n extract --paths="./src" --output="./src/Locale" --merge=yes --extract-core=yes --exclude="Test,Vendor" --overwrite
+ls -l ./src/Locale/default.pot
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Controller/controller.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Controller/controller.ctp
new file mode 100644
index 0000000..76407ce
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Controller/controller.ctp
@@ -0,0 +1,78 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * Controller bake template file
+ *
+ * Allows templating of Controllers generated from bake.
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+use Cake\Utility\Inflector;
+
+$defaultModel = $name;
+%>
+<?php
+namespace <%= $namespace %>\Controller<%= $prefix %>;
+
+use <%= $namespace %>\Controller\AppController;
+
+/**
+ * <%= $name %> Controller
+ *
+ * @property \<%= $namespace %>\Model\Table\<%= $defaultModel %>Table $<%= $defaultModel %>
+<%
+foreach ($components as $component):
+ $classInfo = $this->Bake->classInfo($component, 'Controller/Component', 'Component');
+%>
+ * @property <%= $classInfo['fqn'] %> $<%= $classInfo['name'] %>
+<% endforeach; %>
+ */
+class <%= $name %>Controller extends AppController
+{
+<% if ($this->BakeExtra->hasFilters($currentModelName) ): %>
+
+ public function initialize()
+ {
+ parent::initialize();
+ if ($this->request->action === 'index') {
+ $this->loadComponent('Paginator', [ 'limit' => 15, 'order' => [ '<%=$currentModelName%>.id' => 'DESC' ] ]);
+ $this->loadComponent('Search.Prg');
+ }
+ }
+<% endif; %>
+<%
+echo $this->Bake->arrayProperty('helpers', $helpers, ['indent' => false]);
+echo $this->Bake->arrayProperty('components', $components, ['indent' => false]);
+foreach($actions as $action) {
+ echo $this->element('Controller/' . $action);
+}
+%>
+}
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/_empty.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/_empty.ctp
new file mode 100644
index 0000000..02d5dfb
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/_empty.ctp
@@ -0,0 +1,45 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+%>
+
+ /**
+ * _empty method
+ * Generated when no other actions requested
+ * Prevents bake all to make all $scaffoldActions when unwanted
+ *
+ * @return void
+ */
+ public function _empty()
+ {
+ }
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/add.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/add.ctp
new file mode 100644
index 0000000..be3860b
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/add.ctp
@@ -0,0 +1,71 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+$compact = ["'" . $singularName . "'"];
+%>
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $<%= $singularName %> = $this-><%= $currentModelName %>->newEntity();
+ if ($this->request->is('post')) {
+ $<%= $singularName %> = $this-><%= $currentModelName %>->patchEntity($<%= $singularName %>, $this->request->data);
+ if ($this-><%= $currentModelName; %>->save($<%= $singularName %>)) {
+ $this->Flash->success(__('The <%= strtolower($singularHumanName) %> has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The <%= strtolower($singularHumanName) %> could not be saved. Please, try again.'));
+ }
+ }
+<%
+ $associations = array_merge(
+ $this->Bake->aliasExtractor($modelObj, 'BelongsTo'),
+ $this->Bake->aliasExtractor($modelObj, 'BelongsToMany')
+ );
+ foreach ($associations as $assoc):
+ $association = $modelObj->association($assoc);
+ $otherName = $association->target()->alias();
+ $otherPlural = $this->_variableName($otherName);
+%>
+ $<%= $otherPlural %> = $this-><%= $currentModelName %>-><%= $otherName %>->find('list');
+<%
+ $compact[] = "'$otherPlural'";
+ endforeach;
+%>
+ $this->set(compact(<%= join(', ', $compact) %>));
+ $this->set('_serialize', ['<%=$singularName%>']);
+ }
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/edit.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/edit.ctp
new file mode 100644
index 0000000..b1b62f2
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/edit.ctp
@@ -0,0 +1,74 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+
+$belongsTo = $this->Bake->aliasExtractor($modelObj, 'BelongsTo');
+$belongsToMany = $this->Bake->aliasExtractor($modelObj, 'BelongsToMany');
+$compact = ["'" . $singularName . "'"];
+%>
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id <%= $singularHumanName %> id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $<%= $singularName %> = $this-><%= $currentModelName %>->get($id, [
+ 'contain' => [<%= $this->Bake->stringifyList($belongsToMany, ['indent' => false]) %>]
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $<%= $singularName %> = $this-><%= $currentModelName %>->patchEntity($<%= $singularName %>, $this->request->data);
+ if ($this-><%= $currentModelName; %>->save($<%= $singularName %>)) {
+ $this->Flash->success(__('The <%= strtolower($singularHumanName) %> has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The <%= strtolower($singularHumanName) %> could not be saved. Please, try again.'));
+ }
+ }
+<%
+ foreach (array_merge($belongsTo, $belongsToMany) as $assoc):
+ $association = $modelObj->association($assoc);
+ $otherName = $association->target()->alias();
+ $otherPlural = $this->_variableName($otherName);
+%>
+ $<%= $otherPlural %> = $this-><%= $currentModelName %>-><%= $otherName %>->find('list');
+<%
+ $compact[] = "'$otherPlural'";
+ endforeach;
+%>
+ $this->set(compact(<%= join(', ', $compact) %>));
+ $this->set('_serialize', ['<%=$singularName%>']);
+ }
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/index.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/index.ctp
new file mode 100644
index 0000000..1fa2e18
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/index.ctp
@@ -0,0 +1,69 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+
+use Cake\Utility\Hash;
+use Cake\Utility\Inflector;
+%>
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+<% $belongsTo = $this->Bake->aliasExtractor($modelObj, 'BelongsTo'); %>
+<% if ($belongsTo): %>
+ $this->paginate = [
+ 'contain' => [<%= $this->Bake->stringifyList($belongsTo, ['indent' => false]) %>]
+ ];
+<% endif; %>
+<% if (! $this->BakeExtra->hasFilters($currentModelName)): %>
+ $this->set('<%= $pluralName %>', $this->paginate($this-><%= $currentModelName %>));
+<% else: %>
+ $query = $this-><%= $currentModelName %>
+ ->find('search', $this-><%= $currentModelName %>->filterParams($this->request->query));
+ $this->set('<%= $pluralName %>', $this->paginate($query));
+ $this->set('_serialize', ['<%= $pluralName %>']);
+
+<%
+ $extraModels = Hash::extract($this->BakeExtra->getFilters($currentModelName), "{s}.model");
+ foreach ( $extraModels as $m ):
+ $v = Inflector::variable($m);
+%>
+ $this->loadModel('<%= $m %>');
+ $this->set('<%= $v %>', $this-><%= $m %>->find('list')->toArray());
+<% endforeach;
+ endif; %>
+ }
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/form.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/form.ctp
new file mode 100644
index 0000000..2273d86
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/form.ctp
@@ -0,0 +1,126 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+use Cake\Utility\Inflector;
+
+$fields = collection($fields)
+ ->filter(function($field) use ($schema) {
+ return $schema->columnType($field) !== 'binary';
+ });
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+<% if (strpos($action, 'add') === false && $this->BakeExtra->hasAction("delete", $modelClass)): %>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $<%= $singularVar %>-><%= $primaryKey[0] %>],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $<%= $singularVar %>-><%= $primaryKey[0] %>)]
+ )
+ ?></li>
+<% endif;
+ if ($this->BakeExtra->hasAction("index", $modelClass)):
+%>
+ <li><?= $this->Html->link(__('List <%= $pluralHumanName %>'), ['action' => 'index']) ?></li>
+<%
+ endif;
+ $done = [];
+ foreach ($associations as $type => $data) {
+ foreach ($data as $alias => $details) {
+ if ($details['controller'] !== $this->name && !in_array($details['controller'], $done)) {
+ if ( $this->BakeExtra->hasAction("index", $details['controller']) ):
+%>
+ <li><?= $this->Html->link(__('List <%= $this->_pluralHumanName($alias) %>'), ['controller' => '<%= $details['controller'] %>', 'action' => 'index']) %></li>
+<%
+ endif;
+ if ( $this->BakeExtra->hasAction("add", $details['controller']) ):
+%>
+ <li><?= $this->Html->link(__('New <%= $this->_singularHumanName($alias) %>'), ['controller' => '<%= $details['controller'] %>', 'action' => 'add']) %></li>
+<%
+ endif;
+ $done[] = $details['controller'];
+ }
+ }
+ }
+%>
+ </ul>
+</nav>
+<div class="<%= $pluralVar %> form large-10 medium-9 columns content">
+ <?= $this->Form->create($<%= $singularVar %>) ?>
+ <fieldset>
+ <legend><?= __('<%= Inflector::humanize($action) %> <%= $singularHumanName %>') ?></legend>
+ <?php
+<%
+ foreach ($fields as $field) {
+ if (in_array($field, $primaryKey)) {
+ continue;
+ }
+ if (isset($keyFields[$field])) {
+ $fieldData = $schema->column($field);
+ if (!empty($fieldData['null'])) {
+%>
+ echo $this->Form->input('<%= $field %>', ['options' => $<%= $keyFields[$field] %>, 'empty' => true]);
+<%
+ } else {
+%>
+ echo $this->Form->input('<%= $field %>', ['options' => $<%= $keyFields[$field] %>]);
+<%
+ }
+ continue;
+ }
+ if (!in_array($field, ['created', 'modified', 'updated'])) {
+ $fieldData = $schema->column($field);
+ if (($fieldData['type'] === 'date') && (!empty($fieldData['null']))) {
+%>
+ echo $this->Form->input('<%= $field %>', ['empty' => true, 'default' => '']);
+<%
+ } else {
+%>
+ echo $this->Form->input('<%= $field %>');
+<%
+ }
+ }
+ }
+ if (!empty($associations['BelongsToMany'])) {
+ foreach ($associations['BelongsToMany'] as $assocName => $assocData) {
+%>
+ echo $this->Form->input('<%= $assocData['property'] %>._ids', ['options' => $<%= $assocData['variable'] %>]);
+<%
+ }
+ }
+%>
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/entity.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/entity.ctp
new file mode 100644
index 0000000..5d1cb28
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/entity.ctp
@@ -0,0 +1,127 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+
+use Cake\Utility\Inflector;
+$title = $this->BakeExtra->getTitleOpts(Inflector::camelize($table));
+
+$propertyHintMap = null;
+if (!empty($propertySchema)) {
+ $propertyHintMap = $this->DocBlock->buildEntityPropertyHintTypeMap($propertySchema);
+}
+
+$accessible = [];
+if (!isset($fields) || $fields !== false) {
+ if (!empty($fields)) {
+ foreach ($fields as $field) {
+ $accessible[$field] = 'true';
+ }
+ } elseif (!empty($primaryKey)) {
+ $accessible['*'] = 'true';
+ foreach ($primaryKey as $field) {
+ $accessible[$field] = 'false';
+ }
+ }
+}
+%>
+<?php
+namespace <%= $namespace %>\Model\Entity;
+
+use Cake\ORM\Entity;
+
+/**
+ * <%= $name %> Entity.
+<% if ($propertyHintMap): %>
+ *
+<% foreach ($propertyHintMap as $property => $type): %>
+<% if ($type): %>
+ * @property <%= $type %> $<%= $property %>
+<% else: %>
+ * @property $<%= $property %>
+<% endif; %>
+<% endforeach; %>
+<% endif; %>
+ */
+class <%= $name %> extends Entity
+{
+<% if (!empty($accessible)): %>
+
+ /**
+ * Fields that can be mass assigned using newEntity() or patchEntity().
+ *
+ * Note that when '*' is set to true, this allows all unspecified fields to
+ * be mass assigned. For security purposes, it is advised to set '*' to false
+ * (or remove it), and explicitly make individual fields accessible as needed.
+ *
+ * @var array
+ */
+ protected $_accessible = [
+<% foreach ($accessible as $field => $value): %>
+ '<%= $field %>' => <%= $value %>,
+<% endforeach; %>
+ ];
+<% endif %>
+<% if (!empty($hidden)): %>
+
+ /**
+ * Fields that are excluded from JSON an array versions of the entity.
+ *
+ * @var array
+ */
+ protected $_hidden = [<%= $this->Bake->stringifyList($hidden) %>];
+<% endif %>
+<% if (!empty($title)): %>
+
+ /**
+ * Virtual field for pretty print in related table's views
+ *
+ * @return String
+ */
+ protected function _getTitle()
+ {
+<% if (array_key_exists('custom_code', $title)) {
+ echo "return " . $title['custom_code'] . ";\n";
+ } else {
+ echo "return implode('" . $title['glue'] . "', array_filter([\n";
+ if (array_key_exists('prefix', $title)) {
+ echo "\t\t\t'" . $title['prefix'] . "',\n";
+ }
+ foreach ($title['pieces'] as $piece) {
+ echo "\t\t\t\$this->_properties['" . $piece . "'],\n";
+ }
+ echo "], 'strlen'));\n";
+ }
+%>
+ }
+<% endif; %>
+}
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/table.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/table.ctp
new file mode 100644
index 0000000..5d21755
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/table.ctp
@@ -0,0 +1,258 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+use Cake\Utility\Inflector;
+%>
+<?php
+namespace <%= $namespace %>\Model\Table;
+
+<%
+$title = $this->BakeExtra->getTitleOpts($name);
+
+$uses = [
+ "use $namespace\\Model\\Entity\\$entity;",
+ 'use Cake\ORM\Query;',
+ 'use Cake\ORM\RulesChecker;',
+ 'use Cake\ORM\Table;',
+ 'use Cake\Validation\Validator;'
+];
+if ( $this->BakeExtra->hasFilters($name) ) {
+ $uses[] = 'use Search\Manager;';
+ $behaviors['Search.Search'] = [];
+}
+sort($uses);
+echo implode("\n", $uses);
+%>
+
+
+/**
+ * <%= $name %> Model
+ *
+<% if ($associations): %>
+ *
+<% foreach ($associations as $type => $assocs): %>
+<% foreach ($assocs as $assoc): %>
+ * @property \Cake\ORM\Association\<%= Inflector::camelize($type) %> $<%= $assoc['alias'] %>
+<% endforeach %>
+<% endforeach; %>
+<% endif; %>
+ */
+class <%= $name %>Table extends Table
+{
+
+ /**
+ * Initialize method
+ *
+ * @param array $config The configuration for the Table.
+ * @return void
+ */
+ public function initialize(array $config)
+ {
+ parent::initialize($config);
+
+<% if (!empty($table)): %>
+ $this->table('<%= $table %>');
+<% endif %>
+<%
+ if (!empty($displayField) || !empty($title)):
+ if (!empty($title)):
+%>
+ $this->displayField('title');
+<% else: %>
+ $this->displayField('<%= $displayField %>');
+<% endif; %>
+<% endif; %>
+<% if (!empty($primaryKey)): %>
+<% if (count($primaryKey) > 1): %>
+ $this->primaryKey([<%= $this->Bake->stringifyList((array)$primaryKey, ['indent' => false]) %>]);
+<% else: %>
+ $this->primaryKey('<%= current((array)$primaryKey) %>');
+<% endif %>
+<% endif %>
+<% if (!empty($behaviors)): %>
+
+<% endif; %>
+<% foreach ($behaviors as $behavior => $behaviorData): %>
+ $this->addBehavior('<%= $behavior %>'<%= $behaviorData ? ", [" . implode(', ', $behaviorData) . ']' : '' %>);
+<% endforeach %>
+<% if (!empty($associations)): %>
+
+<% endif; %>
+<% foreach ($associations as $type => $assocs): %>
+<% foreach ($assocs as $assoc):
+ $alias = $assoc['alias'];
+ unset($assoc['alias']);
+%>
+ $this-><%= $type %>('<%= $alias %>', [<%= $this->Bake->stringifyList($assoc, ['indent' => 3]) %>]);
+<% endforeach %>
+<% endforeach %>
+ }
+<% if ( $this->BakeExtra->hasFilters($name) ):
+ $searchMethods = [];
+ foreach ( $this->BakeExtra->getFilters($name) as $k => $details ):
+ if ( $details['mode']==='value' ):
+ $searchMethods[] = "->" . $details['mode'] . "('$k', [ 'field' => \$this->aliasField('$k')])";
+ else:
+ $fields = [];
+ foreach ( $details['columns'] as $col ):
+ $fields[] = "\$this->aliasField('$col')";
+ endforeach;
+ $fields = implode(', ', $fields);
+ $searchMethods[] = "->" . $details['mode'] . "('$k', [\n"
+ . "\t\t\t\t'before' => " . $details['before'] . ",\n"
+ . "\t\t\t\t'after' => " . $details['after'] . ",\n"
+ . "\t\t\t\t'field' => [$fields]\n"
+ . "\t\t\t])";
+ endif;
+ endforeach;
+%>
+ /**
+ * Search plugin queries configuration
+ */
+ public function searchConfiguration()
+ {
+ $search = new Manager($this);
+<% if (!empty($searchMethods)):
+ $lastIndex = count($searchMethods) - 1;
+ $searchMethods[$lastIndex] .= ';';
+%>
+ $search
+<% foreach ($searchMethods as $searchMethod): %>
+ <%= $searchMethod %>
+<% endforeach; %>
+<% endif; %>
+ return $search;
+ }
+<% endif; %>
+<% if (!empty($validation)): %>
+
+ /**
+ * Default validation rules.
+ *
+ * @param \Cake\Validation\Validator $validator Validator instance.
+ * @return \Cake\Validation\Validator
+ */
+ public function validationDefault(Validator $validator)
+ {
+<%
+foreach ($validation as $field => $rules):
+ $validationMethods = [];
+ foreach ($rules as $ruleName => $rule):
+ if ($rule['rule'] && !isset($rule['provider'])):
+ $validationMethods[] = sprintf(
+ "->add('%s', '%s', ['rule' => '%s'])",
+ $field,
+ $ruleName,
+ $rule['rule']
+ );
+ elseif ($rule['rule'] && isset($rule['provider'])):
+ $validationMethods[] = sprintf(
+ "->add('%s', '%s', ['rule' => '%s', 'provider' => '%s'])",
+ $field,
+ $ruleName,
+ $rule['rule'],
+ $rule['provider']
+ );
+ endif;
+
+ if (isset($rule['allowEmpty'])):
+ if (is_string($rule['allowEmpty'])):
+ $validationMethods[] = sprintf(
+ "->allowEmpty('%s', '%s')",
+ $field,
+ $rule['allowEmpty']
+ );
+ elseif ($rule['allowEmpty']):
+ $validationMethods[] = sprintf(
+ "->allowEmpty('%s')",
+ $field
+ );
+ else:
+ $validationMethods[] = sprintf(
+ "->requirePresence('%s', 'create')",
+ $field
+ );
+ $validationMethods[] = sprintf(
+ "->notEmpty('%s')",
+ $field
+ );
+ endif;
+ endif;
+ endforeach;
+
+ if (!empty($validationMethods)):
+ $lastIndex = count($validationMethods) - 1;
+ $validationMethods[$lastIndex] .= ';';
+ %>
+ $validator
+ <%- foreach ($validationMethods as $validationMethod): %>
+ <%= $validationMethod %>
+ <%- endforeach; %>
+
+<%
+ endif;
+endforeach;
+%>
+ return $validator;
+ }
+<% endif %>
+<% if (!empty($rulesChecker)): %>
+
+ /**
+ * Returns a rules checker object that will be used for validating
+ * application integrity.
+ *
+ * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
+ * @return \Cake\ORM\RulesChecker
+ */
+ public function buildRules(RulesChecker $rules)
+ {
+ <%- foreach ($rulesChecker as $field => $rule): %>
+ $rules->add($rules-><%= $rule['name'] %>(['<%= $field %>']<%= !empty($rule['extra']) ? ", '$rule[extra]'" : '' %>));
+ <%- endforeach; %>
+ return $rules;
+ }
+<% endif; %>
+<% if ($connection !== 'default'): %>
+
+ /**
+ * Returns the database connection name to use by default.
+ *
+ * @return string
+ */
+ public static function defaultConnectionName()
+ {
+ return '<%= $connection %>';
+ }
+<% endif; %>
+}
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/index.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/index.ctp
new file mode 100644
index 0000000..112a40c
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/index.ctp
@@ -0,0 +1,179 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+use Cake\Utility\Inflector;
+use Cake\Utility\Hash;
+
+/* Enable for debug
+echo "<!-- Instanciated vars :\n";
+print_r(compact('modelObject','modelClass','primaryKey','displayField','singularVar','pluralVar','singularHumanName','pluralHumanName','fields','keyFields','schema','fields','associations', 'extra', 'actions'));
+echo "\n-->\n";
+*/
+$fields = collection($fields)
+ ->filter(function($field) use ($schema) {
+ return !in_array($schema->columnType($field), ['binary', 'text']) && $field != 'id';
+ })
+ ->take(7);
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New <%= $singularHumanName %>'), ['action' => 'add']) ?></li>
+<%
+ $done = [];
+ foreach ($associations as $type => $data):
+ foreach ($data as $alias => $details):
+ if (!empty($details['navLink']) && $details['controller'] !== $this->name && !in_array($details['controller'], $done)):
+ if ($this->BakeExtra->hasAction("index", $details['controller'])):
+%>
+ <li><?= $this->Html->link(__('List <%= $this->_pluralHumanName($alias) %>'), ['controller' => '<%= $details['controller'] %>', 'action' => 'index']) ?></li>
+<%
+ endif;
+ if ($this->BakeExtra->hasAction("add", $details['controller'])):
+%>
+ <li><?= $this->Html->link(__('New <%= $this->_singularHumanName($alias) %>'), ['controller' => '<%= $details['controller'] %>', 'action' => 'add']) ?></li>
+<%
+ endif;
+ $done[] = $details['controller'];
+ endif;
+ endforeach;
+ endforeach;
+%>
+ </ul>
+</nav>
+<div class="<%= $pluralVar %> index large-10 medium-9 columns content">
+ <h3><?= __('<%= $pluralHumanName %>') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+<%
+ if ( $this->BakeExtra->hasFilters($modelClass) ):
+%>
+ <?= $this->Form->create(null) . "\n" ?>
+<%
+ endif;
+%>
+ <thead>
+<% if ( $this->BakeExtra->hasFilters($modelClass) ): %>
+ <tr class="filter">
+<% foreach ( $this->BakeExtra->getFilters($modelClass) as $k => $filter): %>
+ <th colspan="<%= $filter['colspan'] %>">
+ <?= $this->Form->input('<%= $k %>', [
+ 'placeholder' => __('<%= $filter["hint"] %>'),
+ 'empty' => __('<%= $filter["hint"] %>')
+ ]) ?>
+ </th>
+<% endforeach; %>
+ <th class="actions">
+ <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?>
+ <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?>
+ </th>
+ </tr>
+<% endif; %>
+ <tr>
+<% foreach ($fields as $field): %>
+ <th><?= $this->Paginator->sort('<%= $field %>') ?></th>
+<% endforeach; %>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+<% if ( $this->BakeExtra->hasFilters($modelClass) ): %>
+ <?= $this->Form->end() . "\n" ?>
+<% endif; %>
+ <tbody>
+ <?php foreach ($<%= $pluralVar %> as $<%= $singularVar %>): ?>
+ <tr>
+<% foreach ($fields as $field) {
+ $isKey = false;
+ if (!empty($associations['BelongsTo'])) {
+ foreach ($associations['BelongsTo'] as $alias => $details) {
+ if ($field === $details['foreignKey']) {
+ $isKey = true;
+ if ( $this->BakeExtra->hasAction("view", $details['controller']) ) {
+%>
+ <td><?= $<%= $singularVar %>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?></td>
+<%
+ } else {
+%>
+ <td><?= $<%= $singularVar %>->has('<%= $details['property'] %>') ? h($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>) : '' ?></td>
+<%
+ }
+ break;
+ }
+ }
+ }
+ if ($isKey !== true) {
+ if (!in_array($schema->columnType($field), ['integer', 'biginteger', 'decimal', 'float'])) {
+%>
+ <td><?= h($<%= $singularVar %>-><%= $field %>) ?></td>
+<%
+ } else {
+%>
+ <td><?= $this->Number->format($<%= $singularVar %>-><%= $field %>) ?></td>
+<%
+ }
+ }
+ }
+
+ $pk = '$' . $singularVar . '->' . $primaryKey[0];
+%>
+ <td class="actions">
+<%
+ if ($this->BakeExtra->hasAction("view", $modelClass)):
+%>
+ <?= $this->Html->link(__('View'), ['action' => 'view', <%= $pk %>]) ?>
+<%
+ endif;
+ if ($this->BakeExtra->hasAction("edit", $modelClass)):
+%>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', <%= $pk %>]) ?>
+<%
+ endif;
+ if ($this->BakeExtra->hasAction("delete", $modelClass)):
+%>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', <%= $pk %>], ['confirm' => __('Are you sure you want to delete # {0}?', <%= $pk %>)]) ?>
+<%
+ endif;
+%>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ </div>
+
+</div>
diff --git a/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/view.ctp b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/view.ctp
new file mode 100644
index 0000000..8ab9916
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/view.ctp
@@ -0,0 +1,215 @@
+<%
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * For full copyright and license information, please see the LICENSE.txt
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 0.1.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+use Cake\Utility\Inflector;
+
+$associations += ['BelongsTo' => [], 'HasOne' => [], 'HasMany' => [], 'BelongsToMany' => []];
+$immediateAssociations = $associations['BelongsTo'] + $associations['HasOne'];
+$associationFields = collection($fields)
+ ->map(function($field) use ($immediateAssociations) {
+ foreach ($immediateAssociations as $alias => $details) {
+ if ($field === $details['foreignKey']) {
+ return [$field => $details];
+ }
+ }
+ })
+ ->filter()
+ ->reduce(function($fields, $value) {
+ return $fields + $value;
+ }, []);
+
+$groupedFields = collection($fields)
+ ->filter(function($field) use ($schema) {
+ return $schema->columnType($field) !== 'binary';
+ })
+ ->groupBy(function($field) use ($schema, $associationFields) {
+ $type = $schema->columnType($field);
+ if (isset($associationFields[$field])) {
+ return 'string';
+ }
+ if (in_array($type, ['integer', 'float', 'decimal', 'biginteger'])) {
+ return 'number';
+ }
+ if (in_array($type, ['date', 'time', 'datetime', 'timestamp'])) {
+ return 'date';
+ }
+ return in_array($type, ['text', 'boolean']) ? $type : 'string';
+ })
+ ->toArray();
+
+$groupedFields += ['number' => [], 'string' => [], 'boolean' => [], 'date' => [], 'text' => []];
+$pk = "\$$singularVar->{$primaryKey[0]}";
+%>
+<nav class="large-2 medium-3 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+<%
+ if ($this->BakeExtra->hasAction("edit", $modelClass)):
+%>
+ <li><?= $this->Html->link(__('Edit <%= $singularHumanName %>'), ['action' => 'edit', <%= $pk %>]) ?> </li>
+<%
+ endif;
+ if ($this->BakeExtra->hasAction("delete", $modelClass)):
+%>
+ <li><?= $this->Form->postLink(__('Delete <%= $singularHumanName %>'), ['action' => 'delete', <%= $pk %>], ['confirm' => __('Are you sure you want to delete # {0}?', <%= $pk %>)]) ?> </li>
+<%
+ endif;
+ if ($this->BakeExtra->hasAction("index", $modelClass)):
+%>
+ <li><?= $this->Html->link(__('List <%= $pluralHumanName %>'), ['action' => 'index']) ?> </li>
+<%
+ endif;
+ if ($this->BakeExtra->hasAction("add", $modelClass)):
+%>
+ <li><?= $this->Html->link(__('New <%= $singularHumanName %>'), ['action' => 'add']) ?> </li>
+<%
+ endif;
+ $done = [];
+ foreach ($associations as $type => $data) {
+ foreach ($data as $alias => $details) {
+ if ($details['controller'] !== $this->name && !in_array($details['controller'], $done)) {
+ if ($this->BakeExtra->hasAction("index", $details['controller'])):
+%>
+ <li><?= $this->Html->link(__('List <%= $this->_pluralHumanName($alias) %>'), ['controller' => '<%= $details['controller'] %>', 'action' => 'index']) ?> </li>
+<%
+ endif;
+ if ($this->BakeExtra->hasAction("add", $details['controller'])):
+%>
+ <li><?= $this->Html->link(__('New <%= Inflector::humanize(Inflector::singularize(Inflector::underscore($alias))) %>'), ['controller' => '<%= $details['controller'] %>', 'action' => 'add']) ?> </li>
+<%
+ endif;
+ $done[] = $details['controller'];
+ }
+ }
+ }
+%>
+ </ul>
+</nav>
+<div class="<%= $pluralVar %> view large-10 medium-9 columns content">
+ <h3><?= h($<%= $singularVar %>-><%= $displayField %>) ?></h3>
+ <table class="vertical-table">
+<% if ($groupedFields['string']) : %>
+<% foreach ($groupedFields['string'] as $field) : %>
+<% if (isset($associationFields[$field])) :
+ $details = $associationFields[$field];
+%>
+ <tr>
+ <th><?= __('<%= Inflector::humanize($details['property']) %>') ?></th>
+<%
+ if ( $this->BakeExtra->hasAction("view", $details['controller']) ):
+%>
+ <td><?= $<%= $singularVar %>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?></td>
+<%
+ else:
+%>
+ <td><?= $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %> ?></td>
+<%
+ endif;
+%>
+ </tr>
+<% else : %>
+ <tr>
+ <th><?= __('<%= Inflector::humanize($field) %>') ?></th>
+ <td><?= h($<%= $singularVar %>-><%= $field %>) ?></td>
+ </tr>
+<% endif; %>
+<% endforeach; %>
+<% endif; %>
+<% if ($groupedFields['number']) : %>
+<% foreach ($groupedFields['number'] as $field) : %>
+ <tr>
+ <th><?= __('<%= Inflector::humanize($field) %>') ?></th>
+ <td><?= $this->Number->format($<%= $singularVar %>-><%= $field %>) ?></td>
+ </tr>
+<% endforeach; %>
+<% endif; %>
+<% if ($groupedFields['date']) : %>
+<% foreach ($groupedFields['date'] as $field) : %>
+ <tr>
+ <th><%= "<%= __('" . Inflector::humanize($field) . "') %>" %></th>
+ <td><?= h($<%= $singularVar %>-><%= $field %>) ?></tr>
+ </tr>
+<% endforeach; %>
+<% endif; %>
+<% if ($groupedFields['boolean']) : %>
+<% foreach ($groupedFields['boolean'] as $field) : %>
+ <tr>
+ <th><?= __('<%= Inflector::humanize($field) %>') ?></th>
+ <td><?= $<%= $singularVar %>-><%= $field %> ? __('Yes') : __('No'); ?></td>
+ </tr>
+<% endforeach; %>
+<% endif; %>
+ </table>
+<% if ($groupedFields['text']) : %>
+<% foreach ($groupedFields['text'] as $field) : %>
+ <div class="row">
+ <h4><?= __('<%= Inflector::humanize($field) %>') ?></h4>
+ <?= $this->Text->autoParagraph(h($<%= $singularVar %>-><%= $field %>)); ?>
+ </div>
+<% endforeach; %>
+<% endif; %>
+<%
+$relations = $associations['HasMany'] + $associations['BelongsToMany'];
+foreach ($relations as $alias => $details):
+ $otherSingularVar = Inflector::variable($alias);
+ $otherPluralHumanName = Inflector::humanize(Inflector::underscore($details['controller']));
+ %>
+ <div class="related">
+ <h4><?= __('Related <%= $otherPluralHumanName %>') ?></h4>
+ <?php if (!empty($<%= $singularVar %>-><%= $details['property'] %>)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+<% foreach ($details['fields'] as $field): %>
+ <th><?= __('<%= Inflector::humanize($field) %>') ?></th>
+<% endforeach; %>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+<!-- FIXME : ne pas prendre toutes les colonnes, rendre configurable ou faire un include d'un autre fichier Template -->
+ <?php foreach ($<%= $singularVar %>-><%= $details['property'] %> as $<%= $otherSingularVar %>): ?>
+ <tr>
+ <%- foreach ($details['fields'] as $field): %>
+ <td><?= h($<%= $otherSingularVar %>-><%= $field %>) ?></td>
+ <%- endforeach; %>
+ <%- $otherPk = "\${$otherSingularVar}->{$details['primaryKey'][0]}"; %>
+ <td class="actions">
+<!-- FIXME : ces liens devraient être conditionnels -->
+ <?= $this->Html->link(__('View'), ['controller' => '<%= $details['controller'] %>', 'action' => 'view', <%= $otherPk %>]) %>
+ <?= $this->Html->link(__('Edit'), ['controller' => '<%= $details['controller'] %>', 'action' => 'edit', <%= $otherPk %>]) %>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+<% endforeach; %>
+</div>
diff --git a/generator/before-bake/plugins/CustomTheme/src/View/Helper/BakeExtraHelper.php b/generator/before-bake/plugins/CustomTheme/src/View/Helper/BakeExtraHelper.php
new file mode 100644
index 0000000..69506a9
--- /dev/null
+++ b/generator/before-bake/plugins/CustomTheme/src/View/Helper/BakeExtraHelper.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace CustomTheme\View\Helper;
+
+use Cake\View\Helper;
+use Cake\Utility\Hash;
+
+class BakeExtraHelper extends Helper
+{
+ public function hello()
+ {
+ return "<!-- BakeExtra::hello()\n" . print_r($this->_config, true) . "\n-->\n";
+ }
+
+ public function hasFilters($controllerName) {
+ if ( ! is_string($controllerName) ) return FALSE;
+ $filters = $this->getFilters($controllerName);
+ return (is_array($filters) && count($filters) > 0);
+ }
+
+ public function getFilters($controllerName) {
+ if ( ! is_string($controllerName) ) return FALSE;
+ return Hash::get($this->_config, "$controllerName.filters");
+ }
+
+ public function hasAction($action, $controllerName) {
+ if ( ! is_string($controllerName) ) return FALSE;
+ return in_array($action, $this->getActions($controllerName));
+ }
+
+ public function getActions($controllerName) {
+ if ( ! is_string($controllerName) ) return FALSE;
+ $actions = Hash::get($this->_config, "$controllerName.actions");
+ if ( ! is_array($actions) ) {
+ $actions = Hash::get($this->_config, "default.actions");
+ }
+ if ( ! is_array($actions) ) {
+ $actions = ['index', 'view', 'add', 'edit', 'delete'];
+ }
+ return $actions;
+ }
+ // TODO : modelClass or controllerName ?
+ public function getTitleOpts($modelClass) {
+ if ( ! is_string($modelClass) ) return FALSE;
+ return Hash::get($this->_config, "$modelClass.title");
+ }
+}
diff --git a/generator/before-bake/src/View/AppView.php b/generator/before-bake/src/View/AppView.php
new file mode 100644
index 0000000..65014f8
--- /dev/null
+++ b/generator/before-bake/src/View/AppView.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+/**
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since 3.0.0
+ * @license http://www.opensource.org/licenses/mit-license.php MIT License
+ */
+namespace App\View;
+
+use Cake\View\View;
+
+/**
+ * Application View
+ *
+ * Your application’s default view class
+ *
+ * @link http://book.cakephp.org/3.0/en/views.html#the-app-view
+ */
+class AppView extends View
+{
+
+ /**
+ * Initialization hook method.
+ *
+ * Use this method to add common initialization code like loading helpers.
+ *
+ * e.g. `$this->loadHelper('Html');`
+ *
+ * @return void
+ */
+ public function initialize()
+ {
+ parent::initialize();
+ if ($this->request->action === 'add' || $this->request->action === 'edit') {
+ $this->loadHelper('Form', ['templates'=> ['dateWidget' => '{{day}}{{month}}{{year}}']]);
+ }
+ }
+}
diff --git a/generator/before-bake/tests/TestCase/View/I18nBasicTest.php b/generator/before-bake/tests/TestCase/View/I18nBasicTest.php
new file mode 100644
index 0000000..de33609
--- /dev/null
+++ b/generator/before-bake/tests/TestCase/View/I18nBasicTest.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+namespace App\Test\TestCase\View;
+
+// use App\View\Helper\ProgressHelper;
+use Cake\I18n\I18n;
+use Cake\TestSuite\TestCase;
+use Cake\View\View;
+
+class ProgressHelperTest extends TestCase
+{
+ public function setUp()
+ {
+ I18n::locale('fr-FR');
+ }
+
+ public function testBasicTranslation()
+ {
+ $this->assertContains('Juin', __('June'));
+ }
+}
diff --git a/generator/before-bake/webroot/.htaccess b/generator/before-bake/webroot/.htaccess
new file mode 100644
index 0000000..01dde77
--- /dev/null
+++ b/generator/before-bake/webroot/.htaccess
@@ -0,0 +1,6 @@
+<IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteBase /gestion
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^ index.php [L]
+</IfModule>
diff --git a/generator/before-bake/webroot/css/local.css b/generator/before-bake/webroot/css/local.css
new file mode 100644
index 0000000..6ec914a
--- /dev/null
+++ b/generator/before-bake/webroot/css/local.css
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+ * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+ *
+ * This file is part of CHD Gestion.
+ *
+ * CHD Gestion is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * CHD Gestion is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+**/
+
+.filter th {
+ padding-top:0;
+ padding-bottom:0;
+}
+
+.filter input,button {
+ padding: 0.5rem;
+}
+
+.filter label {
+ display: none;
+}
+
+/* Retouche pour les tableaux (vues view) : pas de fer à droite */
+.vertical-table th {
+ width: 10rem;
+}
+
+.vertical-table td {
+ text-align: left;
+}
+
+/* Retouche alignement pour la top-bar du layout général lorsque le navigateur est étroit */
+.top-bar-section ul {
+ padding-left: 0.9375rem;
+}
diff --git a/generator/before-bake/webroot/favicon.ico b/generator/before-bake/webroot/favicon.ico
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/generator/before-bake/webroot/favicon.ico
diff --git a/generator/composer.json b/generator/composer.json
new file mode 100644
index 0000000..bcd9e4e
--- /dev/null
+++ b/generator/composer.json
@@ -0,0 +1,45 @@
+{
+ "name": "chd/chd_gestion:1.0",
+ "description": "CHD Gestion",
+ "homepage": "http://priv.chd.sx/gestion",
+ "type": "project",
+ "license": "GPL3+",
+ "require": {
+ "php": ">=5.5.9",
+ "cakephp/app": "3.1.2",
+ "cakephp/cakephp": "3.1.10",
+ "mobiledetect/mobiledetectlib": "2.*",
+ "cakephp/migrations": "~1.0",
+ "cakephp/plugin-installer": "*",
+ "friendsofcake/search": "dev-master"
+ },
+ "require-dev": {
+ "psy/psysh": "@stable",
+ "cakephp/debug_kit": "~3.2",
+ "cakephp/bake": "~1.1",
+ "phpunit/phpunit": "5.*"
+ },
+ "suggest": {
+ "phpunit/phpunit": "Allows automated tests to be run without system-wide install.",
+ "cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."
+ },
+ "autoload": {
+ "psr-4": {
+ "App\\": "src",
+ "CustomTheme\\": "./plugins/CustomTheme/src"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "App\\Test\\": "tests",
+ "Cake\\Test\\": "./vendor/cakephp/cakephp/tests",
+ "CustomTheme\\Test\\": "./plugins/CustomTheme/tests"
+ }
+ },
+ "scripts": {
+ "post-install-cmd": "App\\Console\\Installer::postInstall",
+ "post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump"
+ },
+ "minimum-stability": "stable",
+ "prefer-stable": true
+}
diff --git a/generator/make.sh b/generator/make.sh
new file mode 100755
index 0000000..fed4a03
--- /dev/null
+++ b/generator/make.sh
@@ -0,0 +1,78 @@
+#!/bin/bash -x
+# Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+# Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+#
+# This file is part of CHD Gestion.
+#
+# CHD Gestion is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# CHD Gestion is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+#
+cd /var/www
+
+# Sauver la précédente fournée
+if [ -d chd_gestion ]
+then [ -d chd_gestion.bkp ] && rm -r chd_gestion.bkp/
+ mv chd_gestion chd_gestion.bkp
+fi
+
+# Installer un nouveau CakePHP ( http://book.cakephp.org/3.0/en/quickstart.html#getting-cakephp )
+[ -f composer.phar ] || wget https://getcomposer.org/composer.phar
+
+mkdir chd_gestion
+cd chd_gestion || exit
+
+ln -s ../composer.phar
+# Personnaliser les dépendances (forcer CakePHP 3.1.10)
+cp -a /root/chd_gestion_generator/composer.json .
+# Deployer un squellette d'appli (avec les dépendances)
+yes | php composer.phar create-project
+# Cakephp/app nous sert de base, mais a été installé comme dépendance à cause de l'utilisation du composer.json
+rsync -ai --exclude **/empty ./vendor/cakephp/app/ .
+
+# Ajouter PHPUnit ( http://book.cakephp.org/3.0/en/development/testing.html#installing-phpunit )
+#php composer.phar require --dev phpunit/phpunit:5.*
+# Ajouter le plugin Search ( https://github.com/FriendsOfCake/search )
+#php composer.phar require friendsofcake/search "dev-master"
+
+# Ajouter un theme pour altérer le comportement de bake (http://book.cakephp.org/3.0/en/bake/development.html#creating-a-bake-theme )
+yes | bin/cake bake plugin CustomTheme
+
+# Paramétrer le français en langue par défaut ( http://book.cakephp.org/3.0/en/core-libraries/internationalization-and-localization.html#setting-the-default-locale )
+sed --in-place -e "s/ini_set('intl.default_locale', '[^']*')/ini_set('intl.default_locale', 'fr_FR')/" config/bootstrap.php
+
+# Page d'accueil = Liste des adhérents (http://book.cakephp.org/3.0/en/development/routing.html#quick-tour )
+sed --in-place -e "s#connect('/', [^)]\\+)#connect('/', ['controller' => 'Adherents', 'action' => 'index'])#" config/routes.php
+
+cat >> config/bootstrap.php <<"EOT"
+# Ajouter des pluriel irréguliers vu de la langue anglaise
+# http://book.cakephp.org/3.0/en/core-libraries/inflector.html#loading-custom-inflections
+Inflector::rules('uninflected', ['ipmgmt']);
+Inflector::rules('uninflected', ['relais']);
+Inflector::rules('irregular', ['interesse' => 'interesses']);
+
+# Ne pas afficher les heures par défaut
+use Cake\I18n\Time;
+Time::setToStringFormat([IntlDateFormatter::SHORT, -1]);
+EOT
+
+# Ajout des personnalisations qui s'expriment pas facilement dans un script
+rsync -ai /root/chd_gestion_generator/before-bake/ ./
+
+# Génération de l'ensemble du CRUD ( http://book.cakephp.org/3.0/en/bake/usage.html )
+for table in $(bin/cake bake all | sed -ne 's/^- \(.*\)$/\1/p' | grep -vE '^v_')
+do
+ yes | bin/cake bake all --theme=CustomTheme $table
+done
+
+# Ecarsement de certains modèles générés
+rsync -aib --backup-dir=../src.orig /root/chd_gestion_generator/after-bake/src/ ./src/
diff --git a/generator/quick.sh b/generator/quick.sh
new file mode 100755
index 0000000..e6240c9
--- /dev/null
+++ b/generator/quick.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr>
+# Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+#
+# This file is part of CHD Gestion.
+#
+# CHD Gestion is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# CHD Gestion is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>.
+#
+cd /var/www/chd_gestion
+
+# Ecarsement de certains modèles générés
+rsync -aib --backup-dir=../src.orig /root/chd_gestion_generator/after-bake/src/ ./src/
+