/** * Renders the view * * @param string $tpl Template name * * @return void * * @since 2.5.4 */ public function display($tpl = null) { // Get data from the model. $this->state = $this->get('State'); // Load useful classes. $model = $this->getModel(); $this->loadHelper('select'); // Assign view variables. $ftp = $model->getFTPOptions(); $this->assign('updateInfo', $model->getUpdateInformation()); $this->assign('methodSelect', JoomlaupdateHelperSelect::getMethods($ftp['enabled'])); // Set the toolbar information. JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'loop install'); JToolbarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false); // Add toolbar buttons. $user = JFactory::getUser(); if ($user->authorise('core.admin', 'com_joomlaupdate') || $user->authorise('core.options', 'com_joomlaupdate')) { JToolbarHelper::preferences('com_joomlaupdate'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE'); if (!is_null($this->updateInfo['object'])) { // Show the message if a update is found. JFactory::getApplication()->enqueueMessage(JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE'), 'notice'); } // Render the view. parent::display($tpl); }
protected function addToolbar($layout = null) { switch ($layout) { case 'export': JToolbarHelper::title(JText::_('COM_PRP') . ': ' . JText::_('COM_PRP_VIEW_EXPORT_TABLE_EXPORT')); JToolbarHelper::back('JTOOLBAR_BACK', JRoute::_('index.php?option=com_prp&view=exports'), false); JToolbarHelper::custom('export.xlsx', 'xlsx', 'xlsx', '', false); JToolbarHelper::custom('export.xls', 'xls', 'xls', '', false); JFactory::getDocument()->addStyleDeclaration( PRPHelperExport::getStyleDeclaration('xls') . "\n\n" . PRPHelperExport::getStyleDeclaration('xlsx') ); JFactory::getDocument()->addStyleSheet(JUri::root().'/media/com_prp/css/export.css'); break; default: JFactory::getApplication()->input->set('hidemainmenu', true); $isNew = ($this->item->id == 0); $title_sufix = ($isNew)?'_NEW':'_EDIT'; JToolbarHelper::title(JText::_('COM_PRP') . ': ' . JText::_('COM_PRP_VIEW_EXPORT'.$title_sufix)); JToolbarHelper::save('export.save'); JToolbarHelper::save2new('export.save2new'); if ($isNew) { JToolbarHelper::cancel('export.cancel'); } else { JToolbarHelper::cancel('export.cancel', 'JTOOLBAR_CLOSE'); } break; } }
public function display($tpl = null) { $this->setHeading('COM_EASYSOCIAL_HEADING_MAINTENANCE'); $this->setDescription('COM_EASYSOCIAL_DESCRIPTION_MAINTENANCE'); // Add button JToolbarHelper::custom('form', 'refresh', '', JText::_('COM_EASYSOCIAL_MAINTENANCE_EXECUTE_SCRIPTS')); // Check if this is from after execution $success = JRequest::getInt('success'); if (!empty($success)) { $plurality = $success > 1 ? '_PLURAL' : '_SINGULAR'; FD::info()->set(false, JText::sprintf('COM_EASYSOCIAL_MAINTENANCE_SUCCESSFULLY_EXECUTED_SCRIPT' . $plurality, $success), SOCIAL_MSG_SUCCESS); return $this->redirect('index.php?option=com_easysocial&view=maintenance'); } $model = FD::model('maintenance', array('initState' => true)); $version = $model->getState('version'); $search = $model->getState('search'); $ordering = $model->getState('ordering'); $direction = $model->getState('direction'); $limit = $model->getState('limit'); $scripts = $model->getItems(); $pagination = $model->getPagination(); $versions = $model->getVersions(); $this->set('scripts', $scripts); $this->set('version', $version); $this->set('search', $search); $this->set('ordering', $ordering); $this->set('direction', $direction); $this->set('limit', $limit); $this->set('pagination', $pagination); $this->set('versions', $versions); echo parent::display('admin/maintenance/default'); }
/** * Default user listings page. * * @since 1.0 * @access public * @param null * @return null */ public function display($tpl = null) { $this->checkAccess('easyblog.manage.languages'); $this->setHeading('COM_EASYBLOG_HEADING_LANGUAGES', '', 'fa-language'); // Get configuration $config = EB::config(); // Get the api key from the config $key = $config->get('main_apikey'); // Add Joomla buttons JToolbarHelper::title(JText::_('COM_EASYBLOG_HEADING_LANGUAGES')); if (!$key) { JToolbarHelper::custom('savekey', 'save', '', JText::_('COM_EASYBLOG_SAVE_APIKEY_BUTTON'), false); $return = base64_encode('index.php?option=com_easyblog&view=languages'); $this->set('return', $return); return parent::display('languages/key'); } JToolbarHelper::custom('languages.discover', 'refresh', '', JText::_('COM_EASYBLOG_TOOLBAR_BUTTON_FIND_UPDATES'), false); JToolbarHelper::custom('languages.install', 'upload', '', JText::_('COM_EASYBLOG_TOOLBAR_BUTTON_INSTALL_OR_UPDATE')); JToolbarHelper::custom('languages.purge', 'purge', '', JText::_('COM_EASYBLOG_TOOLBAR_BUTTON_PURGE_CACHE'), false); // Get the languages that are already stored on the db $model = EB::model('Languages'); $initialized = $model->initialized(); if (!$initialized) { $this->set('key', $key); return parent::display('languages/initialize'); } // Get languages $languages = $model->getLanguages(); foreach ($languages as &$language) { $translators = json_decode($language->translator); $language->translator = $translators; } $this->set("languages", $languages); parent::display('languages/default'); }
/** * Add the toolbar and toolbar title. * * @access protected * @return void * * @since 2.0 */ protected function addToolbar() { // Get the results for each action $canDo = JoomHelper::getActions(); JToolBarHelper::title(JText::_('COM_JOOMGALLERY_IMGMAN_IMAGE_MANAGER'), 'images'); if (($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('joom.upload') || count(JoomHelper::getAuthorisedCategories('joom.upload'))) && $this->pagination->total) { JToolbarHelper::addNew('new'); } if (($canDo->get('core.edit') || $canDo->get('core.edit.own')) && $this->pagination->total) { JToolbarHelper::editList(); JToolbarHelper::custom('edit', 'checkbox-partial', 'checkbox-partial', 'JTOOLBAR_BATCH'); JToolbarHelper::custom('showmove', 'move.png', 'move.png', 'COM_JOOMGALLERY_COMMON_TOOLBAR_MOVE'); JToolbarHelper::custom('recreate', 'refresh.png', 'refresh.png', 'COM_JOOMGALLERY_COMMON_TOOLBAR_RECREATE'); JToolbarHelper::divider(); } if ($canDo->get('core.edit.state') && $this->pagination->total) { JToolbarHelper::publishList('publish', JText::_('COM_JOOMGALLERY_COMMON_PUBLISH')); JToolbarHelper::unpublishList('unpublish', JText::_('COM_JOOMGALLERY_COMMON_UNPUBLISH')); JToolbarHelper::custom('approve', 'upload.png', 'upload_f2.png', 'COM_JOOMGALLERY_IMGMAN_TOOLBAR_APPROVE'); JToolbarHelper::divider(); } //if($canDo->get('core.delete')) //{ JToolbarHelper::deleteList('', 'remove'); //} }
/** * 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_NUTRIENTS'), 'database nutrients'); if ($canDo->get('core.create')) { JToolBarHelper::addNew('nutrient.add'); } if ($canDo->get('core.edit') && isset($this->items[0])) { JToolBarHelper::editList('nutrient.edit'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::checkin('nutrients.checkin'); JToolbarHelper::custom('nutrients.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::publish('nutrients.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::deleteList('', 'nutrients.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('nutrients.trash'); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_sibdiet'); } JHtmlSidebar::setAction('index.php?option=com_sibdiet&view=nutrients'); }
/** * Setting the toolbar */ protected function addToolBar($total = NULL) { JToolBarHelper::title(JText::_('COM_AGENDADIRIGENTES') . ': ' . JText::_('COM_AGENDADIRIGENTES_MANAGER_COMPROMISSOS') . ($total ? ' <span style="font-size: 0.5em; vertical-align: middle;">(' . $total . ' ' . JText::_('COM_AGENDADIRIGENTES_ITEMS') . ')</span>' : '')); if ($this->canDo->get('core.create')) { JToolBarHelper::addNew('compromisso.add'); } if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own')) { JToolBarHelper::editList('compromisso.edit'); } if ($this->canDo->get('core.edit.state')) { $allowFeature = $this->state->get('params')->get('allowFeature', 'state'); $isSuperUser = array_search(8, $this->user->groups) !== false; JToolBarHelper::publishList('compromissos.publish'); JToolBarHelper::unpublishList('compromissos.unpublish'); if ($allowFeature == 'state' || $allowFeature == 'edit' && $this->canDo->get('core.edit') || $allowFeature == 'superuser' && $isSuperUser) { JToolbarHelper::custom('compromissos.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); } JToolbarHelper::archiveList('compromissos.archive'); } if ($this->state->get('filter.state') == -2 && $this->canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'compromissos.delete'); } elseif ($this->canDo->get('core.edit.state')) { JToolbarHelper::trash('compromissos.trash'); } // Options button. if ($this->canDo->get('core.admin')) { JToolBarHelper::preferences('com_agendadirigentes'); } }
function display($cachable = false, $urlparams = false) { require_once JPATH_COMPONENT . '/helpers/admirorgallery.php'; if (!is_dir(JPATH_SITE . '/plugins/content/admirorgallery/')) { JError::raiseWarning('2', JText::_('COM_PLUGIN_NOT_INSTALLED')); } AdmirorGalleryHelper::addSubmenu(JRequest::getCmd('view', 'control_panel'), JRequest::getCmd('AG_resourceType', '')); $doc = JFactory::getDocument(); $viewType = $doc->getType(); $viewName = $this->input->get('view', $this->default_view); $viewLayout = $this->input->get('layout', 'default', 'string'); $view = $this->getView($viewName, $viewType, '', array('base_path' => $this->basePath, 'layout' => $viewLayout)); JToolBarHelper::help("", false, "http://www.admiror-design-studio.com/admiror-joomla-extensions/admiror-gallery/user-manuals"); if (JFactory::getUser()->authorise('core.admin', 'com_admirorgallery')) { JToolbarHelper::preferences('com_admirorgallery'); if ($viewName == 'resourcemanager') { JToolbarHelper::custom('ag_install', 'ag_install', 'ag_install', 'JTOOLBAR_INSTALL', false, false); JToolbarHelper::deleteList('COM_ADMIRORGALLERY_ARE_YOU_SURE', 'ag_uninstall', 'JTOOLBAR_UNINSTALL'); } else { JToolbarHelper::custom('AG_apply', 'publish', 'publish', 'COM_ADMIRORGALLERY_APPLY_DESC', false, false); JToolbarHelper::custom('AG_reset', 'unpublish', 'unpublish', 'COM_ADMIRORGALLERY_RESET_DESC', false, false); } } $view->sidebar = JHtmlSidebar::render(); $doc->addScriptDeclaration(' AG_jQuery(function(){ // SET SHORCUTS AG_jQuery(document).bind("keydown", "ctrl+return", function (){submitbutton("AG_apply");return false;}); AG_jQuery(document).bind("keydown", "ctrl+backspace", function (){submitbutton("AG_reset");return false;}); });//AG_jQuery(function() '); parent::display(); }
/** * Renders the view * * @param string $tpl Template name * * @return void * * @since 2.5.4 */ public function display($tpl = null) { // Get data from the model $this->state = $this->get('State'); // Load useful classes $model = $this->getModel(); $this->loadHelper('select'); // Assign view variables $ftp = $model->getFTPOptions(); $this->assign('updateInfo', $model->getUpdateInformation()); $this->assign('methodSelect', JoomlaupdateHelperSelect::getMethods($ftp['enabled'])); // Set the toolbar information JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install'); JToolbarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false); // Add toolbar buttons JToolbarHelper::preferences('com_joomlaupdate'); // Load mooTools JHtml::_('behavior.framework', true); // Load our Javascript $document = JFactory::getDocument(); $document->addScript('../media/com_joomlaupdate/default.js'); JHtml::_('stylesheet', 'media/mediamanager.css', array(), true); // Render the view parent::display($tpl); }
/** * Main method to display the badges view. * * @since 1.0 * @access public * @return null * * @author Mark Lee <*****@*****.**> */ public function display($tpl = null) { // Add heading here. $this->setHeading('COM_EASYSOCIAL_HEADING_ALERTS'); $this->setDescription('COM_EASYSOCIAL_DESCRIPTION_ALERTS'); // Default filters $options = array(); JToolbarHelper::publishList(); JToolbarHelper::unpublishList(); JToolbarHelper::divider(); JToolbarHelper::custom('emailPublish', 'publish', '', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_PUBLISH_EMAIL')); JToolbarHelper::custom('emailUnpublish', 'unpublish', '', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_UNPUBLISH_EMAIL')); JToolbarHelper::divider(); JToolbarHelper::custom('systemPublish', 'publish', '', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_PUBLISH_SYSTEM')); JToolbarHelper::custom('systemUnpublish', 'unpublish', '', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_UNPUBLISH_SYSTEM')); // Load badges model. $model = FD::model('Alert', array('initState' => true)); // Get the current ordering. $ordering = $model->getState('ordering'); $direction = $model->getState('direction'); $published = $model->getState('published'); $limit = $model->getState('limit'); // Get the badges $alerts = $model->getItems(); // Get pagination $pagination = $model->getPagination(); $this->set('limit', $limit); $this->set('ordering', $ordering); $this->set('direction', $direction); $this->set('published', $published); $this->set('alerts', $alerts); $this->set('pagination', $pagination); echo parent::display('admin/alerts/default'); }
/** * Displays the settings form for the respective page. * * @since 1.0 * @access public * @param null * @return null * @author Mark Lee <*****@*****.**> */ public function form() { // Get the current page. $page = JRequest::getVar('page', ''); // Get info object. $info = FD::info(); if (empty($page)) { // @TODO: Log errors here. $info->set(JText::_('No page provided'), SOCIAL_MSG_ERROR); $this->redirect('index.php?option=com_easysocial'); } // Add Joomla toolbar buttons JToolbarHelper::apply(); JToolbarHelper::custom('export', 'export', '', JText::_('COM_EASYSOCIAL_SETTINGS_EXPORT_SETTINGS'), false); JToolbarHelper::custom('import', 'import', '', JText::_('COM_EASYSOCIAL_SETTINGS_IMPORT_SETTINGS'), false); JToolbarHelper::custom('reset', 'default', '', JText::_('COM_EASYSOCIAL_RESET_TO_FACTORY'), false); // We need to include the theme file's header info. $theme = FD::get('Themes'); $paths = $theme->getTemplate('admin/settings/headers/' . $page); if (JFile::exists($paths->file)) { include $paths->file; } // Ensure that page is in proper string format. $page = strtolower($page); // Set the page to the class for other method to access $this->section = $page; // Set the page variable. $this->set('page', $page); // Set settings view variable $this->set('settings', $this); echo parent::display('admin/settings/form.container'); }
protected function addToolbar() { $state = $this->get('State'); JToolBarHelper::title(JText::_('COM_XMAP_SITEMAPS_TITLE'), 'list'); $canDo = JHelperContent::getActions('com_xmap', 'sitemap'); JToolBarHelper::addNew('sitemap.add'); JToolbarHelper::editList('sitemap.edit'); if ($canDo->get('core.edit.state')) { JToolbarHelper::publish('sitemaps.publish', 'JTOOLBAR_PUBLISH', true); JToolbarHelper::unpublish('sitemaps.unpublish', 'JTOOLBAR_UNPUBLISH', true); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'sitemaps.delete', 'JTOOLBAR_EMPTY_TRASH'); } elseif ($canDo->get('core.edit.state')) { JToolbarHelper::trash('sitemaps.trash'); } if ($canDo->get('core.manage')) { JToolbarHelper::custom('sitemaps.ping', 'heart', 'heart', JText::_('COM_XMAP_TOOLBAR_PING')); } if (JFactory::getUser()->authorise('core.admin')) { JToolbarHelper::preferences('com_xmap'); } if (JHelperContent::getActions('com_plugins')->get('core.edit.state')) { JToolbarHelper::custom('sitemaps.plugins', 'power-cord', 'power-cord', JText::_('COM_XMAP_TOOLBAR_PLUGINS'), false); } JHtmlSidebar::setAction('index.php?option=com_xmap&view=sitemaps'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', XmapHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))); $this->sidebar = JHtmlSidebar::render(); }
/** * Add the page title and toolbar. * */ protected function addToolbar() { if (version_compare(JVERSION, '3.0', 'lt')) { JRequest::setVar('hidemainmenu', true); } else { JFactory::getApplication()->input->set('hidemainmenu', true); } $user = JFactory::getUser(); $user_id = $user->get('id'); $is_new = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 or $this->item->checked_out == $user_id); JToolbarHelper::title($is_new ? JText::_('COM_COMPONENTARCHITECT_COMPONENTOBJECTS_NEW_HEADER') : JText::_('COM_COMPONENTARCHITECT_COMPONENTOBJECTS_EDIT_HEADER'), 'componentobjects.png'); JToolbarHelper::apply('componentobject.apply', 'JTOOLBAR_APPLY'); JToolbarHelper::save('componentobject.save', 'JTOOLBAR_SAVE'); JToolbarHelper::custom('componentobject.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); // If an existing item, can save to a copy. if (!$is_new) { JToolbarHelper::custom('componentobject.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } if ($is_new) { JToolbarHelper::cancel('componentobject.cancel', 'JTOOLBAR_CANCEL'); } else { JToolbarHelper::cancel('componentobject.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); $params = $this->state->get('params'); JToolbarHelper::help('JHELP_COMPONENTS_COMPONENTARCHITECT_COMPONENTOBJECT_EDIT', true, null, 'com_componentarchitect'); }
/** * 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'); }
/** * Displays the settings form for the respective page. * * @since 1.0 * @access public * @param null * @return null * @author Mark Lee <*****@*****.**> */ public function form() { // Get the current page. $page = $this->input->get('page', '', 'word'); // Ensure that the page is valid if (!$page) { return $this->redirect('index.php?option=com_easysocial'); } // Add Joomla toolbar buttons JToolbarHelper::apply(); JToolbarHelper::custom('export', 'export', '', JText::_('COM_EASYSOCIAL_SETTINGS_EXPORT_SETTINGS'), false); JToolbarHelper::custom('import', 'import', '', JText::_('COM_EASYSOCIAL_SETTINGS_IMPORT_SETTINGS'), false); JToolbarHelper::custom('reset', 'default', '', JText::_('COM_EASYSOCIAL_RESET_TO_FACTORY'), false); // Set the heading $languageString = strtoupper($page); $this->setHeading(JText::_('COM_EASYSOCIAL_' . $languageString . '_SETTINGS_HEADER')); $this->setDescription(JText::_('COM_EASYSOCIAL_' . $languageString . '_SETTINGS_HEADER_DESC')); // Ensure that page is in proper string format. $page = strtolower($page); // Set the page to the class for other method to access $this->section = $page; // Set the page variable. $this->set('page', $page); $this->set('settings', $this); echo parent::display('admin/settings/form.container'); }
/** * Adds the toolbar * * @return void */ public function addToolbar() { // Set toolbar items for the page JToolBarHelper::title(JText::_('COM_MATUKIO_CONTACT_PARTICIPANTS'), 'massmail'); JToolbarHelper::custom("contactparticipants.send", 'send', 'send', JText::_("COM_MATUKIO_SEND"), false); JToolBarHelper::help('screen.matukio', true); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $canDo = JHelperContent::getActions('com_templates'); JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES'), 'eye thememanager'); if ($canDo->get('core.edit.state')) { JToolbarHelper::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME'); JToolbarHelper::divider(); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('style.edit'); } if ($canDo->get('core.create')) { JToolbarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true); JToolbarHelper::divider(); } if ($canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'styles.delete'); JToolbarHelper::divider(); } if ($canDo->get('core.admin') || $canDo->get('core.options')) { JToolbarHelper::preferences('com_templates'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES'); JHtmlSidebar::setAction('index.php?option=com_templates&view=styles'); }
/** * 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'))); }
/** * Renders the view * * @param string $tpl Template name * * @return void * * @since 2.5.4 */ public function display($tpl = null) { // Get data from the model. $this->state = $this->get('State'); // Load useful classes. $model = $this->getModel(); $this->loadHelper('select'); // Assign view variables. $ftp = $model->getFTPOptions(); $this->assign('updateInfo', $model->getUpdateInformation()); $this->assign('methodSelect', JoomlaupdateHelperSelect::getMethods($ftp['enabled'])); // Set the toolbar information. JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'arrow-up-2 install'); JToolbarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false); // Add toolbar buttons. if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) { JToolbarHelper::preferences('com_joomlaupdate'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE'); // Load mooTools. JHtml::_('behavior.framework', true); // Include jQuery. JHtml::_('jquery.framework'); // Load our Javascript. $document = JFactory::getDocument(); $document->addScript('../media/com_joomlaupdate/default.js'); JHtml::_('stylesheet', 'media/mediamanager.css', array(), true); if (!is_null($this->updateInfo['object'])) { // Show the message if a update is found. JFactory::getApplication()->enqueueMessage(JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE'), 'notice'); } // Render the view. parent::display($tpl); }
/** * Adds the page title and toolbar. * * @return void * * @since 2.5 */ protected function addToolbar() { // Get the results for each action $canDo = JHelperContent::getActions('com_languages'); JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDES_TITLE'), 'comments-2 langmanager'); if ($canDo->get('core.create')) { JToolbarHelper::addNew('override.add'); } if ($canDo->get('core.edit') && $this->pagination->total) { JToolbarHelper::editList('override.edit'); } if ($canDo->get('core.delete') && $this->pagination->total) { JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'overrides.delete', 'JTOOLBAR_DELETE'); } if (JFactory::getUser()->authorise('core.admin')) { JToolbarHelper::custom('overrides.purge', 'refresh.png', 'refresh_f2.png', 'COM_LANGUAGES_VIEW_OVERRIDES_PURGE', false); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_languages'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES'); JHtmlSidebar::setAction('index.php?option=com_languages&view=overrides'); JHtmlSidebar::addFilter('', 'filter_language_client', JHtml::_('select.options', $this->languages, null, 'text', $this->state->get('filter.language_client')), true); $this->sidebar = JHtmlSidebar::render(); }
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)); }
/** * 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'); JHtmlSidebar::setAction('index.php?option=com_users&view=users'); JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_STATE'), 'filter_state', JHtml::_('select.options', UsersHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state'))); JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_ACTIVE'), 'filter_active', JHtml::_('select.options', UsersHelper::getActiveOptions(), 'value', 'text', $this->state->get('filter.active'))); JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_USERGROUP'), 'filter_group_id', JHtml::_('select.options', UsersHelper::getGroups(), 'value', 'text', $this->state->get('filter.group_id'))); JHtmlSidebar::addFilter(JText::_('COM_USERS_OPTION_FILTER_DATE'), 'filter_range', JHtml::_('select.options', Usershelper::getRangeOptions(), 'value', 'text', $this->state->get('filter.range'))); }
/** * The default method that will display the output of this view which is called by * Joomla * * @param string template Template file name **/ public function display($tpl = null) { $mainframe = JFactory::getApplication(); $jinput = $mainframe->input; //$search = $mainframe->getUserStateFromRequest( "com_community.videos.search", 'search', '', 'string' ); $search = JRequest::getVar('search', ''); // Set the titlebar text JToolBarHelper::title(JText::_('COM_COMMUNITY_VIDEOS'), 'videos'); // Add the necessary buttons JToolbarHelper::custom('fetchThumbnail', 'pictures', '', JText::_('COM_COMMUNITY_FETCH_THUMBNAIL')); JToolBarHelper::trash('delete', JText::_('COM_COMMUNITY_DELETE')); JToolBarHelper::publishList('publish', JText::_('COM_COMMUNITY_PUBLISH')); JToolBarHelper::unpublishList('unpublish', JText::_('COM_COMMUNITY_UNPUBLISH')); $videos = $this->get('Videos'); $pagination = $this->get('Pagination'); $categories = $this->get('Categories'); foreach ($videos as $key => $vid) { foreach ($categories as $cat) { $videos[$key]->categoryName = ''; if ($cat->id == $vid->category_id) { $videos[$key]->categoryName = $cat->name; break; } } } $catHTML = $this->_getCategoriesHTML($categories); $this->assignRef('videos', $videos); $this->assignRef('pagination', $pagination); $this->assignRef('search', $search); $this->assignRef('categories', $catHTML); parent::display($tpl); }
/** * Add the page title and toolbar. * * @param object $campaign Campaign object. * @param array $statistics Array or statistics. * * @return void * * @since 1.0.0 */ protected function addToolbar($campaign, $statistics) { JToolbarHelper::title(JText::_('COM_CMDONATION_MANAGER_STATISTICS'), 'statistics icon-bars'); if (!empty($campaign) && !empty($statistics['donations'])) { JToolbarHelper::custom('statistics.export_donors', 'export out', 'export out', 'COM_CMDONATION_EXPORT_DONORS', false); } }
protected function addToolBar() { JToolBarHelper::title(JText::_('COM_JUDOWNLOAD_MANAGER_TEMPLATE_STYLES'), 'style'); if ($this->groupCanDoManage) { if ($this->canDo->get('core.create')) { JToolBarHelper::addNew('style.add'); } if ($this->canDo->get('core.edit')) { JToolBarHelper::editList('style.edit'); } if ($this->canDo->get('core.create')) { JToolbarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true); JToolbarHelper::divider(); } } if ($this->groupCanDoDelete) { if ($this->canDo->get('core.delete')) { JToolBarHelper::deleteList('COM_JUDOWNLOAD_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THESE_STYLES', 'styles.delete'); } } JToolBarHelper::divider(); $bar = JToolBar::getInstance('toolbar'); $bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judownload/helpers/button"); $bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP')); }
/** * Add the page title and toolbar. * @since 1.6 */ protected function addToolbar() { // Set toolbar items for the page JToolbarHelper::title(JText::_('COM_USERIDEAS_VOTES_MANAGER')); JToolbarHelper::deleteList(JText::_("COM_USERIDEAS_DELETE_ITEMS_QUESTION"), "votes.delete"); JToolbarHelper::divider(); JToolbarHelper::custom('votes.backToDashboard', "dashboard", "", JText::_("COM_USERIDEAS_DASHBOARD"), false); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { // Set toolbar items for the page JToolbarHelper::title(JText::_('COM_CROWDFUNDING_IMPORT_MANAGER')); // Upload JToolbarHelper::custom($this->uploadTask, "upload", "", JText::_("COM_CROWDFUNDING_UPLOAD"), false); JToolbarHelper::divider(); JToolbarHelper::cancel('import.cancel', 'JTOOLBAR_CANCEL'); }
/** * Display the view. * * @param string $tpl The subtemplate to display. * * @return void */ function display($tpl = null) { JToolbarHelper::title(JText::_('jUpgradePro'), 'jupgrade'); JToolbarHelper::custom('cpanel', 'back.png', 'back_f2.png', 'Back', false, false); JToolbarHelper::preferences('com_jupgradepro', '500'); JToolbarHelper::spacer(); JToolbarHelper::custom('help', 'help.png', 'help_f2.png', 'Help', false, false); JToolbarHelper::spacer(); // get params $params = JComponentHelper::getParams('com_jupgradepro'); // // Joomla bug: JInstaller not save the defaults params reading config.xml // $db = JFactory::getDBO(); if (!$params->get('method')) { $default_params = '{"method":"rest","rest_hostname":"http:\\/\\/www.example.org\\/","rest_username":"","rest_password":"","rest_key":"","path":"","driver":"mysql","hostname":"localhost","username":"","password":"","database":"","prefix":"jos_","skip_checks":"0","skip_files":"1","skip_templates":"1","skip_extensions":"1","skip_core_users":"0","skip_core_categories":"0","skip_core_sections":"0","skip_core_contents":"0","skip_core_contents_frontpage":"0","skip_core_menus":"0","skip_core_menus_types":"0","skip_core_modules":"0","skip_core_modules_menu":"0","skip_core_banners":"0","skip_core_banners_clients":"0","skip_core_banners_tracks":"0","skip_core_contacts":"0","skip_core_newsfeeds":"0","skip_core_weblinks":"0","positions":"0","debug":"0"}'; $query = "UPDATE #__extensions SET `params` = '{$default_params}' WHERE `element` = 'com_jupgradepro'"; $db->setQuery($query); $db->query(); // get params.. again $params = JComponentHelper::getParams('com_jupgradepro'); } // Load mooTools //JHTML::_('behavior.mootools'); // 2.5 JHtml::_('behavior.framework', true); $xmlfile = JPATH_COMPONENT_ADMINISTRATOR . '/jupgradepro.xml'; $xml = JFactory::getXML($xmlfile); $this->params = $params; $this->version = $xml->version[0]; parent::display($tpl); }
/** * Display a list of items that are reported on the site. * * @access public * @return null * */ public function display($tpl = null) { // Apply buttons JToolbarHelper::custom('purge', 'trash', '', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_PURGE_REPORTS'), false); JToolbarHelper::deleteList(); // Set the structure heading here. $this->setHeading(JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_REPORTS')); // Set the page icon here. $this->setIcon('icon-jar jar-warning_cleanup'); // Set the structure description here. $this->setDescription(JText::_('COM_EASYSOCIAL_DESCRIPTION_REPORTS')); $model = FD::model('Reports', array('initState' => true)); $search = $model->getState('search'); $limit = $model->getState('limit'); $ordering = $model->getState('ordering'); $direction = $model->getState('direction'); // Get list of reports $reports = $model->getReports(); // Get pagination $pagination = $model->getPagination(); $this->set('ordering', $ordering); $this->set('direction', $direction); $this->set('search', $search); $this->set('limit', $limit); $this->set('pagination', $pagination); $this->set('reports', $reports); return parent::display('admin/reports/default'); }
/** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $canDo = JHelperContent::getActions('com_templates'); JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES'), 'eye thememanager'); if ($canDo->get('core.edit.state')) { JToolbarHelper::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME'); JToolbarHelper::divider(); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('style.edit'); } if ($canDo->get('core.create')) { JToolbarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true); JToolbarHelper::divider(); } if ($canDo->get('core.delete')) { JToolbarHelper::deleteList('', 'styles.delete'); JToolbarHelper::divider(); } if ($canDo->get('core.admin')) { JToolbarHelper::preferences('com_templates'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES'); JHtmlSidebar::setAction('index.php?option=com_templates&view=styles'); JHtmlSidebar::addFilter(JText::_('COM_TEMPLATES_FILTER_TEMPLATE'), 'filter_template', JHtml::_('select.options', TemplatesHelper::getTemplateOptions($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.template'))); JHtmlSidebar::addFilter(JText::_('JGLOBAL_FILTER_CLIENT'), 'filter_client_id', JHtml::_('select.options', TemplatesHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id'))); }