当前位置: 首页>>代码示例>>PHP>>正文


PHP JToolBarHelper::custom方法代码示例

本文整理汇总了PHP中JToolBarHelper::custom方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBarHelper::custom方法的具体用法?PHP JToolBarHelper::custom怎么用?PHP JToolBarHelper::custom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JToolBarHelper的用法示例。


在下文中一共展示了JToolBarHelper::custom方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addToolbar

 /**
  * 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');
     }
 }
开发者ID:emeraldstudio,项目名称:somosmaestros,代码行数:33,代码来源:view.html.php

示例2: _setToolbar

 /**
  * Setup the Toolbar.
  */
 protected function _setToolbar()
 {
     $state = $this->get('State');
     $canDo = TemplatesHelper::getActions();
     $isSite = $state->get('filter.client_id') == 0;
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('style.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('styles.sethome', 'default.png', 'default_f2.png', 'Templates_Toolbar_Set_Home', true);
     }
     JToolBarHelper::title(JText::_('Templates_Manager_Styles'), 'thememanager');
     if ($canDo->get('core.create') && $isSite) {
         JToolBarHelper::addNew('styles.duplicate', 'Templates_Toolbar_Save_Copy');
     }
     if ($canDo->get('core.delete') && $isSite) {
         JToolBarHelper::deleteList('', 'styles.delete');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_templates');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.templates');
 }
开发者ID:joebushi,项目名称:joomla,代码行数:28,代码来源:view.html.php

示例3: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('user.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('user.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
         JToolBarHelper::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
         JToolBarHelper::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'users.delete');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_users');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_USERS_USER_MANAGER');
 }
开发者ID:exntu,项目名称:joomla-cms,代码行数:32,代码来源:view.html.php

示例4: display

 /**
  * Template types display method
  *
  * @copyright
  * @author 		RolandD
  * @todo
  * @see
  * @access 		public
  * @param
  * @return
  * @since 		4.0
  */
 public function display($tpl = null)
 {
     // Load the template types
     $this->templatetypes = $this->get('Items');
     // Get the pagination
     $this->pagination = $this->get('Pagination');
     // Load the user state
     $this->state = $this->get('State');
     // Render the submenu
     if (version_compare(JVERSION, '3.0', '>=')) {
         CsviHelper::addSubmenu('templatetypes');
         $this->sidebar = JHtmlSidebar::render();
     } else {
         // Get the panel
         $this->loadHelper('panel');
         $this->sidebar = '';
     }
     // Show the toolbar
     JToolBarHelper::title(JText::_('COM_CSVI_TEMPLATETYPES'), 'csvi_templates_48');
     JToolBarHelper::custom('templatetypes.reset', 'csvi_reset_32', 'csvi_reset_32', JText::_('COM_CSVI_RESET_SETTINGS'), false);
     JToolBarHelper::divider();
     JToolBarHelper::custom('templatetype.add', 'csvi_add_32', 'csvi_add_32', 'JTOOLBAR_NEW', false);
     JToolBarHelper::custom('templatetype.edit', 'csvi_edit_32', 'csvi_edit_32', 'JTOOLBAR_EDIT', true);
     JToolBarHelper::divider();
     JToolBarHelper::custom('templatetypes.publish', 'csvi_publish_32', 'csvi_publish_32', JText::_('JTOOLBAR_PUBLISH'), true);
     JToolBarHelper::custom('templatetypes.unpublish', 'csvi_unpublish_32', 'csvi_unpublish_32', JText::_('JTOOLBAR_UNPUBLISH'), true);
     //JToolBarHelper::help('about.html', true);
     // Display it all
     parent::display($tpl);
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:42,代码来源:view.html.php

示例5: addToolBar

 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JToolBarHelper::addNew('portfolio.add');
     JToolBarHelper::editList('portfolio.edit');
     JToolBarHelper::custom('portfolios.rebuild', 'refresh.png', 'refresh_f2.png', 'COM_BT_PORTFOLIO_PORTFOLIOS_REBUILD_IMAGES', false);
     JToolBarHelper::divider();
     JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_PORTFOLIOS_MANAGER'), 'portfolio.png');
     JToolBarHelper::publish('portfolios.publish', 'JTOOLBAR_PUBLISH', true);
     JToolBarHelper::unpublish('portfolios.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     JToolBarHelper::custom('portfolios.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
     JToolBarHelper::divider();
     JToolBarHelper::checkin('portfolios.checkin');
     JToolBarHelper::deleteList('', 'portfolios.delete');
     JToolBarHelper::preferences('com_bt_portfolio');
     $this->sidebar = '';
     Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel'));
     //added since 2.0 for j3.0
     if (!$this->legacy) {
         JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=portfolios');
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true));
         JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_SELECT_FEATURED'), 'filter_featured', JHtml::_('select.options', Bt_portfolioHelper::getFeaturedOptions(), 'value', 'text', $this->state->get('filter.featured'), true));
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_catid', JHtml::_('select.options', Bt_portfolioHelper::getCategoryOptions(), 'value', 'text', $this->state->get('filter.catid')));
         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_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
         $this->sidebar = JHtmlSidebar::render();
     }
 }
开发者ID:Tommar,项目名称:remate,代码行数:30,代码来源:view.html.php

