示例#1
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Users'));
     // Add the base model columns to the grid
     $grid->add('user_id', 'ID', array('hidden' => TRUE, 'key' => TRUE));
     $grid->add('email_address', 'Email Address');
     $grid->add('first_name', 'First Name', array('width' => '100', 'search' => TRUE));
     $grid->add('last_name', 'Last Name', array('width' => '100', 'search' => TRUE));
     $grid->add('Location/name', 'Location', array('width' => '100', 'search' => TRUE, 'sortable' => TRUE));
     $grid->add('user_type', 'User Type', array('callback' => array('function' => array($this, 'userType'), 'arguments' => array('user_type'))));
     $grid->add('logins', 'Logins', array('hidden' => TRUE));
     $grid->add('last_login', 'Last Login', array('hidden' => TRUE));
     $grid->add('last_logged_ip', 'Last Logged IP', array('hidden' => TRUE));
     $grid->add('debug_level', 'Debug Level', array('hidden' => TRUE));
     // Add the actions to the grid
     $grid->addAction('usermanager/edit', 'Edit', array('arguments' => 'user_id'));
     $grid->addAction('usermanager/delete', 'Delete', array('arguments' => 'user_id'));
     if (users::getAttr('user_type') == User::TYPE_SYSTEM_ADMIN) {
         $grid->addAction('usermanager/login', 'Login', array('arguments' => 'user_id'));
     }
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#2
0
    public function index()
    {
        $this->template->content = new View('generic/grid');

        // Setup the base grid object
        $grid = jgrid::grid($this->baseModel, array(
                'caption' => 'Network Lists'
            )
        );

        // Add the base model columns to the grid
        $grid->add('net_list_id', 'ID', array(
                'hidden' => true,
                'key' => true
            )
        );
        $grid->add('name', 'Name');

        // Add the actions to the grid
        $grid->addAction('netlistmanager/edit', 'Edit', array(
                'arguments' => 'net_list_id'
            )
        );
        $grid->addAction('netlistmanager/delete', 'Delete', array(
                'arguments' => 'net_list_id'
            )
        );
        
        // Let plugins populate the grid as well
        $this->grid = $grid;
        plugins::views($this);

        // Produce a grid in the view
        $this->view->grid = $this->grid->produce();
    }
示例#3
0
文件: powerdns.php 项目: swk/bluebox
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Domains'))->add('id', 'ID', array('hidden' => true, 'key' => true))->add('name', 'Domain Name/Realm')->add('recordCount', 'Records', array('search' => false, 'align' => 'center', 'callback' => array('function' => array($this, 'countRecords'), 'arguments' => array('id'))))->navButtonAdd('Columns', array('onClickButton' => 'function () {  $(\'#{table_id}\').setColumns(); }', 'buttonimg' => url::base() . 'assets/css/jqGrid/table_insert_column.png', 'title' => 'Show/Hide Columns', 'noCaption' => true, 'position' => 'first'))->addAction('powerdns/edit', 'Edit', array('arguments' => 'id', 'width' => '120'))->addAction('powerdns/delete', 'Delete', array('arguments' => 'id', 'width' => '20'));
     // dont foget to let the plugins add to the grid!
     plugins::views($this);
     $this->view->grid = $this->grid->produce();
 }
