コード例 #1
3
ファイル: view.html.php プロジェクト: carmerin/cesae-web
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = MessagesHelper::getActions();
     JToolBarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'inbox.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('message.add');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ');
         JToolBarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::divider();
         JToolBarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::divider();
             JToolBarHelper::trash('messages.trash');
         }
     }
     //JToolBarHelper::addNew('module.add');
     JToolBarHelper::divider();
     $bar = JToolBar::getInstance('toolbar');
     $bar->appendButton('Popup', 'options', 'COM_MESSAGES_TOOLBAR_MY_SETTINGS', 'index.php?option=com_messages&view=config&tmpl=component', 850, 400);
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_messages');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
 }
コード例 #2
0
ファイル: toolbar.php プロジェクト: magev88/admirorgallery
 public static function getToolbar()
 {
     $bar = new JToolBar('toolbar');
     $bar->appendButton('Standard', 'AG_apply', 'COM_ADMIRORGALLERY_APPLY_DESC', 'AG_apply', false);
     $bar->appendButton('Standard', 'AG_reset', 'COM_ADMIRORGALLERY_RESET_DESC', 'AG_reset', false);
     return $bar->render();
 }
コード例 #3
0
ファイル: toolbar.php プロジェクト: magev88/admirorgallery
 function getToolbar()
 {
     $bar = new JToolBar('toolbar');
     // The first parameter is the button type. have a look a the JToolbar or JButton docs for a full list of these.
     // The second parameter is the class to apply to the button ( this will help us to apply an image to it as in the backend )
     // The third parameter is the text to display on the button.
     // The fourth is the task to set. When the button is pressed the javascript submitButton function is called and the hidden field 'task' is set to this value. We will see this later in our template file.
     // The fifth states whether a selection must be made from an admin list before continuing.
     $bar->appendButton('Standard', 'AG_apply', JText::_('AG_APPLY DESC'), 'AG_apply', false);
     $bar->appendButton('Standard', 'AG_reset', JText::_('AG_RESET DESC'), 'AG_reset', false);
     return $bar->render();
 }
コード例 #4
0
 function display()
 {
     $tpl = JRequest::getVar('tpl');
     // Add toolbar buttons
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('DBEF') . '</small></small>');
     JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
     JToolBarHelper::spacer();
     $bar =& JToolBar::getInstance('toolbar');
     switch ($tpl) {
         case 'tab':
             JToolBarHelper::deleteList();
             $bar->appendButton('Link', 'preview', JText::_('NORMALVIEW'), 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view'));
             break;
         case '':
         default:
             $bar->appendButton('Link', 'preview', JText::_('TABULARVIEW'), 'index.php?option=com_joomlapack&view=' . JRequest::getCmd('view') . '&tpl=tab');
             break;
     }
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('dbef');
     if ($tpl == 'tab') {
         $model =& $this->getModel('Dbef');
         $task = JRequest::getCmd('task', 'default');
         $list =& $model->getRecordsList();
         $this->assignRef('list', $list);
         $this->assignRef('pagination', $model->getPagination());
         $this->assignRef('class', $model->_filterclass);
     }
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     parent::display($tpl);
 }
コード例 #5
0
ファイル: view.html.php プロジェクト: rsam/com_tsj
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     $state = $this->get('State');
     $user = JFactory::getUser();
     //$canDo	= TSJsHelper::getActions('com_tsj', 'category', $state->get('filter.category_id'));
     if (version_compare(JPlatform::RELEASE, '12', '<')) {
     } else {
         $categoryId = $this->state->get('filter.category_id');
     }
     JToolBarHelper::title(JText::_('COM_TSJ_MANAGER_TARIF'));
     //Выводим кнопку настройки
     /*if (JFactory::getUser()->authorise('core.admin', 'com_tsj')) {
     		JToolBarHelper::preferences('com_tsj');
     		JToolBarHelper::divider();
     		}*/
     $toolbar = JToolBar::getInstance('toolbar');
     $toolbar->addButtonPath(JPATH_COMPONENT . DS . 'buttons');
     JToolBarHelper::addNew('tarif.add');
     JToolBarHelper::editList('tarif.edit');
     JToolBarHelper::deleteList('Вы действительно хотите удалить выбранные записи ?', 'tarif.remove');
     JToolBarHelper::help('com_tsj', true);
     if (version_compare(JPlatform::RELEASE, '12', '>=')) {
         JHtmlSidebar::setAction('index.php?option=com_tsj&view=default');
     }
 }
