Internal overhaul
This commit is contained in:
@@ -47,7 +47,7 @@ class Controller_Admin_Product extends Controller_Product {
|
||||
$output = _('Unable to find translate data');
|
||||
|
||||
} else {
|
||||
$pcto = $pco->product_category_translate->where('language_id','=',$_REQUEST['key'])->find();
|
||||
$pcto = $pco->translate->where('language_id','=',$_REQUEST['key'])->find();
|
||||
|
||||
$output = View::factory('product/category/admin/ajaxtranslate')
|
||||
->set('o',$pcto);
|
||||
@@ -161,24 +161,22 @@ $(document).ready(function() {
|
||||
Block::factory()
|
||||
->title(_('Products'))
|
||||
->title_icon('icon-th')
|
||||
->body(Table::display(
|
||||
$products,
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('admin','product/view/')),
|
||||
'title()'=>array('label'=>'Details'),
|
||||
'status'=>array('label'=>'Active'),
|
||||
'prod_plugin_file'=>array('label'=>'Plugin Name'),
|
||||
'prod_plugin_data'=>array('label'=>'Plugin Data'),
|
||||
'price_type'=>array('label'=>'Price Type'),
|
||||
'taxable'=>array('label'=>'Taxable'),
|
||||
'count_services()'=>array('label'=>'Services'),
|
||||
'count_invoices()'=>array('label'=>'Invoices'),
|
||||
),
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>URL::link('admin','product/view'),
|
||||
->body(Table::factory()
|
||||
->data($products)
|
||||
->page_items(25)
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'title()'=>'Details',
|
||||
'status'=>'Active',
|
||||
'prod_plugin_file'=>'Plugin Name',
|
||||
'prod_plugin_data'=>'Plugin Data',
|
||||
'price_type'=>'Price Type',
|
||||
'taxable'=>'Taxable',
|
||||
'service->list_count()'=>'Services',
|
||||
'invoice->list_count()'=>'Invoices',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('admin','product/edit/')),
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -191,21 +189,19 @@ $(document).ready(function() {
|
||||
Block::factory()
|
||||
->title(sprintf('%s: %s',_('Current Services Using this Product'),$po->title()))
|
||||
->title_icon('icon-th-list')
|
||||
->body(Table::display(
|
||||
$po->services()->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
|
||||
'account->accnum()'=>array(),
|
||||
'account->name()'=>array('label'=>'Account'),
|
||||
'name()'=>array('label'=>'Details'),
|
||||
'status'=>array('label'=>'Active'),
|
||||
'price(TRUE,TRUE)'=>array('label'=>'Price','align'=>'right'),
|
||||
),
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>URL::link('user','service/view'),
|
||||
->body(Table::factory()
|
||||
->data($po->service->where_active()->find_all())
|
||||
->page_items(25)
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'account->accnum()'=>'Acc Num',
|
||||
'account->name()'=>'Account',
|
||||
'name()'=>'Details',
|
||||
'status'=>'Active',
|
||||
'price(TRUE,TRUE)'=>'Price',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user