cmc-sales/views/issues/index.ctp
2010-01-10 11:05:04 -07:00

80 lines
2.9 KiB
PHP

<div class="issues index">
<h2><?php __('Open Issues');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
<th><?php echo $paginator->sort('ID');?></th>
<th><?php echo $paginator->sort('created');?></th>
<th><?php echo $paginator->sort('Created By');?></th>
<th><?php echo $paginator->sort('title');?></th>
<th><?php echo $paginator->sort('description');?></th>
<th><?php echo $paginator->sort('priority');?></th>
<th><?php echo $paginator->sort('resolved');?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($issues as $issue):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td>
<?php echo $html->link(__($issue['Issue']['id'], true), array('action' => 'view', $issue['Issue']['id'])); ?>
</td>
<td>
<?php echo $time->niceShort($issue['Issue']['created']);
echo " (".$time->timeAgoInWords($issue['Issue']['created']).")"; ?>
</td>
<td>
<?php echo $html->link($issue['User']['username'], array('controller' => 'users', 'action' => 'view', $issue['User']['id'])); ?>
</td>
<td>
<?php echo $issue['Issue']['title']; ?>
</td>
<td>
<?php echo $issue['Issue']['description']; ?>
</td>
<td>
<?php echo $issuePriorities[$issue['Issue']['priority']]; ?>
</td>
<td>
<?php echo $issue['Issue']['resolved']; ?>
</td>
<td class="actions">
<?php echo $html->link(__('View', true), array('action' => 'view', $issue['Issue']['id'])); ?>
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $issue['Issue']['id'])); ?>
<?php echo $html->link(__('Delete', true), array('action' => 'delete', $issue['Issue']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $issue['Issue']['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
| <?php echo $paginator->numbers();?>
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
<div class="actions">
<ul>
<li><?php echo $html->link(__('New Issue', 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>
<li><?php echo $html->link(__('List Issue Actions', true), array('controller' => 'issue_actions', 'action' => 'index')); ?> </li>
<li><?php echo $html->link(__('New Issue Action', true), array('controller' => 'issue_actions', 'action' => 'add')); ?> </li>
</ul>
</div>