示例#1
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', 'sortname' => 'start_stamp', 'sortorder' => 'desc'));
     // 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', 'callback' => array($this, 'formatNumber')));
     $grid->add('destination_number', 'Destination', array('width' => '250', 'callback' => array($this, 'formatNumber')));
     $grid->add('start_stamp', 'Start', array('width' => 250, 'callback' => array($this, 'formatDate')));
     $grid->add('duration', 'Duration', array('callback' => array($this, 'formatDuration')));
     //$grid->add('uuid', 'Recording', array('callback' => array($this, 'playLink')));
     // Add the actions to the grid
     $grid->addAction('xmlcdr/details', 'Details', array('arguments' => 'xml_cdr_id'));
     // Only display records from the domains associated with the account
     $domainlist = Doctrine_Query::create()->select('domain')->from('Location')->fetchArray();
     $inlist = array();
     foreach ($domainlist as $domain) {
         $inlist[] = $domain['domain'];
     }
     $grid->whereIn('domain_name', '', $inlist);
     // 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()
 {
     $subview = new View('generic/grid');
     $subview->tab = 'main';
     $subview->section = 'general';
     // What are we working with here?
     $base = $this->getBaseModelObject();
     // Setup the base grid object
     $grid = jgrid::grid('Location', array('caption' => 'Locations'));
     // If there is a base model that contains an account_id,
     // then we want to show locations only that relate to this account
     $base = $this->getBaseModelObject();
     if ($base and !empty($base['account_id'])) {
         // Set a where clause, if we're playing plug-in to someone else
         $grid->where('account_id = ', $base['account_id']);
     }
     // Add the base model columns to the grid
     $grid->add('location_id', 'ID', array('hidden' => TRUE, 'key' => TRUE));
     $grid->add('name', 'Name');
     $grid->add('domain', 'Domain');
     // Add the actions to the grid
     $grid->addAction('locationmanager/edit', 'Edit', array('arguments' => 'location_id', 'attributes' => array('class' => 'qtipAjaxForm')));
     $grid->addAction('locationmanager/delete', 'Delete', array('arguments' => 'location_id', 'attributes' => array('class' => 'qtipAjaxForm')));
     // Produces the grid markup or JSON
     $subview->grid = $grid->produce();
     $subview->gridMenu = html::anchor('/locationmanager/create', '<span>Add New Location</span>', array('class' => 'qtipAjaxForm'));
     // Add our view to the main application
     $this->views[] = $subview;
 }
示例#3
0
文件: mediafile.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' => 'Media Files'));
     // Add the base model columns to the grid
     $grid->add('mediafile_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('name', 'Name');
     $grid->add('type', 'Type');
     if (!kohana::config('mediafile.hide_rate_folders')) {
         $grid->add('rates', 'Rate');
         $grid->add('channels', 'Channels');
         $grid->add('length', 'Length');
     }
     $grid->add('updated_at', 'Updated');
     // Add the actions to the grid
     $grid->addAction('mediafile/edit', 'Edit', array('arguments' => 'mediafile_id', 'attributes' => array('class' => 'qtipAjaxForm')));
     $grid->addAction('mediafile/delete', 'Delete', array('arguments' => 'mediafile_id'));
     // Let plugins populate the grid as well
     $this->grid = $grid;
     plugins::views($this);
     if (kohana::config('mediafile.hide_rate_folders')) {
         $q = $this->grid->getQuery()->GroupBy('file');
     } else {
         $q = $this->grid->getQuery();
     }
     // Produce a grid in the view
     $this->view->grid = $this->grid->produce(array('doctrine_query' => $q));
 }
示例#4
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();
    }
示例#5
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();
 }
示例#6
0
    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',
                'sortname' => 'x.start_stamp',
                'sortorder' => 'desc'
                )
        );

        // 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',
                'callback' => array($this, 'formatNumber')
                )
        );
        $grid->add('destination_number', 'Destination', array(
                'width' => '250',
                'callback' => array($this, 'formatNumber')
                )
        );

        $grid->add('start_stamp', 'Start', array('width' => 250, 'callback' => array($this, 'formatDate')));
        $grid->add('duration', 'Duration', array('callback' => array($this, 'formatDuration')));
        //$grid->add('uuid', 'Recording', array('callback' => array($this, 'playLink')));


        // 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');

    }
示例#7
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();
 }
示例#8
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();
 }
示例#9
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();
 }
示例#10
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();
    }
示例#11
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();
 }
