diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-03-12 00:20:18 +0100 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-03-12 00:20:18 +0100 |
commit | 37a67ea723bb6d93421591b8f3ed15738f53ed9e (patch) | |
tree | 38b58703b82eaab20975d6e648533eb44598938e /generator/after-bake/src/Template | |
parent | a6104f47f7a0534664f8f3740f303f01e7e7399e (diff) | |
download | chd_gestion-37a67ea723bb6d93421591b8f3ed15738f53ed9e.zip chd_gestion-37a67ea723bb6d93421591b8f3ed15738f53ed9e.tar.gz chd_gestion-37a67ea723bb6d93421591b8f3ed15738f53ed9e.tar.bz2 |
First import.
Diffstat (limited to 'generator/after-bake/src/Template')
18 files changed, 1663 insertions, 0 deletions
diff --git a/generator/after-bake/src/Template/AdherentRoles/add.ctp b/generator/after-bake/src/Template/AdherentRoles/add.ctp new file mode 100644 index 0000000..75d9401 --- /dev/null +++ b/generator/after-bake/src/Template/AdherentRoles/add.ctp @@ -0,0 +1,46 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('List Adherent Roles'), ['action' => 'index']) ?></li> + <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Adherent Role Types'), ['controller' => 'AdherentRoleTypes', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Adherent Role Type'), ['controller' => 'AdherentRoleTypes', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?></li> + </ul> +</nav> +<div class="adherentRoles form large-10 medium-9 columns content"> + <?= $this->Form->create($adherentRole) ?> + <fieldset> + <legend><?= __('Add Adherent Role') ?></legend> + <?php + echo $this->Form->input('adherent_id', ['options' => $adherents, 'default' => $defaultAdherent]); + echo $this->Form->input('adherent_role_type_id', ['options' => $adherentRoleTypes, 'default' => 7]); + echo $this->Form->input('ville_id', ['options' => $villes, 'empty' => true]); + ?> + </fieldset> + <?= $this->Form->button(__('Submit')) ?> + <?= $this->Form->end() ?> +</div> diff --git a/generator/after-bake/src/Template/AdherentRoles/index.ctp b/generator/after-bake/src/Template/AdherentRoles/index.ctp new file mode 100644 index 0000000..4ce3305 --- /dev/null +++ b/generator/after-bake/src/Template/AdherentRoles/index.ctp @@ -0,0 +1,66 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('New Adherent Role'), ['action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Adherent Role Types'), ['controller' => 'AdherentRoleTypes', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Adherent Role Type'), ['controller' => 'AdherentRoleTypes', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?></li> + </ul> +</nav> +<div class="adherentRoles index large-10 medium-9 columns content"> + <h3><?= __('Adherent Roles') ?></h3> + <table cellpadding="0" cellspacing="0"> + <thead> + <tr> + <th><?= $this->Paginator->sort('adherent_id') ?></th> + <th><?= $this->Paginator->sort('adherent_role_type_id') ?></th> + <th><?= $this->Paginator->sort('ville_id') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + </thead> + <tbody> + <?php foreach ($adherentRoles as $adherentRole): ?> + <tr> + <td><?= $adherentRole->has('adherent') ? $this->Html->link($adherentRole->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $adherentRole->adherent->id]) : '' ?></td> + <td><?= $adherentRole->has('adherent_role_type') ? $this->Html->link($adherentRole->adherent_role_type->title, ['controller' => 'AdherentRoleTypes', 'action' => 'view', $adherentRole->adherent_role_type->id]) : '' ?></td> + <td><?= $adherentRole->has('ville') ? $this->Html->link($adherentRole->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherentRole->ville->id]) : '' ?></td> + <td class="actions"> + <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $adherentRole->id], ['confirm' => __('Are you sure you want to delete # {0}?', $adherentRole->id)]) ?> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <div class="paginator"> + <ul class="pagination"> + <?= $this->Paginator->prev('< ' . __('previous')) ?> + <?= $this->Paginator->numbers() ?> + <?= $this->Paginator->next(__('next') . ' >') ?> + </ul> + </div> + +</div> diff --git a/generator/after-bake/src/Template/Adherents/edit.ctp b/generator/after-bake/src/Template/Adherents/edit.ctp new file mode 100644 index 0000000..388484c --- /dev/null +++ b/generator/after-bake/src/Template/Adherents/edit.ctp @@ -0,0 +1,106 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('List Adherents'), ['action' => 'index']) ?></li> + <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?></li> + </ul> +</nav> +<div class="adherents form large-10 medium-9 columns content"> + <?= $this->Form->create($adherent) ?> + <fieldset> + <legend><?= __('Edit Adherent') ?></legend> + <div class="columns medium-12 large-6"> + <?= $this->Form->input('adherent_statut_id', ['options' => $adherentStatuts]); ?> + </div> + <div class="columns medium-12 large-6"> + <?= $this->Form->input('num_adt_ttn'); ?> + </div> + <div class="clearfix"></div> + <div class="columns medium-12 large-6"> + <?php + echo $this->Form->input('adherent_type_id', ['options' => $adherentTypes]); + echo $this->Form->input('civilite_id', ['options' => $civilites]); + echo $this->Form->input('nom'); + echo $this->Form->input('prenom'); + echo $this->Form->input('raison'); + echo $this->Form->input('tel_fixe1'); + echo $this->Form->input('tel_mobile1'); + ?> + </div> + <div class="columns medium-12 large-6"> + <?php + echo $this->Form->input('adresse1'); + echo $this->Form->input('adresse2'); + echo $this->Form->input('ville_id', ['options' => $villes]); + echo $this->Form->input('mail1'); + echo $this->Form->input('mail2'); + echo $this->Form->input('tel_fixe2'); + echo $this->Form->input('tel_mobile2'); + ?> + </div> + <div class="clearfix"></div> + <div class="columns medium-12 large-6"> + <?php + echo $this->Form->input('proprio'); + echo $this->Form->input('nom2'); + echo $this->Form->input('prenom2'); + ?> + </div> + <div class="columns medium-12 large-6"> + <?= $this->Form->input('notes', ['rows' => 7]); ?> + </div> + </fieldset> + <?= $this->Form->button(__('Submit')) ?> + <?= $this->Form->end() ?> + <div class="related"> + <h4><?= __('Related Services') ?></h4> + <?php if (!empty($adherent->services)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Id') ?></th> + <th><?= __('Service Type') ?></th> + <th><?= __('Relais') ?></th> + <th><?= __('Service Statut') ?></th> + <th><?= __('Ippublique') ?></th> + <th><?= __('Date Debut') ?></th> + <th><?= __('Date Fin') ?></th> + </tr> + <?php foreach ($adherent->services as $services): ?> + <tr> + <td><?= h($services->title) ?></td> + <td><?= h($services->service_type->title) ?></td> + <td><?= $services->has('relais')?h($services->relais->title):'' ?></td> + <td><?= h($services->service_statut->title) ?></td> + <td><?= h($services->ippublique_id) ?></td> + <td><?= h($services->date_debut) ?></td> + <td><?= h($services->date_fin) ?></td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> +</div> diff --git a/generator/after-bake/src/Template/Adherents/index.ctp b/generator/after-bake/src/Template/Adherents/index.ctp new file mode 100644 index 0000000..3a5fbaf --- /dev/null +++ b/generator/after-bake/src/Template/Adherents/index.ctp @@ -0,0 +1,102 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('New Adherent'), ['action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?></li> + <li><?= $this->Form->postLink(__('Apply routing'), + 'https://priv.chd.sx/api/gen_conf.php', + ['confirm' => __('Are you sure you want to globally apply routing?')] + ) ?> + <li> + </ul> +</nav> +<div class="adherents index large-10 medium-9 columns content"> + <!-- TODO : quick'n' dirty, à reprendre --> + <div style="float:right"> + <h5>Progression : <?= $score ?> %</h5> + </div> + <h3><?= __('Adherents') ?></h3> + <table cellpadding="0" cellspacing="0"> + <?= $this->Form->create(null) . "\n" ?> + <thead> + <tr class="filter"> + <th colspan="5"> + <?= $this->Form->input('q', [ + 'placeholder' => __('Rechercher...'), + 'empty' => __('Rechercher...') + ]) ?> + </th> + <th colspan="2"> + <?= $this->Form->input('ville_id', [ + 'placeholder' => __('Villes'), + 'empty' => __('Villes') + ]) ?> + </th> + <th class="actions"> + <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?> + <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?> + </th> + </tr> + <tr> + <th><?= $this->Paginator->sort('nom') ?></th> + <th><?= $this->Paginator->sort('prenom') ?></th> + <th><?= $this->Paginator->sort('raison') ?></th> + <th><?= $this->Paginator->sort('tel_mobile1') ?></th> + <th><?= $this->Paginator->sort('adherent_type_id') ?></th> + <th><?= $this->Paginator->sort('ville_id') ?></th> + <th><?= $this->Paginator->sort('adherent_statut_id') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + </thead> + <?= $this->Form->end() . "\n" ?> + <tbody> + <?php foreach ($adherents as $adherent): ?> + <tr> + <td><?= h($adherent->nom) ?></td> + <td><?= h($adherent->prenom) ?></td> + <td><?= h($adherent->raison) ?></td> + <td><?= h($adherent->tel_mobile1) ?></td> + <td><?= $adherent->has('adherent_type') ? h($adherent->adherent_type->title) : '' ?></td> + <td><?= $adherent->has('ville') ? $this->Html->link($adherent->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherent->ville->id]) : '' ?></td> + <td><?= $adherent->has('adherent_statut') ? h($adherent->adherent_statut->title) : '' ?></td> + <td class="actions"> + <?= $this->Html->link(__('View'), ['action' => 'view', $adherent->id]) ?> + <?= $this->Html->link(__('Edit'), ['action' => 'edit', $adherent->id]) ?> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <div class="paginator"> + <ul class="pagination"> + <?= $this->Paginator->prev('< ' . __('previous')) ?> + <?= $this->Paginator->numbers() ?> + <?= $this->Paginator->next(__('next') . ' >') ?> + </ul> + </div> + +</div> diff --git a/generator/after-bake/src/Template/Adherents/view.ctp b/generator/after-bake/src/Template/Adherents/view.ctp new file mode 100644 index 0000000..74b6326 --- /dev/null +++ b/generator/after-bake/src/Template/Adherents/view.ctp @@ -0,0 +1,235 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('Edit Adherent'), ['action' => 'edit', $adherent->id]) ?> </li> + <li><?= $this->Html->link(__('List Adherents'), ['action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New AdherentRole'), ['controller' => 'AdherentRoles', 'action' => 'add', 'a' => $adherent->id]) ?> </li> + <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add', 'a' => $adherent->id]) ?> </li> + <li><?= $this->Form->postLink(__('Apply routing'), + 'https://priv.chd.sx/api/gen_conf.php', + ['confirm' => __('Are you sure you want to globally apply routing?')] + ) ?> + <li> + </ul> +</nav> +<div class="adherents view large-10 medium-9 columns content"> + <h3><?= h($adherent->title) ?></h3> + <table class="vertical-table columns medium-12 large-6"> + <tr> + <th><?= __('Adherent Statut') ?></th> + <td><?= $adherent->adherent_statut->title ?></td> + </tr> + </table> + <table class="vertical-table columns medium-12 large-6"> + <tr> + <th><?= __('Num Adt Ttn') ?></th> + <td><?= h($adherent->num_adt_ttn) ?></td> + </tr> + </table> + <div style="clear: both"></div> + <table class="vertical-table columns medium-12 large-6"> + <tr> + <th><?= __('Adherent Type') ?></th> + <td><?= $adherent->adherent_type->title ?></td> + </tr> + <tr> + <th><?= __('Civilite') ?></th> + <td><?= $adherent->civilite->title ?></td> + </tr> + <tr> + <th><?= __('Nom') ?></th> + <td><?= h($adherent->nom) ?></td> + </tr> + <tr> + <th><?= __('Prenom') ?></th> + <td><?= h($adherent->prenom) ?></td> + </tr> + <tr> + <th><?= __('Raison') ?></th> + <td><?= h($adherent->raison) ?></td> + </tr> + <tr> + <th><?= __('Tel Fixe1') ?></th> + <td><?= h($adherent->tel_fixe1) ?></td> + </tr> + <tr> + <th><?= __('Tel Mobile1') ?></th> + <td><?= h($adherent->tel_mobile1) ?></td> + </tr> + </table> + <table class="vertical-table columns medium-12 large-6"> + <tr> + <th><?= __('Adresse1') ?></th> + <td><?= h($adherent->adresse1) ?></td> + </tr> + <tr> + <th><?= __('Adresse2') ?></th> + <td><?= h($adherent->adresse2) ?></td> + </tr> + <tr> + <th><?= __('Ville') ?></th> + <td><?= $adherent->has('ville') ? $this->Html->link($adherent->ville->title, ['controller' => 'Villes', 'action' => 'view', $adherent->ville->id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Mail1') ?></th> + <td><?= h($adherent->mail1) ?></td> + </tr> + <tr> + <th><?= __('Mail2') ?></th> + <td><?= h($adherent->mail2) ?></td> + </tr> + <tr> + <th><?= __('Tel Fixe2') ?></th> + <td><?= h($adherent->tel_fixe2) ?></td> + </tr> + <tr> + <th><?= __('Tel Mobile2') ?></th> + <td><?= h($adherent->tel_mobile2) ?></td> + </tr> + </table> + <div style="clear: both"></div> + <table class="vertical-table columns medium-12 large-6"> + <tr> + <th><?= __('Proprio') ?></th> + <td><?= h($adherent->proprio) ?></td> + </tr> + <tr> + <th><?= __('Nom2') ?></th> + <td><?= h($adherent->nom2) ?></td> + </tr> + <tr> + <th><?= __('Prenom2') ?></th> + <td><?= h($adherent->prenom2) ?></td> + </tr> + <tr> + <th><?= __('Created') ?></th> + <td><?= h($adherent->created) ?></td> + </tr> + <tr> + <th><?= __('Modified') ?></th> + <td><?= h($adherent->modified) ?></td> + </tr> + </table> + <?php if (!empty($adherent->adherent_roles)): ?> + <table class="vertical-table columns medium-12 large-6"> + <?php foreach ($adherent->adherent_roles as $k => $adherentRole): ?> + <tr> + <th><?= __('Role {0}', $k+1) ?></th> + <td><?= h($adherentRole->adherent_role_type->title) ?> + <?= $adherentRole->has('ville') ? h($adherentRole->ville->title) : '' ?> + <?= $this->Form->postLink(__('Delete'), ['controller' => 'AdherentRoles', 'action' => 'delete', $adherentRole->id], ['confirm' => __('Are you sure you want to delete # {0}?', $adherentRole->id)]) ?> + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + <div style="clear: both"></div> + <div class="row"> + <h4><?= __('Notes') ?></h4> + <?= $this->Text->autoParagraph(h($adherent->notes)); ?> + </div> + <div class="related"> + <h4><?= __('Related Services') ?></h4> + <?php if (!empty($adherent->services)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Id') ?></th> + <th><?= __('Service Type') ?></th> + <th><?= __('Service Statut') ?></th> + <th><?= __('Ippublique') ?></th> + <th><?= __('Date Debut') ?></th> + <th><?= __('Date Fin') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + <?php foreach ($adherent->services as $services): ?> + <tr> + <td><?= h($services->title) ?></td> + <td><?= h($services->service_type->title) ?></td> + <td><?= h($services->service_statut->title) ?></td> + <td><?= h($services->ippublique_id) ?></td> + <td><?= h($services->date_debut) ?></td> + <td><?= h($services->date_fin) ?></td> + <td class="actions"> + <?= $this->Html->link(__('View'), ['controller' => 'Services', 'action' => 'view', $services->id]) ?> + <?= $this->Html->link(__('Edit'), ['controller' => 'Services', 'action' => 'edit', $services->id]) ?> + <?php + if ( $services->service_type_id === 1 /* Adhésion */ ) { + switch ($services->service_statut_id) { + case 4: /* Actif CHD */ + echo $this->Form->postLink( + __('Terminate'), ['controller' => 'Services', 'action' => 'terminate', $services->id], + ['confirm' => __('Are you sure you want to terminate # {0}?', $services->id)] + ) . "\n"; + break; + case 6: /* Résilié */ + break; + } + } else /* Internet ... */ { + switch ($services->service_statut_id) { + case 1: /* Prévu */ + echo $this->Form->postLink( + __('Activate'), ['controller' => 'Services', 'action' => 'activate', $services->id], + ['confirm' => __('Are you sure you want to activate # {0}?', $services->id)] + ) . "\n"; + break; + case 2: /* Actif TTN */ + echo $this->Form->postLink( + __('Migrate'), ['controller' => 'Services', 'action' => 'migrate', $services->id], + ['confirm' => __('Are you sure you want to migrate # {0}?', $services->id)] + ) . "\n"; + break; + case 3: /* Migré */ + break; + case 4: /* Actif CHD */ + echo $this->Form->postLink( + __('Suspend'), ['controller' => 'Services', 'action' => 'suspend', $services->id], + ['confirm' => __('Are you sure you want to suspend # {0}?', $services->id)] + ) . "\n"; + echo $this->Form->postLink( + __('Terminate'), ['controller' => 'Services', 'action' => 'terminate', $services->id], + ['confirm' => __('Are you sure you want to terminate # {0}?', $services->id)] + ) . "\n"; + break; + case 5: /* Suspendu */ + echo $this->Form->postLink( + __('Unsuspend'), ['controller' => 'Services', 'action' => 'unsuspend', $services->id], + ['confirm' => __('Are you sure you want to suspend # {0}?', $services->id)] + ) . "\n"; + echo $this->Form->postLink( + __('Terminate'), ['controller' => 'Services', 'action' => 'terminate', $services->id], + ['confirm' => __('Are you sure you want to terminate # {0}?', $services->id)] + ) . "\n"; + break; + case 6: /* Résilié */ + break; + } + } + ?> + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> +</div> diff --git a/generator/after-bake/src/Template/Equipements/index.ctp b/generator/after-bake/src/Template/Equipements/index.ctp new file mode 100644 index 0000000..75d7919 --- /dev/null +++ b/generator/after-bake/src/Template/Equipements/index.ctp @@ -0,0 +1,102 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('New Equipement'), ['action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Ipmgmt'), ['controller' => 'Ipmgmt', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('List Equipement Modeles'), ['controller' => 'EquipementModeles', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Equipement Modele'), ['controller' => 'EquipementModeles', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?></li> + </ul> +</nav> +<div class="equipements index large-10 medium-9 columns content"> + <h3><?= __('Equipements') ?></h3> + <table cellpadding="0" cellspacing="0"> + <?= $this->Form->create(null) . "\n" ?> + <thead> + <tr class="filter"> + <th colspan="3"> + <?= $this->Form->input('q', [ + 'placeholder' => __('Adresse MAC...'), + 'empty' => __('Adresse MAC...') + ]) ?> + </th> + <th colspan="2"> + <?= $this->Form->input('equipement_modele_id', [ + 'placeholder' => __('Equipement Modeles'), + 'empty' => __('Equipement Modeles') + ]) ?> + </th> + <th colspan="2"> + <?= $this->Form->input('relais_id', [ + 'placeholder' => __('Relais'), + 'empty' => __('Relais') + ]) ?> + </th> + <th class="actions"> + <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?> + <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?> + </th> + </tr> + <tr> + <th><?= $this->Paginator->sort('mac') ?></th> + <th><?= $this->Paginator->sort('ipmgmt_id') ?></th> + <th><?= $this->Paginator->sort('equipement_mode_id') ?></th> + <th><?= $this->Paginator->sort('equipement_modele_id') ?></th> + <th><?= $this->Paginator->sort('service_id') ?></th> + <th><?= $this->Paginator->sort('relais_id') ?></th> + <th><?= $this->Paginator->sort('uplink_id') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + </thead> + <?= $this->Form->end() . "\n" ?> + <tbody> + <?php foreach ($equipements as $equipement): ?> + <tr> + <td><?= h($equipement->mac) ?></td> + <td><?= $equipement->has('ipmgmt') ? $this->Html->link($equipement->ipmgmt->title, ['controller' => 'Ipmgmt', 'action' => 'view', $equipement->ipmgmt->id]) : '' ?></td> + <td><?= h($equipement->equipement_mode_id) ?></td> + <td><?= $equipement->has('equipement_modele') ? $this->Html->link($equipement->equipement_modele->title, ['controller' => 'EquipementModeles', 'action' => 'view', $equipement->equipement_modele->id]) : '' ?></td> + <td><?= $equipement->has('service') ? $this->Html->link($equipement->service->title, ['controller' => 'Services', 'action' => 'view', $equipement->service->id]) : '' ?></td> + <td><?= $equipement->has('relais') ? $this->Html->link($equipement->relais->title, ['controller' => 'Relais', 'action' => 'view', $equipement->relais->id]) : '' ?></td> + <td><?= $equipement->has('uplink_id') ? $this->Html->link($equipement->uplink_id, ['controller' => 'Equipements', 'action' => 'view', $equipement->uplink_id]) : '' ?></td> + <td class="actions"> + <?= $this->Html->link(__('View'), ['action' => 'view', $equipement->id]) ?> + <?= $this->Html->link(__('Edit'), ['action' => 'edit', $equipement->id]) ?> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <div class="paginator"> + <ul class="pagination"> + <?= $this->Paginator->prev('< ' . __('previous')) ?> + <?= $this->Paginator->numbers() ?> + <?= $this->Paginator->next(__('next') . ' >') ?> + </ul> + </div> + +</div> diff --git a/generator/after-bake/src/Template/Equipements/view.ctp b/generator/after-bake/src/Template/Equipements/view.ctp new file mode 100644 index 0000000..5f22722 --- /dev/null +++ b/generator/after-bake/src/Template/Equipements/view.ctp @@ -0,0 +1,90 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('Edit Equipement'), ['action' => 'edit', $equipement->id]) ?> </li> + <li><?= $this->Html->link(__('List Equipements'), ['action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Equipement'), ['action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Ipmgmt'), ['controller' => 'Ipmgmt', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Ipmgmt'), ['controller' => 'Ipmgmt', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Equipement Modeles'), ['controller' => 'EquipementModeles', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Equipement Modele'), ['controller' => 'EquipementModeles', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Equipement Modes'), ['controller' => 'EquipementModes', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Equipement Mode'), ['controller' => 'EquipementModes', 'action' => 'add']) ?> </li> + </ul> +</nav> +<div class="equipements view large-10 medium-9 columns content"> + <h3><?= h($equipement->id) ?></h3> + <table class="vertical-table"> + <tr> + <th><?= __('Mac') ?></th> + <td><?= h($equipement->mac) ?></td> + </tr> + <tr> + <th><?= __('Ipmgmt') ?></th> + <td><?= $equipement->has('ipmgmt') ? $this->Html->link($equipement->ipmgmt->title, ['controller' => 'Ipmgmt', 'action' => 'view', $equipement->ipmgmt->id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Equipement Modele') ?></th> + <td><?= $equipement->has('equipement_modele') ? $this->Html->link($equipement->equipement_modele->title, ['controller' => 'EquipementModeles', 'action' => 'view', $equipement->equipement_modele->id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Relais') ?></th> + <td><?= $equipement->has('relais') ? $this->Html->link($equipement->relais->title, ['controller' => 'Relais', 'action' => 'view', $equipement->relais->id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Service') ?></th> + <td><?= $equipement->has('service') ? $this->Html->link($equipement->service->title, ['controller' => 'Services', 'action' => 'view', $equipement->service->id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Uplink') ?></th> + <td><?= $equipement->has('uplink_id') ? $this->Html->link($equipement->uplink_id, ['controller' => 'Equipements', 'action' => 'view', $equipement->uplink_id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Equipement Mode') ?></th> + <td><?= $equipement->has('equipement_mode') ? $this->Html->link($equipement->equipement_mode->id, ['controller' => 'EquipementModes', 'action' => 'view', $equipement->equipement_mode->id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Description') ?></th> + <td><?= h($equipement->description) ?></td> + </tr> + <tr> + <th><?= __('Date Achat') ?></th> + <td><?= h($equipement->date_achat) ?></tr> + </tr> + <tr> + <th><?= __('Date Hs') ?></th> + <td><?= h($equipement->date_hs) ?></tr> + </tr> + </table> + <div class="row"> + <h4><?= __('Notes') ?></h4> + <?= $this->Text->autoParagraph(h($equipement->notes)); ?> + </div> +</div> diff --git a/generator/after-bake/src/Template/Ipmgmt/view.ctp b/generator/after-bake/src/Template/Ipmgmt/view.ctp new file mode 100644 index 0000000..d2d27d4 --- /dev/null +++ b/generator/after-bake/src/Template/Ipmgmt/view.ctp @@ -0,0 +1,80 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('Edit Ipmgmt'), ['action' => 'edit', $ipmgmt->id]) ?> </li> + <li><?= $this->Html->link(__('List Ipmgmt'), ['action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Ipmgmt'), ['action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li> + </ul> +</nav> +<div class="ipmgmt view large-10 medium-9 columns content"> + <h3><?= h($ipmgmt->title) ?></h3> + <table class="vertical-table"> + <tr> + <th><?= __('Ip4') ?></th> + <td><?= h($ipmgmt->ip4) ?></td> + </tr> + <tr> + <th><?= __('Ip6') ?></th> + <td><?= h($ipmgmt->ip6) ?></td> + </tr> + <tr> + <th><?= __('Id') ?></th> + <td><?= $this->Number->format($ipmgmt->id) ?></td> + </tr> + </table> + <div class="related"> + <h4><?= __('Related Equipements') ?></h4> + <?php if (!empty($ipmgmt->equipements)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Mac') ?></th> + <th><?= __('Equipement Modele') ?></th> + <th><?= __('Equipement Mode') ?></th> + <th><?= __('Description') ?></th> + <th><?= __('Date Hs') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> +<!-- FIXME : ne pas prendre toutes les colonnes, rendre configurable ou faire un include d'un autre fichier Template --> + <?php foreach ($ipmgmt->equipements as $equipements): ?> + <tr> + <td><?= h($equipements->mac) ?></td> + <td><?= h($equipements->equipement_modele->title) ?></td> + <td><?= h($equipements->equipement_mode_id) ?></td> + <td><?= h($equipements->description) ?></td> + <td><?= h($equipements->date_hs) ?></td> + <td class="actions"> +<!-- FIXME : ces liens devraient être conditionnels --> + <?= $this->Html->link(__('View'), ['controller' => 'Equipements', 'action' => 'view', $equipements->id]) ?> + + <?= $this->Html->link(__('Edit'), ['controller' => 'Equipements', 'action' => 'edit', $equipements->id]) ?> + + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> +</div> diff --git a/generator/after-bake/src/Template/Ippubliques/index.ctp b/generator/after-bake/src/Template/Ippubliques/index.ctp new file mode 100644 index 0000000..72f9c25 --- /dev/null +++ b/generator/after-bake/src/Template/Ippubliques/index.ctp @@ -0,0 +1,84 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('New Ippublique'), ['action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?></li> + </ul> +</nav> +<div class="ippubliques index large-10 medium-9 columns content"> + <h3><?= __('Ippubliques') ?></h3> + <table cellpadding="0" cellspacing="0"> + <?= $this->Form->create(null) . "\n" ?> + <thead> + <tr class="filter"> + <th colspan="2"> + <?= $this->Form->input('q', [ + 'placeholder' => __('Rechercher...'), + 'empty' => __('Rechercher...') + ]) ?> + </th> + <th colspan="2"> + <?= $this->Form->input('secteur_id', [ + 'placeholder' => __('Secteurs'), + 'empty' => __('Secteurs') + ]) ?> + </th> + <th class="actions"> + <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?> + <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?> + </th> + </tr> + <tr> + <th><?= $this->Paginator->sort('ip4') ?></th> + <th><?= $this->Paginator->sort('ip6') ?></th> + <th><?= $this->Paginator->sort('secteur_id') ?></th> + <th><?= __('Utilisee') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + </thead> + <?= $this->Form->end() . "\n" ?> + <tbody> + <?php foreach ($ippubliques as $ippublique): ?> + <tr> + <td><?= h($ippublique->ip4) ?></td> + <td><?= h($ippublique->ip6) ?></td> + <td><?= $ippublique->has('secteur') ? h($ippublique->secteur->title) : '' ?></td> + <td><?= count($ippublique->services) ? __('oui'): __('non') ?></td> + <td class="actions"> + <?= $this->Html->link(__('View'), ['action' => 'view', $ippublique->ip4]) ?> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <div class="paginator"> + <ul class="pagination"> + <?= $this->Paginator->prev('< ' . __('previous')) ?> + <?= $this->Paginator->numbers() ?> + <?= $this->Paginator->next(__('next') . ' >') ?> + </ul> + </div> + +</div> diff --git a/generator/after-bake/src/Template/Ippubliques/view.ctp b/generator/after-bake/src/Template/Ippubliques/view.ctp new file mode 100644 index 0000000..3082b9e --- /dev/null +++ b/generator/after-bake/src/Template/Ippubliques/view.ctp @@ -0,0 +1,79 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('List Ippubliques'), ['action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('List Services'), ['controller' => 'Services', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Service'), ['controller' => 'Services', 'action' => 'add']) ?> </li> + </ul> +</nav> +<div class="ippubliques view large-10 medium-9 columns content"> + <h3><?= h($ippublique->ip4) ?></h3> + <table class="vertical-table"> + <tr> + <th><?= __('Ip4') ?></th> + <td><?= h($ippublique->ip4) ?></td> + </tr> + <tr> + <th><?= __('Ip6') ?></th> + <td><?= h($ippublique->ip6) ?></td> + </tr> + <tr> + <th><?= __('Secteur') ?></th> + <td><?= $ippublique->secteur->title ?></td> + </tr> + </table> + <div class="related"> + <h4><?= __('Related Services') ?></h4> + <?php if (!empty($ippublique->services)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Service Id') ?></th> + <th><?= __('Adherent') ?></th> + <th><?= __('Service Type') ?></th> + <th><?= __('Service Statut Id') ?></th> + <th><?= __('Date Debut') ?></th> + <th><?= __('Date Fin') ?></th> + <th><?= __('Description') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> +<!-- FIXME : ne pas prendre toutes les colonnes, rendre configurable ou faire un include d'un autre fichier Template --> + <?php foreach ($ippublique->services as $services): ?> + <tr> + <td><?= h($services->title) ?></td> + <td><?= h($services->adherent->title) ?></td> + <td><?= h($services->service_type->title) ?></td> + <td><?= h($services->service_statut->title) ?></td> + <td><?= h($services->date_debut) ?></td> + <td><?= h($services->date_fin) ?></td> + <td><?= h($services->description) ?></td> + <td class="actions"> +<!-- FIXME : ces liens devraient être conditionnels --> + <?= $this->Html->link(__('View'), ['controller' => 'Services', 'action' => 'view', $services->id]) ?> + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> +</div> diff --git a/generator/after-bake/src/Template/Layout/default.ctp b/generator/after-bake/src/Template/Layout/default.ctp new file mode 100644 index 0000000..bcc5f05 --- /dev/null +++ b/generator/after-bake/src/Template/Layout/default.ctp @@ -0,0 +1,79 @@ +<?php +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +/** + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The MIT License + * For full copyright and license information, please see the LICENSE.txt + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project + * @since 0.10.0 + * @license http://www.opensource.org/licenses/mit-license.php MIT License + */ + +$cakeDescription = 'CHD Gestion'; +?> +<!DOCTYPE html> +<html> +<head> + <?= $this->Html->charset() ?> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title> + <?= $cakeDescription ?>: + <?= $this->fetch('title') ?> + </title> + <?= $this->Html->meta('icon') ?> + + <?= $this->Html->css('base.css') ?> + <?= $this->Html->css('cake.css') ?> + <?= $this->Html->css('local.css') ?> + + <?= $this->fetch('meta') ?> + <?= $this->fetch('css') ?> + <?= $this->fetch('script') ?> +</head> +<body> + <nav class="top-bar expanded" data-topbar role="navigation"> + <ul class="title-area large-2 medium-3 columns"> + <li class="name"> + <h1><a href=""><?= $this->fetch('title') ?></a></h1> + </li> + </ul> + <section class="top-bar-section"> + <ul class="right"> + <li><?= $this->Html->link(__('Adherents'),['controller' => 'Adherents', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('Interesses'), ['controller' => 'Interesses', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('Ip'), ['controller' => 'Ippubliques', 'action' => 'index']) ?></li> + </ul> + </section> + </nav> + <?= $this->Flash->render() ?> + <section class="container clearfix"> + <?= $this->fetch('content') ?> + </section> + <footer> + </footer> +</body> +</html> diff --git a/generator/after-bake/src/Template/Relais/view.ctp b/generator/after-bake/src/Template/Relais/view.ctp new file mode 100644 index 0000000..ee6d9af --- /dev/null +++ b/generator/after-bake/src/Template/Relais/view.ctp @@ -0,0 +1,90 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('Edit Relais'), ['action' => 'edit', $relais->id]) ?> </li> + <li><?= $this->Html->link(__('List Relais'), ['action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Relais'), ['action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Villes'), ['controller' => 'Villes', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Ville'), ['controller' => 'Villes', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li> + </ul> +</nav> +<div class="relais view large-10 medium-9 columns content"> + <h3><?= h($relais->title) ?></h3> + <table class="vertical-table"> + <tr> + <th><?= __('Title') ?></th> + <td><?= h($relais->title) ?></td> + </tr> + <tr> + <th><?= __('Secteur') ?></th> + <td><?= $relais->secteur->title ?></td> + </tr> + <tr> + <th><?= __('Ville') ?></th> + <td><?= $relais->has('ville') ? $this->Html->link($relais->ville->title, ['controller' => 'Villes', 'action' => 'view', $relais->ville->id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Id') ?></th> + <td><?= $this->Number->format($relais->id) ?></td> + </tr> + <tr> + <th><?= __('Gps Long') ?></th> + <td><?= $this->Number->format($relais->gps_long) ?></td> + </tr> + <tr> + <th><?= __('Gps Lat') ?></th> + <td><?= $this->Number->format($relais->gps_lat) ?></td> + </tr> + </table> + <div class="related"> + <h4><?= __('Related Equipements') ?></h4> + <?php if (!empty($relais->equipements)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Mac') ?></th> + <th><?= __('Ipmgmt') ?></th> + <th colspan="2"><?= __('Equipement Modele') ?></th> + <th><?= __('Equipement Mode Id') ?></th> + <th><?= __('Equipement Description') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + <?php foreach ($relais->equipements as $equipements): ?> + <tr> + <td><?= h($equipements->mac) ?></td> + <td><?= h($equipements->ipmgmt->title) ?></td> + <td colspan="2"><?= h($equipements->equipement_modele->title) ?></td> + <td><?= h($equipements->equipement_mode_id) ?></td> + <td><?= h($equipements->description) ?></td> + <td class="actions"> + <?= $this->Html->link(__('View'), ['controller' => 'Equipements', 'action' => 'view', $equipements->id]) ?> + <?= $this->Html->link(__('Edit'), ['controller' => 'Equipements', 'action' => 'edit', $equipements->id]) ?> + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> +</div> diff --git a/generator/after-bake/src/Template/Services/add.ctp b/generator/after-bake/src/Template/Services/add.ctp new file mode 100644 index 0000000..141c660 --- /dev/null +++ b/generator/after-bake/src/Template/Services/add.ctp @@ -0,0 +1,48 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('List Services'), ['action' => 'index']) ?></li> + <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?></li> + </ul> +</nav> +<div class="services form large-10 medium-9 columns content"> + <?= $this->Form->create($service) ?> + <fieldset> + <legend><?= __('Add Service') ?></legend> + <?php + echo $this->Form->input('adherent_id', ['options' => $adherents, 'default' => $defaultAdherent]); + echo $this->Form->input('service_type_id', ['options' => $serviceTypes, 'default' => $defaultServiceType]); + //echo $this->Form->input('service_statut_id', ['options' => $serviceStatuts, 'default' => $defaultServiceStatut]); + echo $this->Form->input('description'); + ?> + </fieldset> + <?= $this->Form->button(__('Submit')) ?> + <?= $this->Form->end() ?> +</div> diff --git a/generator/after-bake/src/Template/Services/edit.ctp b/generator/after-bake/src/Template/Services/edit.ctp new file mode 100644 index 0000000..1b8f721 --- /dev/null +++ b/generator/after-bake/src/Template/Services/edit.ctp @@ -0,0 +1,64 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('List Services'), ['action' => 'index']) ?></li> + <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?></li> + </ul> +</nav> +<div class="services form large-10 medium-9 columns content"> + <?= $this->Form->create($service) ?> + <fieldset> + <legend><?= __('Edit Service') ?></legend> + <table class="vertical-table"> + <tr> + <th><?= __('Adherent') ?></th> + <td><?= $service->adherent->title ?></td> + </tr> + <tr> + <th><?= __('Service Type') ?></th> + <td><?= $service->service_type->title ?></td> + </tr> + <tr> + <th><?= __('Ip4publique') ?></th> + <td><?= $service->ippublique_id ?></td> + </tr> + <tr> + <th><?= __('Date Debut') ?></th> + <td><?= h($service->date_debut) ?></tr> + </tr> + </table> + <?php + echo $this->Form->input('description'); + echo $this->Form->input('prix_ht'); + echo $this->Form->input('lat'); + echo $this->Form->input('lng'); + ?> + </fieldset> + <?= $this->Form->button(__('Submit')) ?> + <?= $this->Form->end() ?> +</div> diff --git a/generator/after-bake/src/Template/Services/index.ctp b/generator/after-bake/src/Template/Services/index.ctp new file mode 100644 index 0000000..5bdffc8 --- /dev/null +++ b/generator/after-bake/src/Template/Services/index.ctp @@ -0,0 +1,100 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('New Service'), ['action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?></li> + <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?></li> + <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?></li> + </ul> +</nav> +<div class="services index large-10 medium-9 columns content"> + <h3><?= __('Services') ?></h3> + <table cellpadding="0" cellspacing="0"> + <?= $this->Form->create(null) . "\n" ?> + <thead> + <tr class="filter"> + <th colspan="3"> + <?= $this->Form->input('service_type_id', [ + 'placeholder' => __('Service Type'), + 'empty' => __('Service Type') + ]) ?> + </th> + <th colspan="2"> + <?= $this->Form->input('service_statut_id', [ + 'placeholder' => __('Service Statut'), + 'empty' => __('Service Statut') + ]) ?> + </th> + <th colspan="2"> + <?= $this->Form->input('relais_id', [ + 'placeholder' => __('Relais'), + 'empty' => __('Relais') + ]) ?> + </th> + <th class="actions"> + <?= $this->Form->button('Filter', ['type' => 'submit']) . "\n" ?> + <?= $this->Html->link('Reset', ['action' => 'index']) . "\n" ?> + </th> + </tr> + <tr> + <th colspan="2"><?= $this->Paginator->sort('adherent_id') ?></th> + <th><?= $this->Paginator->sort('service_type_id') ?></th> + <th><?= $this->Paginator->sort('service_statut_id') ?></th> + <th><?= $this->Paginator->sort('ippublique_id') ?></th> + <th><?= $this->Paginator->sort('relais_id') ?></th> + <th><?= $this->Paginator->sort('prix_ht') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + </thead> + <?= $this->Form->end() . "\n" ?> + <tbody> + <?php foreach ($services as $service): ?> + <tr> + <td colspan="2"><?= $service->has('adherent') ? $this->Html->link($service->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $service->adherent->id]) : '' ?></td> + <td><?= $service->has('service_type') ? h($service->service_type->title) : '' ?></td> + <td><?= $service->has('service_statut') ? h($service->service_statut->title) : '' ?></td> + <td><?= $service->has('ippublique') ? $this->Html->link($service->ippublique->ip4, ['controller' => 'Ippubliques', 'action' => 'view', $service->ippublique->ip4]) : '' ?></td> + <td><?= $service->has('relais') ? $this->Html->link($service->relais->title, ['controller' => 'Relais', 'action' => 'view', $service->relais->id]) : '' ?></td> + <td><?= $this->Number->format($service->prix_ht) ?></td> + <td class="actions"> + <?= $this->Html->link(__('View'), ['action' => 'view', $service->id]) ?> + <?= $this->Html->link(__('Edit'), ['action' => 'edit', $service->id]) ?> + </td> + </tr> + <?php endforeach; ?> + </tbody> + </table> + <div class="paginator"> + <ul class="pagination"> + <?= $this->Paginator->prev('< ' . __('previous')) ?> + <?= $this->Paginator->numbers() ?> + <?= $this->Paginator->next(__('next') . ' >') ?> + </ul> + </div> + +</div> diff --git a/generator/after-bake/src/Template/Services/migrate.ctp b/generator/after-bake/src/Template/Services/migrate.ctp new file mode 100644 index 0000000..41c3cd4 --- /dev/null +++ b/generator/after-bake/src/Template/Services/migrate.ctp @@ -0,0 +1,45 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('Edit Service'), ['action' => 'edit', $service->id]) ?> </li> + <li><?= $this->Html->link(__('List Services'), ['action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Service'), ['action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('List Relais'), ['controller' => 'Relais', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Relais'), ['controller' => 'Relais', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li> + </ul> +</nav> +<div class="services view large-10 medium-9 columns content"> + <h3><?= h($service->title) ?></h3> + <pre> +<?php + print_r($service); + print_r($service_new); +?> + </pre> +</div> diff --git a/generator/after-bake/src/Template/Services/view.ctp b/generator/after-bake/src/Template/Services/view.ctp new file mode 100644 index 0000000..7ff07d6 --- /dev/null +++ b/generator/after-bake/src/Template/Services/view.ctp @@ -0,0 +1,117 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('Edit Service'), ['action' => 'edit', $service->id]) ?> </li> + <li><?= $this->Html->link(__('List Services'), ['action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Service'), ['action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Adherents'), ['controller' => 'Adherents', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Adherent'), ['controller' => 'Adherents', 'action' => 'add']) ?> </li> + <li><?= $this->Html->link(__('List Ippubliques'), ['controller' => 'Ippubliques', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('List Equipements'), ['controller' => 'Equipements', 'action' => 'index']) ?> </li> + <li><?= $this->Html->link(__('New Equipement'), ['controller' => 'Equipements', 'action' => 'add']) ?> </li> + </ul> +</nav> +<div class="services view large-10 medium-9 columns content"> + <h3><?= h($service->title) ?></h3> + <table class="vertical-table"> + <tr> + <th><?= __('Adherent') ?></th> + <td><?= $service->has('adherent') ? $this->Html->link($service->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $service->adherent->id]) : '' ?></td> + </tr> + <tr> + <th><?= __('Service Type') ?></th> + <td><?= $service->service_type->title ?></td> + </tr> + <tr> + <th><?= __('Service Statut') ?></th> + <td><?= $service->service_statut->title ?></td> + </tr> + <tr> + <th><?= __('Ippublique') ?></th> + <td><?= $service->has('ippublique') ? $this->Html->link($service->ippublique->title, ['controller' => 'Ippubliques', 'action' => 'view', $service->ippublique->ip4]) : '' ?></td> + </tr> + <tr> + <th><?= __('Description') ?></th> + <td><?= h($service->description) ?></td> + </tr> + <tr> + <th><?= __('Prix Ht') ?></th> + <td><?= $this->Number->format($service->prix_ht) ?></td> + </tr> + <tr> + <th><?= __('Lat') ?></th> + <td><?= $this->Number->format($service->lat) ?></td> + </tr> + <tr> + <th><?= __('Lng') ?></th> + <td><?= $this->Number->format($service->lng) ?></td> + </tr> + <tr> + <th><?= __('Date Debut') ?></th> + <td><?= h($service->date_debut) ?></tr> + </tr> + <tr> + <th><?= __('Date Fin') ?></th> + <td><?= h($service->date_fin) ?></tr> + </tr> + <tr> + <th><?= __('Created') ?></th> + <td><?= h($service->created) ?></tr> + </tr> + <tr> + <th><?= __('Modified') ?></th> + <td><?= h($service->modified) ?></tr> + </tr> + </table> + <div class="related"> + <h4><?= __('Related Equipements') ?></h4> + <?php if (!empty($service->equipements)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Mac') ?></th> + <th><?= __('Ipmgmt') ?></th> + <th><?= __('Equipement Modele') ?></th> + <th><?= __('Equipement Mode Id') ?></th> + <th><?= __('Description') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> +<!-- FIXME : ne pas prendre toutes les colonnes, rendre configurable ou faire un include d'un autre fichier Template --> + <?php foreach ($service->equipements as $equipements): ?> + <tr> + <td><?= h($equipements->mac) ?></td> + <td><?= h($equipements->ipmgmt->title) ?></td> + <td><?= h($equipements->equipement_modele->title) ?></td> + <td><?= h($equipements->equipement_mode_id) ?></td> + <td><?= h($equipements->description) ?></td> + <td class="actions"> +<!-- FIXME : ces liens devraient être conditionnels --> + <?= $this->Html->link(__('View'), ['controller' => 'Equipements', 'action' => 'view', $equipements->id]) ?> + <?= $this->Html->link(__('Edit'), ['controller' => 'Equipements', 'action' => 'edit', $equipements->id]) ?> + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> +</div> diff --git a/generator/after-bake/src/Template/Villes/view.ctp b/generator/after-bake/src/Template/Villes/view.ctp new file mode 100644 index 0000000..ce72cc8 --- /dev/null +++ b/generator/after-bake/src/Template/Villes/view.ctp @@ -0,0 +1,130 @@ +<% +/** + * Copyright 2016 Ludovic Pouzenc <ludovic@pouzenc.fr> + * Copyright 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> + * + * This file is part of CHD Gestion. + * + * CHD Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CHD Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. +**/ +%> +<nav class="large-2 medium-3 columns" id="actions-sidebar"> + <ul class="side-nav"> + <li class="heading"><?= __('Actions') ?></li> + <li><?= $this->Html->link(__('Edit Ville'), ['action' => 'edit', $ville->id]) ?> </li> + <li><?= $this->Html->link(__('List Villes'), ['action' => 'index']) ?> </li> + </ul> +</nav> +<div class="villes view large-10 medium-9 columns content"> + <h3><?= h($ville->title) ?></h3> + <table class="vertical-table"> + <tr> + <th><?= __('Title') ?></th> + <td><?= h($ville->title) ?></td> + </tr> + <tr> + <th><?= __('Cp') ?></th> + <td><?= h($ville->cp) ?></td> + </tr> + <tr> + <th><?= __('Tel Contact') ?></th> + <td><?= h($ville->tel_contact) ?></td> + </tr> + </table> + <div class="related"> + <h4><?= __('Related Relais') ?></h4> + <?php if (!empty($ville->relais)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Id') ?></th> + <th><?= __('Title') ?></th> + <th><?= __('Secteur Id') ?></th> + <th><?= __('Ville Id') ?></th> + <th><?= __('Gps Long') ?></th> + <th><?= __('Gps Lat') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + <?php foreach ($ville->relais as $relais): ?> + <tr> + <td><?= h($relais->id) ?></td> + <td><?= h($relais->title) ?></td> + <td><?= h($relais->secteur_id) ?></td> + <td><?= h($relais->ville_id) ?></td> + <td><?= h($relais->gps_long) ?></td> + <td><?= h($relais->gps_lat) ?></td> + <td class="actions"> + <?= $this->Html->link(__('View'), ['controller' => 'Relais', 'action' => 'view', $relais->id]) ?> + <?= $this->Html->link(__('Edit'), ['controller' => 'Relais', 'action' => 'edit', $relais->id]) ?> + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> + <div class="related"> + <h4><?= __('Related Adherent Roles') ?></h4> + <?php if (!empty($ville->adherent_roles)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Adherent') ?></th> + <th><?= __('Adherent role') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + <?php foreach ($ville->adherent_roles as $adherentRole): ?> + <tr> + <td><?= $adherentRole->has('adherent') ? $this->Html->link($adherentRole->adherent->title, ['controller' => 'Adherents', 'action' => 'view', $adherentRole->adherent->id]) : '' ?></td> + <td><?= $adherentRole->has('adherent_role_type') ? $this->Html->link($adherentRole->adherent_role_type->title, ['controller' => 'AdherentRoleTypes', 'action' => 'view', $adherentRole->adherent_role_type->id]) : '' ?></td> + <td class="actions"> + <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $adherentRole->id], ['confirm' => __('Are you sure you want to delete # {0}?', $adherentRole->id)]) ?> + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> + <div class="related"> + <h4><?= __('Related Attente Connexions') ?></h4> + <?php if (!empty($ville->attente_connexions)): ?> + <table cellpadding="0" cellspacing="0"> + <tr> + <th><?= __('Date Demande') ?></th> + <th><?= __('Nom') ?></th> + <th><?= __('Prenom') ?></th> + <th><?= __('Raison') ?></th> + <th><?= __('Telephone') ?></th> + <th><?= __('Mail') ?></th> + <th><?= __('Adresse1') ?></th> + <th><?= __('Notes') ?></th> + <th class="actions"><?= __('Actions') ?></th> + </tr> + <?php foreach ($ville->attente_connexions as $attenteConnexions): ?> + <tr> + <td><?= h($attenteConnexions->date_demande) ?></td> + <td><?= h($attenteConnexions->nom) ?></td> + <td><?= h($attenteConnexions->prenom) ?></td> + <td><?= h($attenteConnexions->raison) ?></td> + <td><?= h($attenteConnexions->telephone) ?></td> + <td><?= h($attenteConnexions->mail) ?></td> + <td><?= h($attenteConnexions->adresse1) ?></td> + <td><?= h($attenteConnexions->notes) ?></td> + <td class="actions"> + <?= $this->Html->link(__('View'), ['controller' => 'AttenteConnexions', 'action' => 'view', $attenteConnexions->id]) ?> + <?= $this->Html->link(__('Edit'), ['controller' => 'AttenteConnexions', 'action' => 'edit', $attenteConnexions->id]) ?> + </td> + </tr> + <?php endforeach; ?> + </table> + <?php endif; ?> + </div> +</div> |