From 37a67ea723bb6d93421591b8f3ed15738f53ed9e Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sat, 12 Mar 2016 00:20:18 +0100 Subject: First import. --- .../src/Controller/AdherentRolesController.php | 89 ++ .../src/Controller/AdherentsController.php | 149 +++ .../src/Controller/EquipementsController.php | 138 +++ .../after-bake/src/Controller/IpmgmtController.php | 107 ++ .../src/Controller/IppubliquesController.php | 79 ++ .../after-bake/src/Controller/RelaisController.php | 122 ++ .../src/Controller/ServicesController.php | 259 ++++ .../after-bake/src/Controller/VillesController.php | 104 ++ generator/after-bake/src/Locale/default.pot | 1306 ++++++++++++++++++++ generator/after-bake/src/Locale/fr_FR/default.po | 1305 +++++++++++++++++++ .../after-bake/src/Template/AdherentRoles/add.ctp | 46 + .../src/Template/AdherentRoles/index.ctp | 66 + .../after-bake/src/Template/Adherents/edit.ctp | 106 ++ .../after-bake/src/Template/Adherents/index.ctp | 102 ++ .../after-bake/src/Template/Adherents/view.ctp | 235 ++++ .../after-bake/src/Template/Equipements/index.ctp | 102 ++ .../after-bake/src/Template/Equipements/view.ctp | 90 ++ generator/after-bake/src/Template/Ipmgmt/view.ctp | 80 ++ .../after-bake/src/Template/Ippubliques/index.ctp | 84 ++ .../after-bake/src/Template/Ippubliques/view.ctp | 79 ++ .../after-bake/src/Template/Layout/default.ctp | 79 ++ generator/after-bake/src/Template/Relais/view.ctp | 90 ++ generator/after-bake/src/Template/Services/add.ctp | 48 + .../after-bake/src/Template/Services/edit.ctp | 64 + .../after-bake/src/Template/Services/index.ctp | 100 ++ .../after-bake/src/Template/Services/migrate.ctp | 45 + .../after-bake/src/Template/Services/view.ctp | 117 ++ generator/after-bake/src/Template/Villes/view.ctp | 130 ++ generator/before-bake/config/app.php | 321 +++++ generator/before-bake/config/bake_extra.php | 162 +++ generator/before-bake/config/bootstrap_cli.php | 70 ++ generator/before-bake/maj_default_pot.sh | 22 + .../src/Template/Bake/Controller/controller.ctp | 78 ++ .../Template/Bake/Element/Controller/_empty.ctp | 45 + .../src/Template/Bake/Element/Controller/add.ctp | 71 ++ .../src/Template/Bake/Element/Controller/edit.ctp | 74 ++ .../src/Template/Bake/Element/Controller/index.ctp | 69 ++ .../CustomTheme/src/Template/Bake/Element/form.ctp | 126 ++ .../CustomTheme/src/Template/Bake/Model/entity.ctp | 127 ++ .../CustomTheme/src/Template/Bake/Model/table.ctp | 258 ++++ .../src/Template/Bake/Template/index.ctp | 179 +++ .../src/Template/Bake/Template/view.ctp | 215 ++++ .../src/View/Helper/BakeExtraHelper.php | 65 + generator/before-bake/src/View/AppView.php | 63 + .../tests/TestCase/View/I18nBasicTest.php | 39 + generator/before-bake/webroot/.htaccess | 6 + generator/before-bake/webroot/css/local.css | 46 + generator/before-bake/webroot/favicon.ico | 0 generator/composer.json | 45 + generator/make.sh | 78 ++ generator/quick.sh | 24 + 51 files changed, 7504 insertions(+) create mode 100644 generator/after-bake/src/Controller/AdherentRolesController.php create mode 100644 generator/after-bake/src/Controller/AdherentsController.php create mode 100644 generator/after-bake/src/Controller/EquipementsController.php create mode 100644 generator/after-bake/src/Controller/IpmgmtController.php create mode 100644 generator/after-bake/src/Controller/IppubliquesController.php create mode 100644 generator/after-bake/src/Controller/RelaisController.php create mode 100644 generator/after-bake/src/Controller/ServicesController.php create mode 100644 generator/after-bake/src/Controller/VillesController.php create mode 100644 generator/after-bake/src/Locale/default.pot create mode 100644 generator/after-bake/src/Locale/fr_FR/default.po create mode 100644 generator/after-bake/src/Template/AdherentRoles/add.ctp create mode 100644 generator/after-bake/src/Template/AdherentRoles/index.ctp create mode 100644 generator/after-bake/src/Template/Adherents/edit.ctp create mode 100644 generator/after-bake/src/Template/Adherents/index.ctp create mode 100644 generator/after-bake/src/Template/Adherents/view.ctp create mode 100644 generator/after-bake/src/Template/Equipements/index.ctp create mode 100644 generator/after-bake/src/Template/Equipements/view.ctp create mode 100644 generator/after-bake/src/Template/Ipmgmt/view.ctp create mode 100644 generator/after-bake/src/Template/Ippubliques/index.ctp create mode 100644 generator/after-bake/src/Template/Ippubliques/view.ctp create mode 100644 generator/after-bake/src/Template/Layout/default.ctp create mode 100644 generator/after-bake/src/Template/Relais/view.ctp create mode 100644 generator/after-bake/src/Template/Services/add.ctp create mode 100644 generator/after-bake/src/Template/Services/edit.ctp create mode 100644 generator/after-bake/src/Template/Services/index.ctp create mode 100644 generator/after-bake/src/Template/Services/migrate.ctp create mode 100644 generator/after-bake/src/Template/Services/view.ctp create mode 100644 generator/after-bake/src/Template/Villes/view.ctp create mode 100644 generator/before-bake/config/app.php create mode 100644 generator/before-bake/config/bake_extra.php create mode 100644 generator/before-bake/config/bootstrap_cli.php create mode 100755 generator/before-bake/maj_default_pot.sh create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Controller/controller.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/_empty.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/add.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/edit.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/Controller/index.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Element/form.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/entity.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Model/table.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/index.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/Template/Bake/Template/view.ctp create mode 100644 generator/before-bake/plugins/CustomTheme/src/View/Helper/BakeExtraHelper.php create mode 100644 generator/before-bake/src/View/AppView.php create mode 100644 generator/before-bake/tests/TestCase/View/I18nBasicTest.php create mode 100644 generator/before-bake/webroot/.htaccess create mode 100644 generator/before-bake/webroot/css/local.css create mode 100644 generator/before-bake/webroot/favicon.ico create mode 100644 generator/composer.json create mode 100755 generator/make.sh create mode 100755 generator/quick.sh (limited to 'generator') 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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 +# +#, 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 \n" +"Language-Team: LANGUAGE \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 +# +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 \n" +"Language-Team: CHD \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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+ Form->create($adherentRole) ?> +
+ + 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]); + ?> +
+ Form->button(__('Submit')) ?> + Form->end() ?> +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

