예제 #1
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_content', 'category', $this->state->get('filter.category_id'));
     JToolbarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'star featured');
     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::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::custom('articles.unfeatured', 'unfeatured.png', 'featured_f2.png', 'JUNFEATURE', true);
         JToolbarHelper::archiveList('articles.archive');
         JToolbarHelper::checkin('articles.checkin');
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('articles.trash');
     }
     if ($canDo->get('core.admin') || $canDo->get('core.options')) {
         JToolbarHelper::preferences('com_content');
     }
     JToolbarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
 }
예제 #2
0
 protected function addToolbar()
 {
     $bar = JToolBar::getInstance('toolbar');
     $canDo = ARKHelper::getActions();
     JToolBarHelper::title(JText::_('COM_ARKEDITOR_SUBMENU_PLUGIN_NAME'), 'puzzle');
     require_once JPATH_COMPONENT . DS . 'helper.php';
     $links = ARKHelper::getExternalLinks();
     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
     JToolBarHelper::help($this->app->input->get('view'), false, $links['ark-guide']);
     ARKHelper::addSubmenu($this->app->input->get('view'));
     JHtmlSidebar::setAction('index.php?option=com_arkeditor&view=list');
     // FILTERS
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', ARKHelper::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();
 }
예제 #3
0
 /**
  * Method to configure the toolbar for this view.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_finder');
     JToolbarHelper::title(JText::_('COM_FINDER_FILTERS_TOOLBAR_TITLE'), 'zoom-in 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::checkin('filters.checkin');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin') || $canDo->get('core.options')) {
         JToolbarHelper::preferences('com_finder');
     }
     JToolbarHelper::divider();
     $toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350);
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_SEARCH_FILTERS');
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'filters.delete');
         JToolbarHelper::divider();
     }
 }
예제 #4
0
 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();
 }
예제 #5
0
 protected function addToolbar()
 {
     $canDo = ReservaHelper::getActions();
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_RESERVA_MANAGER_EVENTOS'), '');
     JToolbarHelper::addNew('evento.add');
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('evento.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('eventos.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('eventos.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('eventos.archive');
         JToolbarHelper::checkin('eventos.checkin');
     }
     //agregar filtro a la vista para busqueda
     JHtmlSidebar::setAction('index.php?option=com_reserva&view=eventos');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
     /*
     if ($canDo->get('core.delete'))
     {
     	JToolBarHelper::deleteList('', 'eventos.delete', 'JTOOLBAR_DELETE');
     }
     se replaza el boton de borrado por envio a la papelera en vez de borrado completamente
     */
     $state = $this->get('State');
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'eventos.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('eventos.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_reserva');
     }
 }
예제 #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 프로젝트: smhnaji/sdnet
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_sibdiet');
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     $bar->addButtonPath(JPATH_COMPONENT . '/toolbar/button/');
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_CONTROLLER'), 'cogs controller');
     if (in_array('requestschecks', $this->permissions)) {
         if (isset($this->items[0])) {
             if ($canDo->get('core.edit')) {
                 JToolBarHelper::editList('request.edit');
             }
             if ($canDo->get('core.edit.state')) {
                 JToolbarHelper::checkin('requests.checkin');
                 JToolbarHelper::publish('requests.publish', 'JTOOLBAR_PUBLISH', true);
                 JToolbarHelper::unpublish('requests.unpublish', 'JTOOLBAR_UNPUBLISH', true);
                 JToolbarHelper::archiveList('requests.archive', 'COM_SIBDIET_TOOLBAR_WAITING_LIST');
             }
             if ($this->state->get('filter.published') == -2) {
                 JToolbarHelper::deleteList('', 'requests.delete', 'JTOOLBAR_EMPTY_TRASH');
             } else {
                 JToolbarHelper::trash('requests.trash');
             }
             // Add a batch button for tags
             if ($canDo->get('core.edit') && $canDo->get('core.edit.state')) {
                 JToolbarHelper::modal('collapseModal', 'icon-checkbox-partial', JText::_('JTOOLBAR_BATCH'));
             }
         }
     }
 }
