cmc-sales/views/products/view.ctp

119 lines
3.7 KiB
Plaintext
Raw Normal View History

2010-05-30 22:54:44 -07:00
<?php echo $javascript->link('costing_dialog'); ?>
<div class="products view">
<h2><?php __('Product: '.$product['Product']['title']);?></h2>
<dl><?php $i = 0; $class = ' class="altrow"';?>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Principle'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $html->link($product['Principle']['name'], array('controller'=> 'principles', 'action'=>'view', $product['Principle']['id'])); ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Title'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $product['Product']['title']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Description'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $product['Product']['description']; ?>
&nbsp;
</dd>
2011-11-13 18:40:06 -08:00
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Item Code'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
2011-11-13 18:40:06 -08:00
<?php echo $product['Product']['item_code']; ?>
&nbsp;
</dd>
2011-11-13 18:40:06 -08:00
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Item Decription'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
2011-11-13 18:40:06 -08:00
<?php echo $product['Product']['item_description']; ?>
&nbsp;
</dd>
2011-11-13 18:40:06 -08:00
</dl>
</div>
2009-04-23 18:21:22 -07:00
<div class="actions">
<ul>
<li><?php echo $html->link(__('Edit Product', true), array('action'=>'edit', $product['Product']['id'])); ?> </li>
<li><?php echo $html->link(__('Add Costing', true), array('controller'=>'costings', 'action'=>'add/productid:'.$product['Product']['id']));?></li>
2010-05-30 22:54:44 -07:00
<button id="addCostingDialog">Add Costing</button>
</ul>
</div>
2010-02-08 12:00:08 -08:00
<?php echo $javascript->link('product-model-number-builder'); ?>
<div id="modelNumberFormat">
<h3>Model Number configuration</h3>
<ul id="sortable">
<?php foreach($options as $opt): ?>
<li class="ui-state-default"><?php echo $opt['ProductOptionsCategory']['name']; ?></li>
<li class="ui-state-default">-</li>
<?php endforeach; ?>
</ul>
<button id="DoModelConfig">Click here to configure the model number builder</button>
</div>
<div class="related">
<h2>Option Categories for this Product</h2>
<?php echo $html->link(__('Add new Option Category', true), array('controller'=>'ProductOptionsCategories', 'action'=>'add', $product['Product']['id'])); ?>
<?php foreach($options as $opt): ?>
<h3><?php echo $opt['ProductOptionsCategory']['name']; ?></h3><?php echo $html->image('edit_add.png');?>
<table class="productoptions">
<th><?php __('Model Number'); ?></th>
<th><?php __('Name'); ?></th>
<th class="actions">Actions</th>
<?php
if($opt['ProductOption']):
foreach($opt['ProductOption'] as $option): ?>
<?php
if($option['default'] == '1') {
echo '<tr class="defaultoption">';
}
else {
echo '<tr>';
}
?>
<td><?php echo $option['model_number'];?></td>
<td><?php echo $option['title'];?></td>
<td class="actions">
<?php echo $html->link(__('View', true), array('controller' => 'product_options', 'action' => 'view', $option['id'])); ?>
<?php echo $html->link(__('Edit', true), array('controller' => 'product_options', 'action' => 'edit', $option['id']));
//if($option['default'] != '1') {
// echo $html->link(__('Set as Default', true), array('controller' => 'product_options', 'action' => 'set_default', $option['id']));
//}
?>
</td>
</tr>
<? endforeach;
endif;
?>
</table>
<?php echo $html->link(__('Add new '.$opt['ProductOptionsCategory']['name'].' option', true), array('controller'=>'ProductOptions', 'action'=>'add', $opt['ProductOptionsCategory']['id'])); ?>
<?php endforeach; ?>
</div>
<div id="costingdiv"></div>
<?php debug($product); ?>
<?php debug($options); ?>