<?php defined('SYSPATH') or die('No direct access allowed.');

/**
 * This class provides Admin Domain functions
 *
 * @package    Domain
 * @category   Controllers/Admin
 * @author     Deon George
 * @copyright  (c) 2009-2013 Open Source Billing
 * @license    http://dev.osbill.net/license.html
 */
class Controller_Admin_Service_Domain extends Controller_Domain {
	protected $secure_actions = array(
		'list'=>TRUE,
	);

	public function action_list() {
		Block::factory()
			->title('Domains By Supplier')
			->title_icon('icon-th-list')
			->body(Table::factory()
				->data(ORM::factory('Service')->where_authorised($this->ao)->list_byplugin('DOMAIN'))
				->jssort('domain')
				->columns(array(
					'id'=>'ID',
					'name()'=>'Domain',
					'status'=>'Active',
					'suspend_billing'=>'Not Bill',
					'external_billing'=>'Ext Bill',
					'plugin()->display("domain_expire")'=>'Expire',
					'recur_schedule'=>'Billing',
					'price(TRUE,TRUE)'=>'Charge',
					'account->accnum()'=>'Cust ID',
					'account->name()'=>'Customer',
					'plugin()->registrar->name'=>'Registrar',
				))
				->prepend(array(
					'id'=>array('url'=>URL::link('user','service/view/')),
				))
			);
	}
}
?>