示例6: _setToolBar

 /**
  * Установки тулбара
  */
 protected function _setToolBar()
 {
     require_once JPATH_COMPONENT . '/helpers/smfaq.php';
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     SmFaqHelper::addSubmenu($this->_name);
     $canDo = SmFaqHelper::getActions($this->state->get('filter.category_id'));
     // Выводим нужные кнопки и заголовок
     JToolBarHelper::title(JText::_('COM_SMFAQ_MANAGER_QUESTIONS'), 'smfaq');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNewX('smfaq.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editListX('smfaq.edit', 'JTOOLBAR_EDIT');
     }
     JToolBarHelper::divider();
     JToolBarHelper::custom('smfaqlist.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
     JToolBarHelper::custom('smfaqlist.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
     JToolBarHelper::divider();
     JToolBarHelper::checkin('smfaqlist.checkin');
     // Замена тулбара карзины на удаление
     if ($this->state->get('filter.published') == -2) {
         JToolBarHelper::deleteList('COM_SMFAQ_YOU_WANT_DELETE_THIS', 'smfaqlist.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         JToolBarHelper::trash('smfaqlist.trash', 'JTOOLBAR_TRASH');
     }
     JToolBarHelper::divider();
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_smfaq');
     }
 }
开发者ID:romuland,项目名称:khparts,代码行数:33,代码来源:view.html.php

示例7: display

 function display($tpl = null)
 {
     if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') {
         JToolBarHelper::title('J-HotelReservation : ' . JText::_('LNG_MANAGE_TAXES', true), 'generic.png');
         JRequest::setVar('hidemainmenu', 1);
         $hotel_id = $this->get('HotelId');
         if ($hotel_id > 0) {
             JToolBarHelper::addNew('managetaxes.edit');
             JToolBarHelper::editList('managetaxes.edit');
             JToolBarHelper::deleteList('', 'managetaxes.delete', JText::_('LNG_DELETE', true));
             JToolBarHelper::custom('managetaxes.back', JHotelUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false);
         }
         $this->hotel_id = $hotel_id;
         $items = $this->get('Datas');
         $this->items = $items;
         $hotels = $this->get('Hotels');
         $hotels = checkHotels(JFactory::getUser()->id, $hotels);
         $this->hotels = $hotels;
     } else {
         $item = $this->get('Data');
         $this->item = $item;
         $hotel_id = $this->get('HotelId');
         $this->hotel_id = $hotel_id;
         $hotel = $this->get('Hotel');
         $this->hotel = $hotel;
         JToolBarHelper::title('J-Hotel Reservation : ' . ($item->tax_id > 0 ? JText::_("LNG_EDIT", true) : JText::_("LNG_ADD_NEW", true)) . ' ' . JText::_('LNG_TAX', true), 'generic.png');
         JRequest::setVar('hidemainmenu', 1);
         JToolBarHelper::cancel('managetaxes.back');
         JToolBarHelper::save('managetaxes.save');
     }
     parent::display($tpl);
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:32,代码来源:view.html.php

示例8: registerToolbar

 function registerToolbar()
 {
     JToolBarHelper::title(JText::_('COM_EASYBLOG_THEMES_TITLE'), 'themes');
     JToolbarHelper::back(JText::_('COM_EASYBLOG_TOOLBAR_HOME'), 'index.php?option=com_easyblog');
     JToolbarHelper::divider();
     JToolBarHelper::custom('makedefault', 'star', '', JText::_('COM_EASYBLOG_SET_DEFAULT'), false);
 }
开发者ID:alexinteam,项目名称:joomla3,代码行数:7,代码来源:view.html.php

示例9: addToolbar

 /**
  * 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);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:35,代码来源:view.html.php

示例10: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     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_content');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:38,代码来源:view.html.php

示例11: registerToolbar

 public function registerToolbar()
 {
     JToolBarHelper::title(JText::_('COM_EASYDISCUSS_RANKING'), 'ranks');
     JToolBarHelper::custom('home', 'arrow-left', '', JText::_('COM_EASYDISCUSS_TOOLBAR_HOME'), false);
     JToolBarHelper::divider();
     JToolBarHelper::custom('save', 'save.png', 'save_f2.png', JText::_('COM_EASYDISCUSS_SAVE_BUTTON'), false);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:7,代码来源:view.html.php

示例12: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/contact.php';
     $canDo = ContactHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'contact.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0) {
         JToolBarHelper::addNew('contact.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('contact.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('contacts.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('contacts.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('contacts.archive', 'JTOOLBAR_ARCHIVE');
         JToolBarHelper::custom('contacts.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'contacts.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('contacts.trash', 'JTOOLBAR_TRASH');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_contact');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS');
 }
开发者ID:Joomla-on-NoSQL,项目名称:LaMojo,代码行数:40,代码来源:view.html.php

示例13: setToolbar

 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();
 }
开发者ID:proyectoseb,项目名称:University,代码行数:27,代码来源:view.html.php

示例14: display

 function display($tpl = null)
 {
     clm_core::$load->load_css("icons_images");
     JToolBarHelper::title(JText::_('TITLE_SWT_LEAGUE'), 'clm_headmenu_manager.png');
     JToolBarHelper::custom('save', 'save.png', 'save_f2.png', JText::_('SWT_LEAGUE_SAVE'), false);
     parent::display($tpl);
 }
开发者ID:kbaerthel,项目名称:com_clm,代码行数:7,代码来源:view.html.php

示例15: setToolBarDefault

	protected function setToolBarDefault() {
		// Set the titlebar text
		JToolBarHelper::title ( '&nbsp;', 'kunena.png' );
		JToolBarHelper::spacer();
		JToolBarHelper::custom('delete','restore.png','restore_f2.png', 'COM_KUNENA_GEN_DELETE');
		JToolBarHelper::spacer();
	}
开发者ID:rich20,项目名称:Kunena,代码行数:7,代码来源:view.html.php


注:本文中的JToolBarHelper::custom方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。