cmc-sales/views/countries/view.ctp

183 lines
7.4 KiB
PHP
Executable file

<div class="countries view">
<h2><?php __('Country');?></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 $country['Country']['id']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $country['Country']['name']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Currency'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $html->link($country['Currency']['name'], array('controller'=> 'currencies', 'action'=>'view', $country['Currency']['id'])); ?>
&nbsp;
</dd>
</dl>
</div>
<div class="actions">
<ul>
<li><?php echo $html->link(__('Edit Country', true), array('action'=>'edit', $country['Country']['id'])); ?> </li>
<li><?php echo $html->link(__('Delete Country', true), array('action'=>'delete', $country['Country']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $country['Country']['id'])); ?> </li>
<li><?php echo $html->link(__('List Countries', true), array('action'=>'index')); ?> </li>
<li><?php echo $html->link(__('New Country', true), array('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 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>
<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>
</ul>
</div>
<div class="related">
<h3><?php __('Related Addresses');?></h3>
<?php if (!empty($country['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 ($country['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($country['Enquiry'])):?>
<table cellpadding = "0" cellspacing = "0">
<tr>
<th><?php __('Id'); ?></th>
<th><?php __('Title'); ?></th>
<th><?php __('User Id'); ?></th>
<th><?php __('Customer Id'); ?></th>
<th><?php __('Contact Id'); ?></th>
<th><?php __('State Id'); ?></th>
<th><?php __('Country Id'); ?></th>
<th><?php __('Principle Id'); ?></th>
<th><?php __('Status Id'); ?></th>
<th><?php __('Comments'); ?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($country['Enquiry'] as $enquiry):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $enquiry['id'];?></td>
<td><?php echo $enquiry['title'];?></td>
<td><?php echo $enquiry['user_id'];?></td>
<td><?php echo $enquiry['customer_id'];?></td>
<td><?php echo $enquiry['contact_id'];?></td>
<td><?php echo $enquiry['state_id'];?></td>
<td><?php echo $enquiry['country_id'];?></td>
<td><?php echo $enquiry['principle_id'];?></td>
<td><?php echo $enquiry['status_id'];?></td>
<td><?php echo $enquiry['comments'];?></td>
<td class="actions">
<?php echo $html->link(__('View', true), array('controller'=> 'enquiries', 'action'=>'view', $enquiry['id'])); ?>
<?php echo $html->link(__('Edit', true), array('controller'=> 'enquiries', 'action'=>'edit', $enquiry['id'])); ?>
<?php echo $html->link(__('Delete', true), array('controller'=> 'enquiries', 'action'=>'delete', $enquiry['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $enquiry['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<div class="actions">
<ul>
<li><?php echo $html->link(__('New Enquiry', true), array('controller'=> 'enquiries', 'action'=>'add'));?> </li>
</ul>
</div>
</div>
<div class="related">
<h3><?php __('Related Principles');?></h3>
<?php if (!empty($country['Principle'])):?>
<table cellpadding = "0" cellspacing = "0">
<tr>
<th><?php __('Id'); ?></th>
<th><?php __('Name'); ?></th>
<th><?php __('Code'); ?></th>
<th><?php __('Address1'); ?></th>
<th><?php __('City'); ?></th>
<th><?php __('State'); ?></th>
<th><?php __('Country Id'); ?></th>
<th><?php __('Currency Id'); ?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($country['Principle'] as $principle):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $principle['id'];?></td>
<td><?php echo $principle['name'];?></td>
<td><?php echo $principle['code'];?></td>
<td><?php echo $principle['address1'];?></td>
<td><?php echo $principle['city'];?></td>
<td><?php echo $principle['state'];?></td>
<td><?php echo $principle['country_id'];?></td>
<td><?php echo $principle['currency_id'];?></td>
<td class="actions">
<?php echo $html->link(__('View', true), array('controller'=> 'principles', 'action'=>'view', $principle['id'])); ?>
<?php echo $html->link(__('Edit', true), array('controller'=> 'principles', 'action'=>'edit', $principle['id'])); ?>
<?php echo $html->link(__('Delete', true), array('controller'=> 'principles', 'action'=>'delete', $principle['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $principle['id'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<div class="actions">
<ul>
<li><?php echo $html->link(__('New Principle', true), array('controller'=> 'principles', 'action'=>'add'));?> </li>
</ul>
</div>
</div>