74 lines
2.8 KiB
PHP
Executable file
74 lines
2.8 KiB
PHP
Executable file
<div class="groups view">
|
|
<h2><?php __('Group');?></h2>
|
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $group['Group']['id']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $group['Group']['name']; ?>
|
|
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('Edit Group', true), array('action'=>'edit', $group['Group']['id'])); ?> </li>
|
|
<li><?php echo $html->link(__('Delete Group', true), array('action'=>'delete', $group['Group']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $group['Group']['id'])); ?> </li>
|
|
<li><?php echo $html->link(__('List Groups', true), array('action'=>'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New Group', true), array('action'=>'add')); ?> </li>
|
|
<li><?php echo $html->link(__('List Users', true), array('controller'=> 'users', 'action'=>'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New User', true), array('controller'=> 'users', 'action'=>'add')); ?> </li>
|
|
</ul>
|
|
</div>
|
|
<div class="related">
|
|
<h3><?php __('Related Users');?></h3>
|
|
<?php if (!empty($group['User'])):?>
|
|
<table cellpadding = "0" cellspacing = "0">
|
|
<tr>
|
|
<th><?php __('Id'); ?></th>
|
|
<th><?php __('Username'); ?></th>
|
|
<th><?php __('Password'); ?></th>
|
|
<th><?php __('First Name'); ?></th>
|
|
<th><?php __('Last Name'); ?></th>
|
|
<th><?php __('Email'); ?></th>
|
|
<th><?php __('Job Title'); ?></th>
|
|
<th><?php __('Group Id'); ?></th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
<?php
|
|
$i = 0;
|
|
foreach ($group['User'] as $user):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
<td><?php echo $user['id'];?></td>
|
|
<td><?php echo $user['username'];?></td>
|
|
<td><?php echo $user['password'];?></td>
|
|
<td><?php echo $user['first_name'];?></td>
|
|
<td><?php echo $user['last_name'];?></td>
|
|
<td><?php echo $user['email'];?></td>
|
|
<td><?php echo $user['job_title'];?></td>
|
|
<td><?php echo $user['group_id'];?></td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('controller'=> 'users', 'action'=>'view', $user['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('controller'=> 'users', 'action'=>'edit', $user['id'])); ?>
|
|
<?php echo $html->link(__('Delete', true), array('controller'=> 'users', 'action'=>'delete', $user['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $user['id'])); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New User', true), array('controller'=> 'users', 'action'=>'add'));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|