Consistency updates for use of viewpath()

This commit is contained in:
Deon George
2011-12-21 12:39:21 +11:00
parent a40ce27a16
commit a893527d77
42 changed files with 125 additions and 125 deletions

View File

@@ -26,7 +26,7 @@ class Controller_Product extends Controller_TemplateDefault {
Block::add(array(
'title'=>sprintf('%s: %s',_('Category'),$cat->name),
'body'=>View::factory('product/category/view')
'body'=>View::factory($this->viewpath().'/view')
->set('results',$this->_get_category($cat->id))
->set('cat',$cat->id),
));
@@ -63,7 +63,7 @@ class Controller_Product extends Controller_TemplateDefault {
Block::add(array(
'title'=>$po->product_translate->find()->description_short,
'body'=>View::factory('product/view')
'body'=>View::factory($this->viewpath())
->set('record',$po),
));
}

View File

@@ -15,6 +15,10 @@ class Controller_Product_Category extends Controller_TemplateDefault {
* By default show a menu of available categories
*/
public function action_index() {
Request::current()->redirect('product_category/list');
}
public function action_list() {
Block::add(array(
'title'=>_('Product Categories'),
'body'=>View::factory('product/category/list')

View File

@@ -62,7 +62,7 @@ echo Form::open('cart/add');
<!-- @todo If CURRENCY's value is not active in the DB, then the wrong flag is shown, as StaticList_Module::form() only returns active values -->
<!-- @todo Currency is not used in the cart? -->
<?php $CURRENCY_ISO='AUD'; $CURRENCY=6; $COUNTRY=61?>
<td class="body"><?php echo StaticList_Module::form('currency','currency',$CURRENCY,'id','name',array('status'=>'=:1'));?> <?php echo Country::icon($COUNTRY);?></td>
<td class="body"><?php echo StaticList_Module::form('currency','currency',$CURRENCY,'id','name',array('status'=>'=:1'),FALSE,array('class'=>'form_button'));?> <?php echo Country::icon($COUNTRY);?></td>
</tr>
<tr>
<td class="body"><b>Price Type</b></td>