Skip to content

Instantly share code, notes, and snippets.

@housni
Created February 12, 2012 16:43
Show Gist options
  • Save housni/1809582 to your computer and use it in GitHub Desktop.
Save housni/1809582 to your computer and use it in GitHub Desktop.
Ltihium view
<?php $this->title('Listing Departments'); ?>
<h2>Listing Departments</h2>
<?php if (empty($departments)): ?>
<p>Sorry, there are no Departments to display.</p>
<?php else: ?>
<table>
<tr>
<th style="width: 75%;">Title</th>
<th colspan="3">Actions</th>
</tr>
<?php foreach ($departments as $department): ?>
<tr>
<td><strong><?= $department->title; ?></strong></td>
<td><?= $this->html->link('Show', array('Departments::view', 'id' => $department->id)); ?></td>
<td><?= $this->html->link('Edit', array('Departments::edit', 'id' => $department->id)); ?></td>
<td class="delete-button">
<?= $this->form->create($department, array(
'url' => array('Departments::delete', 'id' => $department->id),
'method' => 'delete'
)); ?>
<?= $this->security->requestToken(); ?>
<?= $this->form->submit('Delete'); ?>
<?= $this->form->end(); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?= $this->html->link('New Department', 'Departments::add'); ?> |
<?= $this->html->link('Search', 'Departments::search'); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment