121 lines
4.4 KiB
PHP
121 lines
4.4 KiB
PHP
<div class="industries view">
|
|
<h2><?php
|
|
|
|
if($industry['ParentIndustry']['name']) {
|
|
|
|
__('Industry: '.$html->link($industry['ParentIndustry']['name'], array('controller'=> 'industries', 'action'=>'view', $industry['ParentIndustry']['id']))
|
|
.': '.$industry['Industry']['name']); }
|
|
else {
|
|
|
|
__('Industry: '.$industry['Industry']['name']);
|
|
}
|
|
|
|
?></h2>
|
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $industry['Industry']['name']; ?>
|
|
|
|
</dd>
|
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Parent Industry'); ?></dt>
|
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
|
<?php echo $html->link($industry['ParentIndustry']['name'], array('controller'=> 'industries', 'action'=>'view', $industry['ParentIndustry']['id'])); ?>
|
|
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('Edit Industry', true), array('action'=>'edit', $industry['Industry']['id'])); ?> </li>
|
|
<li><?php echo $html->link(__('Delete Industry', true), array('action'=>'delete', $industry['Industry']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $industry['Industry']['id'])); ?> </li>
|
|
<li><?php echo $html->link(__('List Industries', true), array('action'=>'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New Industry', true), array('action'=>'add')); ?> </li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div class="related">
|
|
<h3><?php __('Sub-Industries');?></h3>
|
|
<?php if (!empty($industry['subIndustry'])):?>
|
|
<table cellpadding = "0" cellspacing = "0">
|
|
<tr>
|
|
<th><?php __('Name'); ?></th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
<?php
|
|
$i = 0;
|
|
foreach ($industry['subIndustry'] as $subIndustry):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
<td><?php echo $subIndustry['name'];?></td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('controller'=> 'industries', 'action'=>'view', $subIndustry['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('controller'=> 'industries', 'action'=>'edit', $subIndustry['id'])); ?>
|
|
<?php echo $html->link(__('Delete', true), array('controller'=> 'industries', 'action'=>'delete', $subIndustry['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $subIndustry['id'])); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New Sub Industry', true), array('controller'=> 'industries', 'action'=>'add'));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="related">
|
|
<h3><?php __('Related Customers');?></h3>
|
|
<?php if (!empty($industry['Customer'])):?>
|
|
<table cellpadding = "0" cellspacing = "0">
|
|
<tr>
|
|
<th><?php __('Id'); ?></th>
|
|
<th><?php __('Name'); ?></th>
|
|
<th><?php __('Abn'); ?></th>
|
|
<th><?php __('Created'); ?></th>
|
|
<th><?php __('Notes'); ?></th>
|
|
<th><?php __('Payment Terms'); ?></th>
|
|
<th><?php __('Discount Pricing Policies'); ?></th>
|
|
<th><?php __('Customer Category Id'); ?></th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
<?php
|
|
$i = 0;
|
|
foreach ($industry['Customer'] as $customer):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
<td><?php echo $customer['id'];?></td>
|
|
<td><?php echo $customer['name'];?></td>
|
|
<td><?php echo $customer['abn'];?></td>
|
|
<td><?php echo $customer['created'];?></td>
|
|
<td><?php echo $customer['notes'];?></td>
|
|
<td><?php echo $customer['payment_terms'];?></td>
|
|
<td><?php echo $customer['discount_pricing_policies'];?></td>
|
|
<td><?php echo $customer['customer_category_id'];?></td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('controller'=> 'customers', 'action'=>'view', $customer['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('controller'=> 'customers', 'action'=>'edit', $customer['id'])); ?>
|
|
<?php echo $html->link(__('Delete', true), array('controller'=> 'customers', 'action'=>'delete', $customer['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $customer['id'])); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New Customer', true), array('controller'=> 'customers', 'action'=>'add'));?> </li>
|
|
</ul>
|
|
</div>
|
|
</div>
|