コード例 #6
0
ファイル: view.html.php プロジェクト: smhnaji/sdnet
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/sibdiet.php';
     $state = $this->get('State');
     $canDo = SibdietHelper::getActions();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_ACTIVITIES'), 'database activities');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('activity.add');
     }
     if ($canDo->get('core.edit') && isset($this->items[0])) {
         JToolBarHelper::editList('activity.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('activities.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::publish('activities.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::deleteList('', 'activities.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('activities.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_sibdiet');
     }
     JHtmlSidebar::setAction('index.php?option=com_sibdiet&view=activities');
 }
コード例 #7
0
ファイル: view.html.php プロジェクト: juanferden/adoperp
 function listing()
 {
     $app = JFactory::getApplication();
     $config = acymailing_config();
     if (!class_exists('plgSystemAcymailingClassMail')) {
         $app->enqueueMessage('AcyMailing can customize some Joomla messages. If you want to do this, please first <a href="index.php?option=com_acymailing&ctrl=cpanel">enable the plugin acymailingclassmail</a>', 'notice');
     }
     $pageInfo = new stdClass();
     $pageInfo->filter = new stdClass();
     $pageInfo->filter->order = new stdClass();
     $paramBase = ACYMAILING_COMPONENT . '.' . $this->getName();
     $pageInfo->filter->order->value = $app->getUserStateFromRequest($paramBase . ".filter_order", 'filter_order', 'mailid', 'cmd');
     $pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase . ".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
     $db = JFactory::getDBO();
     $query = 'SELECT mailid, subject, alias, fromname, published, fromname, fromemail, replyname, replyemail FROM #__acymailing_mail WHERE `type` = ' . $db->Quote($this->type);
     if (!empty($pageInfo->filter->order->value)) {
         $query .= ' ORDER BY ' . $pageInfo->filter->order->value . ' ' . $pageInfo->filter->order->dir;
     }
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     acymailing_setTitle(JText::_($this->nameListing), $this->icon, $this->ctrl);
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::custom('preview', 'acypreview', '', JText::_('ACY_PREVIEW'), true);
     JToolBarHelper::editList();
     JToolBarHelper::deleteList(JText::_('ACY_VALIDDELETEITEMS'));
     JToolBarHelper::divider();
     $bar->appendButton('Pophelp', $this->doc);
     $bar->appendButton('Link', 'acymailing', JText::_('ACY_CPANEL'), acymailing_completeLink('dashboard'));
     $toggleClass = acymailing_get('helper.toggle');
     $this->assignRef('toggleClass', $toggleClass);
     $this->assignRef('pageInfo', $pageInfo);
     $this->assign('config', $config);
     $this->assign('rows', $rows);
 }
コード例 #8
0
 /**
  *
  * Add an toolbar dropdown list
  *
  * @param String $text is text of parent
  * @param String $title is title of parent
  * @param String $icon is icon class prefix
  * @param String $childs is HTML
  * @param String $href is url of parent
  * @param String $action is action you want when click on parent
  */
 public static function dropdown($text = '', $title = '', $icon = 'jsn-parent', $childs = '', $href = '', $action = 'popup')
 {
     JSNFactory::localimport('helpers.html.toolbar.button.jsndropdown');
     $bar = JToolBar::getInstance('toolbar');
     // Add a standard button.
     $bar->appendButton('JSNDropdown', $text, $title, $icon, $childs, $href, $action);
 }
コード例 #9
0
ファイル: view.html.php プロジェクト: kosmosby/medicine-prof
 protected function addToolBar()
 {
     JToolBarHelper::title(JText::_('COM_JUDOWNLOAD_MANAGER_TAGS'), 'tags');
     if ($this->groupCanDoManage) {
         if ($this->canDo->get('core.create')) {
             JToolBarHelper::addNew('tag.add');
         }
         if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own')) {
             JToolBarHelper::editList('tag.edit');
         }
         if ($this->canDo->get('core.edit.state')) {
             JToolbarHelper::publish('tags.publish', 'JTOOLBAR_PUBLISH', true);
             JToolbarHelper::unpublish('tags.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
     }
     if ($this->groupCanDoDelete) {
         if ($this->canDo->get('core.delete')) {
             JToolBarHelper::deleteList('COM_JUDOWNLOAD_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THESE_ITEMS', 'tags.delete');
         }
     }
     JToolBarHelper::divider();
     $bar = JToolBar::getInstance('toolbar');
     $bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judownload/helpers/button");
     $bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
 }
コード例 #10
0
ファイル: view.html.php プロジェクト: kosmosby/medicine-prof
 protected function addToolBar()
 {
     JToolBarHelper::title(JText::_('COM_JUDOWNLOAD_MANAGER_TEMPLATE_STYLES'), 'style');
     if ($this->groupCanDoManage) {
         if ($this->canDo->get('core.create')) {
             JToolBarHelper::addNew('style.add');
         }
         if ($this->canDo->get('core.edit')) {
             JToolBarHelper::editList('style.edit');
         }
         if ($this->canDo->get('core.create')) {
             JToolbarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
             JToolbarHelper::divider();
         }
     }
     if ($this->groupCanDoDelete) {
         if ($this->canDo->get('core.delete')) {
             JToolBarHelper::deleteList('COM_JUDOWNLOAD_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THESE_STYLES', 'styles.delete');
         }
     }
     JToolBarHelper::divider();
     $bar = JToolBar::getInstance('toolbar');
     $bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judownload/helpers/button");
     $bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
 }
コード例 #11
0
ファイル: view.php プロジェクト: enjoy2000/smcd
 function display($tpl = null)
 {
     $canDo = JCKHelper::getActions();
     $app = JFactory::getApplication();
     if (!$canDo->get('jckman.install')) {
         $app->redirect(JRoute::_('index.php?option=com_jckman&view=cpanel', false), JText::_('COM_JCKMAN_PLUGIN_PERM_NO_INSTALL'), 'error');
         return false;
     }
     //end if
     /*
      * Set toolbar items for the page
      */
     $bar =& JToolBar::getInstance('toolbar');
     // Add a Link button for Control Panel
     $bar->appendButton('Link', 'cpanel', JText::_('COM_JCKMAN_SUBMENU_CPANEL_NAME'), 'index.php?option=com_jckman&controller=cpanel');
     JToolBarHelper::help('screen.installer');
     $paths = new stdClass();
     $paths->first = '';
     $lookup = array(JHTML::_('select.option', 0, JText::_('All')));
     $selections =& $this->get('ToolbarList');
     $lists['selections'] = JHTML::_('select.genericlist', $selections, 'selections[]', 'class="inputbox" size="15" multiple="multiple" style=width:182px;', 'value', 'text', $lookup, 'selections');
     $this->assignRef('paths', $paths);
     $this->assignRef('state', $this->get('state'));
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
コード例 #12
0
ファイル: view.html.php プロジェクト: whiteof/comcar
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_WCATALOG_MANAGER_CATEGORIES'), 'categories.png');
     JToolbarHelper::addNew('category.add');
     JToolbarHelper::editList('category.edit');
     JToolbarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
     JToolbarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     //JToolbarHelper::archiveList('categories.archive');
     //JToolbarHelper::checkin('categories.checkin');
     JToolbarHelper::deleteList('', 'categories.delete', 'JTOOLBAR_DELETE');
     //JToolbarHelper::preferences('com_wcatalog');
     //JToolbarHelper::help('JHELP_COMPONENTS_WCATALOG_CATEGORIES');
     JHtmlSidebar::setAction('index.php?option=com_wcatalog&view=categories');
     /*
     JHtmlSidebar::addFilter(
     	JText::_('JOPTION_SELECT_PUBLISHED'),
     	'filter_published',
     	JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
     );
     
     JHtmlSidebar::addFilter(
     	JText::_('COM_WCATALOG_PARENT_CATEGORY'),
     	'filter_category_id',
     	JHtml::_('select.options', JHtml::_('category.options', 'com_wcatalog'), 'value', 'text', $this->state->get('filter.category_id'))
     );
     */
 }
コード例 #13
0
ファイル: view.html.php プロジェクト: scarsroga/blog-soa
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'phocagallerycs.php';
     $state = $this->get('State');
     $canDo = PhocaGalleryCsHelper::getActions($state->get('filter.category_id'));
     $user = JFactory::getUser();
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_PHOCAGALLERY_CATEGORIES'), 'folder');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('phocagalleryc.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('phocagalleryc.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('phocagallerycs.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('phocagallerycs.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::custom('phocagallerycs.approve', 'approve.png', '', 'COM_PHOCAGALLERY_APPROVE', true);
         JToolBarHelper::custom('phocagallerycs.disapprove', 'disapprove.png', '', 'COM_PHOCAGALLERY_NOT_APPROVE', true);
         JToolBarHelper::custom('phocagallerycs.cooliris', 'cooliris.png', '', 'COM_PHOCAGALLERY_COOLIRIS', true);
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList(JText::_('COM_PHOCAGALLERY_WARNING_DELETE_ITEMS'), 'phocagallerycs.delete', 'COM_PHOCAGALLERY_DELETE');
     }
     // Add a batch button
     if ($user->authorise('core.edit')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         $dhtml = "<button data-toggle=\"modal\" data-target=\"#collapseModal\" class=\"btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\n\t\t\t\t\t\t{$title}</button>";
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.phocagallery', true);
 }
コード例 #14
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     $canDo = LanguagesHelper::getActions();
     JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('language.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('language.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.published') != 2) {
             JToolBarHelper::publishList('languages.publish');
             JToolBarHelper::unpublishList('languages.unpublish');
         }
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('languages.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         // Add install languages link to the lang installer component
         $bar = JToolBar::getInstance('toolbar');
         $bar->appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_languages');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
 }
コード例 #15
0
ファイル: view.html.php プロジェクト: grlf/eyedock
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_messages');
     JToolbarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'envelope inbox');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('message.add');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::divider();
         JToolbarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ', true);
         JToolbarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD', true);
     }
     JToolbarHelper::divider();
     $bar = JToolBar::getInstance('toolbar');
     // Instantiate a new JLayoutFile instance and render the layout
     JHtml::_('behavior.modal', 'a.messagesSettings');
     $layout = new JLayoutFile('toolbar.mysettings');
     $bar->appendButton('Custom', $layout->render(array()), 'upload');
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::divider();
         JToolbarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::divider();
         JToolbarHelper::trash('messages.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_messages');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
 }
