예제 #1
2
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     if (isset($this->item->checked_out)) {
         $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     } else {
         $checkedOut = false;
     }
     $canDo = SomosmaestrosHelper::getActions();
     JToolBarHelper::title(JText::_('COM_SOMOSMAESTROS_TITLE_FORMACION'), 'formacion.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('formacion.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('formacion.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::custom('formacion.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('formacion.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('formacion.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('formacion.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #2
1
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('COM_REDSOCIALSTREAM_CONFIGURE'), 'configure.png');
     JToolBarHelper::apply();
     JToolBarHelper::cancel('cancel', 'COM_REDSOCIALSTREAM_CLOSE');
     //DEVNOTE: set document title
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_REDSOCIALSTREAM_REDSOCIALSTREAMS'));
     $mainframe = JFactory::getApplication();
     $context = "config";
     $model = $this->getModel('configure');
     $db = JFactory::getDbo();
     $q = "SELECT * FROM #__redsocialstream_settings";
     $db->setQuery($q);
     $this->settingsrows = $db->loadObjectList();
     $typelist = $this->get('type_list_sorted');
     $pagination = $this->get('Pagination');
     //DEVNOTE:give me ordering from request
     $filter_order = $mainframe->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'ordering');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '');
     $this->assignRef('lists', $lists);
     $this->assignRef("typelist", $typelist);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
예제 #3
1
파일: view.html.php 프로젝트: smhnaji/sdnet
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = SibdietHelper::getActions();
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_ERRAND'), 'database errands');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('errand.apply');
         JToolBarHelper::save('errand.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolbarHelper::save2new('errand.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2copy('errand.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('errand.cancel');
     } else {
         JToolBarHelper::cancel('errand.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #4
0
 public function display($tpl = null)
 {
     $Redconfiguration = new Redconfiguration();
     $uri = JFactory::getURI();
     $lists = array();
     $detail = $this->get('data');
     $isNew = $detail->zipcode_id < 1;
     $text = $isNew ? JText::_('COM_REDSHOP_NEW') : JText::_('COM_REDSHOP_EDIT');
     JToolBarHelper::title(JText::_('COM_REDSHOP_ZIPCODE_DETAIL') . ': <small><small>[ ' . $text . ' ]</small></small>', 'redshop_region_48');
     JToolBarHelper::save();
     JToolBarHelper::apply();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE'));
     }
     $countryarray = $Redconfiguration->getCountryList((array) $detail);
     $detail->country_code = $countryarray['country_code'];
     $lists['country_code'] = $countryarray['country_dropdown'];
     $statearray = $Redconfiguration->getStateList((array) $detail);
     $lists['state_code'] = $statearray['state_dropdown'];
     $this->detail = $detail;
     $this->lists = $lists;
     $this->request_url = $uri->toString();
     parent::display($tpl);
 }
예제 #5
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = RedirectHelper::getActions();
     JToolBarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINK'), 'redirect');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('link.apply');
         JToolBarHelper::save('link.save');
     }
     // This component does not support Save as Copy due to uniqueness checks.
     // While it can be done, it causes too much confusion if the user does
     // not change the Old URL.
     if ($canDo->get('core.edit') && $canDo->get('core.create')) {
         JToolBarHelper::save2new('link.save2new');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('link.cancel');
     } else {
         JToolBarHelper::cancel('link.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER_EDIT');
 }
예제 #6
0
 protected function addToolbar()
 {
     JToolBarHelper::title(JText::_('COM_JDEVELOPER_OVERRIDE'));
     JToolBarHelper::apply('override.apply');
     JToolBarHelper::save('override.save');
     JToolBarHelper::cancel('override.cancel', 'JTOOLBAR_CANCEL');
 }
예제 #7
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addEditEntityToolbar()
 {
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->record->id == 0;
     $checkedOut = !($this->record->checked_out == 0 || $this->record->checked_out == $userId);
     $toolbarHelperTitle = $isNew ? 'COM_JMAP_DATASETS_NEW' : 'COM_JMAP_DATASETS_EDIT';
     $doc = JFactory::getDocument();
     $doc->addStyleDeclaration('.icon-48-jmap{background-image:url("components/com_jmap/images/icon-48-datasets.png")}');
     JToolBarHelper::title(JText::_($toolbarHelperTitle), 'jmap');
     if ($isNew) {
         // For new records, check the create permission.
         if ($isNew && $user->authorise('core.create', 'com_jmap')) {
             JToolBarHelper::apply('datasets.applyEntity', 'JAPPLY');
             JToolBarHelper::save('datasets.saveEntity', 'JSAVE');
             JToolBarHelper::save2new('datasets.saveEntity2New');
         }
     } else {
         // Can't save the record if it's checked out.
         if (!$checkedOut) {
             // Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
             if ($user->authorise('core.edit', 'com_jmap')) {
                 JToolBarHelper::apply('datasets.applyEntity', 'JAPPLY');
                 JToolBarHelper::save('datasets.saveEntity', 'JSAVE');
                 JToolBarHelper::save2new('datasets.saveEntity2New');
             }
         }
     }
     JToolBarHelper::custom('datasets.cancelEntity', 'cancel', 'cancel', 'JCANCEL', false);
 }
예제 #8
0
파일: view.html.php 프로젝트: smhnaji/sdnet
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     // Built the actions for new and existing records.
     $canDo = JHelperContent::getActions('com_testyourself');
     JToolBarHelper::title(JText::_('COM_TESTYOURSELF_MANAGER_QUESTION'), 'question questions');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('question.apply');
         JToolBarHelper::save('question.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolbarHelper::save2new('question.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2copy('question.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('question.cancel');
     } else {
         JToolBarHelper::cancel('question.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #9
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
     JToolBarHelper::title(JText::_($isNew ? 'COM_MENUS_VIEW_NEW_MENU_TITLE' : 'COM_MENUS_VIEW_EDIT_MENU_TITLE'), 'menu.png');
     // If a new item, can save the item.  Allow users with edit permissions to apply changes to prevent returning to grid.
     if ($isNew && $canDo->get('core.create')) {
         if ($canDo->get('core.edit')) {
             JToolBarHelper::apply('menu.apply');
         }
         JToolBarHelper::save('menu.save');
     }
     // If user can edit, can save the item.
     if (!$isNew && $canDo->get('core.edit')) {
         JToolBarHelper::apply('menu.apply');
         JToolBarHelper::save('menu.save');
     }
     // If the user can create new items, allow them to see Save & New
     if ($canDo->get('core.create')) {
         JToolBarHelper::save2new('menu.save2new');
     }
     if ($isNew) {
         JToolBarHelper::cancel('menu.cancel');
     } else {
         JToolBarHelper::cancel('menu.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_MENUS_MENU_MANAGER_EDIT');
 }
예제 #10
0
 public function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('COM_REDSHOP_GIFTCARD_MANAGEMENT'), 'redshop_giftcard_48');
     $uri = JFactory::getURI();
     jimport('joomla.html.pane');
     $pane = JPane::getInstance('sliders');
     $this->pane = $pane;
     $this->setLayout('default');
     $lists = array();
     $detail = $this->get('data');
     $isNew = $detail->giftcard_id < 1;
     $text = $isNew ? JText::_('COM_REDSHOP_NEW') : JText::_('COM_REDSHOP_EDIT');
     JToolBarHelper::title(JText::_('COM_REDSHOP_GIFTCARDS') . ': <small><small>[ ' . $text . ' ]</small></small>', 'redshop_giftcard_48');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE'));
     }
     $lists['customer_amount'] = JHTML::_('select.booleanlist', 'customer_amount', 'class="inputbox" ', $detail->customer_amount);
     $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $detail->published);
     if (ECONOMIC_INTEGRATION == 1) {
         $redhelper = new redhelper();
         $accountgroup = $redhelper->getEconomicAccountGroup();
         $op = array();
         $op[] = JHTML::_('select.option', '0', JText::_('COM_REDSHOP_SELECT'));
         $accountgroup = array_merge($op, $accountgroup);
         $lists["accountgroup_id"] = JHTML::_('select.genericlist', $accountgroup, 'accountgroup_id', 'class="inputbox" size="1" ', 'value', 'text', $detail->accountgroup_id);
     }
     $this->lists = $lists;
     $this->detail = $detail;
     $this->request_url = $uri->toString();
     parent::display($tpl);
 }
예제 #11
0
파일: services.php 프로젝트: Tommar/remate
 function __construct($default = array())
 {
     parent::__construct($default);
     $task = JRequest::getWord('task', '');
     switch ($task) {
         case 'add':
         case 'save':
         case 'apply':
         case 'edit':
             JToolBarHelper::apply();
             JToolBarHelper::save();
             JToolBarHelper::cancel();
             break;
         default:
             JToolBarHelper::addNew();
             JToolBarHelper::deleteList();
             JToolBarHelper::makeDefault('publish');
             break;
     }
     // Register Extra tasks
     JRequest::setVar('view', 'services');
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('publish', 'setDefault');
 }
예제 #12
0
 function toolbar()
 {
     switch (JRequest::getCmd('task')) {
         case 'edit':
         case 'apply':
         case 'add':
             switch (JRequest::getCmd('task')) {
                 case 'add':
                     JToolBarHelper::title(JText::_('COM_REDFORM_Add_Value'), 'redform_plus');
                     break;
                 default:
                     JToolBarHelper::title(JText::_('COM_REDFORM_Edit_Value'), 'redform_plus');
                     break;
             }
             JToolBarHelper::save();
             JToolBarHelper::apply();
             JToolBarHelper::cancel();
             break;
         default:
             JToolBarHelper::title(JText::_('COM_REDFORM_Values'), 'redform_values');
             if ($this->get('Total', 'fields') > 0) {
                 JToolBarHelper::publishList();
                 JToolBarHelper::unpublishList();
                 JToolBarHelper::spacer();
                 JToolBarHelper::deleteList();
                 JToolBarHelper::editListX();
                 JToolBarHelper::addNew();
             }
             break;
     }
 }
예제 #13
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = BannersHelper::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_CLIENT_NEW') : JText::_('COM_BANNERS_MANAGER_CLIENT_EDIT'), 'banners-clients.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('client.apply');
         JToolBarHelper::save('client.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('client.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('client.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('client.cancel');
     } else {
         JToolBarHelper::cancel('client.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS_EDIT');
 }
예제 #14
0
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jcomments.php';
     JFactory::getApplication()->input->set('hidemainmenu', 1);
     $userId = JFactory::getUser()->get('id');
     $canDo = JCommentsHelper::getActions();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     if (version_compare(JVERSION, '3.0', 'ge')) {
         JToolbarHelper::title($isNew ? JText::_('A_SMILIES_SMILEY_NEW') : JText::_('A_SMILIES_SMILEY_EDIT'), 'smilies.png');
     } else {
         JToolbarHelper::title($isNew ? JText::_('A_SMILIES_SMILEY_NEW') : JText::_('A_SMILIES_SMILEY_EDIT'), 'jcomments-smilies');
     }
     if (!$checkedOut && $canDo->get('core.edit')) {
         JToolBarHelper::apply('smiley.apply');
         JToolBarHelper::save('smiley.save');
     }
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2new('smiley.save2new');
     }
     if ($isNew) {
         JToolBarHelper::cancel('smiley.cancel');
     } else {
         JToolBarHelper::cancel('smiley.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #15
0
 function _setToolBar()
 {
     JToolBarHelper::title(JText::_('ROLES_MANAGER_TITLE'), 'roles');
     JToolBarHelper::save('save_package');
     JToolBarHelper::apply('apply_package');
     JToolBarHelper::cancel('cancel_package');
 }
예제 #16
0
 protected function addToolBar()
 {
     //JRequest::setVar('hidemainmenu', true);
     JToolBarHelper::title(JText::_('Settings'));
     JToolBarHelper::apply('settings.apply');
     JToolBarHelper::cancel('settings.cancel', 'JTOOLBAR_CLOSE');
 }
예제 #17
0
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     if (isset($this->item->checked_out)) {
         $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     } else {
         $checkedOut = false;
     }
     $canDo = JvpricetableHelper::getActions();
     JToolBarHelper::title(JText::_('COM_JVPRICETABLE_TITLE_ITEM'), 'item.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('item.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('item.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::custom('item.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('item.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('item.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('item.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::custom('item.template', 'briefcase', 'briefcase', 'COM_JVPRICETABLE_TEMPLATE', false);
     JToolBarHelper::custom('item.customcss', 'list', 'list', 'COM_JVPRICETABLE_CUSTOMCSS', false);
 }
예제 #18
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_GROUP_TITLE' : 'COM_USERS_VIEW_EDIT_GROUP_TITLE'), 'groups-add');
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         JToolBarHelper::apply('group.apply');
         JToolBarHelper::save('group.save');
     }
     if ($canDo->get('core.create')) {
         JToolBarHelper::save2new('group.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('group.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('group.cancel');
     } else {
         JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_USERS_GROUPS_EDIT');
 }
예제 #19
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     // Since we don't track these assets at the item level, use the category id.
     $canDo = BannersHelper::getActions($this->item->catid, 0);
     JToolBarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_BANNER_NEW') : JText::_('COM_BANNERS_MANAGER_BANNER_EDIT'), 'banners.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)) {
         JToolBarHelper::apply('banner.apply');
         JToolBarHelper::save('banner.save');
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2new('banner.save2new');
         }
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('banner.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('banner.cancel');
     } else {
         JToolBarHelper::cancel('banner.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS_EDIT');
 }
예제 #20
0
 /**
  * Add the page title and toolbar.
  *
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $uid = JFactory::getUser()->get('id');
     $access = PFtasksHelper::getListActions($this->item->id);
     $checked_out = !($this->item->checked_out == 0 || $this->item->checked_out == $uid);
     $is_new = $this->item->id == 0;
     JToolBarHelper::title(JText::_('COM_PROJECTFORK_PAGE_' . ($checked_out ? 'VIEW_TASKLIST' : ($is_new ? 'ADD_TASKLIST' : 'EDIT_TASKLIST'))), 'article-add.png');
     // Built the actions for new and existing records.
     // For new records, check the create permission.
     if ($is_new) {
         JToolBarHelper::apply('tasklist.apply');
         JToolBarHelper::save('tasklist.save');
         JToolBarHelper::save2new('tasklist.save2new');
         JToolBarHelper::cancel('tasklist.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checked_out) {
             if ($access->get('core.edit') || $access->get('core.edit.own') && $this->item->created_by == $uid) {
                 JToolBarHelper::apply('tasklist.apply');
                 JToolBarHelper::save('tasklist.save');
                 JToolBarHelper::save2new('tasklist.save2new');
             }
         }
         JToolBarHelper::save2copy('tasklist.save2copy');
         JToolBarHelper::cancel('tasklist.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #21
0
 function _setToolBar()
 {
     JToolBarHelper::title(JText::_('USER_RESOURCES_MANAGER'), 'addedit');
     JToolBarHelper::save('save_resources');
     JToolBarHelper::apply('apply_resources');
     JToolBarHelper::cancel();
 }
예제 #22
0
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->id;
     $isNew = $this->item->id == 0;
     $canDo = PlayJoomHelper::getActions($this->item->id);
     JToolBarHelper::title($isNew ? JText::_('COM_PLAYJOOM_MANAGER_PLAYJOOM_NEW') : JText::_('COM_PLAYJOOM_MANAGER_PLAYJOOM_EDIT_ARTIST'), 'Edit Artist');
     // Built the actions for new and existing records.
     if ($isNew) {
         // For new records, check the create permission.
         if ($canDo->get('core.create')) {
             JToolBarHelper::apply('album.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('album.save', 'JTOOLBAR_SAVE');
             JToolBarHelper::custom('album.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
         }
         JToolBarHelper::cancel('album.cancel', 'JTOOLBAR_CANCEL');
     } else {
         if ($canDo->get('core.edit')) {
             // We can save the new record
             JToolBarHelper::apply('album.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('album.save', 'JTOOLBAR_SAVE');
             // We can save this record, but check the create permission to see if we can return to make a new one.
             if ($canDo->get('core.create')) {
                 JToolBarHelper::custom('album.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
             }
         }
         if ($canDo->get('core.create')) {
             JToolBarHelper::custom('album.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
         }
         JToolBarHelper::cancel('album.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #23
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = JDownloadsHelper::getActions();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     $title = $isNew ? JText::_('COM_JDOWNLOADS_LICEDIT_ADD') : JText::_('COM_JDOWNLOADS_LICEDIT_EDIT');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . $title, 'jdlicenses');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('license.apply');
         JToolBarHelper::save('license.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('license.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('license.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('license.cancel');
     } else {
         JToolBarHelper::cancel('license.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.license', true);
 }
예제 #24
0
파일: view.html.php 프로젝트: akksi/jcg
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = NewsfeedsHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)) {
         JToolBarHelper::apply('newsfeed.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('newsfeed.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         JToolBarHelper::custom('newsfeed.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('newsfeed.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
 }
예제 #25
0
 /**
  * Add the page title and toolbar.
  *
  * @return void
  *
  * @throws Exception
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     if (isset($this->item->checked_out)) {
         $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     } else {
         $checkedOut = false;
     }
     $canDo = VocabHelper::getActions();
     JToolBarHelper::title(JText::_('COM_VOCAB_TITLE_SUBJECT'), 'subject.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('subject.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('subject.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::custom('subject.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('subject.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     // Button for version control
     if ($this->state->params->get('save_history', 1) && $user->authorise('core.edit')) {
         JToolbarHelper::versions('com_vocab.subject', $this->item->id);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('subject.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('subject.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #26
0
 protected function addToolbar()
 {
     $jinput = JFactory::getApplication()->input;
     $jinput->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $canDo = Bt_SocialconnectAdminHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title($isNew ? JText::_('COM_BT_SOCIALCONNECT_CONNECTION_NEW') : JText::_('COM_BT_SOCIALCONNECT_CONNECTION_EDIT'), 'socialconnect-add.png');
     if ($isNew && count($user->getAuthorisedCategories('com_bt_socialconnect', 'core.create')) > 0) {
         JToolBarHelper::apply('connection.apply');
         JToolBarHelper::save('connection.save');
         JToolBarHelper::save2new('connection.save2new');
         JToolBarHelper::cancel('connection.cancel');
     } else {
         if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) {
             JToolBarHelper::apply('connection.apply');
             JToolBarHelper::save('connection.save');
             // We can save this record, but check the create permission to see if we can return to make a new one.
             if ($canDo->get('core.create')) {
                 JToolBarHelper::save2new('connection.save2new');
             }
         }
         // If checked out, we can still save
         JToolBarHelper::cancel('connection.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
 }
예제 #27
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = TemplatesHelper::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_TEMPLATES_MANAGER_ADD_STYLE') : JText::_('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'thememanager');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('style.apply');
         JToolBarHelper::save('style.save');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('style.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('style.cancel');
     } else {
         JToolBarHelper::cancel('style.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     // Get the help information for the template item.
     $lang = JFactory::getLanguage();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = JText::_($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     JToolBarHelper::help($help->key, false, $url);
 }
예제 #28
0
파일: view.html.php 프로젝트: A-Bush/pprod
 /**
  * Sets the toolbar.
  */
 protected function addToolBar()
 {
     $canDo = SimpleCustomRouterHelper::getActions();
     $isNew = $this->item->id == 0;
     if ($isNew) {
         JToolBarHelper::title(JText::_('COM_SIMPLECUSTOMROUTER_MANAGER_ROUTE_NEW'));
         if ($canDo->get('core.create')) {
             JToolBarHelper::apply('route.apply');
             JToolBarHelper::save('route.save');
             JToolBarHelper::save2new('route.save2new');
         }
         JToolBarHelper::cancel('route.cancel');
     } else {
         JToolBarHelper::title(JText::_('COM_SIMPLECUSTOMROUTER_MANAGER_ROUTE_EDIT'));
         if ($canDo->get('core.edit')) {
             JToolBarHelper::apply('route.apply');
             JToolBarHelper::save('route.save');
             if ($canDo->get('core.create')) {
                 JToolBarHelper::save2new('route.save2new');
             }
         }
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2copy('route.save2copy');
         }
         JToolBarHelper::cancel('route.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #29
0
 /**
  * Setting the toolbar
  */
 public function addToolbar()
 {
     $input = JFactory::getApplication()->input;
     $input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->id;
     $isNew = $this->item->id == 0;
     JToolbarHelper::title($isNew ? JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW') : JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT'));
     if ($isNew) {
         if ($this->canDo->get('core.create')) {
             JToolBarHelper::apply('helloworld.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('helloworld.save', 'JTOOLBAR_SAVE');
             JToolBarHelper::custom('helloworld.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
         }
         JToolBarHelper::cancel('helloworld.cancel', 'JTOOLBAR_CANCEL');
         JToolbarHelper::save('helloworld.save');
         JToolbarHelper::cancel('helloworld.cancel', $isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE');
     } else {
         if ($this->canDo->get('core.edit')) {
             // We can save the new record
             JToolBarHelper::apply('helloworld.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('helloworld.save', 'JTOOLBAR_SAVE');
             // We can save this record, but check the create permission to see
             // if we can return to make a new one.
             if ($this->canDo->get('core.create')) {
                 JToolBarHelper::custom('helloworld.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
             }
         }
         if ($this->canDo->get('core.create')) {
             JToolBarHelper::custom('helloworld.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
         }
         JToolBarHelper::cancel('helloworld.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #30
0
 /**
  * redFORM view display method
  * @return void
  **/
 function display($tpl = null)
 {
     $mainframe =& JFactory::getApplication();
     $document = JFactory::getDocument();
     $row = $this->get('Data');
     $editor =& JFactory::getEditor();
     /* Create the published field */
     $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published);
     /* Get the fields */
     $fields = $this->get('FieldsOptions');
     $lists['fields'] = JHTML::_('select.genericlist', $fields, 'field_id', '', 'value', 'text', $row->field_id);
     /* Set variabels */
     $this->assignRef('row', $row);
     $this->assignRef('lists', $lists);
     $this->assignRef('editor', $editor);
     /* Get the toolbar */
     switch (JRequest::getCmd('task')) {
         case 'add':
             JToolBarHelper::title(JText::_('COM_REDFORM_Add_Value'), 'redform_plus');
             break;
         case 'ajaxedit':
             $this->setLayout('ajax');
             $this->assign('field_id', JRequest::getInt('fieldid'));
             break;
         default:
             JToolBarHelper::title(JText::_('COM_REDFORM_Edit_Value'), 'redform_plus');
             break;
     }
     JToolBarHelper::save();
     JToolBarHelper::apply();
     JToolBarHelper::cancel();
     /* Display the page */
     parent::display($tpl);
 }