Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public function index()
 {
     $s_data = array();
     $this->setSearch('mfshiftsSearch', 'useDefault', $s_data);
     $this->view->set('clickaction', 'view');
     parent::index(new MFShiftCollection($this->_templateobject));
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('Actions', array('new' => array('tag' => 'Add New Shift', 'link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'))));
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
Exemplo n.º 3
0
 public function viewmfshift()
 {
     if (!$this->CheckParams('mf_shift_id')) {
         sendBack();
     }
     $mfshift = DataObjectFactory::Factory('MFShift');
     $mfshift->load($this->_data['mf_shift_id']);
     if (!$mfshift->isLoaded()) {
         $this->dataError();
         sendBack();
     }
     $this->view->set('model', $mfshift);
     $mfshiftdowntimes = new MFShiftDowntimeCollection($this->_templateobject);
     $sh = $this->setSearchHandler($mfshiftdowntimes);
     $sh->setFields(array('id', 'downtime_code', 'down_time', 'time_period'));
     $sh->addConstraint(new Constraint('mf_shift_id', '=', $this->_data['mf_shift_id']));
     parent::index($mfshiftdowntimes, $sh);
     $this->view->set('clickaction', 'edit');
     $this->view->set('page_title', $this->getPageName('', 'View'));
 }
Exemplo n.º 4
0
 public function view_mfshift()
 {
     if (!$this->CheckParams('mf_shift_id')) {
         sendBack();
     }
     $mfshift = DataObjectFactory::Factory('MFShift');
     $mfshift->load($this->_data['mf_shift_id']);
     if (!$mfshift->isLoaded()) {
         $this->dataError();
         sendBack();
     }
     $this->view->set('model', $mfshift);
     $mfshiftoutputs = new MFShiftOutputCollection($this->_templateobject);
     $sh = $this->setSearchHandler($mfshiftoutputs);
     $sh->addConstraint(new Constraint('mf_shift_id', '=', $this->_data['mf_shift_id']));
     parent::index($mfshiftoutputs, $sh);
     $this->view->set('clickaction', 'view');
     $this->view->set('page_title', $this->getPageName('', 'View'));
 }