示例#4
0
文件: fax.php 项目: swk/bluebox
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid('FaxProfile', array('caption' => 'Fax Profiles'))->add('fxp_id', 'ID', array('hidden' => true, 'key' => true))->add('fxp_name', 'Name')->add('fxp_default', 'Default')->addAction('fax/edit', 'Edit', array('arguments' => 'fxp_id'))->addAction('fax/delete', 'Delete', array('arguments' => 'fxp_id'));
     // Let plugins populate the grid as well
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#5
0
文件: odbc.php 项目: swk/bluebox
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Build a grid with a hidden device_id, class_type, and add an option for the user to select the display columns
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'My ODBC Connections', 'multiselect' => true))->add('odbc_id', 'ID', array('hidden' => true, 'key' => true))->add('dsn_name', 'DSN Name', array('width' => '60'))->add('description', 'Description', array('width' => '120'))->add('host', 'Host', array('width' => '60'))->add('user', 'User', array('width' => '50'))->add('type', 'Type', array('width' => '30'))->add('port', 'port', array('width' => '30'))->navButtonAdd('Columns', array('onClickButton' => 'function () {  $(\'#{table_id}\').setColumns(); }', 'buttonimg' => url::base() . 'assets/css/jqGrid/table_insert_column.png', 'title' => 'Show/Hide Columns', 'noCaption' => true, 'position' => 'first'))->addAction('odbc/edit', 'Edit', array('arguments' => 'odbc_id', 'width' => '40'))->addAction('odbc/delete', 'Delete', array('arguments' => 'odbc_id', 'width' => '40'))->addAction('odbc/config', 'odbc.ini', array('arguments' => 'odbc_id', 'width' => '60'))->navGrid(array('del' => true));
     // dont foget to let the plugins add to the grid!
     plugins::views($this);
     // Produces the grid markup or JSON, respectively
     $this->view->grid = $this->grid->produce();
 }
示例#6
0
    public function index()
    {
        $this->template->content = new View('generic/grid');

        // Setup the base grid object
        $grid = jgrid::grid($this->baseModel, array(
                'caption' => 'Auto Attendants'
            )
        );

        // Add the base model columns to the grid
        $grid->add('auto_attendant_id', 'ID', array(
                'hidden' => true,
                'key' => true
            )
        );
        $grid->add('name', 'Name', array(
                'width' => '200',
                'search' => false,
            )
        );
        $grid->add('type', 'Prompt', array(
                'align' => 'center',
                'callback' => array(
                    'function' => array($this, '_showPrompt'),
                    'arguments' => array('registry')
                )
            )
        );
        $grid->add('keys', 'Options', array(
                'align' => 'center',
                'callback' => array(
                    'function' => array($this, '_showOptions'),
                    'arguments' => array('keys')
                )
            )
        );

        // Add the actions to the grid
        $grid->addAction('autoattendant/edit', 'Edit', array(
                'arguments' => 'auto_attendant_id'
            )
        );
        $grid->addAction('autoattendant/delete', 'Delete', array(
                'arguments' => 'auto_attendant_id'
            )
        );

        // Let plugins populate the grid as well
        $this->grid = $grid;
        plugins::views($this);

        // Produce a grid in the view
        $this->view->grid = $this->grid->produce();
    }
示例#7
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     $this->grid = jgrid::grid('callcenter_queue', array('caption' => 'Queues'));
     $this->grid->add('ccq_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('ccq_name', 'Name');
     $this->grid->add('queueLocation/name', 'Location', array('width' => '150', 'search' => false));
     $this->grid->addAction('callcenter_supervisor/view', 'View', array('arguments' => 'ccq_id'));
     plugins::views($this);
     $this->view->grid = $this->grid->produce();
 }