예제 #8
0
 protected function addToolbar()
 {
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_ARKEDITOR_SUBMENU_LAYOUT_NAME'), 'layout.png');
     require_once JPATH_COMPONENT . DS . 'helper.php';
     $links = ARKHelper::getExternalLinks();
     if ($this->canDo->get('core.create')) {
         JToolBarHelper::addNew('toolbars.add');
     }
     if ($this->canDo->get('core.edit')) {
         JToolBarHelper::editList('toolbars.edit');
     }
     if ($this->canDo->get('core.create')) {
         JToolBarHelper::custom('toolbars.copy', 'copy', 'copy', JText::_('JLIB_HTML_BATCH_COPY'), true);
     }
     if ($this->canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'toolbars.remove');
     }
     if ($this->canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('toolbars.checkin');
     }
     JToolBarHelper::help($this->app->input->get('view'), false, $links['ark-guide']);
     JHtmlSidebar::setAction('index.php?option=com_arkeditor&view=' . JFactory::getApplication()->input->get('view', 'toolbars'));
     ARKHelper::addSubmenu($this->app->input->get('view'));
     $this->sidebar = JHtmlSidebar::render();
 }
예제 #9
0
파일: view.html.php 프로젝트: smhnaji/sdnet
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_sibdiet');
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     $bar->addButtonPath(JPATH_COMPONENT . '/toolbar/button/');
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_REQUESTS'), 'list-view requests');
     if (in_array('requests', $this->permissions)) {
         if ($canDo->get('core.create')) {
             JToolBarHelper::addNew('request.add');
         }
         if (isset($this->items[0])) {
             if ($canDo->get('core.edit')) {
                 JToolBarHelper::editList('request.edit');
             }
             if ($canDo->get('core.edit.state')) {
                 JToolbarHelper::checkin('requests.checkin');
             }
             if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
                 JToolbarHelper::publish('requests.publish', 'JTOOLBAR_PUBLISH', true);
                 JToolbarHelper::deleteList('', 'requests.delete', 'JTOOLBAR_EMPTY_TRASH');
             } elseif ($canDo->get('core.edit.state')) {
                 JToolbarHelper::trash('requests.trash');
             }
             // Add a batch button for tags
             if ($canDo->get('core.edit') && $canDo->get('core.edit.state')) {
                 JToolbarHelper::modal('collapseModal', 'icon-checkbox-partial', JText::_('JTOOLBAR_BATCH'));
             }
             $bar->appendButton('Print', 'index.php?option=com_sibdiet&view=printdiets&tmpl=component', 'COM_SIBDIET_PRINT_DIETS');
         }
     }
 }
예제 #10
0
 protected function addToolbar()
 {
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_JCKMAN_SUBMENU_LAYOUT_NAME'), 'layout.png');
     if ($this->canDo->get('core.create')) {
         JToolBarHelper::addNew('toolbars.add');
     }
     if ($this->canDo->get('core.edit')) {
         JToolBarHelper::editList('toolbars.edit');
     }
     if ($this->canDo->get('core.create')) {
         JToolBarHelper::custom('toolbars.copy', 'copy', 'copy', JText::_('JLIB_HTML_BATCH_COPY'), true);
     }
     if ($this->canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'toolbars.remove');
     }
     if ($this->canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('toolbars.checkin');
     }
     // 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=17#layout_man');
     JHtmlSidebar::setAction('index.php?option=com_jckman&view=' . JFactory::getApplication()->input->get('view', 'toolbars'));
     JCKHelper::addSubmenu($this->app->input->get('view'));
     $this->sidebar = JHtmlSidebar::render();
 }
예제 #11
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/banners.php';
     $canDo = BannersHelper::getActions();
     JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'), 'banners-clients.png');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('client.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('client.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('clients.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('clients.archive');
         JToolbarHelper::checkin('clients.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('clients.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_banners');
     }
     JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
     JHtmlSidebar::setAction('index.php?option=com_banners&view=clients');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
 }
