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); }
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); }
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')); }
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'); }
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); }
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()); }
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); }
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); }
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)); }
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); }
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); }
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); }
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); }
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); }
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); }
public function view() { $flash = Flash::Instance(); if (MEMCACHED_ENABLED) { // fetch the item from the cache $cache = Cache::Instance(); $item = $cache->get($this->_data['id']); } else { $flash->addError("Cache is disabled"); sendBack(); } // make sure we've got something if ($item === FALSE) { $flash->addError("Cache item doesn't exist"); sendBack(); } // ammend output depending on the data type if (is_object($item) || is_array($item)) { $item = print_r($item, TRUE); } else { $item = var_export($item, TRUE); } // set smarty variables $this->view->set('item', $item); $this->view->set('title', $this->_data['id']); // set sidebar $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('view_all_caches' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'index'), 'tag' => 'view_all_caches'), 'flush_cache' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'delete', 'id' => $this->_data['id']), 'tag' => 'delete_key'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { // Cater for no module to edit. if (empty($this->_data['for_module'])) { $this->_data['for_module'] = 'shared'; } $sidebarList['shared'] = array('tag' => 'Shared', 'link' => array('module' => 'dashboard', 'controller' => 'preferences', 'action' => 'index', 'for_module' => 'shared')); $accessObject =& AccessObject::Instance(EGS_USERNAME); $module = DataObjectFactory::Factory('ModuleObject'); $modules = $module->getAll(); $sidebar = new SidebarController($this->view); foreach ($modules as $module) { if (!class_exists(ucfirst($module) . 'Preferences')) { continue; } if ($accessObject->hasPermission($module, 'preferences')) { $sidebarList[$module] = array('tag' => ucfirst($module) . ' Preferences', 'link' => array('module' => 'dashboard', 'controller' => 'preferences', 'action' => 'index', 'for_module' => $module)); } } if (empty($sidebarList)) { $flash = Flash::Instance(); $flash->addError('There are no preferences you can edit'); sendTo('index', 'index', array('dashboard')); } else { $sidebar->addList('Modules', $sidebarList); } $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); $module = $this->getPreferenceClass($this->_data['for_module']); $this->view->set('templateCode', $module->generateTemplate()); $this->view->set('page_title', $this->getPageName($this->_data['for_module'], 'Preferences for')); }
public function view() { $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']; } $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['awaiting'] = array('link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'selectWHTransfers')), 'tag' => 'View Transfers Awaiting Despatch'); $sidebarlist['completed'] = array('link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'viewWHTransfers')), 'tag' => 'View Completed Transfers'); if ($whtransfer->awaitingTransfer()) { $sidebarlist['edit'] = array('link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'transferStock', 'id' => $whtransfer->id)), 'tag' => 'Action this Transfer'); } if ($whtransfer->transferred()) { $sidebarlist['edit'] = array('link' => array_merge($this->_modules, array('controller' => 'WHTransfers', 'action' => 'printaction', 'printaction' => 'printTransferNote', 'filename' => 'WHT' . $whtransfer->transfer_number, 'id' => $whtransfer->id)), 'tag' => 'Reprint Transfer Note'); } $sidebar->addList('Actions', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function view() { if (!$this->loadData()) { $this->dataError(); sendBack(); } $holidayEntitlement = $this->_uses[$this->modeltype]; $employee = DataObjectFactory::Factory('Employee'); $employee->load($holidayEntitlement->employee_id); $this->view->set('employee', $employee); $currently_viewing = $employee->employee . ': ' . $holidayEntitlement->start_date . '-' . $holidayEntitlement->end_date; $sidebar = new SidebarController($this->view); $sidebar->addList('currently_viewing', array($employee->employee => array('tag' => $currently_viewing, 'link' => array('module' => 'hr', 'controller' => 'holidayentitlements', 'action' => 'view', 'id' => $holidayEntitlement->id)), 'edit' => array('tag' => 'Edit', 'link' => array('module' => 'hr', 'controller' => 'holidayentitlements', 'action' => 'edit', 'id' => $holidayEntitlement->id)))); $sidebar->addList('related_items', array('holidayextraday' => array('tag' => 'Holiday Extra Days', 'link' => array('module' => 'hr', 'controller' => 'holidayextradays', 'action' => 'viewentitlement', 'entitlement_period_id' => $holidayEntitlement->id), 'new' => array('module' => 'hr', 'controller' => 'holidayextradays', 'action' => 'new', 'entitlement_period_id' => $holidayEntitlement->id, 'employee_id' => $holidayEntitlement->employee_id)))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function _new() { parent::_new(); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => $this->_modules['module'], 'controller' => $this->name, 'action' => 'index'), 'tag' => 'Return to Supplementary Complaint Codes'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'edit'); parent::index(new CSFailureCodeCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new')), 'tag' => 'New Failure Code'), 'summary' => array('link' => array_merge($this->_modules, array('controller' => 'customerservices', 'action' => 'index')), 'tag' => 'Customer Service Summary'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); parent::index(new DataObjectCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('tag' => 'Add Downtime Code', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new')))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function view() { if (!$this->loadData()) { $this->dataError(); sendBack(); } $note = $this->_uses[$this->modeltype]; $sidebar = new SidebarController($this->view); $sidebarlist = array(); $sidebarlist['viewAll'] = array('tag' => 'View Work Schedules', 'link' => array('modules' => $this->_modules, 'controller' => 'workschedules', 'action' => 'index')); $sidebarlist['new'] = array('tag' => 'New Work Schedule', 'link' => array('modules' => $this->_modules, 'controller' => 'workschedules', 'action' => 'new')); $sidebar->addList('Actions', $sidebarlist); $sidebarlist = array(); $sidebarlist['edit'] = array('tag' => 'Edit', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'edit', $note->idField => $note->{$note->idField})); $sidebar->addList('This Note', $sidebarlist); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'edit'); parent::index(new SInvoiceLineCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array_merge($this->_modules, array('controller' => 'SInvoiceLines', 'action' => 'new')), 'tag' => 'new_SInvoiceLine'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); parent::index(new GLAnalysisCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new')), 'tag' => 'new_glanalysis'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); parent::index(new TicketModuleVersionCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'ticketing', 'controller' => 'tickets', 'action' => 'view'), 'tag' => 'View All Tickets'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function view() { $resourcetemplate = $this->_uses['Resourcetemplate']; $resourcetemplate->load($this->_data['id']) or sendBack(); $sidebar = new SidebarController($this->view); $sidebar->addList('currently_viewing', array($resourcetemplate->person_id => array('tag' => $resourcetemplate->person . ' (' . $resourcetemplate->name . ')', 'link' => array('module' => 'projects', 'controller' => 'resourcetemplate', 'action' => 'view', 'id' => $resourcetemplate->id)), 'edit' => array('tag' => 'Edit', 'link' => array('module' => 'projects', 'controller' => 'resourcetemplate', 'action' => 'edit', 'id' => $resourcetemplate->id)), 'delete' => array('tag' => 'Delete', 'link' => array('module' => 'projects', 'controller' => 'resourcetemplate', 'action' => 'delete', 'id' => $resourcetemplate->id)))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'edit'); parent::index(new STTypecodeCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('tag' => 'New Stock Type Code', 'link' => array_merge($this->_modules, array('controller' => $this->name, 'action' => 'new'))))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'edit'); parent::index(new SOPriceTypeCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'new_Price_Type'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function view() { $flash = Flash::Instance(); if (!$this->loadData()) { $this->dataError(); sendBack(); } $header = $this->_uses[$this->modeltype]; if ($header === false) { sendBack(); } $this->view->set('issue_lines', $header->lines); $sidebar = new SidebarController($this->view); $sidebar->addList('Project', array('view_project' => array('tag' => $header->project, 'link' => array('module' => 'projects', 'controller' => 'projects', 'action' => 'view', 'id' => $header->project_id)))); $sidebar->addList('Actions', array('edit' => array('link' => array('module' => 'projects', 'controller' => 'ProjectIssues', 'action' => 'edit', 'id' => $header->id), 'tag' => 'Edit Issue Header'), 'add_line' => array('link' => array('module' => 'projects', 'controller' => 'ProjectIssueLines', 'action' => 'new', 'header_id' => $header->id), 'tag' => 'New Issue Line'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }