diff options
Diffstat (limited to 'generator/after-bake/src')
3 files changed, 8 insertions, 10 deletions
diff --git a/generator/after-bake/src/Controller/EquipementsController.php b/generator/after-bake/src/Controller/EquipementsController.php index ffc6060..7bc423a 100644 --- a/generator/after-bake/src/Controller/EquipementsController.php +++ b/generator/after-bake/src/Controller/EquipementsController.php @@ -126,7 +126,7 @@ class EquipementsController extends AppController $this->Flash->error(__('The equipement could not be saved. Please, try again.')); } } - $equipements = $this->Equipements->Equipements->find('list'); + $equipements = $this->Equipements->Equipements->find('list', array('order' => array('mac' => 'asc'))); $services = $this->Equipements->Services->find('list'); $ipmgmt = $this->Equipements->Ipmgmt->find('list'); $equipementModeles = $this->Equipements->EquipementModeles->find('list'); diff --git a/generator/after-bake/src/Template/Equipements/index.ctp b/generator/after-bake/src/Template/Equipements/index.ctp index e6fce69..d1a294a 100644 --- a/generator/after-bake/src/Template/Equipements/index.ctp +++ b/generator/after-bake/src/Template/Equipements/index.ctp @@ -23,8 +23,6 @@ <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> @@ -63,8 +61,8 @@ </tr> <tr> <th><?= $this->Paginator->sort('mac') ?></th> + <th><?= $this->Paginator->sort('hostname') ?></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> @@ -77,8 +75,8 @@ <?php foreach ($equipements as $equipement): ?> <tr> <td><?= h($equipement->mac) ?></td> + <td><?= h($equipement->hostname) ?></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> diff --git a/generator/after-bake/src/Template/Equipements/view.ctp b/generator/after-bake/src/Template/Equipements/view.ctp index 99d6542..9a0f167 100644 --- a/generator/after-bake/src/Template/Equipements/view.ctp +++ b/generator/after-bake/src/Template/Equipements/view.ctp @@ -31,22 +31,22 @@ <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> + <h3><?= h($equipement->title) ?></h3> <table class="vertical-table"> <tr> <th><?= __('Mac') ?></th> <td><?= h($equipement->mac) ?></td> </tr> <tr> + <th><?= __('Hostname') ?></th> + <td><?= h($equipement->hostname) ?></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> |