cmc-sales/views/product_options/index.ctp

63 lines
2.4 KiB
Plaintext
Raw Normal View History

<div class="productOptions index">
<h2><?php __('ProductOptions');?></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('product_id');?></th>
<th><?php echo $paginator->sort('title');?></th>
<th><?php echo $paginator->sort('description');?></th>
<th><?php echo $paginator->sort('cost_price');?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($productOptions as $productOption):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td>
<?php echo $productOption['ProductOption']['id']; ?>
</td>
<td>
<?php echo $html->link($productOption['Product']['title'], array('controller'=> 'products', 'action'=>'view', $productOption['Product']['id'])); ?>
</td>
<td>
<?php echo $productOption['ProductOption']['title']; ?>
</td>
<td>
<?php echo $productOption['ProductOption']['description']; ?>
</td>
<td>
<?php echo $productOption['ProductOption']['cost_price']; ?>
</td>
<td class="actions">
<?php echo $html->link(__('View', true), array('action'=>'view', $productOption['ProductOption']['id'])); ?>
<?php echo $html->link(__('Edit', true), array('action'=>'edit', $productOption['ProductOption']['id'])); ?>
<?php echo $html->link(__('Delete', true), array('action'=>'delete', $productOption['ProductOption']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $productOption['ProductOption']['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 ProductOption', true), array('action'=>'add')); ?></li>
<li><?php echo $html->link(__('List Products', true), array('controller'=> 'products', 'action'=>'index')); ?> </li>
<li><?php echo $html->link(__('New Product', true), array('controller'=> 'products', 'action'=>'add')); ?> </li>
</ul>
</div>