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


PHP JToolbarHelper::unarchiveList方法代码示例

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


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

示例1: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/banners.php';
     $canDo = BannersHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'), 'banners.png');
     if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0) {
         JToolbarHelper::addNew('banner.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('banner.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolbarHelper::publish('banners.publish', 'JTOOLBAR_PUBLISH', true);
             JToolbarHelper::unpublish('banners.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             if ($this->state->get('filter.state') != 2) {
                 JToolbarHelper::archiveList('banners.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolbarHelper::unarchiveList('banners.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('banners.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('banners.trash');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_banners') && $user->authorise('core.edit', 'com_banners') && $user->authorise('core.edit.state', 'com_banners')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_banners');
     }
     JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS');
     JHtmlSidebar::setAction('index.php?option=com_banners&view=banners');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
     JHtmlSidebar::addFilter(JText::_('COM_BANNERS_SELECT_CLIENT'), 'filter_client_id', JHtml::_('select.options', BannersHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_banners'), 'value', 'text', $this->state->get('filter.category_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
 }
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:61,代码来源:view.html.php

示例2: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_redirect');
     JToolbarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'), 'refresh redirect');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('link.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('link.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($state->get('filter.state') != 2) {
             JToolbarHelper::divider();
             JToolbarHelper::publish('links.publish', 'JTOOLBAR_ENABLE', true);
             JToolbarHelper::unpublish('links.unpublish', 'JTOOLBAR_DISABLE', true);
         }
         if ($state->get('filter.state') != -1) {
             JToolbarHelper::divider();
             if ($state->get('filter.state') != 2) {
                 JToolbarHelper::archiveList('links.archive');
             } elseif ($state->get('filter.state') == 2) {
                 JToolbarHelper::unarchiveList('links.publish', 'JTOOLBAR_UNARCHIVE');
             }
         }
     }
     if ($canDo->get('core.create')) {
         // Get the toolbar object instance
         $bar = JToolBar::getInstance('toolbar');
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'links.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolbarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('links.trash');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_redirect');
         JToolbarHelper::divider();
     }
     JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER');
     JHtmlSidebar::setAction('index.php?option=com_redirect&view=links');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', RedirectHelper::publishedOptions(), 'value', 'text', $this->state->get('filter.state'), true));
 }
开发者ID:educakanchay,项目名称:kanchay,代码行数:58,代码来源:view.html.php

示例3: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/banners.php';
     $canDo = JHelperContent::getActions('com_banners', 'category', $this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'), 'bookmark banners');
     if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0) {
         JToolbarHelper::addNew('banner.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('banner.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolbarHelper::publish('banners.publish', 'JTOOLBAR_PUBLISH', true);
             JToolbarHelper::unpublish('banners.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             if ($this->state->get('filter.state') != 2) {
                 JToolbarHelper::archiveList('banners.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolbarHelper::unarchiveList('banners.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('banners.checkin');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_banners') && $user->authorise('core.edit', 'com_banners') && $user->authorise('core.edit.state', 'com_banners')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('banners.trash');
     }
     if ($user->authorise('core.admin', 'com_banners')) {
         JToolbarHelper::preferences('com_banners');
     }
     JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS');
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:56,代码来源:view.html.php

示例4: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_redirect');
     JToolbarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'), 'refresh redirect');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('link.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('link.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($state->get('filter.state') != 2) {
             JToolbarHelper::divider();
             JToolbarHelper::publish('links.publish', 'JTOOLBAR_ENABLE', true);
             JToolbarHelper::unpublish('links.unpublish', 'JTOOLBAR_DISABLE', true);
         }
         if ($state->get('filter.state') != -1) {
             JToolbarHelper::divider();
             if ($state->get('filter.state') != 2) {
                 JToolbarHelper::archiveList('links.archive');
             } elseif ($state->get('filter.state') == 2) {
                 JToolbarHelper::unarchiveList('links.publish', 'JTOOLBAR_UNARCHIVE');
             }
         }
     }
     if ($canDo->get('core.create')) {
         // Get the toolbar object instance
         $bar = JToolbar::getInstance('toolbar');
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'links.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolbarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::custom('links.purge', 'purge', 'purge', 'COM_REDIRECT_TOOLBAR_PURGE', false);
         JToolbarHelper::trash('links.trash');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin') || $canDo->get('core.options')) {
         JToolbarHelper::preferences('com_redirect');
         JToolbarHelper::divider();
     }
     JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER');
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:56,代码来源:view.html.php

示例5: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = RedirectHelper::getActions();
     JToolbarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINKS'), 'redirect');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('link.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('link.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($state->get('filter.state') != 2) {
             JToolbarHelper::divider();
             JToolbarHelper::publish('links.publish', 'JTOOLBAR_ENABLE', true);
             JToolbarHelper::unpublish('links.unpublish', 'JTOOLBAR_DISABLE', true);
         }
         if ($state->get('filter.state') != -1) {
             JToolbarHelper::divider();
             if ($state->get('filter.state') != 2) {
                 JToolbarHelper::archiveList('links.archive');
             } elseif ($state->get('filter.state') == 2) {
                 JToolbarHelper::unarchiveList('links.publish', 'JTOOLBAR_UNARCHIVE');
             }
         }
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'links.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolbarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('links.trash');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_redirect');
         JToolbarHelper::divider();
     }
     JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER');
     JHtmlSidebar::setAction('index.php?option=com_redirect&view=links');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', RedirectHelper::publishedOptions(), 'value', 'text', $this->state->get('filter.state'), true));
 }
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:46,代码来源:view.html.php