+ + + + + + + + + + + + + + + + + + + +
Paginator->sort('adherent_id') ?>Paginator->sort('adherent_role_type_id') ?>Paginator->sort('ville_id') ?>
has('adherent') ? $this->Html->link($adherentRole->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $adherentRole->adherent->id]) : '' ?>has('adherent_role_type') ? $this->Html->link($adherentRole->adherent_role_type->title, ['controller' => 'AdherentRoleTypes', 'action' => 'view', $adherentRole->adherent_role_type->id]) : '' ?>has('ville') ? $this->Html->link($adherentRole->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherentRole->ville->id]) : '' ?> + Form->postLink(__('Delete'), ['action' => 'delete', $adherentRole->id], ['confirm' => __('Are you sure you want to delete # {0}?', $adherentRole->id)]) ?> +
+
+
    + Paginator->prev('< ' . __('previous')) ?> + Paginator->numbers() ?> + Paginator->next(__('next') . ' >') ?> +
+
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+ Form->create($adherent) ?> +
+ +
+ Form->input('adherent_statut_id', ['options' => $adherentStatuts]); ?> +
+
+ Form->input('num_adt_ttn'); ?> +
+
+
+ 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'); + ?> +
+
+ 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'); + ?> +
+
+
+ Form->input('proprio'); + echo $this->Form->input('nom2'); + echo $this->Form->input('prenom2'); + ?> +
+
+ Form->input('notes', ['rows' => 7]); ?> +
+
+ Form->button(__('Submit')) ?> + Form->end() ?> + +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+ +
+
Progression : %
+
+

