当前位置: 首页>>代码示例>>PHP>>正文


PHP SidebarController::addList方法代码示例

本文整理汇总了PHP中SidebarController::addList方法的典型用法代码示例。如果您正苦于以下问题:PHP SidebarController::addList方法的具体用法?PHP SidebarController::addList怎么用?PHP SidebarController::addList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SidebarController的用法示例。


在下文中一共展示了SidebarController::addList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: view

 public function view()
 {
     if (!$this->loadData()) {
         $this->dataError();
         sendBack();
     }
     $accesslist = $this->_uses[$this->modeltype];
     //		$this->addSidebar($systempolicy);
     $policy_permissions = new SystemPolicyControlListCollection();
     $sh = $this->setSearchHandler($policy_permissions);
     $sh->addConstraint(new Constraint('access_lists_id', '=', $accesslist->{$accesslist->idField}));
     parent::index($policy_permissions, $sh);
     $this->view->set('no_ordering', true);
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['alllists'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'index'), 'tag' => 'View All System Access Lists');
     $sidebar->addList('Actions', $sidebarlist);
     $sidebarlist = array();
     $sidebarlist['edit'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'edit', 'id' => $accesslist->{$accesslist->idField}), 'tag' => 'edit_access_list');
     $sidebarlist['delete'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'delete', 'id' => $accesslist->{$accesslist->idField}), 'tag' => 'delete_access_list');
     $sidebarlist['addpermission'] = array('link' => array('modules' => $this->_modules, 'controller' => 'systempolicycontrollists', 'action' => '_new', 'object_policies_id' => $accesslist->{$accesslist->idField}), 'tag' => 'add_policy_permission');
     $sidebar->addList('This Policy', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:25,代码来源:SystempolicyaccesslistsController.php

示例2: view

 public function view()
 {
     if (!$this->loadData()) {
         $this->dataError();
         sendBack();
     }
     $transaction = $this->_uses[$this->modeltype];
     $id = $transaction->id;
     $this->view->set('transaction', $transaction);
     $elements = new WHTransferruleCollection(new WHTransferrule());
     $sh = new SearchHandler($elements, false);
     $sh->extract();
     $sh->addConstraint(new Constraint('whaction_id', '=', $id));
     $sh->extractOrdering();
     $sh->extractPaging();
     $elements->load($sh);
     $this->view->set('elements', $elements);
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('Show', array('all' => array('tag' => 'All Actions', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'index'))), 'locations' => array('tag' => 'All Stores', 'link' => array_merge($this->_modules, array('controller' => 'WHStores', 'action' => 'index')))));
     $sidebarlist = array();
     $sidebarlist['edit'] = array('tag' => 'Edit', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'edit', 'id' => $id)));
     $sidebarlist['delete'] = array('tag' => 'Delete', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'delete', 'id' => $id)));
     if (is_null($transaction->max_rules) || $elements->count() < $transaction->max_rules) {
         $sidebarlist['Add'] = array('tag' => 'Add Rule', 'link' => array_merge($this->_modules, array('controller' => 'WHTransferrules', 'action' => 'new', 'whaction_id' => $id)));
     }
     $sidebar->addList('This Action', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
     $this->view->set('clickaction', 'view');
     $this->view->set('clickcontroller', 'WHTransferrules');
     $this->view->set('no_ordering', true);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:32,代码来源:WhactionsController.php

示例3: view

 public function view()
 {
     if (!$this->loadData()) {
         $this->dataError();
         sendBack();
     }
     $transaction = $this->_uses[$this->modeltype];
     $id = $transaction->id;
     if ($transaction->bin_controlled == 't') {
         sendTo('WHBins', 'index', $this->_modules, array('whlocation_id' => $this->_data['id']));
     }
     $this->view->set('transaction', $transaction);
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['stores'] = array('tag' => 'All Stores', 'link' => array_merge($this->_modules, array('controller' => 'WHStores', 'action' => 'index')));
     $sidebarlist['locations'] = array('tag' => 'Locations for Store ' . $transaction->whstore, 'link' => array_merge($this->_modules, array('controller' => 'WHStores', 'action' => 'view', 'id' => $transaction->whstore_id)));
     $sidebar->addList('Show', $sidebarlist);
     $sidebarlist = array();
     $sidebarlist['edit'] = array('tag' => 'Edit', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'edit', 'id' => $id)));
     if ($transaction->isBinControlled() && $transaction->bins->count() == 0 || !$transaction->isBinControlled() && $transaction->balances->count() == 0) {
         $sidebarlist['delete'] = array('tag' => 'Delete', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'delete', 'id' => $id, 'whstore_id' => $transaction->whstore_id)));
     }
     $sidebar->addList('This Location', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
     $this->view->set('page_title', $this->getPageName('Location'));
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:27,代码来源:WhlocationsController.php

示例4: view

 public function view()
 {
     if (!$this->loadData()) {
         $this->dataError();
         sendBack();
     }
     $transaction = $this->_uses[$this->modeltype];
     $id = $transaction->id;
     $this->view->set('transaction', $transaction);
     $elements = new MFCentreCollection(new MFCentre());
     $sh = $this->setSearchHandler($elements);
     $sh->addConstraint(new Constraint('mfdept_id', '=', $id));
     parent::index($elements, $sh);
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['all'] = array('tag' => 'All Departments', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'index')));
     $sidebar->addList('Show', $sidebarlist);
     $sidebarlist = array();
     $sidebarlist['edit'] = array('tag' => 'Edit', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'edit', 'id' => $id)));
     if ($elements->count() == 0) {
         $sidebarlist['delete'] = array('tag' => 'Delete', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'delete', 'id' => $id)));
     }
     $sidebarlist['add'] = array('tag' => 'Add Centre', 'link' => array_merge($this->_modules, array('controller' => 'MFCentres', 'action' => 'new', 'mfdept_id' => $id)));
     $sidebar->addList('This Department', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
     $this->view->set('clickaction', 'view');
     $this->view->set('clickcontroller', 'MFCentres');
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:29,代码来源:MfdeptsController.php

示例5: view

 public function view()
 {
     if (!$this->loadData()) {
         $this->dataError();
         sendBack();
     }
     $account = $this->_uses[$this->modeltype];
     $glbalance = $account->glbalance();
     $this->view->set('glbalance', $glbalance);
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['view_all'] = array('tag' => 'View All Accounts', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'index'));
     $sidebarlist['receiveany'] = array('link' => array('modules' => $this->_modules, 'controller' => 'cbtransactions', 'action' => 'receive_payment', 'cb_account_id' => $account->id), 'tag' => 'receive_payment');
     $sidebarlist['makeany'] = array('link' => array('modules' => $this->_modules, 'controller' => 'cbtransactions', 'action' => 'make_payment', 'cb_account_id' => $account->id), 'tag' => 'make_payment');
     $sidebarlist['moveany'] = array('link' => array('modules' => $this->_modules, 'controller' => 'cbtransactions', 'action' => 'move_money'), 'tag' => 'move_money');
     $sidebar->addList('actions', $sidebarlist);
     $sidebarlist = array();
     $idfield = $account->idField;
     $idfieldValue = $account->{$account->idField};
     $sidebarlist[$account->name] = array('tag' => $account->name, 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'view', $idfield => $idfieldValue));
     $sidebarlist['reconcile'] = array('tag' => 'reconcile', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'reconcile', $idfield => $idfieldValue));
     $sidebarlist['viewtrans'] = array('link' => array('modules' => $this->_modules, 'controller' => 'cbtransactions', 'action' => 'index', 'cb_account_id' => $idfieldValue), 'tag' => 'view_transactions');
     $sidebarlist['receive_payment'] = array('link' => array('modules' => $this->_modules, 'controller' => 'cbtransactions', 'action' => 'receive_payment', 'cb_account_id' => $idfieldValue, 'currency_id' => $account->currency_id), 'tag' => 'receive_payment');
     $sidebarlist['make_payment'] = array('link' => array('modules' => $this->_modules, 'controller' => 'cbtransactions', 'action' => 'make_payment', 'cb_account_id' => $idfieldValue, 'currency_id' => $account->currency_id), 'tag' => 'make_payment');
     $sidebarlist['move_money'] = array('link' => array('modules' => $this->_modules, 'controller' => 'cbtransactions', 'action' => 'move_money', 'cb_account_id' => $idfieldValue), 'tag' => 'move_money');
     $params = new GLParams();
     if ($params->base_currency() != $account->currency_id) {
         $sidebarlist['revaluation'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'revaluation', $idfield => $idfieldValue), 'tag' => 'revaluation');
     }
     $sidebar->addList($account->name, $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:33,代码来源:BankaccountsController.php

示例6: view

 public function view()
 {
     if (!$this->loadData()) {
         $this->dataError();
         sendBack();
     }
     $mappingrule = $this->_uses[$this->modeltype];
     $this->view->set('clickaction', 'view');
     $this->view->set('mappingrule', $mappingrule);
     $childrules = new DataMappingRuleCollection(new DataMappingRule());
     $sh = $this->setSearchHandler($childrules);
     $sh->addConstraint(new Constraint('parent_id', '=', $mappingrule->id));
     parent::index($childrules, $sh);
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('actions', array($mappingrule->name => array('tag' => 'View All Mapping Rules', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'index'))));
     $sidebarlist = array();
     $sidebarlist[$mappingrule->name] = array('tag' => 'view', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'view', 'id' => $mappingrule->id));
     $sidebarlist['edit'] = array('tag' => 'edit', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'edit', 'id' => $mappingrule->id));
     $sidebarlist['delete'] = array('tag' => 'delete', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'delete', 'id' => $mappingrule->id));
     $sidebar->addList($mappingrule->external_system . ' ' . $mappingrule->name, $sidebarlist);
     if (!is_null($mappingrule->parent_id)) {
         $mappingrule->addLinkRule(array('data_translations' => array()));
     }
     $this->sidebarRelatedItems($sidebar, $mappingrule);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
     $this->view->set('page_title', $this->getPageName());
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:28,代码来源:DatamappingrulesController.php