示例#12
0
 public function subview_tiers()
 {
     $grid = jgrid::grid('callcenter_tier', array('caption' => ''));
     $grid->where('callcenter_tier/cct_cca_id', '=', Event::$data->callcenter_agent->cca_id);
     $grid->add('callcenter_tier/cct_id', 'ID', array('hidden' => true, 'key' => true));
     $grid->add('callcenter_queue/ccq_name', 'Queue Name');
     $grid->add('callcenter_tier/cct_level', 'Level');
     $grid->add('callcenter_tier/cct_position', 'Position');
     $grid->addAction('callcenter_tier/delete', 'Delete', array('arguments' => 'callcenter_tier/cct_id'));
     $subview = new View('callcenter_agents/tiers');
     $subview->tiergrid = $grid->produce();
     $this->views[] = $subview;
 }
示例#13
0
 public function index()
 {
     $this->template->content = new View('globalmedia/index');
     javascript::add('php_file_tree_jquery.js');
     stylesheet::add('php_file_tree.css');
     // Collect a list of paths in the system, to be displayed as a list
     $this->view->filetree = filetree::php_file_tree(Media::getMediaPath(), "javascript:filterPath('[link]');", FALSE, '/^8000$|^16000$|^32000$|^48000$/');
     // Build a grid with a hidden device_id, device_type, and add an option for the user to select the display columns
     $this->grid = jgrid::grid($this->baseModel, array('caption' => '&nbsp;', 'gridName' => 'MediaGrid'))->add('mediafile_id', 'ID', array('width' => '80', 'hidden' => true, 'key' => true))->add('file', 'Filename', array('width' => '40', 'search' => true, 'callback' => array('MediaFile', 'getBaseName')))->add('path', 'Path', array('width' => '80', 'hidden' => true, 'key' => true, 'search' => true))->add('description', 'Description', array('width' => '80', 'search' => true))->add('size', 'File Size', array('width' => '40', 'align' => 'right', 'callback' => array('function' => array('MediaFile', 'getSize'), 'arguments' => 'registry')))->add('length', 'Length', array('width' => '40', 'align' => 'right', 'callback' => array('function' => array('MediaFile', 'getLength'), 'arguments' => 'registry')))->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('globalmedia/details', 'Details', array('arguments' => 'mediafile_id', 'attributes' => array('class' => 'qtipAjaxForm')))->addAction('globalmedia/download', 'Download', array('arguments' => 'mediafile_id'))->addAction('globalmedia/delete', 'Delete', array('width' => '60', 'arguments' => 'mediafile_id'));
     // dont foget to let the plugins add to the grid!
     plugins::views($this);
     // Produces the grid markup or JSON
     $this->view->grid = $this->grid->produce();
 }
示例#14
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();
 }
示例#15
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();
 }
示例#16
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();
 }
示例#17
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();
 }
示例#18
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();
 }
示例#19
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();
 }
示例#20
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();
 }
示例#21
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();
 }
示例#22
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();
    }
示例#23
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();
 }
示例#24
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();
 }
示例#25
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();
 }
示例#26
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();
 }
示例#27
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();
 }
示例#28
0
 public function createSubGrid()
 {
     $subview = new View('generic/grid');
     $subview->tab = 'main';
     $subview->section = 'general';
     // Setup the base grid object
     $grid = jgrid::grid('User', array('caption' => 'Users'));
     // If there is a base model that contains an account_id,
     // then we want to show locations only that relate to this account
     $base = $this->getBaseModelObject();
     if ($base and !empty($base['location_id'])) {
         // Set a where clause, if we're playing plug-in to someone else
         $grid->where('location_id = ', $base['location_id']);
     } else {
         if ($base and !empty($base['account_id'])) {
             // Set a where clause, if we're playing plug-in to someone else
             $grid->where('account_id = ', $base['account_id']);
         }
     }
     // 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('hidden' => empty($base['location_id']) ? TRUE : FALSE, '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', 'attributes' => array('class' => 'qtipAjaxForm')));
     $grid->addAction('usermanager/delete', 'Delete', array('arguments' => 'user_id', 'attributes' => array('class' => 'qtipAjaxForm')));
     if (users::getAttr('user_type') == User::TYPE_SYSTEM_ADMIN) {
         $grid->addAction('usermanager/login', 'Login', array('arguments' => 'user_id'));
     }
     // Produces the grid markup or JSON
     $subview->grid = $grid->produce();
     $subview->gridMenu = html::anchor('/usermanager/create', '<span>Add New User</span>', array('class' => 'qtipAjaxForm'));
     // Add our view to the main application
     $this->views[] = $subview;
 }
示例#29
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();
 }
示例#30
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();
 }