+ + Form->create(null) . "\n" ?> + + + + + + + + + + + + + + + + + + Form->end() . "\n" ?> + + + + + + + + + + + + + + +
+ Form->input('q', [ + 'placeholder' => __('Rechercher...'), + 'empty' => __('Rechercher...') + ]) ?> + + Form->input('ville_id', [ + 'placeholder' => __('Villes'), + 'empty' => __('Villes') + ]) ?> + + Form->button('Filter', ['type' => 'submit']) . "\n" ?> + Html->link('Reset', ['action' => 'index']) . "\n" ?> +
Paginator->sort('nom') ?>Paginator->sort('prenom') ?>Paginator->sort('raison') ?>Paginator->sort('tel_mobile1') ?>Paginator->sort('adherent_type_id') ?>Paginator->sort('ville_id') ?>Paginator->sort('adherent_statut_id') ?>
nom) ?>prenom) ?>raison) ?>tel_mobile1) ?>has('adherent_type') ? h($adherent->adherent_type->title) : '' ?>has('ville') ? $this->Html->link($adherent->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherent->ville->id]) : '' ?>has('adherent_statut') ? h($adherent->adherent_statut->title) : '' ?> + Html->link(__('View'), ['action' => 'view', $adherent->id]) ?> + Html->link(__('Edit'), ['action' => 'edit', $adherent->id]) ?> +
+
+
    + Paginator->prev('< ' . __('previous')) ?> + Paginator->numbers() ?> + Paginator->next(__('next') . ' >') ?> +
+
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

title) ?>

+ + + + + +
adherent_statut->title ?>
+ + + + + +
num_adt_ttn) ?>
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adherent_type->title ?>
civilite->title ?>
nom) ?>
prenom) ?>
raison) ?>
tel_fixe1) ?>
tel_mobile1) ?>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
adresse1) ?>
adresse2) ?>
has('ville') ? $this->Html->link($adherent->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherent->ville->id]) : '' ?>
mail1) ?>
mail2) ?>
tel_fixe2) ?>
tel_mobile2) ?>
+
+ + + + + + + + + + + + + + + + + + + + + +
proprio) ?>
nom2) ?>
prenom2) ?>
created) ?>
modified) ?>
+ adherent_roles)): ?> + + adherent_roles as $k => $adherentRole): ?> + + + + + +
adherent_role_type->title) ?> + has('ville') ? h($adherentRole->ville->title) : '' ?> + Form->postLink(__('Delete'), ['controller' => 'AdherentRoles', 'action' => 'delete', $adherentRole->id], ['confirm' => __('Are you sure you want to delete # {0}?', $adherentRole->id)]) ?> +
+ +
+
+

+ Text->autoParagraph(h($adherent->notes)); ?> +
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

+ + Form->create(null) . "\n" ?> + + + + + + + + + + + + + + + + + + + Form->end() . "\n" ?> + + + + + + + + + + + + + + +
+ Form->input('q', [ + 'placeholder' => __('Adresse MAC...'), + 'empty' => __('Adresse MAC...') + ]) ?> + + Form->input('equipement_modele_id', [ + 'placeholder' => __('Equipement Modeles'), + 'empty' => __('Equipement Modeles') + ]) ?> + + Form->input('relais_id', [ + 'placeholder' => __('Relais'), + 'empty' => __('Relais') + ]) ?> + + Form->button('Filter', ['type' => 'submit']) . "\n" ?> + Html->link('Reset', ['action' => 'index']) . "\n" ?> +
Paginator->sort('mac') ?>Paginator->sort('ipmgmt_id') ?>Paginator->sort('equipement_mode_id') ?>Paginator->sort('equipement_modele_id') ?>Paginator->sort('service_id') ?>Paginator->sort('relais_id') ?>Paginator->sort('uplink_id') ?>
mac) ?>has('ipmgmt') ? $this->Html->link($equipement->ipmgmt->title, ['controller' => 'Ipmgmt', 'action' => 'view', $equipement->ipmgmt->id]) : '' ?>equipement_mode_id) ?>has('equipement_modele') ? $this->Html->link($equipement->equipement_modele->title, ['controller' => 'EquipementModeles', 'action' => 'view', $equipement->equipement_modele->id]) : '' ?>has('service') ? $this->Html->link($equipement->service->title, ['controller' => 'Services', 'action' => 'view', $equipement->service->id]) : '' ?>has('relais') ? $this->Html->link($equipement->relais->title, ['controller' => 'Relais', 'action' => 'view', $equipement->relais->id]) : '' ?>has('uplink_id') ? $this->Html->link($equipement->uplink_id, ['controller' => 'Equipements', 'action' => 'view', $equipement->uplink_id]) : '' ?> + Html->link(__('View'), ['action' => 'view', $equipement->id]) ?> + Html->link(__('Edit'), ['action' => 'edit', $equipement->id]) ?> +
+
+
    + Paginator->prev('< ' . __('previous')) ?> + Paginator->numbers() ?> + Paginator->next(__('next') . ' >') ?> +