示例7: edit

 public function edit()
 {
     parent::edit();
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['action'] = array('tag' => 'View All Report Definitions', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'index'));
     $sidebarlist['new'] = array('tag' => 'New Report Definition', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'));
     $sidebarlist['copy'] = array('tag' => 'Copy Report Definition', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'copy', 'id' => $this->_data['id']));
     $sidebar->addList('Actions', $sidebarlist);
     $sidebarlist = array();
     $sidebarlist['report'] = array('tag' => 'Print Test Report', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'printDialog', 'printaction' => 'testReport', 'id' => $this->_data['id']));
     $sidebar->addList('Reports', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:15,代码来源:ReportDefinitionsController.php

示例8: index

 public function index()
 {
     $this->view->set('clickaction', 'view');
     $errors = array();
     $s_data = array();
     // Set context from calling module
     if (isset($this->_data['username'])) {
         $s_data['username'] = $this->_data['username'];
     }
     if (isset($this->_data['glcentre_id'])) {
         $s_data['glcentre_id'] = $this->_data['glcentre_id'];
     }
     $this->setSearch('poauthlimitsSearch', 'useDefault', $s_data);
     $username = $this->search->getValue('username');
     $glcentre_id = $this->search->getValue('glcentre_id');
     parent::index(new POAuthLimitCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $actions = array();
     $actions['new'] = array('tag' => 'New Authorisation Limit', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'));
     if (isset($s_data['username']) && $s_data['username'] != '') {
         $actions['forperson'] = array('tag' => 'New Authorisation Limit for this person', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new', 'username' => $username));
     }
     if (isset($s_data['glcentre_id']) && $s_data['glcentre_id'] != '0') {
         $actions['foraccount'] = array('tag' => 'New Authorisation Limit for this GL Centre', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new', 'glcentre_id' => $s_data['glcentre_id']));
     }
     $sidebar->addList('Actions', $actions);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:29,代码来源:PoauthlimitsController.php

示例9: view

 public function view()
 {
     if (!$this->loadData()) {
         sendback();
     }
     $ledgercategory = $this->_uses[$this->modeltype];
     $idfield = $ledgercategory->idField;
     $id = $ledgercategory->{$idfield};
     // Check if Ledger Category is used by Ledger Accounts
     $ledgeraccount = new LedgerCategory('ledger_category_accounts');
     $ledgeraccount->idField = 'company_id';
     $ledgeraccount->identifierField = 'name';
     $cc = new ConstraintChain();
     $cc->add(new Constraint('category_id', '=', $ledgercategory->category_id));
     $ledgeraccounts = $ledgeraccount->getAll($cc);
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['all'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'index'), 'tag' => 'view_ledger_categories');
     $sidebarlist['new'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'new_ledger_category');
     if (count($ledgeraccounts) == 0) {
         $sidebarlist['edit'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'edit', $idfield => $ledgercategory->{$idfield}), 'tag' => 'edit_ledger_category');
         $sidebarlist['delete'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'delete', $idfield => $ledgercategory->{$idfield}), 'tag' => 'delete_ledger_category');
     }
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
     $this->view->set('model', $ledgercategory);
     $this->view->set('count', count($ledgeraccounts));
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:29,代码来源:LedgercategorysController.php

示例10: index

 public function index()
 {
     $errors = array();
     $s_data = array();
     // Set context from calling module
     if (isset($this->_data['cbaccount_id'])) {
         $s_data['cbaccount_id'] = $this->_data['cbaccount_id'];
     }
     if (isset($this->_data['company_id'])) {
         $s_data['company_id'] = $this->_data['company_id'];
     }
     if (isset($this->_data['source'])) {
         $s_data['source'] = $this->_data['source'];
     }
     if (isset($this->_data['status'])) {
         $s_data['status'] = $this->_data['status'];
     }
     if (isset($this->_data['frequency'])) {
         $s_data['frequency'] = $this->_data['frequency'];
     }
     $this->setSearch('PeriodicPaymentsSearch', 'useDefault', $s_data);
     $this->view->set('clickaction', 'edit');
     parent::index(new PeriodicPaymentCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['new'] = array('tag' => 'New Payment', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'));
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:30,代码来源:PeriodicpaymentsController.php

示例11: _new

 public function _new()
 {
     $flash = Flash::Instance();
     parent::_new();
     $gl_params = $this->_uses[$this->modeltype];
     $unassigned = $gl_params->unassignedParams();
     if (count($unassigned) > 0) {
         $this->view->set('unassigned', $unassigned);
     } elseif (count($unassigned) == 0 && $this->_data['action'] == 'new') {
         $flash->addMessage('All parameters have been assigned');
         sendTo($this->name, 'index', $this->_modules);
     } elseif ($this->_data['action'] == 'new') {
         $flash->addError('Error getting Parameter List');
         sendback();
     }
     if (isset($_POST[$this->modeltype]['paramdesc'])) {
         $this->selectlist($_POST[$this->modeltype]['paramdesc']);
     } elseif ($gl_params->isLoaded()) {
         $this->selectlist($gl_params->paramdesc);
         $this->view->set('selected', $gl_params->paramvalue_id);
     } else {
         $this->selectlist(key($unassigned));
     }
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['view'] = array('tag' => 'View Parameters', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'index')));
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:30,代码来源:GlparamssController.php

示例12: index

 public function index()
 {
     $errors = array();
     $s_data = array();
     // Preserve any search criteria selection so that the context is maintained
     if (isset($this->_data['Search'])) {
         $s_data = $this->_data['Search'];
     } elseif (!isset($this->_data['orderby']) && !isset($this->_data['page'])) {
         // Either this is the first entry to the page or the search has been cleared
         // and orderby or paging is not selected
         // so set context from calling module
         $currentPeriod = GLPeriod::getPeriod(date('Y-m-d'));
         if ($currentPeriod && count($currentPeriod) > 0) {
             $s_data['glperiods_id'] = array($currentPeriod['id']);
         }
         if (isset($this->_data['glaccount_id'])) {
             $s_data['glaccount_id'] = $this->_data['glaccount_id'];
         }
         if (isset($this->_data['glcentre_id'])) {
             $s_data['glcentre_id'] = $this->_data['glcentre_id'];
         }
     }
     $this->setSearch('glbalancesSearch', 'useDefault', $s_data);
     $this->view->set('clickaction', 'edit');
     parent::index(new GLBudgetCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['new'] = array('tag' => 'New Budget', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new')));
     $sidebarlist['viewaccounts'] = array('tag' => 'View All Accounts', 'link' => array_merge($this->_modules, array('controller' => 'glaccounts', 'action' => 'index')));
     $sidebarlist['viewcentres'] = array('tag' => 'View All Centres', 'link' => array_merge($this->_modules, array('controller' => 'glcentres', 'action' => 'index')));
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:34,代码来源:GlbudgetsController.php

示例13: index

 function index()
 {
     $userPreferences = UserPreferences::instance();
     $view = $userPreferences->getPreferenceValue('default-calendar-view', 'calendar');
     $display_options = unserialize($userPreferences->getPreferenceValue('display-calendar-filter', 'calendar'));
     $calendars = array();
     $calendars = $this->getCalendarList($display_options);
     $this->view->set('default_view', $view);
     $this->view->set('calendars', $calendars);
     $this->view->set('writable_calendars', $this->getWriteableCalendars());
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('Events', array('new_event' => array('link' => array('module' => 'calendar', 'controller' => 'calendarevents', 'action' => 'new'), 'tag' => 'new_event'), 'view_events' => array('link' => array('module' => 'calendar', 'controller' => 'calendarevents', 'action' => 'index'), 'tag' => 'view_agenda')));
     $sidebar->addList('calendars', array('manage_calendars' => array('link' => array('module' => 'calendar', 'controller' => 'calendars', 'action' => 'index'), 'tag' => 'Manage Calendars')));
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:16,代码来源:IndexController.php

示例14: view

 public function view()
 {
     if (!$this->loadData()) {
         $this->dataError();
         sendBack();
     }
     $mfshiftoutput = $this->_uses[$this->modeltype];
     $this->view->set('model', $mfshiftoutput);
     $mfshiftwaste = new MFShiftWasteCollection();
     $sh = $this->setSearchHandler($mfshiftwaste);
     $sh->setFields(array('id', 'waste_type', 'qty', 'uom_name'));
     $sh->addConstraint(new Constraint('mf_shift_outputs_id', '=', $mfshiftoutput->id));
     parent::index($mfshiftwaste, $sh);
     $this->view->set('clickaction', 'edit');
     $this->view->set('clickcontroller', 'mfshiftwastes');
     $this->view->set('page_title', $this->getPageName('', 'View'));
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['viewallshifts'] = array('tag' => 'View All Shifts', 'link' => array('modules' => $this->_modules, 'controller' => 'mfshifts', 'action' => 'index'));
     $sidebarlist['newshift'] = array('tag' => 'Add New Shift', 'link' => array('modules' => $this->_modules, 'controller' => 'mfshifts', 'action' => 'new'));
     $sidebar->addList('Actions', $sidebarlist);
     $sidebarlist = array();
     $sidebarlist['viewshift'] = array('tag' => 'View Shift', 'link' => array('modules' => $this->_modules, 'controller' => 'mfshifts', 'action' => 'view', 'id' => $mfshiftoutput->mf_shift_id));
     $sidebarlist['edit'] = array('tag' => 'Edit Output', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'edit', 'id' => $mfshiftoutput->id));
     $sidebarlist['delete'] = array('tag' => 'Delete Output', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'delete', 'id' => $mfshiftoutput->id));
     $sidebarlist['addwastet'] = array('tag' => 'Add Waste', 'link' => array('modules' => $this->_modules, 'controller' => 'mfshiftwastes', 'action' => 'new', 'mf_shift_outputs_id' => $mfshiftoutput->id));
     $sidebar->addList('Current Shift Output', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:30,代码来源:MfshiftoutputsController.php

示例15: index

 public function index()
 {
     $flash = Flash::Instance();
     // Preserve any search criteria selection so that the context is maintained
     $s_data = array();
     if (isset($this->_data['id'])) {
         $s_data['wh_transfer_id'] = $this->_data['id'];
     }
     $this->view->set('clickaction', 'view');
     $whtransfer = new WHTransfer();
     $whtransfer->load($this->_data['id']);
     $this->view->set('whtransfer', $whtransfer);
     $from_store = WHLocation::getStoreLocation($whtransfer->from_whlocation_id);
     $this->view->set('from_store', $from_store);
     $to_store = WHLocation::getStoreLocation($whtransfer->to_whlocation_id);
     $this->view->set('to_store', $to_store);
     $this->setSearch('whtransfersSearch', 'useDefault', $s_data);
     parent::index(new WHTransferlineCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebarlist = array();
     $sidebarlist['all'] = array('tag' => 'View All Transfers', 'link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'index')));
     if ($whtransfer->awaitingTransfer()) {
         $sidebarlist['edit'] = array('tag' => 'Edit this Transfer', 'link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'edit', 'id' => $whtransfer->id)));
         $sidebarlist['cancel'] = array('tag' => 'Cancel this Transfer', 'link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'cancel', 'id' => $whtransfer->id)));
     }
     $sidebar->addList('Actions', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:29,代码来源:WhtransferlinesController.php


注:本文中的SidebarController::addList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。