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'); } }
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'); } }
<div id="navCap"></div> </div> <?php } ?> </div> <div class="main"> <?php message::render(); ?> <div class="sub_menu"> <?php $submenu = navigation::getCurrentSubMenu(); if (!empty($submenu) && navigation::atUrl()) { foreach ($submenu as $menuItem => $parameters) { if (!empty($parameters['disabled'])) { continue; } if (navigation::atUrl($parameters['url'])) { continue; } echo html::anchor($parameters['url'], __($menuItem)); } } ?> </div> <?php