+
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

id) ?>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
mac) ?>
has('ipmgmt') ? $this->Html->link($equipement->ipmgmt->title, ['controller' => 'Ipmgmt', 'action' => 'view', $equipement->ipmgmt->id]) : '' ?>
has('equipement_modele') ? $this->Html->link($equipement->equipement_modele->title, ['controller' => 'EquipementModeles', 'action' => 'view', $equipement->equipement_modele->id]) : '' ?>
has('relais') ? $this->Html->link($equipement->relais->title, ['controller' => 'Relais', 'action' => 'view', $equipement->relais->id]) : '' ?>
has('service') ? $this->Html->link($equipement->service->title, ['controller' => 'Services', 'action' => 'view', $equipement->service->id]) : '' ?>
has('uplink_id') ? $this->Html->link($equipement->uplink_id, ['controller' => 'Equipements', 'action' => 'view', $equipement->uplink_id]) : '' ?>
has('equipement_mode') ? $this->Html->link($equipement->equipement_mode->id, ['controller' => 'EquipementModes', 'action' => 'view', $equipement->equipement_mode->id]) : '' ?>
description) ?>
date_achat) ?>
date_hs) ?>
+
+

+ Text->autoParagraph(h($equipement->notes)); ?> +
+
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

title) ?>

+ + + + + + + + + + + + + +
ip4) ?>
ip6) ?>
Number->format($ipmgmt->id) ?>
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

+ + Form->create(null) . "\n" ?> + + + + + + + + + + + + + + + Form->end() . "\n" ?> + + + + + + + + + + + +
+ Form->input('q', [ + 'placeholder' => __('Rechercher...'), + 'empty' => __('Rechercher...') + ]) ?> + + Form->input('secteur_id', [ + 'placeholder' => __('Secteurs'), + 'empty' => __('Secteurs') + ]) ?> + + Form->button('Filter', ['type' => 'submit']) . "\n" ?> + Html->link('Reset', ['action' => 'index']) . "\n" ?> +
Paginator->sort('ip4') ?>Paginator->sort('ip6') ?>Paginator->sort('secteur_id') ?>
ip4) ?>ip6) ?>has('secteur') ? h($ippublique->secteur->title) : '' ?>services) ? __('oui'): __('non') ?> + Html->link(__('View'), ['action' => 'view', $ippublique->ip4]) ?> +
+
+
    + Paginator->prev('< ' . __('previous')) ?> + Paginator->numbers() ?> + Paginator->next(__('next') . ' >') ?> +
+
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

ip4) ?>

+ + + + + + + + + + + + + +
ip4) ?>
ip6) ?>
secteur->title ?>
+ +
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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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'; +?> + + + + Html->charset() ?> + + + <?= $cakeDescription ?>: + <?= $this->fetch('title') ?> + + Html->meta('icon') ?> + + Html->css('base.css') ?> + Html->css('cake.css') ?> + Html->css('local.css') ?> + + fetch('meta') ?> + fetch('css') ?> + fetch('script') ?> + + + + Flash->render() ?> +
+ fetch('content') ?> +
+
+
+ + 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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

title) ?>

+ + + + + + + + + + + + + + + + + + + + + + + + + +
title) ?>
secteur->title ?>
has('ville') ? $this->Html->link($relais->ville->title, ['controller' => 'Villes', 'action' => 'view', $relais->ville->id]) : '' ?>
Number->format($relais->id) ?>
Number->format($relais->gps_long) ?>
Number->format($relais->gps_lat) ?>
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+ Form->create($service) ?> +
+ + 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'); + ?> +
+ Form->button(__('Submit')) ?> + Form->end() ?> +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+ Form->create($service) ?> +
+ + + + + + + + + + + + + + + + + + +
adherent->title ?>
service_type->title ?>
ippublique_id ?>
date_debut) ?>
+ Form->input('description'); + echo $this->Form->input('prix_ht'); + echo $this->Form->input('lat'); + echo $this->Form->input('lng'); + ?> +
+ Form->button(__('Submit')) ?> + Form->end() ?> +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