예제 #12
0
파일: view.html.php 프로젝트: smhnaji/sdnet
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = SibdietHelper::getActions('com_sibdiet');
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_CONTAGS'), 'tags contags');
     if (in_array('contags', $this->permissions)) {
         if ($canDo->get('core.create')) {
             JToolBarHelper::addNew('contag.add');
         }
         if (isset($this->items[0])) {
             if ($canDo->get('core.edit')) {
                 JToolBarHelper::editList('contag.edit');
             }
             if ($canDo->get('core.edit.state')) {
                 JToolbarHelper::checkin('contags.checkin');
             }
             if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
                 JToolbarHelper::publish('contags.publish', 'JTOOLBAR_PUBLISH', true);
                 JToolbarHelper::deleteList('', 'contags.delete', 'JTOOLBAR_EMPTY_TRASH');
             } elseif ($canDo->get('core.edit.state')) {
                 JToolbarHelper::trash('contags.trash');
             }
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_sibdiet');
     }
 }
예제 #13
0
파일: view.html.php 프로젝트: smhnaji/sdnet
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_sibdiet');
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_PROFILES'), 'users profiles');
     if (in_array('profiles', $this->permissions)) {
         if ($canDo->get('core.create')) {
             JToolBarHelper::addNew('profile.add');
         }
         if (isset($this->items[0])) {
             if ($canDo->get('core.edit')) {
                 JToolBarHelper::editList('profile.edit');
             }
             if ($canDo->get('core.edit.state')) {
                 JToolbarHelper::checkin('profiles.checkin');
             }
             if ($canDo->get('core.delete')) {
                 JToolbarHelper::deleteList('', 'profiles.delete');
             }
             // Add a batch button for Merge Files
             if (JFactory::getUser()->get('isRoot')) {
                 JToolbarHelper::modal('collapseModal', 'icon-users', JText::_('COM_SIBDIET_TOOLBAR_MERGE_FILES'));
             }
         }
     }
     JToolBarHelper::help('screen.profiles', true);
 }
예제 #14
0
 protected function addToolbar()
 {
     $canDo = DeviceHelper::getActions();
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_DEVICE_MANAGER_DEVICES'), 'folder categories');
     JToolbarHelper::addNew('device.add');
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('device.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('devices.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('devices.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('devices.archive');
         JToolbarHelper::checkin('devices.checkin');
     }
     /*将信息直接删除
     		if($canDo->get('core.delete')){
     			JToolbarHelper::deleteList('', 'labs.delete', 'JTOOLBAR_DELETE');
     		}*/
     $state = $this->get('State');
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'devices.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolbarHelper::trash('devices.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_device');
     }
     JHtmlSidebar::setAction('index.php?option=com_device&view=devices');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
 }
예제 #15
0
파일: view.html.php 프로젝트: rukin/joomla
 protected function addToolbar()
 {
     $canDo = FolioHelper::getActions();
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_FOLIO_MANAGER_FOLIOS'), '');
     JToolbarHelper::addNew('folio.add');
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('folio.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('folios.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('folios.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('folios.archive');
         JToolbarHelper::checkin('folios.checkin');
     }
     $state = $this->get('State');
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'folios.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('folios.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_folio');
     }
     JHtmlSidebar::setAction('index.php?option=com_folio&view=folios');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
 }