コード例 #16
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = MessagesHelper::getActions();
     JToolbarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'inbox.png');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('message.add');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::divider();
         JToolbarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ');
         JToolbarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::divider();
         JToolbarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::divider();
         JToolbarHelper::trash('messages.trash');
     }
     //JToolbarHelper::addNew('module.add');
     JToolbarHelper::divider();
     $bar = JToolBar::getInstance('toolbar');
     JHtml::_('bootstrap.modal', 'collapseModal');
     $title = JText::_('COM_MESSAGES_TOOLBAR_MY_SETTINGS');
     $dhtml = "<a class=\"btn modal btn-small\" href=\"index.php?option=com_messages&amp;view=config&amp;tmpl=component\"\n\t\t\t\t\trel=\"{handler:'iframe', size:{x:700,y:300}}\">\n\t\t\t\t\t<i class=\"icon-cog\" title=\"{$title}\"></i>{$title}</a>";
     $bar->appendButton('Custom', $dhtml, 'config');
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_messages');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
 }
コード例 #17
0
ファイル: view.html.php プロジェクト: proyectoseb/University
 protected function setToolbar()
 {
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_KUNENA') . ': ' . JText::_('COM_KUNENA_USER_MANAGER'), 'users');
     JToolBarHelper::spacer();
     JToolBarHelper::editList();
     JToolBarHelper::custom('logout', 'cancel.png', 'cancel_f2.png', 'COM_KUNENA_LOGOUT');
     JToolBarHelper::divider();
     JToolBarHelper::custom('move', 'move.png', 'move_f2.png', 'COM_KUNENA_MOVE_USERMESSAGES');
     if (version_compare(JVERSION, '3.0', '>')) {
         JHtml::_('bootstrap.modal', 'moderateModal');
         $title = JText::_('COM_KUNENA_VIEW_USERS_TOOLBAR_ASSIGN_MODERATORS');
         $dhtml = "<button data-toggle=\"modal\" data-target=\"#moderateModal\" class=\"btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"> </i>\n\t\t\t\t\t\t\t{$title}</button>";
         $bar->appendButton('Custom', $dhtml, 'batch');
     } else {
         JHtml::_('moobootstrap.modal', 'moderateModal');
         $title = JText::_('COM_KUNENA_VIEW_USERS_TOOLBAR_ASSIGN_MODERATORS');
         $dhtml = "<a data-toggle=\"modal\" data-target=\"#moderateModal\" class=\"toolbar\" href=\"javascript:void(null);\">\n\t\t\t\t\t\t<span class=\"icon-32-apply\" title=\"{$title}\"></span>\n\t\t\t\t\t\t\t{$title}</a>";
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     JToolBarHelper::divider();
     JToolBarHelper::custom('trashusermessages', 'trash.png', 'icon-32-move.png', 'COM_KUNENA_TRASH_USERMESSAGES');
     JToolBarHelper::deleteList();
     JToolBarHelper::spacer();
 }
コード例 #18
0
ファイル: documentation.php プロジェクト: q0821/esportshop
    function listing()
    {
        hikashop_setTitle(JText::_('DOCUMENTATION'), 'help_header', 'documentation');
        if (!HIKASHOP_PHP5) {
            $bar =& JToolBar::getInstance('toolbar');
        } else {
            $bar = JToolBar::getInstance('toolbar');
        }
        $bar->appendButton('Link', 'hikashop', JText::_('HIKASHOP_CPANEL'), hikashop_completeLink('dashboard'));
        $config =& hikashop_config();
        $level = $config->get('level');
        $url = HIKASHOP_HELPURL . 'documentation&level=' . $level;
        if (hikashop_isSSL()) {
            $url = str_replace('http://', 'https://', $url);
        }
        $config =& hikashop_config();
        $menu_style = $config->get('menu_style', 'title_bottom');
        if (HIKASHOP_J30) {
            $menu_style = 'content_top';
        }
        if ($menu_style == 'content_top') {
            echo hikashop_getMenu('', $menu_style);
        }
        ?>
				<div id="hikashop_div">
						<iframe allowtransparency="true" scrolling="auto" height="450px" frameborder="0" width="100%" name="hikashop_frame" id="hikashop_frame" src="<?php 
        echo $url;
        ?>
">
						</iframe>
				</div>
<?php 
    }
コード例 #19
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JFactory::getLanguage()->load('com_content');
     $state = $this->get('State');
     $canDo = TZ_Portfolio_PlusHelper::getActions($this->state->get('filter.category_id'));
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('article.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('article.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('articles.archive');
         JToolBarHelper::checkin('articles.checkin');
         JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::trash('articles.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_tz_portfolio_plus');
         //			JToolBarHelper::preferences('com_content');
         JToolBarHelper::divider();
     }
     $doc = JFactory::getDocument();
     // If the joomla is version 3.0
     if (COM_TZ_PORTFOLIO_PLUS_JVERSION_COMPARE) {
         $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio_plus/fonts/font-awesome-4.5.0/css/font-awesome.min.css');
     }
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio_plus/css/style.min.css');
     JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
     JHtmlSidebar::setAction('index.php?option=com_tz_portfolio_plus&view=featured');
     // Special HTML workaround to get send popup working
     $docClass = ' class="btn btn-small"';
     $youtubeIcon = '<i class="tz-icon-youtube tz-icon-14"></i>&nbsp;';
     $wikiIcon = '<i class="tz-icon-wikipedia tz-icon-14"></i>&nbsp;';
     $youtubeTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_VIDEO_TUTORIALS');
     $wikiTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_WIKIPEDIA_TUTORIALS');
     $videoTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://www.youtube.com/channel/UCykS6SX6L2GOI-n3IOPfTVQ/videos\', \'' . $youtubeTitle . '\', 800, 500, 1)"' . ' href="#">' . $youtubeIcon . $youtubeTitle . '</a>';
     $wikiTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://wiki.templaza.com/Main_Page\', \'' . $wikiTitle . '\', 800, 500, 1)"' . ' href="#">' . $wikiIcon . $wikiTitle . '</a>';
     $bar->appendButton('Custom', $videoTutorial, 'youtube');
     $bar->appendButton('Custom', $wikiTutorial, 'wikipedia');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $this->state->get('filter.category_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
 }
コード例 #20
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     JToolBarHelper::title(JText::_("COM_ITPMETA_DASHBOARD"));
     // Help button
     $bar = JToolBar::getInstance('toolbar');
     $bar->appendButton('Link', 'help', JText::_('JHELP'), JText::_('COM_ITPMETA_HELP_URL'));
 }