示例#8
0
文件: dbndir.php 项目: swk/bluebox
 public function index()
 {
     $this->template->content = new View('generic/grid');
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Directories'));
     // Add the base model columns to the grid
     $this->grid->add('dbn_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('dbn_name', 'Directory Name');
     $this->grid->addAction('dbndir/edit', 'Edit', array('arguments' => 'dbn_id'));
     //        $this->grid->addAction('callcenter_agents/delete', 'Delete', array(
     //                'arguments' => 'cca_id'
     //            )
     //        );
     plugins::views($this);
     $this->view->grid = $this->grid->produce();
 }
示例#9
0
文件: xmlcdr.php 项目: swk/bluebox
 public function details($xml_cdr_id)
 {
     $xmlcdr = Doctrine::getTable('Xmlcdr')->findOneBy('xml_cdr_id', $xml_cdr_id);
     $idx = array('Caller Name' => 'caller_id_name', 'Caller Number' => 'caller_id_number', 'Direction' => 'direction', 'Desintation Number' => 'destination_number', 'User Name' => 'user_name', 'Context' => 'context', 'Start' => 'start_stamp', 'Answer' => 'answer_stamp', 'End' => 'end_stamp', 'Duration' => 'duration', 'Billable Seconds' => 'billsec', 'Hangup Cause' => 'hangup_cause', 'UUID' => 'uuid', 'B-Leg UUID' => 'bleg_uuid', 'Account Code' => 'accountcode', 'Domain Name' => 'domain_name', 'User Context' => 'user_context', 'Read Codec' => 'read_codec', 'Write Codec' => 'write_codec', 'Dailed Domain' => 'dialed_domain', 'Dailed User' => 'dialed_user');
     $this->xmlcdr = $xmlcdr;
     $details = '<h3>CDR</h3>';
     $details .= '<table>';
     foreach ($idx as $k => $p) {
         $details .= "<tr><td width=\"300px\">{$k}</td><td>{$xmlcdr->{$p}}</td></tr>\n";
     }
     $details .= '</table>';
     $this->view->details = $details;
     // Execute plugin hooks here, after we've loaded the core data sets
     Event::run('bluebox.create_view', $this->view);
     plugins::views($this);
 }
示例#10
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Queues'));
     // Add the base model columns to the grid
     $this->grid->add('ccq_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('ccq_name', 'Name');
     //$grid->add('datafield2', 'Field 2');
     $this->grid->add('queueLocation/name', 'Location', array('width' => '150', 'search' => false));
     // Add the actions to the grid
     $this->grid->addAction('callcenter_queues/edit', 'Edit', array('arguments' => 'ccq_id'));
     $this->grid->addAction('callcenter_queues/delete', 'Delete', array('arguments' => 'ccq_id'));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#11
0
文件: timeofday.php 项目: swk/bluebox
 /**
  * Method for the main page of this module
  */
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Time Of Day Routes'));
     // Add the base model columns to the grid
     $grid->add('time_of_day_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Route Name');
     // Add the actions to the grid
     $grid->addAction('timeofday/edit', 'Edit', array('arguments' => 'time_of_day_id', 'width' => '120'));
     $grid->addAction('timeofday/delete', 'Delete', array('arguments' => 'time_of_day_id', 'width' => '20'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#12
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Custom Feature Codes'));
     // Add the base model columns to the grid
     $grid->add('custom_feature_code_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Name');
     $grid->add('description', 'Description');
     // Add the actions to the grid
     $grid->addAction('customfeaturecode/edit', 'Edit', array('arguments' => 'custom_feature_code_id'));
     $grid->addAction('customfeaturecode/delete', 'Delete', array('arguments' => 'custom_feature_code_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#13
0
文件: mymodule.php 项目: swk/bluebox
 /**
  * Typically we create a grid, but you can define any entry point you
  * would like...
  */
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'MyModule Grid Header'));
     // Add the base model columns to the grid
     $grid->add('my_module_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('datafield1', 'Field 1');
     $grid->add('datafield2', 'Field 2');
     // Add the actions to the grid
     $grid->addAction('mymodule/edit', 'Edit', array('arguments' => 'my_module_id'));
     $grid->addAction('mymodule/delete', 'Delete', array('arguments' => 'my_module_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#14
0
 /**
  * Typically we create a grid, but you can define any entry point you
  * would like...
  */
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Tiers'));
     // Add the base model columns to the grid
     $this->grid->add('cct_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('callcenter_agent/cca_loginid', 'Agent Login');
     $this->grid->add('callcenter_agent/cca_displayname', 'Agent Name');
     $this->grid->add('callcenter_queue/ccq_name', 'Queue Name');
     $this->grid->add('callcenter_agent/cca_locationid', 'Location', array('width' => '60', 'callback' => array('function' => array($this, 'getlocationname')), 'search' => false, 'sortable' => false));
     // Add the actions to the grid
     $this->grid->addAction('callcenter_tiers/edit', 'Edit', array('arguments' => 'cct_id'));
     $this->grid->addAction('callcenter_tiers/delete', 'Delete', array('arguments' => 'cct_id'));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#15
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Trunks/Gateways'));
     // Add the base model columns to the grid
     $grid->add('trunk_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Trunk Name');
     $grid->add('type', 'Type', array('width' => '50', 'search' => false));
     // Add the actions to the grid
     $grid->addAction('trunkmanager/edit', 'Edit', array('arguments' => 'trunk_id'));
     $grid->addAction('trunkmanager/delete', 'Delete', array('arguments' => 'trunk_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#16
0
文件: calls.php 项目: swk/bluebox
 public function download($start = NULL, $end = NULL)
 {
     // Download a CDR
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('gridName' => 'calldownload', 'caption' => 'Export Preview'))->add('calls_id', 'ID', array('hidden' => true, 'key' => true))->add('start_stamp', 'Start')->add('end_stamp', 'End')->add('caller_id_number', 'Calling Party')->add('destination_number', 'Called Party')->add('duration', 'Length')->add('hangup_cause', 'Call End Cause');
     if (!is_null($start)) {
         $grid->andWhere('start_stamp >', "'" . $start . "'");
     }
     if (!is_null($end)) {
         $grid->andWhere('end_stamp <', "'" . $end . "'");
     }
     // Let plugins populate the grid as well
     $this->grid = $grid;
     Kohana::log('debug', print_r($_POST, TRUE));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#17
0
    public function index()
    {
        $this->template->content = new View('generic/grid');

        // Setup the base grid object
        $grid = jgrid::grid($this->baseModel, array(
                'caption' => ' Ring Groups'
            )
        );

        // Add the base model columns to the grid
        $grid->add('ring_group_id', 'ID', array(
                'hidden' => true,
                'key' => true
            )
        );
        $grid->add('name', 'Ring Group Name');
        $grid->add('strategy', 'Strategy', array(
                'callback' => array($this, '_showStrategy')
            )
        );
        $grid->add('members', 'Members', array(
                'search' => false,
                'callback' => array($this, '_countMembers')
            )
        );

        // Add the actions to the grid
        $grid->addAction('ringgroup/edit', 'Edit', array(
                'arguments' => 'ring_group_id'
            )
        );
        $grid->addAction('ringgroup/delete', 'Delete', array(
                'arguments' => 'ring_group_id'
            )
        );

        // Let plugins populate the grid as well
        $this->grid = $grid;
        plugins::views($this);

        // Produce a grid in the view
        $this->view->grid = $this->grid->produce();
    }
示例#18
0
 /**
  * Typically we create a grid, but you can define any entry point you
  * would like...
  */
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Valet Parking Lots'));
     // Add the base model columns to the grid
     $grid->add('vpl_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('vpl_name', 'Name');
     $grid->add('vpl_start', 'Start');
     $grid->add('vpl_end', 'End');
     // Add the actions to the grid
     $grid->addAction('valetparking/edit', 'Edit', array('arguments' => 'vpl_id'));
     $grid->addAction('valetparking/delete', 'Delete', array('arguments' => 'vpl_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#19
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Conferences'));
     // Add the base model columns to the grid
     $grid->add('conference_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Name');
     $grid->add('registry', 'Record?', array('callback' => array($this, '_showRecord')));
     $grid->add('pins', 'Has Pin?', array('callback' => array($this, '_hasPin')));
     // Add the actions to the grid
     $grid->addAction('conference/edit', 'Edit', array('arguments' => 'conference_id'));
     $grid->addAction('conference/delete', 'Delete', array('arguments' => 'conference_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#20
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Endpoints'));
     // Add the base model columns to the grid
     $grid->add('id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('mac', 'MAC Address');
     //$grid->add('model', 'Model');
     $grid->add('description', 'Description');
     // Add the actions to the grid
     $grid->addAction('endpointmanager/edit', 'Edit', array('arguments' => 'endpoint_device_id'));
     $grid->addAction('endpointmanager/delete', 'Delete', array('arguments' => 'endpoint_device_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#21
0
文件: voicemail.php 项目: swk/bluebox
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Voicemail Boxes'));
     // Add the base model columns to the grid
     $grid->add('voicemail_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Mailbox Name');
     $grid->add('mailbox', 'Mailbox');
     $grid->add('email_address', 'Email', array('callback' => array('function' => array($this, '_showEmail'), 'arguments' => array('registry'))));
     // Add the actions to the grid
     $grid->addAction('voicemail/edit', 'Edit', array('arguments' => 'voicemail_id', 'width' => '120'));
     $grid->addAction('voicemail/delete', 'Delete', array('arguments' => 'voicemail_id', 'width' => '20'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#22
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Feature Codes'));
     // Add the base model columns to the grid
     $grid->add('feature_code_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Name');
     $grid->add('description', 'Description');
     $grid->add('sections', 'Sections', array('align' => 'center', 'search' => FALSE, 'sortable' => FALSE, 'callback' => array('function' => array($this, '_showSections'), 'arguments' => array('registry'))));
     // Add the actions to the grid
     $grid->addAction('featurecode/edit', 'Edit', array('arguments' => 'feature_code_id'));
     $grid->addAction('featurecode/delete', 'Delete', array('arguments' => 'feature_code_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#23
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'SIP Interfaces'));
     // Add the base model columns to the grid
     $grid->add('sipinterface_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Interface Name');
     $grid->add('ip_address', 'IP Address', array('callback' => array($this, '_showIp')));
     $grid->add('port', 'Port');
     $grid->add('auth', 'Authentication', array('callback' => array($this, '_showAuth')));
     // Add the actions to the grid
     $grid->addAction('sipinterface/edit', 'Edit', array('arguments' => 'sipinterface_id'));
     $grid->addAction('sipinterface/delete', 'Delete', array('arguments' => 'sipinterface_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#24
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Accounts'));
     if (users::getAttr('user_type') != User::TYPE_SYSTEM_ADMIN) {
         $grid->where('account_id = ', users::getAttr('account_id'));
     }
     // Add the base model columns to the grid
     $grid->add('account_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Name');
     $grid->add('type', 'Type', array('callback' => array('function' => array('Account', 'typeName'))));
     $grid->add('created_at', 'Created');
     // Add the actions to the grid
     $grid->addAction('accountmanager/edit', 'Edit', array('arguments' => 'account_id'));
     $grid->addAction('accountmanager/delete', 'Delete', array('arguments' => 'account_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#25
0
文件: xmlcdr.php 项目: swk/bluebox
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Caller Detail Records'));
     // Add the base model columns to the grid
     $grid->add('xml_cdr_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('direction', 'Direction', array('width' => '120'));
     $grid->add('caller_id_name', 'Caller Name', array('width' => '250'));
     $grid->add('caller_id_number', 'Caller Number', array('width' => '250'));
     $grid->add('destination_number', 'Destination', array('width' => '250'));
     $grid->add('start_stamp', 'Start', array('width' => '250'));
     $grid->add('duration', 'Duration', array('width' => '250'));
     // Add the actions to the grid
     $grid->addAction('xmlcdr/details', 'Details', array('arguments' => 'xml_cdr_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
     //             $this->template->content = new View('xmlcdr/index');
 }
示例#26
0
文件: feature.php 项目: swk/bluebox
 function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Features'));
     // Add the base model columns to the grid
     $this->grid->add('ftr_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('ftr_display_name', 'Name');
     $this->grid->add('ftr_desc', 'Description');
     // Add the actions to the grid
     $this->grid->addAction('feature/edit', 'Edit', array('arguments' => 'ftr_id'));
     $this->grid->addAction('feature/delete', 'Delete', array('arguments' => 'ftr_id'));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
     $currentuser = users::getCurrentUser();
     if ($currentuser['user_type'] == User::TYPE_SYSTEM_ADMIN) {
         navigation::getNavTree();
         $submenu = navigation::getCurrentSubMenu();
         navigation::addSubmenuOption('feature', 'Re-Install Default Features', 'feature/installDefaultFeatures');
     }
 }
示例#27
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $grid = jgrid::grid($this->baseModel, array('caption' => 'Numbers'));
     // Add the base model columns to the grid
     $grid->add('number_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('number', 'Number', array('width' => '120', 'callback' => array($this, '_formatNumber')));
     $grid->add('number_route', 'Routes to', array('width' => '250', 'search' => false, 'sortable' => false, 'callback' => array('arguments' => 'number_id', 'function' => array($this, '_showRoute'))));
     $grid->add('pools', 'Pools', array('width' => '42', 'align' => 'center', 'search' => false, 'sortable' => false, 'callback' => array('arguments' => 'number_id', 'function' => array($this, '_showPools'))));
     $grid->add('context', 'Contexts', array('width' => '70', 'align' => 'center', 'search' => false, 'sortable' => false, 'callback' => array('arguments' => 'number_id', 'function' => array($this, '_showContexts'))));
     $grid->add('Location/name', 'Location', array('width' => '150', 'search' => false));
     // Add the actions to the grid
     $grid->addAction('numbermanager/edit', 'Edit', array('arguments' => 'number_id'));
     $grid->addAction('numbermanager/rebuild', 'Rebuild', array('arguments' => 'number_id', 'attributes' => array('class' => 'qtipAjaxForm')));
     $grid->addAction('numbermanager/delete', 'Delete', array('arguments' => 'number_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
 }
示例#28
0
文件: mediafile.php 项目: swk/bluebox
 /**
  * This generic delete function will remove entries of $baseModel
  */
 public function delete($id = NULL)
 {
     $this->template->content = new View('mediafile/delete');
     $this->view->title = 'Delete Media File';
     $this->loadBaseModel($id);
     if ($action = $this->submitted(array('submitString' => 'delete'))) {
         Event::run('bluebox.deleteOnSubmit', $action);
         if ($action == self::SUBMIT_CONFIRM) {
             $success = TRUE;
             if (kohana::config('mediafile.hide_rate_folders', FALSE) and !empty($_POST['delete_media_files'])) {
                 foreach ($_POST['delete_media_files'] as $mediafile_id) {
                     $mediafile = Doctrine::getTable('MediaFile')->find($mediafile_id);
                     if (!$mediafile) {
                         continue;
                     }
                     if (!$this->formDelete($mediafile)) {
                         $success = FALSE;
                         break;
                     }
                 }
             } else {
                 $success = $this->formDelete($this->mediafile);
             }
             if ($success) {
                 $this->returnQtipAjaxForm(NULL);
                 url::redirect(Router_Core::$controller);
             }
         } else {
             if ($action == self::SUBMIT_DENY) {
                 $this->exitQtipAjaxForm();
                 url::redirect(Router_Core::$controller);
             }
         }
     }
     $this->view->set_global('mediafile', $this->mediafile);
     Event::run('bluebox.prepare_delete_view', $this->view);
     // Execute plugin hooks here, after we've loaded the core data sets
     plugins::views($this);
 }
示例#29
0
 public function index()
 {
     $this->template->content = new View('generic/grid');
     // Setup the base grid object
     $this->grid = jgrid::grid($this->baseModel, array('caption' => 'Agents'));
     // Add the base model columns to the grid
     $this->grid->add('cca_id', 'ID', array('hidden' => true, 'key' => true));
     $this->grid->add('cca_displayname', 'Display Name');
     $this->grid->add('cca_loginid', 'Login ID');
     $this->grid->add('agentLocation/name', 'Location', array('width' => '150', 'search' => false));
     // Add the actions to the grid
     $this->grid->addAction('callcenter_agents/edit', 'Edit', array('arguments' => 'cca_id'));
     $this->grid->addAction('callcenter_agents/delete', 'Delete', array('arguments' => 'cca_id'));
     plugins::views($this);
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce();
     $currentuser = users::getCurrentUser();
     if ($currentuser['user_type'] == User::TYPE_SYSTEM_ADMIN) {
         navigation::getNavTree();
         $submenu = navigation::getCurrentSubMenu();
         navigation::addSubmenuOption('callcenter_agents', 'Re-Install Features', 'callcenter_agents/installFeatures');
     }
 }
示例#30
0
 public function create()
 {
     $reqPath = '';
     if (isset($_POST['path']) and isset($_POST['newfolder'])) {
         $reqPath = $_POST['path'];
         $path = Media::getMediaPath() . $reqPath;
         kohana::log('debug', 'Creating ' . $path . DIRECTORY_SEPARATOR . $_POST['newfolder']);
         if ($this->createFolder($path . DIRECTORY_SEPARATOR . $_POST['newfolder'])) {
             message::set('Folder created.');
             url::redirect(Router_Core::$controller . '/index');
         } else {
             message::set('The path ' . $_POST['path'] . ' does not exist or could not be created! Does your web user have write access?');
         }
     }
     plugins::views($this);
     $this->view->soundPath = Media::getMediaPath();
     $this->view->reqPath = $reqPath;
 }