예제 #16
0
파일: view.html.php 프로젝트: site4com/acts
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_edashboard', 'category', $state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_EDASHBOARD_MANAGER'), 'calendar-3');
     if (count($user->getAuthorisedCategories('com_edashboard', 'core.create')) > 0) {
         JToolbarHelper::addNew('post.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('post.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('edashboard.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('edashboard.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('edashboard.archive');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::checkin('post.checkin');
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'edashboard.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('edashboard.trash');
     }
     if ($user->authorise('core.admin', 'com_edashboard')) {
         JToolbarHelper::preferences('com_edashboard');
     }
     JToolbarHelper::help('JHELP_COMPONENTS_ACT');
     JHtmlSidebar::setAction('index.php?option=com_edashboard&view=edashboard');
     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_edashboard'), 'value', 'text', $this->state->get('filter.category_id')));
 }
예제 #17
0
 protected function addToolbar()
 {
     $canDo = JHarvestHelper::getActions('com_jharvest');
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_JHARVEST_HARVESTS_TITLE'), 'stack article');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('harvest.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolbarHelper::editList('harvest.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('harvests.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('harvests.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::checkin('harvests.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'harvests.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::custom('harvests.reset', 'refresh', 'refresh', 'COM_JHARVEST_HARVESTS_BUTTON_RESET', false);
         JToolbarHelper::trash('harvests.trash');
     }
     if ($user->authorise('core.admin', $this->option)) {
         JToolbarHelper::preferences($this->option);
     }
     JToolbarHelper::help('JHELP_JHARVEST_HARVESTS_MANAGER');
     JHtmlSidebar::setAction('index.php?option=com_jharvest&view=harvests');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
 }
예제 #18
0
 /**
  * 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::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
         JToolbarHelper::archiveList('articles.archive');
         JToolbarHelper::checkin('articles.checkin');
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('articles.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_content');
     }
     JToolbarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
     JHtmlSidebar::setAction('index.php?option=com_content&view=featured');
     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')));
 }
예제 #19
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_banners');
     JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'), 'bookmark banners-clients');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('client.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('client.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('clients.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('clients.archive');
         JToolbarHelper::checkin('clients.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('clients.trash');
     }
     if ($canDo->get('core.admin') || $canDo->get('core.options')) {
         JToolbarHelper::preferences('com_banners');
     }
     JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
 }
예제 #20
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function setToolbar()
 {
     JToolbarHelper::title(JText::_('COM_KUNENA') . ': ' . JText::_('COM_KUNENA_PLUGIN_MANAGER'), 'pluginsmanager');
     JToolbarHelper::spacer();
     JToolbarHelper::editList('plugin.edit');
     JToolbarHelper::divider();
     JToolbarHelper::publish('publish', 'JTOOLBAR_ENABLE', true);
     JToolbarHelper::unpublish('unpublish', 'JTOOLBAR_DISABLE', true);
     JToolbarHelper::divider();
     JToolbarHelper::checkin('checkin');
     JToolbarHelper::spacer();
 }
예제 #21
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_modules');
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES'), 'cube module');
     if ($canDo->get('core.create')) {
         // Instantiate a new JLayoutFile instance and render the layout
         $layout = new JLayoutFile('toolbar.newmodule');
         $bar->appendButton('Custom', $layout->render(array()), 'new');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::checkin('modules.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('modules.trash');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_modules') && $user->authorise('core.edit', 'com_modules') && $user->authorise('core.edit.state', 'com_modules')) {
         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_modules');
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
     JHtmlSidebar::addEntry(JText::_('JSITE'), 'index.php?option=com_modules&filter_client_id=0', $this->state->get('filter.client_id') == 0);
     JHtmlSidebar::addEntry(JText::_('JADMINISTRATOR'), 'index.php?option=com_modules&filter_client_id=1', $this->state->get('filter.client_id') == 1);
     JHtmlSidebar::setAction('index.php?option=com_modules');
     JHtmlSidebar::addFilter('', 'filter_client_id', JHtml::_('select.options', ModulesHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id')), false);
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', ModulesHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
     JHtmlSidebar::addFilter(JText::_('COM_MODULES_OPTION_SELECT_POSITION'), 'filter_position', JHtml::_('select.options', ModulesHelper::getPositions($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.position')));
     JHtmlSidebar::addFilter(JText::_('COM_MODULES_OPTION_SELECT_MODULE'), 'filter_module', JHtml::_('select.options', ModulesHelper::getModules($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.module')));
     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();
 }
예제 #22
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = ModulesHelper::getActions();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES'), 'module.png');
     if ($canDo->get('core.create')) {
         $title = JText::_('JTOOLBAR_NEW');
         $dhtml = "<button onClick=\"location.href='index.php?option=com_modules&amp;view=select'\" class=\"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, 'new');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::checkin('modules.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('modules.trash');
     }
     // Add a batch button
     if ($canDo->get('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');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_modules');
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
     JHtmlSidebar::addEntry(JText::_('JSITE'), 'index.php?option=com_modules&filter_client_id=0', $this->state->get('filter.client_id') == 0);
     JHtmlSidebar::addEntry(JText::_('JADMINISTRATOR'), 'index.php?option=com_modules&filter_client_id=1', $this->state->get('filter.client_id') == 1);
     JHtmlSidebar::setAction('index.php?option=com_modules');
     JHtmlSidebar::addFilter('', 'filter_client_id', JHtml::_('select.options', ModulesHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id')), false);
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', ModulesHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
     JHtmlSidebar::addFilter(JText::_('COM_MODULES_OPTION_SELECT_POSITION'), 'filter_position', JHtml::_('select.options', ModulesHelper::getPositions($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.position')));
     JHtmlSidebar::addFilter(JText::_('COM_MODULES_OPTION_SELECT_MODULE'), 'filter_module', JHtml::_('select.options', ModulesHelper::getModules($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.module')));
     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();
 }
예제 #23
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function setToolbar()
 {
     JToolbarHelper::title(JText::_('COM_KUNENA') . ': ' . JText::_('COM_KUNENA_PLUGIN_MANAGER'), 'puzzle');
     JToolbarHelper::spacer();
     JToolbarHelper::editList('plugin.edit');
     JToolbarHelper::divider();
     JToolbarHelper::publish('publish', 'JTOOLBAR_ENABLE', true);
     JToolbarHelper::unpublish('unpublish', 'JTOOLBAR_DISABLE', true);
     JToolbarHelper::divider();
     JToolbarHelper::checkin('checkin');
     JToolbarHelper::spacer();
     $help_url = 'http://www.kunena.org/docs/';
     JToolBarHelper::help('COM_KUNENA', false, $help_url);
 }
예제 #24
0
 /**
  * visfields view display method
  * @return void
  * @since Joomla 1.6
  **/
 public function display($tpl = null)
 {
     $fid = JFactory::getApplication()->input->getInt('fid', -1);
     // Get data from the model
     $this->form = $this->get('Form');
     $this->items = $this->get('Items');
     $this->state = $this->get('State');
     $pagination = $this->get('Pagination');
     $this->canDo = VisformsHelper::getActions($fid);
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     $user = JFactory::getUser();
     $doc = JFactory::getDocument();
     JToolbarHelper::title(JText::_('COM_VISFORMS_VISFORM_FIELDS'), 'visform');
     $css = '.icon-visform {background:url(../administrator/components/com_visforms/images/visforms_logo_32.png) no-repeat;}' . ' [class^="icon-visform"] {display: block; float: left; height: 32px; line-height: 32px; width: 32px;}' . '  .visformbottom {	text-align: center;	padding-top: 15px;	color: #999;}';
     $doc->addStyleDeclaration($css);
     $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_visforms/css/visforms_min.css');
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     VisformsHelper::addSubmenu('visforms');
     $this->sidebar = JHtmlSidebar::render();
     if ($this->canDo->get('core.create')) {
         JToolbarHelper::addNew('visfield.add');
     }
     if ($this->canDo->get('core.edit.state')) {
         JToolbarHelper::publishList('visfields.publish');
         JToolbarHelper::unpublishList('visfields.unpublish');
         JToolbarHelper::checkin('visfields.checkin');
     }
     if ($this->canDo->get('core.delete')) {
         JToolbarHelper::deleteList('COM_VISFORMS_DELETE_FIELD_TRUE', 'visfields.delete', 'COM_VISFORMS_DELETE');
     }
     if ($this->canDo->get('core.edit')) {
         JToolbarHelper::editList('visfield.edit');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_visforms') && $user->authorise('core.edit', 'com_visforms') && $user->authorise('core.edit.state', 'com_visforms')) {
         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');
     }
     JToolbarHelper::custom('visfields.forms', 'forms', 'forms', JText::_('COM_VISFORMS_SUBMENU_FORMS'), false);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
예제 #25
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_modules');
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolbar::getInstance('toolbar');
     if ($state->get('filter.client_id') == 1) {
         JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_ADMIN'), 'cube module');
     } else {
         JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_SITE'), 'cube module');
     }
     if ($canDo->get('core.create')) {
         // Instantiate a new JLayoutFile instance and render the layout
         $layout = new JLayoutFile('toolbar.newmodule');
         $bar->appendButton('Custom', $layout->render(array()), 'new');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::checkin('modules.checkin');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_modules') && $user->authorise('core.edit', 'com_modules') && $user->authorise('core.edit.state', 'com_modules')) {
         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('JGLOBAL_CONFIRM_DELETE', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('modules.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_modules');
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
 }
예제 #26
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'article.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_content', 'core.create')) > 0) {
         JToolbarHelper::addNew('article.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolbarHelper::editList('article.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
         JToolbarHelper::archiveList('articles.archive');
         JToolbarHelper::checkin('articles.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('articles.trash');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_content') && $user->authorise('core.edit', 'com_content') && $user->authorise('core.edit.state', 'com_content')) {
         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_content');
     }
     JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
     JHtmlSidebar::setAction('index.php?option=com_content&view=articles');
     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')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_TAG'), 'filter_tag', JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag')));
 }