コード例 #21
0
ファイル: view.html.php プロジェクト: justinlyon/scc
 /**
  * Create toolbar for default layout view
  *
  * @param midxed $params
  */
 private function _makeToolbarDefault($params = null)
 {
     global $mainframe;
     // Get the JComponent instance of JToolBar
     $bar =& JToolBar::getInstance('toolbar');
     // add title
     $title = Sh404sefHelperGeneral::makeToolbarTitle(JText16::_('COM_SH404SEF_PAGEIDS_MANAGER'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title');
     $mainframe->set('JComponentTitle', $title);
     // get toolbar object
     $bar =& JToolBar::getInstance('toolbar');
     $bar->addButtonPath(JPATH_COMPONENT . DS . 'classes');
     // add import button
     $params['class'] = 'modaltoolbar';
     $params['size'] = array('x' => 500, 'y' => 400);
     unset($params['onClose']);
     $url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=import&opsubject=pageids';
     $bar->appendButton('Shpopuptoolbarbutton', 'import', $url, JText::_('Import'), $msg = '', $task = 'import', $list = false, $hidemenu = true, $params);
     // add import button
     $params['class'] = 'modaltoolbar';
     $params['size'] = array('x' => 500, 'y' => 300);
     unset($params['onClose']);
     $url = 'index.php?option=com_sh404sef&c=wizard&task=start&tmpl=component&optype=export&opsubject=pageids';
     $bar->appendButton('Shpopuptoolbarbutton', 'export', $url, JText::_('Export'), $msg = '', $task = 'export', $list = false, $hidemenu = true, $params);
     // separator
     JToolBarHelper::divider();
     // add delete button as an ajax call
     $params['class'] = 'modaltoolbar';
     $params['size'] = array('x' => 500, 'y' => 300);
     unset($params['onClose']);
     $url = 'index.php?option=com_sh404sef&c=pageids&task=confirmdelete&tmpl=component';
     $bar->appendButton('Shpopuptoolbarbutton', 'delete', $url, JText::_('Delete'), $msg = JText::_('VALIDDELETEITEMS', true), $task = 'purgeselected', $list = true, $hidemenu = true, $params);
     // separator
     JToolBarHelper::divider();
 }
コード例 #22
0
ファイル: view.html.php プロジェクト: Nechoj23/SVI-Homepage
 /**
  * Method to configure the toolbar for this view.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $canDo = FinderHelper::getActions();
     JToolBarHelper::title(JText::_('COM_FINDER_FILTERS_TOOLBAR_TITLE'), 'finder');
     $toolbar = JToolBar::getInstance('toolbar');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('filter.add');
         JToolBarHelper::editList('filter.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publishList('filters.publish');
         JToolBarHelper::unpublishList('filters.unpublish');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'filters.delete');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_finder');
     }
     JToolBarHelper::divider();
     $toolbar->appendButton('Popup', 'stats', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 500);
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_SEARCH_FILTERS');
 }
コード例 #23
0
ファイル: view.html.php プロジェクト: joshjim27/jobsglobal
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     // Set the titlebar text
     JToolBarHelper::title(JText::_('JOOMLART_EXTENSIONS_MANAGER'), 'generic');
     if (jaIsJoomla3x()) {
         // Add a upload button
         $title = JText::_('UPLOAD');
         $dhtml = "<button href=\"#\" onclick=\"jaOpenUploader(); return false;\" class=\"toolbar btn btn-small btn-success\">\n\t\t\t\t\t\t<i class=\"icon-plus icon-white\" title=\"{$title}\"></i>\n\t\t\t\t\t\t{$title}</button>";
         $bar->appendButton('Custom', $dhtml, 'upload');
         // Add a delete button
         $title = JText::_('DELETE');
         $dhtml = "<button href=\"#\" onclick=\"multiDelete(); return false;\" class=\"toolbar btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-remove\" title=\"{$title}\"></i>\n\t\t\t\t\t\t{$title}</button>";
         $bar->appendButton('Custom', $dhtml, 'delete');
     } else {
         // Add a upload button
         $title = JText::_('UPLOAD');
         $dhtml = "<a href=\"#\" onclick=\"jaOpenUploader(); return false;\" class=\"toolbar btn btn-small btn-success\">\n\t\t\t\t\t\t<span class=\"icon-32-upload\" title=\"{$title}\" type=\"Custom\"></span>\n\t\t\t\t\t\t{$title}</a>";
         $bar->appendButton('Custom', $dhtml, 'upload');
         // Add a delete button
         $title = JText::_('DELETE');
         $dhtml = "<a href=\"#\" onclick=\"multiDelete(); return false;\" class=\"toolbar\">\n\t\t\t\t\t\t<span class=\"icon-32-delete\" title=\"{$title}\" type=\"Custom\"></span>\n\t\t\t\t\t\t{$title}</a>";
         $bar->appendButton('Custom', $dhtml, 'delete');
     }
 }
コード例 #24
0
ファイル: view.html.php プロジェクト: grchis/Site-Auto
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     $option = JRequest::getCmd('option');
     $view = JRequest::getCmd('view');
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
     $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', '', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $model = $this->getModel();
     $total = $model->getTotalGroups();
     if ($limitstart > $total - $limit) {
         $limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit);
         JRequest::setVar('limitstart', $limitstart);
     }
     $extraFieldGroups = $model->getGroups();
     $this->assignRef('rows', $extraFieldGroups);
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     JToolBarHelper::title(JText::_('K2_EXTRA_FIELD_GROUPS'), 'k2.png');
     JToolBarHelper::deleteList('', 'remove', 'K2_DELETE');
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     if (K2_JVERSION != '15') {
         JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
     } else {
         $toolbar = JToolBar::getInstance('toolbar');
         $toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings');
     }
     $this->loadHelper('html');
     K2HelperHTML::subMenu();
     parent::display($tpl);
 }
コード例 #25
0
ファイル: view.html.php プロジェクト: scarsroga/blog-soa
 protected function addToolbar()
 {
     $bar = JToolBar::getInstance('toolbar');
     $canDo = JCKHelper::getActions();
     JToolBarHelper::title(JText::_('COM_JCKMAN_SUBMENU_PLUGIN_NAME'), 'plugin.png');
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('list.edit');
     }
     //end if
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publishList('list.publish');
         JToolBarHelper::unpublishList('list.unpublish');
         JToolbarHelper::checkin('list.checkin');
     }
     //end if
     // Add a Link button for Control Panel
     $bar->appendButton('Link', 'cpanel', JText::_('COM_JCKMAN_SUBMENU_CPANEL_NAME'), 'index.php?option=com_jckman&view=cpanel');
     JToolBarHelper::help($this->app->input->get('view'), false, 'http://www.joomlackeditor.com/installation-guide?start=14#plugin_man_help');
     JCKHelper::addSubmenu($this->app->input->get('view'));
     JHtmlSidebar::setAction('index.php?option=com_jckman&view=list');
     // FILTERS
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JCKHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
     JHtmlSidebar::addFilter(JText::_('- Select Core Type -'), 'filter_iscore', JHtml::_('select.options', array(JHtml::_('select.option', '1', 'Core Plugins'), JHtml::_('select.option', '0', 'Not Core Plugins')), 'value', 'text', $this->state->get('filter.iscore')));
     $this->sidebar = JHtmlSidebar::render();
 }
コード例 #26
0
 function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/phocamapsmarkers.php';
     $state = $this->get('State');
     $canDo = PhocaMapsMarkersHelper::getActions($this->t, $state->get('filter.marker_id'));
     $user = JFactory::getUser();
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_PHOCAMAPS_MARKERS'), 'location');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('phocamapsmarker.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('phocamapsmarker.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('phocamapsmarkers.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('phocamapsmarkers.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('COM_PHOCAMAPS_WARNING_DELETE_ITEMS', 'phocamapsmarkers.delete', 'COM_PHOCAMAPS_DELETE');
     }
     // Add a batch button
     if ($user->authorise('core.edit')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         $dhtml = "<button data-toggle=\"modal\" data-target=\"#collapseModal\" class=\"btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\n\t\t\t\t\t\t{$title}</button>";
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.phocamaps', true);
 }
コード例 #27
0
ファイル: view.html.php プロジェクト: kosmosby/medicine-prof
 protected function addToolBar()
 {
     $app = JFactory::getApplication();
     $app->input->set('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $user = JFactory::getUser();
     $userId = $user->id;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     JToolBarHelper::title(JText::_('COM_JUDOWNLOAD_PAGE_' . ($checkedOut ? 'VIEW_CRITERIAGROUP' : ($isNew ? 'ADD_CRITERIAGROUP' : 'EDIT_CRITERIAGROUP'))), 'criteriagroup-add');
     if ($isNew && $user->authorise('core.create', 'com_judownload')) {
         JToolBarHelper::apply('criteriagroup.apply');
         JToolBarHelper::save('criteriagroup.save');
         JToolBarHelper::save2new('criteriagroup.save2new');
         JToolBarHelper::cancel('criteriagroup.cancel');
     } else {
         if (!$checkedOut) {
             if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own') && $this->item->created_by == $userId) {
                 JToolBarHelper::apply('criteriagroup.apply');
                 JToolBarHelper::save('criteriagroup.save');
                 if ($this->canDo->get('core.create')) {
                     JToolBarHelper::save2new('criteriagroup.save2new');
                 }
             }
         }
         JToolBarHelper::cancel('criteriagroup.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     $bar = JToolBar::getInstance('toolbar');
     $bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judownload/helpers/button");
     $bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
 }
コード例 #28
0
ファイル: view.html.php プロジェクト: Shtier/digicom
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_digicom', 'category', $this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_DIGICOM_PRODUCTS_TOOLBAR_TITLE'), 'stack product');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_digicom', 'core.create')) > 0) {
         //JToolbarHelper::addNew('product.add');
         $layout = new JLayoutFile('toolbar.products');
         $bar->appendButton('Custom', $layout->render(array()), 'products');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('products.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('products.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         //JToolbarHelper::custom('products.featured', 'featured.png', 'featured_f2.png', 'JFEATURE', true);
         //JToolbarHelper::custom('products.unfeatured', 'unfeatured.png', 'featured_f2.png', 'JUNFEATURE', true);
         //JToolbarHelper::archiveList('products.archive');
         //JToolbarHelper::checkin('products.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'products.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('products.trash');
     }
     // Instantiate a new JLayoutFile instance and render the layout
     $layout = new JLayoutFile('toolbar.title');
     $title = array('title' => JText::_('COM_DIGICOM_PRODUCTS_TOOLBAR_TITLE'), 'class' => 'product');
     $bar->appendButton('Custom', $layout->render($title), 'title');
     $layout = new JLayoutFile('toolbar.settings');
     $bar->appendButton('Custom', $layout->render(array()), 'settings');
 }
コード例 #29
0
ファイル: view.html.php プロジェクト: densem-2013/exikom
 protected function addToolbar($title = '', $name = '')
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $bar = JToolBar::getInstance('toolbar');
     $lang = JFactory::getLanguage();
     require_once JPATH_COMPONENT . '/helpers/toolbar/link.php';
     if ($this->isNew) {
         $key = 'APP_CCK_FORM_' . $name . '_TITLE_ADD';
         if ($lang->hasKey($key) == 1) {
             $title = JText::_($key);
         } else {
             $key = 'COM_CCK_TITLE_FORM_ADD_' . str_replace(' ', '_', $title);
             $title = $lang->hasKey($key) == 1 ? JText::_($key) : JText::_('COM_CCK_TITLE_ADD') . ' ' . $title;
         }
         JToolBarHelper::title($title, 'pencil-2');
         $bar->prependButton('CckLink', 'cancel', 'JTOOLBAR_CANCEL', 'javascript:JCck.Core.submit(\'form.cancel\');');
     } else {
         $key = 'APP_CCK_FORM_' . $name . '_TITLE_EDIT';
         if ($lang->hasKey($key) == 1) {
             $title = JText::_($key);
         } else {
             $key = 'COM_CCK_TITLE_FORM_EDIT_' . str_replace(' ', '_', $title);
             $title = $lang->hasKey($key) == 1 ? JText::_($key) : JText::_('COM_CCK_TITLE_EDIT') . ' ' . $title;
         }
         JToolBarHelper::title($title, 'pencil-2');
         $bar->prependButton('CckLink', 'cancel', 'JTOOLBAR_CLOSE', 'javascript:JCck.Core.submit(\'form.cancel\');');
     }
     $bar->prependButton('CckLink', 'save-new', 'JTOOLBAR_SAVE_AND_NEW', 'javascript:JCck.Core.submit(\'form.save2new\');');
     $bar->prependButton('CckLink', 'save', 'JTOOLBAR_SAVE', 'javascript:JCck.Core.submit(\'form.save\');');
     $bar->prependButton('CckLink', 'apply', 'JTOOLBAR_APPLY', 'javascript:JCck.Core.submit(\'form.apply\');');
 }
コード例 #30
0
ファイル: view.html.php プロジェクト: jbelborja/lavid3
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/' . $this->t['tasks'] . '.php';
     JRequest::setVar('hidemainmenu', true);
     $bar = JToolBar::getInstance('toolbar');
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $class = ucfirst($this->t['tasks']) . 'Helper';
     $canDo = $class::getActions($this->t, $this->state->get('filter.category_id'));
     $text = $isNew ? JText::_($this->t['l'] . '_NEW') : JText::_($this->t['l'] . '_EDIT');
     JToolBarHelper::title(JText::_($this->t['l'] . '_CATEGORY') . ': <small><small>[ ' . $text . ' ]</small></small>', 'folder');
     // If not checked out, can save the item.
     if (!$checkedOut && $canDo->get('core.edit')) {
         JToolBarHelper::apply($this->t['task'] . '.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save($this->t['task'] . '.save', 'JTOOLBAR_SAVE');
         JToolBarHelper::addNew($this->t['task'] . '.save2new', 'JTOOLBAR_SAVE_AND_NEW');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         //JToolBarHelper::custom($this->t['c'].'cat.save2copy', 'copy.png', 'copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel($this->t['task'] . '.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel($this->t['task'] . '.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.' . $this->t['c'], true);
 }