cmc-sales/views/currencies/index.ctp

63 lines
2.5 KiB
PHP
Executable file

<div class="currencies index">
<h2><?php __('Currencies');?></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('name');?></th>
<th><?php echo $paginator->sort('symbol');?></th>
<th><?php echo $paginator->sort('iso4217');?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($currencies as $currency):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td>
<?php echo $currency['Currency']['id']; ?>
</td>
<td>
<?php echo $currency['Currency']['name']; ?>
</td>
<td>
<?php echo $currency['Currency']['symbol']; ?>
</td>
<td>
<?php echo $currency['Currency']['iso4217']; ?>
</td>
<td class="actions">
<?php echo $html->link(__('View', true), array('action'=>'view', $currency['Currency']['id'])); ?>
<?php echo $html->link(__('Edit', true), array('action'=>'edit', $currency['Currency']['id'])); ?>
<?php echo $html->link(__('Delete', true), array('action'=>'delete', $currency['Currency']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $currency['Currency']['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 Currency', true), array('action'=>'add')); ?></li>
<li><?php echo $html->link(__('List Countries', true), array('controller'=> 'countries', 'action'=>'index')); ?> </li>
<li><?php echo $html->link(__('New Country', true), array('controller'=> 'countries', 'action'=>'add')); ?> </li>
<li><?php echo $html->link(__('List Principles', true), array('controller'=> 'principles', 'action'=>'index')); ?> </li>
<li><?php echo $html->link(__('New Principle', true), array('controller'=> 'principles', 'action'=>'add')); ?> </li>
<li><?php echo $html->link(__('List Quoted Products', true), array('controller'=> 'quoted_products', 'action'=>'index')); ?> </li>
<li><?php echo $html->link(__('New Quoted Product', true), array('controller'=> 'quoted_products', 'action'=>'add')); ?> </li>
</ul>
</div>