/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $group = new RToolbarButtonGroup(); $option = RToolbarBuilder::createRedcoreOptionsButton('com_redcore'); $group->addButton($option); $toolbar = new RToolbar(); $toolbar->addGroup($group); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); if ($user->authorise('core.admin', 'com_redmigrator.panel')) { $options = RToolbarBuilder::createRedcoreOptionsButton('com_redmigrator'); $firstGroup->addButton($options); } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $group = new RToolbarButtonGroup(); if (empty($this->item->id)) { $cancel = RToolbarBuilder::createCancelButton('payment_log.cancel'); } else { $cancel = RToolbarBuilder::createCloseButton('payment_log.cancel'); } $group->addButton($cancel); $toolbar = new RToolbar(); $toolbar->addGroup($group); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $group = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); $user = JFactory::getUser(); if ($user->authorise('core.admin', 'com_redcore')) { $save = RToolbarBuilder::createSaveButton('config.apply'); $saveAndClose = RToolbarBuilder::createSaveAndCloseButton('config.save'); $group->addButton($save)->addButton($saveAndClose); } $cancel = RToolbarBuilder::createCloseButton('config.cancel'); $group->addButton($cancel); $toolbar = new RToolbar(); $toolbar->addGroup($group)->addGroup($secondGroup); return $toolbar; }
/** * 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('organizationinfo.apply'); $saveClose = RToolbarBuilder::createSaveAndCloseButton('organizationinfo.save'); $firstGroup->addButton($save)->addButton($saveClose); $cancel = RToolbarBuilder::createCloseButton('organizationinfo.close'); $secondGroup->addButton($cancel); } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup); return $toolbar; }
/** * 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; }
/** * 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; }
/** * 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(); $thirdGroup = new RToolbarButtonGroup(); if ($user->authorise('core.admin', 'com_openhrm.panel')) { $new = RToolbarBuilder::createNewButton('employee.add'); $edit = RToolbarBuilder::createEditButton('employee.edit'); $firstGroup->addButton($new)->addButton($edit); $publish = RToolbarBuilder::createPublishButton('employees.published'); $unpublish = RToolbarBuilder::createPublishButton('employees.unpublished'); $secondGroup->addButton($publish)->addButton($unpublish); $delete = RToolbarBuilder::createDeleteButton('employees.delete'); $thirdGroup->addButton($delete); } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup); return $toolbar; }
/** * 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; }
/** * Get the tool-bar to render. * * @return RToolbar */ public function getToolbar() { $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); $thirdGroup = new RToolbarButtonGroup(); $fourthGroup = new RToolbarButtonGroup(); if ($user->authorise('core.create', 'com_tracks')) { $new = RToolbarBuilder::createNewButton('eventresult.add'); $firstGroup->addButton($new); $addall = RToolbarBuilder::createStandardButton('eventresults.addall', 'COM_TRACKS_ADD_ALL', '', 'icon-plus', false); $firstGroup->addButton($addall); } if ($user->authorise('core.edit', 'com_tracks')) { $edit = RToolbarBuilder::createEditButton('eventresult.edit'); $secondGroup->addButton($edit); $rank = RToolbarBuilder::createStandardButton('eventresults.saveranks', JText::_('COM_TRACKS_SAVE_RESULTS'), 'save-results', 'icon-save'); $secondGroup->addButton($rank); } if ($user->authorise('core.delete', 'com_tracks')) { $delete = RToolbarBuilder::createDeleteButton('eventresults.delete'); $fourthGroup->addButton($delete); } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup)->addGroup($fourthGroup); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $group = new RToolbarButtonGroup(); $save = RToolbarBuilder::createSaveButton('translation.apply'); $saveAndClose = RToolbarBuilder::createSaveAndCloseButton('translation.save'); $cancel = RToolbarBuilder::createCancelButton('translation.cancel'); $group->addButton($save)->addButton($saveAndClose)->addButton($cancel); $toolbar = new RToolbar(); $toolbar->addGroup($group); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { if ($this->getLayout() == 'test') { return null; } $canDo = $this->getActions(); $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); $thirdGroup = new RToolbarButtonGroup(); if ($user->authorise('core.admin', 'com_redcore')) { // Edit if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_redcore', 'core.create')) > 0) { $new = new RToolbarButtonStandard('COM_REDCORE_PAYMENT_CONFIGURATION_NEW_CONFIGURATION', 'payment_configuration.add', 'btn-success', 'icon-file-text', '', false); $firstGroup->addButton($new); } if ($canDo->get('core.edit')) { $edit = RToolbarBuilder::createEditButton('payment_configuration.edit'); $firstGroup->addButton($edit); } $new = new RToolbarButtonStandard('COM_REDCORE_PAYMENT_CONFIGURATION_TEST_CONFIGURATION', 'payment_configurations.test', '', 'icon-file-text', '', false); $secondGroup->addButton($new); // Delete / Trash if ($canDo->get('core.delete')) { $delete = RToolbarBuilder::createDeleteButton('payment_configurations.delete'); $thirdGroup->addButton($delete); } } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); if (!empty($this->contentElement)) { $delete = RToolbarBuilder::createDeleteButton('translations.delete'); $firstGroup->addButton($delete); // Manage $manage = RToolbarBuilder::createStandardButton('translations.manageContentElement', JText::_('COM_REDCORE_TRANSLATIONS_MANAGE_CONTENT_ELEMENTS'), 'btn btn-primary', 'icon-globe', false); $secondGroup->addButton($manage); } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup); return $toolbar; }
/** * Get the tool-bar to render. * * @return RToolbar */ public function getToolbar() { $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); $thirdGroup = new RToolbarButtonGroup(); $fourthGroup = new RToolbarButtonGroup(); if ($user->authorise('core.create', 'com_tracks')) { $new = RToolbarBuilder::createNewButton('eventtype.add'); $firstGroup->addButton($new); } if ($user->authorise('core.edit', 'com_tracks')) { $edit = RToolbarBuilder::createEditButton('eventtype.edit'); $secondGroup->addButton($edit); } if ($user->authorise('core.delete', 'com_tracks')) { $delete = RToolbarBuilder::createDeleteButton('eventtypes.delete'); $fourthGroup->addButton($delete); } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup)->addGroup($fourthGroup); return $toolbar; }
/** * Get the tool-bar to render. * * @todo The commented lines are going to be implemented once we have setup ACL requirements for Dummy * @return RToolbar */ public function getToolbar() { $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); $thirdGroup = new RToolbarButtonGroup(); $new = RToolbarBuilder::createNewButton('object.add'); $firstGroup->addButton($new); $edit = RToolbarBuilder::createEditButton('object.edit'); $secondGroup->addButton($edit); $delete = RToolbarBuilder::createDeleteButton('objects.delete'); $thirdGroup->addButton($delete); $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $canDo = $this->getActions(); $group = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); $thirdGroup = new RToolbarButtonGroup(); $user = JFactory::getUser(); if ($user->authorise('core.admin', 'com_redcore')) { if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_redcore', 'core.create')) > 0) { $new = RToolbarBuilder::createNewButton('webservice.add'); $group->addButton($new); } if ($canDo->get('core.edit')) { $edit = RToolbarBuilder::createEditButton('webservice.edit'); $group->addButton($edit); $publish = RToolbarBuilder::createPublishButton('webservices.publish'); $unPublish = RToolbarBuilder::createUnpublishButton('webservices.unpublish'); $secondGroup->addButton($publish)->addButton($unPublish); } if ($canDo->get('core.delete')) { $delete = RToolbarBuilder::createDeleteButton('webservices.delete'); $thirdGroup->addButton($delete); } } $toolbar = new RToolbar(); $toolbar->addGroup($group)->addGroup($secondGroup)->addGroup($thirdGroup); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $canDo = RedsourceHelpersAcl::getActions(); $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); if ($user->authorise('core.admin', 'com_redsource')) { // Add / edit if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_redsource', 'core.create')) > 0) { $new = RToolbarBuilder::createNewButton('ctype.add'); $firstGroup->addButton($new); } if ($canDo->get('core.edit')) { $edit = RToolbarBuilder::createEditButton('ctype.edit'); $firstGroup->addButton($edit); } // Publish / Unpublish if ($canDo->get('core.edit.state')) { $publish = RToolbarBuilder::createPublishButton('ctypes.publish'); $unpublish = RToolbarBuilder::createUnpublishButton('ctypes.unpublish'); $firstGroup->addButton($publish)->addButton($unpublish); } // Delete / Trash if ($canDo->get('core.delete')) { $delete = RToolbarBuilder::createDeleteButton('ctypes.delete'); $secondGroup->addButton($delete); } } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $canDo = JabHelper::getActions($this->state->get('filter.category_id')); $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); $thirdGroup = new RToolbarButtonGroup(); if ($user->authorise('core.admin', 'com_jab.panel')) { $panel = RToolbarBuilder::createStandardButton('states.topanel', 'COM_JAB_CONTROL_PANEL_TITLE', '', 'icon-home', false); $firstGroup->addButton($panel); // Add / edit if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_jab', 'core.create')) > 0) { $new = RToolbarBuilder::createNewButton('state.add'); $secondGroup->addButton($new); } if ($canDo->get('core.edit')) { $edit = RToolbarBuilder::createEditButton('state.edit'); $secondGroup->addButton($edit); } // Publish / Unpublish if ($canDo->get('core.edit.state')) { $publish = RToolbarBuilder::createPublishButton('states.publish'); $unpublish = RToolbarBuilder::createUnpublishButton('states.unpublish'); $secondGroup->addButton($publish)->addButton($unpublish); } // Delete / Trash if ($canDo->get('core.delete')) { $delete = RToolbarBuilder::createDeleteButton('states.delete'); $thirdGroup->addButton($delete); } // Preferences if ($canDo->get('core.admin')) { $options = RToolbarBuilder::createOptionsButton('com_jab'); $thirdGroup->addButton($options); } } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $canDo = $this->getActions(); $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup(); if ($user->authorise('core.admin', 'com_redcore')) { // Add / edit if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_redcore', 'core.create')) > 0) { $new = RToolbarBuilder::createNewButton('oauth_client.add'); $firstGroup->addButton($new); } if ($canDo->get('core.edit')) { $edit = RToolbarBuilder::createEditButton('oauth_client.edit'); $firstGroup->addButton($edit); } // Delete / Trash if ($canDo->get('core.delete')) { $delete = RToolbarBuilder::createDeleteButton('oauth_clients.delete'); $secondGroup->addButton($delete); } } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup); return $toolbar; }
/** * Get the toolbar to render. * * @return RToolbar */ public function getToolbar() { $canDo = $this->getActions(); $user = JFactory::getUser(); $firstGroup = new RToolbarButtonGroup(); $secondGroup = new RToolbarButtonGroup('', true, 'icon-cogs', JText::_('COM_REDCORE_PAYMENT_OPTIONS')); $thirdGroup = new RToolbarButtonGroup(); if ($user->authorise('core.admin', 'com_redcore')) { if ($canDo->get('core.edit')) { $button = new RToolbarButtonStandard('COM_REDCORE_PAYMENT_INSPECT_PAYMENT', 'payment.edit', '', 'icon-edit'); $firstGroup->addButton($button); $button = new RToolbarButtonStandard('COM_REDCORE_PAYMENT_CHECK_PAYMENT', 'payment.checkPayment', '', 'icon-refresh'); $secondGroup->addButton($button); $button = new RToolbarButtonStandard('COM_REDCORE_PAYMENT_CAPTURE_PAYMENT', 'payment.capturePayment', '', 'icon-money'); $secondGroup->addButton($button); $button = new RToolbarButtonStandard('COM_REDCORE_PAYMENT_REFUND_PAYMENT', 'payment.refundPayment', '', 'icon-money'); $secondGroup->addButton($button); $button = new RToolbarButtonStandard('COM_REDCORE_PAYMENT_DELETE_PAYMENT', 'payment.deletePayment', '', 'icon-money'); $secondGroup->addButton($button); } // Delete / Trash if ($canDo->get('core.delete')) { $delete = RToolbarBuilder::createDeleteButton('payments.delete'); $thirdGroup->addButton($delete); } } $toolbar = new RToolbar(); $toolbar->addGroup($firstGroup)->addGroup($secondGroup)->addGroup($thirdGroup); return $toolbar; }