本文整理汇总了PHP中JToolBarHelper::divider方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBarHelper::divider方法的具体用法?PHP JToolBarHelper::divider怎么用?PHP JToolBarHelper::divider使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolBarHelper
的用法示例。
在下文中一共展示了JToolBarHelper::divider方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolbar
/**
* 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: _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');
}
示例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');
}
示例4: _setToolbar
/**
* Display the toolbar
*/
protected function _setToolbar()
{
$canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
JToolBarHelper::title(JText::_('Content_Featured_Title'), 'featured.png');
if ($canDo->get('core.create')) {
JToolBarHelper::custom('article.add', 'new.png', 'new_f2.png', 'New', false);
}
if ($canDo->get('core.edit')) {
JToolBarHelper::custom('article.edit', 'edit.png', 'edit_f2.png', 'Edit', true);
}
JToolBarHelper::divider();
if ($canDo->get('core.edit.state')) {
JToolBarHelper::custom('articles.publish', 'publish.png', 'publish_f2.png', 'Publish', true);
JToolBarHelper::custom('articles.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true);
JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JToolbar_Remove', true);
if ($this->state->get('filter.published') != -1) {
JToolBarHelper::archiveList('articles.archive');
}
}
if ($canDo->get('core.admin')) {
JToolBarHelper::divider();
JToolBarHelper::preferences('com_content');
}
JToolBarHelper::divider();
JToolBarHelper::help('screen.content.featured');
}
示例5: addToolbar
/**
* Adds the page title and toolbar.
*
*/
protected function addToolbar()
{
$user = JFactory::getUser();
$asset = 'com_pfdesigns';
JToolBarHelper::title(JText::_('COM_PROJECTFORK_DESIGNS_ALBUMS_TITLE'), 'article.png');
if ($user->authorise('core.create', $asset)) {
JToolBarHelper::addNew('album.add');
}
if ($user->authorise('core.edit', $asset) || $user->authorise('core.edit.own', $asset)) {
JToolBarHelper::editList('album.edit');
}
if ($user->authorise('core.edit.state', $asset)) {
JToolBarHelper::divider();
JToolBarHelper::publish('albums.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('albums.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::archiveList('albums.archive');
JToolBarHelper::checkin('albums.checkin');
}
if ($this->state->get('filter.published') == -2 && $user->authorise('core.delete', $asset)) {
JToolBarHelper::deleteList('', 'albums.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} elseif ($user->authorise('core.edit.state', $asset)) {
JToolBarHelper::trash('albums.trash');
JToolBarHelper::divider();
}
if (version_compare(JVERSION, '3', 'ge')) {
JHtmlSidebar::setAction('index.php?option=com_pfdesigns&view=albums');
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_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')));
}
}
示例6: addToolBar
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'));
}
示例7: 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();
}
示例8: 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);
}
示例9: display
/**
* Renders the view
*
* @param string $tpl Template name
*
* @return void
*/
public function display($tpl = null)
{
$password = JFactory::getApplication()->getUserState('com_joomlaupdate.password', null);
$filesize = JFactory::getApplication()->getUserState('com_joomlaupdate.filesize', null);
$ajaxUrl = JUri::base() . 'components/com_joomlaupdate/restore.php';
$returnUrl = 'index.php?option=com_joomlaupdate&task=update.finalise';
// Set the toolbar information
JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE');
// Add toolbar buttons
if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) {
JToolbarHelper::preferences('com_joomlaupdate');
}
// Load mooTools
JHtml::_('behavior.framework', true);
$updateScript = <<<ENDSCRIPT
var joomlaupdate_password = '{$password}';
var joomlaupdate_totalsize = '{$filesize}';
var joomlaupdate_ajax_url = '{$ajaxUrl}';
var joomlaupdate_return_url = '{$returnUrl}';
ENDSCRIPT;
// Load our Javascript
$document = JFactory::getDocument();
$document->addScript('../media/com_joomlaupdate/json2.js');
$document->addScript('../media/com_joomlaupdate/encryption.js');
$document->addScript('../media/com_joomlaupdate/update.js');
JHtml::_('script', 'system/progressbar.js', true, true);
JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
$document->addScriptDeclaration($updateScript);
// Render the view
parent::display($tpl);
}
示例10: display
function display($tpl = null)
{
$document = JFactory::getDocument();
$document->addStyleSheet('components/com_mijopolls/assets/css/mijopolls.css');
$title = $this->get('Title');
$t_title = $title ? JText::_('COM_MIJOPOLLS_VOTES_FOR') . ': ' . $title : JText::_('COM_MIJOPOLLS_SELECT_POLL');
JToolBarHelper::title($t_title, 'mijopolls');
JToolBarHelper::deleteList(JText::_('COM_MIJOPOLLS_DELETE_CONFIRM'), "deleteVotes", JText::_('COM_MIJOPOLLS_DELETE'), true);
JToolBarHelper::divider();
JToolBarHelper::preferences('com_mijopolls', 500);
$this->mainframe = JFactory::getApplication();
$this->option = JRequest::getWord('option');
$filter_order = $this->mainframe->getUserStateFromRequest($this->option . '.votes.filter_order', 'filter_order', 'v.date', 'cmd');
$filter_order_Dir = $this->mainframe->getUserStateFromRequest($this->option . '.votes.filter_order_Dir', 'filter_order_Dir', '', 'word');
$search = $this->mainframe->getUserStateFromRequest($this->option . '.votes.search', 'search', '', 'string');
// Get data from the model
$lists = $this->get('List');
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search'] = $search;
$this->title = $title;
$this->lists = $lists;
$this->votes = $this->get('Data');
$this->pagination = $this->get('Pagination');
$this->poll_id = JRequest::getInt('id', 0);
parent::display($tpl);
}
示例11: addToolbar
/**
* 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');
}
示例12: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/faqs.php';
$state = $this->get('State');
$canDo = FaqsHelper::getActions($state->get('filter.category_id'));
$user = JFactory::getUser();
JToolBarHelper::title(JText::_('COM_FAQS_MANAGER_FAQS'), 'faqs.png');
if (count($user->getAuthorisedCategories('com_faqs', 'core.create')) > 0) {
JToolBarHelper::addNew('faq.add');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('faq.edit');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('faqs.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('faqs.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::archiveList('faqs.archive');
JToolBarHelper::checkin('faqs.checkin');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'faqs.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolBarHelper::trash('faqs.trash');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_faqs');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_COMPONENTS_FAQS_LINKS');
}
示例13: addToolbar
/**
* 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: addToolbar
/**
* 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')) {
JToolBarHelper::preferences('com_languages');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
}
示例15: 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');
}