+ + Form->create(null) . "\n" ?> + + + + + + + + + + + + + + + + + + Form->end() . "\n" ?> + + + + + + + + + + + + + +
+ Form->input('service_type_id', [ + 'placeholder' => __('Service Type'), + 'empty' => __('Service Type') + ]) ?> + + Form->input('service_statut_id', [ + 'placeholder' => __('Service Statut'), + 'empty' => __('Service Statut') + ]) ?> + + Form->input('relais_id', [ + 'placeholder' => __('Relais'), + 'empty' => __('Relais') + ]) ?> + + Form->button('Filter', ['type' => 'submit']) . "\n" ?> + Html->link('Reset', ['action' => 'index']) . "\n" ?> +
Paginator->sort('adherent_id') ?>Paginator->sort('service_type_id') ?>Paginator->sort('service_statut_id') ?>Paginator->sort('ippublique_id') ?>Paginator->sort('relais_id') ?>Paginator->sort('prix_ht') ?>
has('adherent') ? $this->Html->link($service->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $service->adherent->id]) : '' ?>has('service_type') ? h($service->service_type->title) : '' ?>has('service_statut') ? h($service->service_statut->title) : '' ?>has('ippublique') ? $this->Html->link($service->ippublique->ip4, ['controller' => 'Ippubliques', 'action' => 'view', $service->ippublique->ip4]) : '' ?>has('relais') ? $this->Html->link($service->relais->title, ['controller' => 'Relais', 'action' => 'view', $service->relais->id]) : '' ?>Number->format($service->prix_ht) ?> + Html->link(__('View'), ['action' => 'view', $service->id]) ?> + Html->link(__('Edit'), ['action' => 'edit', $service->id]) ?> +
+
+
    + Paginator->prev('< ' . __('previous')) ?> + Paginator->numbers() ?> + Paginator->next(__('next') . ' >') ?> +
+
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

title) ?>

+
+
+	
+
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

title) ?>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
has('adherent') ? $this->Html->link($service->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $service->adherent->id]) : '' ?>
service_type->title ?>
service_statut->title ?>
has('ippublique') ? $this->Html->link($service->ippublique->title, ['controller' => 'Ippubliques', 'action' => 'view', $service->ippublique->ip4]) : '' ?>
description) ?>
Number->format($service->prix_ht) ?>
Number->format($service->lat) ?>
Number->format($service->lng) ?>
date_debut) ?>
date_fin) ?>
created) ?>
modified) ?>
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +%> + +
+

title) ?>

+ + + + + + + + + + + + + +
title) ?>
cp) ?>
tel_contact) ?>
+ + + +
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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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/.php. + * Make sure the class implements PHP's `SessionHandlerInterface` and set + * Session.handler to + * + * 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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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 +# Copyright 2016 Nicolas Goaziou +# +# 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 . +# +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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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; +%> +\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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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'; + }); +%> + +
+ Form->create($<%= $singularVar %>) ?> +
+ <%= $singularHumanName %>') ?> + 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'] %>]); +<% + } + } +%> + ?> +
+ Form->button(__('Submit')) ?> + Form->end() ?> +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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'; + } + } +} +%> +\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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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; +%> +\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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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 "\n"; +*/ +$fields = collection($fields) + ->filter(function($field) use ($schema) { + return !in_array($schema->columnType($field), ['binary', 'text']) && $field != 'id'; + }) + ->take(7); +%> + +
+

') ?>

