This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/product/classes/controller/admin/product.php
2012-01-12 19:55:13 +11:00

48 lines
1.3 KiB
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides Admin Product management
*
* @package OSB
* @subpackage Product
* @category Controllers/Admin
* @author Deon George
* @copyright (c) 2010 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
protected $secure_actions = array(
'list'=>TRUE,
);
/**
* Show a list of products
*/
public function action_list() {
Block::add(array(
'title'=>_('Customer Products'),
'body'=>Table::display(
ORM::factory('product')->order_by('active DESC,prod_plugin_file')->find_all(),
25,
array(
'id'=>array('label'=>'ID','url'=>'product/view/'),
'name()'=>array('label'=>'Details'),
'active'=>array('label'=>'Active'),
'prod_plugin_file'=>array('label'=>'Plugin Name'),
'prod_plugin_data'=>array('label'=>'Plugin Data'),
'price_type'=>array('label'=>'Price Type'),
'price_base'=>array('label'=>'Price Base'),
'taxable'=>array('label'=>'Taxable'),
'services_count()'=>array('label'=>'Services'),
'invoices_count()'=>array('label'=>'Invoices'),
),
array(
'page'=>TRUE,
'type'=>'select',
'form'=>'product/view',
)),
));
}
}
?>