cmc-sales/app/views/industries/index.ctp
2013-03-23 16:25:52 +11:00

39 lines
872 B
PHP
Executable file

<div class="industries index">
<h2><?php __('Industries');?></h2>
<?php echo $this->element('tipbox', array('tip' => "<p>Click on the green plus symbol to add new sub-Industries</p>"));
?>
<div class="actions">
<?php
echo $html->link('Add new Industry', array('action'=>'add')); ?>
</div>
<div class="categorylist">
<?
foreach ($parents as $parent):
echo "<h3>".$html->link($parent['name'], array('action'=>'view', $parent['id'])).
$html->link(
$html->image("edit_add.png"),
array('action'=>'add', 'parentid:'.$parent['id']), array('escape'=>false))."</h3>";
echo "<ul>";
foreach ($industries as $industry) {
if($industry['Industry']['parent_id'] == $parent['id']) {
echo "<li>".$html->link($industry['Industry']['name'], array('action'=>'view', $industry['Industry']['id']))."</li>";
}
}
echo "</ul>";
endforeach;
?>
</div>
</div>