diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-05-22 12:55:32 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-05-22 12:55:32 +0200 |
commit | e30d47f18c0b0c23dbbf15dfae5fabbbc96b3e4d (patch) | |
tree | 05c46738c12b3466e6668dce101d2732fe4aabf4 /generator/after-bake/src/Template/Equipements/index.ctp | |
parent | 55d84eea0f815156b2227b7c72dd7c073c018682 (diff) | |
download | chd_gestion-e30d47f18c0b0c23dbbf15dfae5fabbbc96b3e4d.zip chd_gestion-e30d47f18c0b0c23dbbf15dfae5fabbbc96b3e4d.tar.gz chd_gestion-e30d47f18c0b0c23dbbf15dfae5fabbbc96b3e4d.tar.bz2 |
Equipements : make MAC adress breakable at OUI vendor
Diffstat (limited to 'generator/after-bake/src/Template/Equipements/index.ctp')
-rw-r--r-- | generator/after-bake/src/Template/Equipements/index.ctp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/generator/after-bake/src/Template/Equipements/index.ctp b/generator/after-bake/src/Template/Equipements/index.ctp index 912ba78..87f2548 100644 --- a/generator/after-bake/src/Template/Equipements/index.ctp +++ b/generator/after-bake/src/Template/Equipements/index.ctp @@ -38,8 +38,8 @@ <tr class="filter"> <th colspan="3"> <?= $this->Form->input('q', [ - 'placeholder' => __('MAC, IPv4, Nom...'), - 'empty' => __('MAC, IPv4, Nom...') + 'placeholder' => __('MAC, IPv4, Hostname...'), + 'empty' => __('MAC, IPv4, Hostname...') ]) ?> </th> <th colspan="2"> @@ -61,11 +61,11 @@ </tr> <tr> <th><?= $this->Paginator->sort('mac') ?></th> - <th><?= $this->Paginator->sort('ipmgmt_id') ?></th> <th colspan="2"><?= $this->Paginator->sort('hostname') ?></th> <th><?= $this->Paginator->sort('equipement_modele_id') ?></th> - <th><?= $this->Paginator->sort('relais_id') ?></th> <th><?= $this->Paginator->sort('uplink_id') ?></th> + <th><?= $this->Paginator->sort('relais_id') ?></th> + <th><?= $this->Paginator->sort('ipmgmt_id') ?></th> <th class="actions"><?= __('Actions') ?></th> </tr> </thead> @@ -73,7 +73,11 @@ <tbody> <?php foreach ($equipements as $equipement): ?> <tr> - <td><?= h($equipement->mac) ?></td> + <td><?= preg_replace('/^(..:..:..):(..:..:..)$/', '$1:<wbr>$2', h($equipement->mac)) ?></td> + <td colspan="2"><?= h($equipement->hostname) ?></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('uplink_id') ? $this->Html->link($equipement->uplink_id, ['controller' => 'Equipements', 'action' => 'view', $equipement->uplink_id]) : '' ?></td> + <td><?= $equipement->has('relais') ? $this->Html->link($equipement->relais->title, ['controller' => 'Relais', 'action' => 'view', $equipement->relais->id]) : '' ?></td> <td><?= $equipement->has('ipmgmt') ? $this->Html->link( $equipement->ipmgmt->ip4, @@ -82,10 +86,6 @@ ) : '' ?> </td> - <td colspan="2"><?= h($equipement->hostname) ?></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('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]) ?> |