示例6: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  */
 protected function addToolbar()
 {
     $canDo = PfmobileappwsHelper::getActions();
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('Note'), 'generic.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('note.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('note.edit');
     }
     if ($this->state->get('filter.state') != 2) {
         JToolbarHelper::publish('notes.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('notes.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != -1) {
             if ($this->state->get('filter.state') != 2) {
                 JToolbarHelper::archiveList('notes.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolbarHelper::unarchiveList('notes.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('notes.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'notes.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('notes.trash');
     }
     JToolBarHelper::preferences('com_pfmobileappws', '550');
     if (!version_compare(JVERSION, '3', '<')) {
         JHtmlSidebar::setAction('index.php?option=com_pfmobileappws&view=notes');
     }
     if (!version_compare(JVERSION, '3', '<')) {
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
     }
 }
开发者ID:ranrolls,项目名称:php-web-offers-portal,代码行数:45,代码来源:view.html.php

示例7: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since    1.6
  */
 protected function addToolbar()
 {
     /** @noinspection PhpIncludeInspection */
     require_once JPATH_COMPONENT . '/helpers/catalogue.php';
     /** @noinspection PhpUndefinedClassInspection */
     $canDo = CatalogueHelper::getActions();
     JToolbarHelper::title(JText::_('COM_CATALOGUE_MANAGER'), 'component.png');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('item.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('item.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolbarHelper::publish('item.publish', 'JTOOLBAR_PUBLISH', true);
             JToolbarHelper::unpublish('item.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             if ($this->state->get('filter.published') != 2) {
                 JToolbarHelper::archiveList('item.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolbarHelper::unarchiveList('item.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('item.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'catalogue.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('catalogue.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_catalogue');
     }
 }
开发者ID:saity74,项目名称:joomla-catalogue-component,代码行数:45,代码来源:view.html.php

示例8: addToolbar

 /**
  * Add the page title and toolbar.
  *
  */
 protected function addToolbar()
 {
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolbar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_KNVBAPI2_COMPETITIES_LIST_HEADER'), 'stack competities');
     if ($this->can_do->get('core.create')) {
         JToolbarHelper::addNew('competitie.add', 'JTOOLBAR_NEW');
     }
     if ($this->can_do->get('core.edit') or $this->can_do->get('core.edit.own')) {
         JToolbarHelper::editList('competitie.edit', 'JTOOLBAR_EDIT');
     }
     if ($this->can_do->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolbarHelper::custom('competities.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
             JToolbarHelper::custom('competities.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             if ($this->state->get('filter.state') != 2) {
                 JToolbarHelper::archiveList('competities.archive', 'JTOOLBAR_ARCHIVE');
             } else {
                 if ($this->state->get('filter.state') == 2) {
                     JToolbarHelper::unarchiveList('competities.publish', 'JTOOLBAR_UNARCHIVE');
                 }
             }
         }
     }
     if ($this->can_do->get('core.edit.state')) {
         JToolbarHelper::custom('competities.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_knvbapi2') and $user->authorise('core.edit', 'com_knvbapi2') and $user->authorise('core.edit.state', 'com_knvbapi2')) {
         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');
     }
     if ($this->state->get('filter.state') == -2) {
         if ($this->can_do->get('core.delete')) {
             JToolbarHelper::deleteList('', 'competities.delete', 'JTOOLBAR_EMPTY_TRASH');
         }
     } else {
         if ($this->can_do->get('core.edit.state')) {
             JToolbarHelper::trash('competities.trash', 'JTOOLBAR_TRASH');
         }
     }
     if ($user->authorise('core.admin', 'com_knvbapi2') or $user->authorise('core.options', 'com_knvbapi2')) {
         JToolbarHelper::preferences('com_knvbapi2');
     }
 }
开发者ID:esorone,项目名称:efcpw,代码行数:54,代码来源:view.html.php

示例9: renderToolbarElement


//.........这里部分代码省略.........
                 $check = isset($attributes['check']) ? FOFStringUtils::toBool($attributes['check']) : false;
                 JToolbarHelper::publish($task, $alt, $check);
             }
             break;
         case 'publishList':
             if ($this->perms->editstate) {
                 $task = isset($attributes['task']) ? $attributes['task'] : 'publish';
                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_PUBLISH';
                 JToolbarHelper::publishList($task, $alt);
             }
             break;
         case 'unpublish':
             if ($this->perms->editstate) {
                 $task = isset($attributes['task']) ? $attributes['task'] : 'unpublish';
                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_UNPUBLISH';
                 $check = isset($attributes['check']) ? FOFStringUtils::toBool($attributes['check']) : false;
                 JToolbarHelper::unpublish($task, $alt, $check);
             }
             break;
         case 'unpublishList':
             if ($this->perms->editstate) {
                 $task = isset($attributes['task']) ? $attributes['task'] : 'unpublish';
                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_UNPUBLISH';
                 JToolbarHelper::unpublishList($task, $alt);
             }
             break;
         case 'archiveList':
             if ($this->perms->editstate) {
                 $task = isset($attributes['task']) ? $attributes['task'] : 'archive';
                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_ARCHIVE';
                 JToolbarHelper::archiveList($task, $alt);
             }
             break;
         case 'unarchiveList':
             if ($this->perms->editstate) {
                 $task = isset($attributes['task']) ? $attributes['task'] : 'unarchive';
                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_UNARCHIVE';
                 JToolbarHelper::unarchiveList($task, $alt);
             }
             break;
         case 'editList':
             if ($this->perms->edit) {
                 $task = isset($attributes['task']) ? $attributes['task'] : 'edit';
                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_EDIT';
                 JToolbarHelper::editList($task, $alt);
             }
             break;
         case 'editHtml':
             $task = isset($attributes['task']) ? $attributes['task'] : 'edit_source';
             $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_EDIT_HTML';
             JToolbarHelper::editHtml($task, $alt);
             break;
         case 'editCss':
             $task = isset($attributes['task']) ? $attributes['task'] : 'edit_css';
             $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_EDIT_CSS';
             JToolbarHelper::editCss($task, $alt);
             break;
         case 'deleteList':
             if ($this->perms->delete) {
                 $msg = isset($attributes['msg']) ? $attributes['msg'] : '';
                 $task = isset($attributes['task']) ? $attributes['task'] : 'remove';
                 $alt = isset($attributes['alt']) ? $attributes['alt'] : 'JTOOLBAR_DELETE';
                 JToolbarHelper::deleteList($msg, $task, $alt);
             }
             break;
         case 'trash':
开发者ID:Tommar,项目名称:vino2,代码行数:67,代码来源:toolbar.php

示例10: registerToolbar

 /**
  * Registers necessary buttons on the toolbar.
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public function registerToolbar()
 {
     if ($this->getLayout() == 'templates') {
         JToolBarHelper::title(JText::_('COM_EASYBLOG_BLOGS_POST_TEMPLATES_TITLE'), 'blogs');
         JToolbarHelper::deleteList(JText::_('COM_EASYBLOG_CONFIRM_DELETE_POST_TEMPLATES'), 'blogs.deletePostTemplates');
         return;
     }
     if ($this->getLayout() == 'pending') {
         JToolBarHelper::title(JText::_('COM_EASYBLOG_BLOGS_ALL_BLOG_ENTRIES_TITLE'), 'blogs');
         JToolbarHelper::deleteList(JText::_('Are you sure you want to delete these pending posts?'), 'pending.remove');
         JToolbarHelper::publishList('blogs.publish', JText::_('COM_EASYBLOG_APPROVE'));
         JToolbarHelper::unpublishList('blogs.unpublish', JText::_('COM_EASYBLOG_REJECT'));
         return;
     }
     if ($this->getLayout() == 'drafts') {
         JToolBarHelper::title(JText::_('COM_EASYBLOG_BLOGS_DRAFT_BLOGS'), 'blogs');
         JToolbarHelper::deleteList(JText::_('COM_EASYBLOG_BLOGS_DRAFT_DELETE_DRAFTS_CONFIRMATION'), 'drafts.remove');
         return;
     }
     JToolBarHelper::title(JText::_('COM_EASYBLOG_BLOGS_ALL_BLOG_ENTRIES_TITLE'), 'blogs');
     JToolBarHelper::addNew('blogs.create');
     JToolBarHelper::divider();
     $state = $this->app->getUserStateFromRequest('com_easyblog.blogs.filter_state', 'filter_state', '*', 'word');
     if ($state != 'T') {
         JToolbarHelper::publishList('blogs.publish');
         JToolbarHelper::unpublishList('blogs.unpublish');
         JToolBarHelper::custom('blogs.feature', 'star', '', JText::_('COM_EASYBLOG_FEATURE_TOOLBAR'));
         JToolBarHelper::custom('blogs.unfeature', 'star-empty', '', JText::_('COM_EASYBLOG_UNFEATURE_TOOLBAR'));
         JToolbarHelper::archiveList('blogs.archive');
         JToolbarHelper::unarchiveList('blogs.unarchive');
         JToolbarHelper::custom('blogs.lock', 'lock', '', JText::_('COM_EASYBLOG_TOOLBAR_LOCK'));
         JToolbarHelper::custom('blogs.unlock', 'unlock', '', JText::_('COM_EASYBLOG_TOOLBAR_UNLOCK'));
         JToolBarHelper::custom('blogs.toggleFrontpage', 'featured.png', 'featured_f2.png', JText::_('COM_EASYBLOG_FRONTPAGE_TOOLBAR'), true);
         JToolBarHelper::divider();
     }
     // If this is on the trash view, we need to show empty trash icon
     if ($state == 'T') {
         JToolbarHelper::publishList('blogs.restore', JText::_('COM_EASYBLOG_RESTORE'));
         JToolbarHelper::deleteList(JText::_('COM_EASYBLOG_CONFIRM_DELETE'), 'blogs.remove');
     } else {
         JToolbarHelper::trash('blogs.trash');
         JToolBarHelper::custom('blogs.move', 'move', '', JText::_('COM_EASYBLOG_MOVE'));
         JToolBarHelper::custom('blogs.copy', 'copy', '', JText::_('COM_EASYBLOG_COPY'));
         JToolBarHelper::divider();
         JToolBarHelper::custom('blogs.changeAuthor', 'users', '', JText::_('COM_EASYBLOG_CHANGE_AUTHOR'));
     }
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:55,代码来源:view.html.php

示例11: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     JLoader::register('BannersHelper', JPATH_ADMINISTRATOR . '/components/com_banners/helpers/banners.php');
     $canDo = JHelperContent::getActions('com_banners', 'category', $this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'), 'bookmark banners');
     if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0) {
         JToolbarHelper::addNew('banner.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('banner.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.published') != 2) {
             JToolbarHelper::publish('banners.publish', 'JTOOLBAR_PUBLISH', true);
             JToolbarHelper::unpublish('banners.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.published') != -1) {
             if ($this->state->get('filter.published') != 2) {
                 JToolbarHelper::archiveList('banners.archive');
             } elseif ($this->state->get('filter.published') == 2) {
                 JToolbarHelper::unarchiveList('banners.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('banners.checkin');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_banners') && $user->authorise('core.edit', 'com_banners') && $user->authorise('core.edit.state', 'com_banners')) {
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         JToolbar::getInstance('toolbar')->appendButton('Custom', $dhtml, 'batch');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('banners.trash');
     }
     if ($user->authorise('core.admin', 'com_banners') || $user->authorise('core.options', 'com_banners')) {
         JToolbarHelper::preferences('com_banners');
     }
     JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS');
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:53,代码来源:view.html.php


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