+ +<% + if ( $this->BakeExtra->hasFilters($modelClass) ): +%> + Form->create(null) . "\n" ?> +<% + endif; +%> + +<% if ( $this->BakeExtra->hasFilters($modelClass) ): %> + +<% foreach ( $this->BakeExtra->getFilters($modelClass) as $k => $filter): %> + +<% endforeach; %> + + +<% endif; %> + +<% foreach ($fields as $field): %> + +<% endforeach; %> + + + +<% if ( $this->BakeExtra->hasFilters($modelClass) ): %> + Form->end() . "\n" ?> +<% endif; %> + + as $<%= $singularVar %>): ?> + +<% 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']) ) { +%> + +<% + } else { +%> + +<% + } + break; + } + } + } + if ($isKey !== true) { + if (!in_array($schema->columnType($field), ['integer', 'biginteger', 'decimal', 'float'])) { +%> + +<% + } else { +%> + +<% + } + } + } + + $pk = '$' . $singularVar . '->' . $primaryKey[0]; +%> + + + + +
+ Form->input('<%= $k %>', [ + 'placeholder' => __('<%= $filter["hint"] %>'), + 'empty' => __('<%= $filter["hint"] %>') + ]) ?> + + Form->button('Filter', ['type' => 'submit']) . "\n" ?> + Html->link('Reset', ['action' => 'index']) . "\n" ?> +
Paginator->sort('<%= $field %>') ?>
->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?>->has('<%= $details['property'] %>') ? h($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>) : '' ?>-><%= $field %>) ?>Number->format($<%= $singularVar %>-><%= $field %>) ?> +<% + if ($this->BakeExtra->hasAction("view", $modelClass)): +%> + Html->link(__('View'), ['action' => 'view', <%= $pk %>]) ?> +<% + endif; + if ($this->BakeExtra->hasAction("edit", $modelClass)): +%> + Html->link(__('Edit'), ['action' => 'edit', <%= $pk %>]) ?> +<% + endif; + if ($this->BakeExtra->hasAction("delete", $modelClass)): +%> + Form->postLink(__('Delete'), ['action' => 'delete', <%= $pk %>], ['confirm' => __('Are you sure you want to delete # {0}?', <%= $pk %>)]) ?> +<% + endif; +%> +
+
+
    + Paginator->prev('< ' . __('previous')) ?> + Paginator->numbers() ?> + Paginator->next(__('next') . ' >') ?> +
+
+ +
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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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]}"; +%> + +
+

-><%= $displayField %>) ?>

+ +<% if ($groupedFields['string']) : %> +<% foreach ($groupedFields['string'] as $field) : %> +<% if (isset($associationFields[$field])) : + $details = $associationFields[$field]; +%> + + +<% + if ( $this->BakeExtra->hasAction("view", $details['controller']) ): +%> + +<% + else: +%> + +<% + endif; +%> + +<% else : %> + + + + +<% endif; %> +<% endforeach; %> +<% endif; %> +<% if ($groupedFields['number']) : %> +<% foreach ($groupedFields['number'] as $field) : %> + + + + +<% endforeach; %> +<% endif; %> +<% if ($groupedFields['date']) : %> +<% foreach ($groupedFields['date'] as $field) : %> + + + + +<% endforeach; %> +<% endif; %> +<% if ($groupedFields['boolean']) : %> +<% foreach ($groupedFields['boolean'] as $field) : %> + + + + +<% endforeach; %> +<% endif; %> +
') ?>->has('<%= $details['property'] %>') ? $this->Html->link($<%= $singularVar %>-><%= $details['property'] %>-><%= $details['displayField'] %>, ['controller' => '<%= $details['controller'] %>', 'action' => 'view', $<%= $singularVar %>-><%= $details['property'] %>-><%= $details['primaryKey'][0] %>]) : '' ?>-><%= $details['property'] %>-><%= $details['displayField'] %> ?>
') ?>-><%= $field %>) ?>
') ?>Number->format($<%= $singularVar %>-><%= $field %>) ?>
<%= "<%= __('" . Inflector::humanize($field) . "') %>" %>-><%= $field %>) ?>
') ?>-><%= $field %> ? __('Yes') : __('No'); ?>
+<% if ($groupedFields['text']) : %> +<% foreach ($groupedFields['text'] as $field) : %> +
+

') ?>

+ Text->autoParagraph(h($<%= $singularVar %>-><%= $field %>)); ?> +
+<% endforeach; %> +<% endif; %> +<% +$relations = $associations['HasMany'] + $associations['BelongsToMany']; +foreach ($relations as $alias => $details): + $otherSingularVar = Inflector::variable($alias); + $otherPluralHumanName = Inflector::humanize(Inflector::underscore($details['controller'])); + %> + +<% endforeach; %> +
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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +namespace CustomTheme\View\Helper; + +use Cake\View\Helper; +use Cake\Utility\Hash; + +class BakeExtraHelper extends Helper +{ + public function hello() + { + return "\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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +/** + * 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 @@ + + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ +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 @@ + + RewriteEngine On + RewriteBase /gestion + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + 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 + * Copyright 2016 Nicolas Goaziou + * + * 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 . +**/ + +.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 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 +# Copyright 2016 Nicolas Goaziou +# +# 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 . +# +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 +# Copyright 2016 Nicolas Goaziou +# +# 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 . +# +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/ + -- cgit v1.1