Exemple #1
0
 /**
  * Get the toolbar to render.
  *
  * @return  RToolbar
  */
 public function getToolbar()
 {
     $group = new RToolbarButtonGroup();
     $save = RToolbarBuilder::createSaveButton('team.apply');
     $saveAndClose = RToolbarBuilder::createSaveAndCloseButton('team.save');
     $saveAndNew = RToolbarBuilder::createSaveAndNewButton('team.save2new');
     $save2Copy = RToolbarBuilder::createSaveAsCopyButton('team.save2copy');
     $group->addButton($save)->addButton($saveAndClose)->addButton($saveAndNew)->addButton($save2Copy);
     if (empty($this->item->id)) {
         $cancel = RToolbarBuilder::createCancelButton('team.cancel');
     } else {
         $cancel = RToolbarBuilder::createCloseButton('team.cancel');
     }
     $group->addButton($cancel);
     $toolbar = new RToolbar();
     $toolbar->addGroup($group);
     return $toolbar;
 }
Exemple #2
0
 /**
  * Get the toolbar to render.
  *
  * @return  RToolbar
  */
 public function getToolbar()
 {
     $canDo = OpenHrmHelpersAcl::getActions($this->state->get('filter.country_id'));
     $user = JFactory::getUser();
     $firstGroup = new RToolbarButtonGroup();
     $secondGroup = new RToolbarButtonGroup();
     if ($user->authorise('core.admin', 'com_openhrm.panel')) {
         $save = RToolbarBuilder::createSaveButton('employee.apply');
         $saveNew = RToolbarBuilder::createSaveAndNewButton('employee.savenew');
         $saveClose = RToolbarBuilder::createSaveAndCloseButton('employee.save');
         $firstGroup->addButton($save)->addButton($saveNew)->addButton($saveClose);
         $cancel = RToolbarBuilder::createCancelButton('employee.cancel');
         $secondGroup->addButton($cancel);
     }
     $toolbar = new RToolbar();
     $toolbar->addGroup($firstGroup)->addGroup($secondGroup);
     return $toolbar;
 }
Exemple #3
0
 /**
  * Get the toolbar to render.
  *
  * @return  RToolbar
  */
 public function getToolbar()
 {
     $group = new RToolbarButtonGroup();
     $user = JFactory::getUser();
     if ($user->authorise('core.admin', 'com_jab.panel')) {
         $save = RToolbarBuilder::createSaveButton('state.apply');
         $saveAndClose = RToolbarBuilder::createSaveAndCloseButton('state.save');
         $saveAndNew = RToolbarBuilder::createSaveAndNewButton('state.save2new');
         $group->addButton($save)->addButton($saveAndClose)->addButton($saveAndNew);
     }
     if (empty($this->item->id)) {
         $cancel = RToolbarBuilder::createCancelButton('state.cancel');
     } else {
         $cancel = RToolbarBuilder::createCloseButton('state.cancel');
     }
     $group->addButton($cancel);
     $toolbar = new RToolbar();
     $toolbar->addGroup($group);
     return $toolbar;
 }
Exemple #4
0
 /**
  * Get the toolbar to render.
  *
  * @todo	We have setup ACL requirements for Dummy
  *
  * @return  RToolbar
  */
 public function getToolbar()
 {
     $group1 = new RToolbarButtonGroup();
     $save = RToolbarBuilder::createSaveButton('object.apply');
     $saveAndClose = RToolbarBuilder::createSaveAndCloseButton('object.save');
     $saveAndNew = RToolbarBuilder::createSaveAndNewButton('object.save2new');
     $group1->addButton($save);
     $group2 = new RToolbarButtonGroup();
     $group2->addButton($saveAndClose);
     $group3 = new RToolbarButtonGroup();
     $group3->addButton($saveAndNew);
     if (empty($this->item->id)) {
         $cancel = RToolbarBuilder::createCancelButton('object.cancel');
     } else {
         $cancel = RToolbarBuilder::createCloseButton('object.cancel');
     }
     $group5 = new RToolbarButtonGroup();
     $group5->addButton($cancel);
     $toolbar = new RToolbar();
     $toolbar->addGroup($group1)->addGroup($group2)->addGroup($group3)->addGroup($group5);
     return $toolbar;
 }