diff options
Diffstat (limited to 'generator/after-bake/src/Template/Services')
-rw-r--r-- | generator/after-bake/src/Template/Services/add.ctp | 48 | ||||
-rw-r--r-- | generator/after-bake/src/Template/Services/edit.ctp | 64 | ||||
-rw-r--r-- | generator/after-bake/src/Template/Services/index.ctp | 100 | ||||
-rw-r--r-- | generator/after-bake/src/Template/Services/migrate.ctp | 45 | ||||
-rw-r--r-- | generator/after-bake/src/Template/Services/view.ctp | 117 |
5 files changed, 374 insertions, 0 deletions
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> |