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/Adherents/view.ctp | |
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/Adherents/view.ctp')
-rw-r--r-- | generator/after-bake/src/Template/Adherents/view.ctp | 235 |
1 files changed, 235 insertions, 0 deletions
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> |