99 lines
3.8 KiB
PHP
Executable file
99 lines
3.8 KiB
PHP
Executable file
<div class="states view">
|
|
<h2><?php __('State');?></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 $state['State']['id']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $state['State']['name']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Shortform'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $state['State']['shortform']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Enqform'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $state['State']['enqform']; ?>
|
|
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('Edit State', true), array('action'=>'edit', $state['State']['id'])); ?> </li>
|
|
<li><?php echo $html->link(__('Delete State', true), array('action'=>'delete', $state['State']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $state['State']['id'])); ?> </li>
|
|
<li><?php echo $html->link(__('List States', true), array('action'=>'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New State', true), array('action'=>'add')); ?> </li>
|
|
<li><?php echo $html->link(__('List Addresses', true), array('controller'=> 'addresses', 'action'=>'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New Address', true), array('controller'=> 'addresses', '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>
|
|
</ul>
|
|
</div>
|
|
<div class="related">
|
|
<h3><?php __('Related Addresses');?></h3>
|
|
<?php if (!empty($state['Address'])):?>
|
|
<table cellpadding = "0" cellspacing = "0">
|
|
<tr>
|
|
<th><?php __('Id'); ?></th>
|
|
<th><?php __('Address1'); ?></th>
|
|
<th><?php __('City'); ?></th>
|
|
<th><?php __('State Id'); ?></th>
|
|
<th><?php __('Country Id'); ?></th>
|
|
<th><?php __('Customer Id'); ?></th>
|
|
<th><?php __('Type'); ?></th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
<?php
|
|
$i = 0;
|
|
foreach ($state['Address'] as $address):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
<td><?php echo $address['id'];?></td>
|
|
<td><?php echo $address['address1'];?></td>
|
|
<td><?php echo $address['city'];?></td>
|
|
<td><?php echo $address['state_id'];?></td>
|
|
<td><?php echo $address['country_id'];?></td>
|
|
<td><?php echo $address['customer_id'];?></td>
|
|
<td><?php echo $address['type'];?></td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('controller'=> 'addresses', 'action'=>'view', $address['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('controller'=> 'addresses', 'action'=>'edit', $address['id'])); ?>
|
|
<?php echo $html->link(__('Delete', true), array('controller'=> 'addresses', 'action'=>'delete', $address['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $address['id'])); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New Address', true), array('controller'=> 'addresses', 'action'=>'add'));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="related">
|
|
<h3><?php __('Related Enquiries');?></h3>
|
|
<?php if (!empty($state['Enquiry'])) {
|
|
echo $this->element('enquiry_table', $enquiries);
|
|
}
|
|
else {
|
|
echo "No Enquiries from this State";
|
|
}
|
|
?>
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New Enquiry', true), array('controller'=> 'enquiries', 'action'=>'add'));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|