<div class="principles index">
<h2><?php __('Principles');?></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('name');?></th>
	<th>Short Name</th>
	<th><?php echo $paginator->sort('code');?></th>
	<th><?php echo $paginator->sort('country_id');?></th>
	<th><?php echo $paginator->sort('currency_id');?></th>
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($principles as $principle):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		
		<td>
			<?php echo $principle['Principle']['name']; ?>
		</td>
		<td>
			<?php echo $principle['Principle']['short_name'];?>
		</td>
		<td>
			<?php echo $principle['Principle']['code']; ?>
		</td>
		<td>
			<?php echo $html->link($principle['Country']['name'], array('controller'=> 'countries', 'action'=>'view', $principle['Country']['id'])); ?>
		</td>
		<td>
			<?php echo $html->link($principle['Currency']['name'], array('controller'=> 'currencies', 'action'=>'view', $principle['Currency']['id'])); ?>
		</td>
		<td class="actions">
			<?php echo $html->link(__('View', true), array('action'=>'view', $principle['Principle']['id'])); ?>
			<?php echo $html->link(__('Edit', true), array('action'=>'edit', $principle['Principle']['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 Principle', 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 Currencies', true), array('controller'=> 'currencies', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Currency', true), array('controller'=> 'currencies', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Enquiries', true), array('controller'=> 'enquiries', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Enquiry', true), array('controller'=> 'enquiries', '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>