예제 #27
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_plugins');
     JToolbarHelper::title(JText::_('COM_PLUGINS_MANAGER_PLUGINS'), 'power-cord plugin');
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('plugin.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('plugins.publish', 'JTOOLBAR_ENABLE', true);
         JToolbarHelper::unpublish('plugins.unpublish', 'JTOOLBAR_DISABLE', true);
         JToolbarHelper::checkin('plugins.checkin');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_plugins');
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_PLUGIN_MANAGER');
 }
예제 #28
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/weblinks.php';
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_weblinks', 'category', $state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'link weblinks');
     if (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0) {
         JToolbarHelper::addNew('weblink.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('weblink.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('weblinks.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('weblinks.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('weblinks.archive');
         JToolbarHelper::checkin('weblinks.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'weblinks.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('weblinks.trash');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_weblinks') && $user->authorise('core.edit', 'com_weblinks') && $user->authorise('core.edit.state', 'com_weblinks')) {
         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 ($user->authorise('core.admin', 'com_weblinks')) {
         JToolbarHelper::preferences('com_weblinks');
     }
     JToolbarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS');
     JHtmlSidebar::setAction('index.php?option=com_weblinks&view=weblinks');
     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::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_weblinks'), 'value', 'text', $this->state->get('filter.category_id')));
     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')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_TAG'), 'filter_tag', JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag')));
 }
예제 #29
0
 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = NewsfeedsHelper::getActions($state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEEDS'), 'newsfeeds.png');
     if (count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         JToolbarHelper::addNew('newsfeed.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('newsfeed.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('newsfeeds.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('newsfeeds.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::archiveList('newsfeeds.archive');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::checkin('newsfeeds.checkin');
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('newsfeeds.trash');
     }
     // 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');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_newsfeeds');
     }
     JToolbarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS');
     JHtmlSidebar::setAction('index.php?option=com_newsfeeds&view=newsfeeds');
     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_newsfeeds'), 'value', 'text', $this->state->get('filter.category_id')));
     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')));
     JHtmlSidebar::addFilter('-' . JText::_('JSELECT') . ' ' . JText::_('JTAG') . '-', 'filter_tag', JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag')));
 }
예제 #30
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.0.0
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = CMDonationHelper::getActions();
     JToolbarHelper::title(JText::_('COM_CMDONATION_MANAGER_DONATIONS'), 'donation icon-heart-2');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('donation.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('donation.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::checkin('donations.checkin');
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList(JText::_('COM_CMDONATION_WARNING_DELETE_ITEMS'), 'donations.delete');
     }
 }