本文整理汇总了PHP中JToolbarHelper类的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper类的具体用法?PHP JToolbarHelper怎么用?PHP JToolbarHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JToolbarHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: addToolbar
/**
* Add the page title and toolbar.
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$isNew = $this->item->id == 0;
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
$canDo = SibdietHelper::getActions();
JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_ERRAND'), 'database errands');
// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
JToolBarHelper::apply('errand.apply');
JToolBarHelper::save('errand.save');
}
if (!$checkedOut && $canDo->get('core.create')) {
JToolbarHelper::save2new('errand.save2new');
}
// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create')) {
JToolbarHelper::save2copy('errand.save2copy');
}
if (empty($this->item->id)) {
JToolBarHelper::cancel('errand.cancel');
} else {
JToolBarHelper::cancel('errand.cancel', 'JTOOLBAR_CLOSE');
}
}
开发者ID:smhnaji,项目名称:sdnet,代码行数:29,代码来源:view.html.php
示例2: addToolbar
/**
* 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_MAPS_TOOLBAR_TITLE'), 'zoom-in finder');
$toolbar = JToolbar::getInstance('toolbar');
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publishList('maps.publish');
JToolbarHelper::unpublishList('maps.unpublish');
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_CONTENT_MAPS');
if ($canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'maps.delete');
JToolbarHelper::divider();
}
JHtmlSidebar::setAction('index.php?option=com_finder&view=maps');
JHtmlSidebar::addFilter('', 'filter_branch', JHtml::_('select.options', JHtml::_('finder.mapslist'), 'value', 'text', $this->state->get('filter.branch')), true);
JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')));
}
开发者ID:educakanchay,项目名称:educared,代码行数:32,代码来源:view.html.php
示例3: display
/**
* Renders the view
*
* @param string $tpl Template name
*
* @return void
*/
public function display($tpl = null)
{
$password = JFactory::getApplication()->getUserState('com_joomlaupdate.password', null);
$filesize = JFactory::getApplication()->getUserState('com_joomlaupdate.filesize', null);
$ajaxUrl = JUri::base() . 'components/com_joomlaupdate/restore.php';
$returnUrl = 'index.php?option=com_joomlaupdate&task=update.finalise';
// Set the toolbar information
JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'install');
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE');
// Add toolbar buttons
if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) {
JToolbarHelper::preferences('com_joomlaupdate');
}
// Load mooTools
JHtml::_('behavior.framework', true);
$updateScript = <<<ENDSCRIPT
var joomlaupdate_password = '{$password}';
var joomlaupdate_totalsize = '{$filesize}';
var joomlaupdate_ajax_url = '{$ajaxUrl}';
var joomlaupdate_return_url = '{$returnUrl}';
ENDSCRIPT;
// Load our Javascript
$document = JFactory::getDocument();
$document->addScript('../media/com_joomlaupdate/json2.js');
$document->addScript('../media/com_joomlaupdate/encryption.js');
$document->addScript('../media/com_joomlaupdate/update.js');
JHtml::_('script', 'system/progressbar.js', true, true);
JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
$document->addScriptDeclaration($updateScript);
// Render the view
parent::display($tpl);
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:41,代码来源:view.html.php
示例4: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$isNew = $this->item->id == 0;
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
// Built the actions for new and existing records.
$canDo = JHelperContent::getActions('com_testyourself');
JToolBarHelper::title(JText::_('COM_TESTYOURSELF_MANAGER_QUESTION'), 'question questions');
// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
JToolBarHelper::apply('question.apply');
JToolBarHelper::save('question.save');
}
if (!$checkedOut && $canDo->get('core.create')) {
JToolbarHelper::save2new('question.save2new');
}
// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create')) {
JToolbarHelper::save2copy('question.save2copy');
}
if (empty($this->item->id)) {
JToolBarHelper::cancel('question.cancel');
} else {
JToolBarHelper::cancel('question.cancel', 'JTOOLBAR_CLOSE');
}
}
开发者ID:smhnaji,项目名称:sdnet,代码行数:32,代码来源:view.html.php
示例5: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/languages.php';
JFactory::getApplication()->input->set('hidemainmenu', 1);
$isNew = empty($this->item->lang_id);
$canDo = $this->canDo;
JToolbarHelper::title(JText::_($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'comments-2 langmanager');
// If a new item, can save.
if ($isNew && $canDo->get('core.create')) {
JToolbarHelper::save('language.save');
}
//If an existing item, allow to Apply and Save.
if (!$isNew && $canDo->get('core.edit')) {
JToolbarHelper::apply('language.apply');
JToolbarHelper::save('language.save');
}
// If an existing item, can save to a copy only if we have create rights.
if ($canDo->get('core.create')) {
JToolbarHelper::save2new('language.save2new');
}
if ($isNew) {
JToolbarHelper::cancel('language.cancel');
} else {
JToolbarHelper::cancel('language.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT');
$this->sidebar = JHtmlSidebar::render();
}
开发者ID:joomlatools,项目名称:joomla-platform,代码行数:34,代码来源:view.html.php
示例6: display
function display($tpl = null)
{
$entry = $this->get('Data');
$characters_length = $this->get('CharactersLength');
$robots_array = array('', 'index, follow', 'noindex, follow', 'index, nofollow', 'noindex, nofollow');
if (empty($entry->id)) {
JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_NEWENTRY'), 'easyfrontendseo-add');
JToolBarHelper::save('save');
JToolBarHelper::cancel('cancel');
} else {
JToolBarHelper::title(JText::_('COM_EASYFRONTENDSEO') . ' - ' . JText::_('COM_EASYFRONTENDSEO_EDITENTRY'), 'easyfrontendseo-edit');
JToolbarHelper::apply('apply');
JToolBarHelper::save('save');
JToolBarHelper::cancel('cancel', 'Close');
}
JHTML::_('behavior.framework');
$document = JFactory::getDocument();
$document->addStyleSheet('components/com_easyfrontendseo/css/easyfrontendseo.css');
$document->addScript('components/com_easyfrontendseo/js/wordcount.js', 'text/javascript');
$output = "window.addEvent('domready', function(){";
$output .= "new WordCount('counter_title', {inputName:'title', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_title', {inputName:'title', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
$output .= "new WordCount('counter_description', {inputName:'description', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_description', {inputName:'description', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
$output .= "new WordCount('counter_keywords', {inputName:'keywords', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_keywords', {inputName:'keywords', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
$output .= "new WordCount('counter_generator', {inputName:'generator', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'}); new WordCount('counter_generator', {inputName:'generator', eventTrigger: 'click', wordText:'" . JText::_('COM_EASYFRONTENDSEO_WORDS') . "', charText:'" . JText::_('COM_EASYFRONTENDSEO_CHARACTERS') . "'});\n";
$output .= " });";
$document->addScriptDeclaration($output, 'text/javascript');
$this->entry = $entry;
$this->characters_length = $characters_length;
$this->robots_array = $robots_array;
// Get donation code message
require_once JPATH_COMPONENT . '/helpers/easyfrontendseo.php';
$donation_code_message = EasyFrontendSeoHelper::getDonationCodeMessage();
$this->donation_code_message = $donation_code_message;
parent::display($tpl);
}
开发者ID:kJluk,项目名称:EFSEO-Easy-Frontend-SEO,代码行数:35,代码来源:view.html.php
示例7: addToolbar
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();
}
开发者ID:b2un0,项目名称:joomla-component-mapx,代码行数:30,代码来源:view.html.php
示例8: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$input = JFactory::getApplication()->input;
$input->set('hidemainmenu', true);
$isNew = $this->item->id == 0;
$canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
JToolbarHelper::title(JText::_($isNew ? 'COM_MENUS_VIEW_NEW_MENU_TITLE' : 'COM_MENUS_VIEW_EDIT_MENU_TITLE'), 'list menu');
// If a new item, can save the item. Allow users with edit permissions to apply changes to prevent returning to grid.
if ($isNew && $canDo->get('core.create')) {
if ($canDo->get('core.edit')) {
JToolbarHelper::apply('menu.apply');
}
JToolbarHelper::save('menu.save');
}
// If user can edit, can save the item.
if (!$isNew && $canDo->get('core.edit')) {
JToolbarHelper::apply('menu.apply');
JToolbarHelper::save('menu.save');
}
// If the user can create new items, allow them to see Save & New
if ($canDo->get('core.create')) {
JToolbarHelper::save2new('menu.save2new');
}
if ($isNew) {
JToolbarHelper::cancel('menu.cancel');
} else {
JToolbarHelper::cancel('menu.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_MENUS_MENU_MANAGER_EDIT');
}
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:36,代码来源:view.html.php
示例9: addToolbar
/**
* 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);
}
}
开发者ID:sis-direct,项目名称:cmdonation,代码行数:17,代码来源:view.html.php
示例10: addToolbar
/**
* Add the page title and toolbar.
*
* @return void.
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$isNew = $this->item->id == 0;
$canDo = JHelperContent::getActions('com_redirect');
JToolbarHelper::title($isNew ? JText::_('COM_REDIRECT_MANAGER_LINK_NEW') : JText::_('COM_REDIRECT_MANAGER_LINK_EDIT'), 'refresh redirect');
// If not checked out, can save the item.
if ($canDo->get('core.edit')) {
JToolbarHelper::apply('link.apply');
JToolbarHelper::save('link.save');
}
/**
* This component does not support Save as Copy due to uniqueness checks.
* While it can be done, it causes too much confusion if the user does
* not change the Old URL.
*/
if ($canDo->get('core.edit') && $canDo->get('core.create')) {
JToolbarHelper::save2new('link.save2new');
}
if (empty($this->item->id)) {
JToolbarHelper::cancel('link.cancel');
} else {
JToolbarHelper::cancel('link.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER_EDIT');
}
开发者ID:deenison,项目名称:joomla-cms,代码行数:33,代码来源:view.html.php
示例11: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$isNew = $this->item->id == 0;
$canDo = JHelperContent::getActions('com_users');
JToolbarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_LEVEL_TITLE' : 'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'users levels-add');
if ($canDo->get('core.edit') || $canDo->get('core.create')) {
JToolbarHelper::apply('level.apply');
JToolbarHelper::save('level.save');
}
if ($canDo->get('core.create')) {
JToolbarHelper::save2new('level.save2new');
}
// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create')) {
JToolbarHelper::save2copy('level.save2copy');
}
if (empty($this->item->id)) {
JToolbarHelper::cancel('level.cancel');
} else {
JToolbarHelper::cancel('level.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_USERS_ACCESS_LEVELS_EDIT');
}
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:30,代码来源:view.html.php
示例12: addToolbar
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/jcomments.php';
JFactory::getApplication()->input->set('hidemainmenu', 1);
$userId = JFactory::getUser()->get('id');
$canDo = JCommentsHelper::getActions();
$isNew = $this->item->id == 0;
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
if (version_compare(JVERSION, '3.0', 'ge')) {
JToolbarHelper::title($isNew ? JText::_('A_SMILIES_SMILEY_NEW') : JText::_('A_SMILIES_SMILEY_EDIT'), 'smilies.png');
} else {
JToolbarHelper::title($isNew ? JText::_('A_SMILIES_SMILEY_NEW') : JText::_('A_SMILIES_SMILEY_EDIT'), 'jcomments-smilies');
}
if (!$checkedOut && $canDo->get('core.edit')) {
JToolBarHelper::apply('smiley.apply');
JToolBarHelper::save('smiley.save');
}
if (!$isNew && $canDo->get('core.create')) {
JToolbarHelper::save2new('smiley.save2new');
}
if ($isNew) {
JToolBarHelper::cancel('smiley.cancel');
} else {
JToolBarHelper::cancel('smiley.cancel', 'JTOOLBAR_CLOSE');
}
}
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:26,代码来源:view.html.php
示例13: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->get('id');
$isNew = $this->item->id == 0;
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
// Since we don't track these assets at the item level, use the category id.
$canDo = BannersHelper::getActions($this->item->catid, 0);
JToolbarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_BANNER_NEW') : JText::_('COM_BANNERS_MANAGER_BANNER_EDIT'), 'banners.png');
// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)) {
JToolbarHelper::apply('banner.apply');
JToolbarHelper::save('banner.save');
if ($canDo->get('core.create')) {
JToolbarHelper::save2new('banner.save2new');
}
}
// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create')) {
JToolbarHelper::save2copy('banner.save2copy');
}
if (empty($this->item->id)) {
JToolbarHelper::cancel('banner.cancel');
} else {
JToolbarHelper::cancel('banner.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS_EDIT');
}
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:35,代码来源:view.html.php
示例14: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$isNew = $this->item->id == 0;
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
$canDo = $this->canDo;
JToolbarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_CLIENT_NEW') : JText::_('COM_BANNERS_MANAGER_CLIENT_EDIT'), 'bookmark banners-clients');
// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
JToolbarHelper::apply('client.apply');
JToolbarHelper::save('client.save');
}
if (!$checkedOut && $canDo->get('core.create')) {
JToolbarHelper::save2new('client.save2new');
}
// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create')) {
JToolbarHelper::save2copy('client.save2copy');
}
if (empty($this->item->id)) {
JToolbarHelper::cancel('client.cancel');
} else {
if ($this->state->params->get('save_history', 0) && $user->authorise('core.edit')) {
JToolbarHelper::versions('com_banners.client', $this->item->id);
}
JToolbarHelper::cancel('client.cancel', 'JTOOLBAR_CLOSE');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS_EDIT');
}
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:38,代码来源:view.html.php
示例15: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @throws Exception
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$isNew = $this->item->id == 0;
if (isset($this->item->checked_out)) {
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
} else {
$checkedOut = false;
}
$canDo = VocabHelper::getActions();
JToolBarHelper::title(JText::_('COM_VOCAB_TITLE_SUBJECT'), 'subject.png');
// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
JToolBarHelper::apply('subject.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('subject.save', 'JTOOLBAR_SAVE');
}
if (!$checkedOut && $canDo->get('core.create')) {
JToolBarHelper::custom('subject.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
}
// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create')) {
JToolBarHelper::custom('subject.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
}
// Button for version control
if ($this->state->params->get('save_history', 1) && $user->authorise('core.edit')) {
JToolbarHelper::versions('com_vocab.subject', $this->item->id);
}
if (empty($this->item->id)) {
JToolBarHelper::cancel('subject.cancel', 'JTOOLBAR_CANCEL');
} else {
JToolBarHelper::cancel('subject.cancel', 'JTOOLBAR_CLOSE');
}
}
开发者ID:brianteeman,项目名称:cam,代码行数:41,代码来源:view.html.php
示例16: display
/**
* 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);
}
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:38,代码来源:view.html.php
示例17: addToolBar
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_JUDOWNLOAD_MANAGER_TAGS'), 'tags');
if ($this->groupCanDoManage) {
if ($this->canDo->get('core.create')) {
JToolBarHelper::addNew('tag.add');
}
if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own')) {
JToolBarHelper::editList('tag.edit');
}
if ($this->canDo->get('core.edit.state')) {
JToolbarHelper::publish('tags.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('tags.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
}
if ($this->groupCanDoDelete) {
if ($this->canDo->get('core.delete')) {
JToolBarHelper::deleteList('COM_JUDOWNLOAD_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THESE_ITEMS', 'tags.delete');
}
}
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judownload/helpers/button");
$bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:25,代码来源:view.html.php
示例18: addToolBar
/**
* Add toolbar for this view
*/
protected function addToolBar()
{
JSNFactory::localimport('helpers.html.jsntoolbar');
JToolbarHelper::title(JText::_('JSN_RAW_LAYOUT_MANAGER_TITLE'), 'poweradmin-rawmode');
JSNToolBarHelper::switchmode('poweradmin-rawmode-help', JText::_('JSN_RAWMODE_HELP_CONTENT_TEXT', true), JText::_('JSN_RAWMODE_HELP_CONTENT_TITLE_SHOW', true), JText::_('JSN_RAWMODE_HELP_CONTENT_TITLE_HIDE', true));
JToolBarHelper::spacer(5);
}
开发者ID:kleinhelmi,项目名称:tus03_j3_2015_01,代码行数:10,代码来源:view.html.php
示例19: addToolbar
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();
}
开发者ID:scarsroga,项目名称:blog-soa,代码行数:25,代码来源:view.html.php
示例20: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_languages');
JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'comments-2 langmanager');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('language.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('language.edit');
JToolbarHelper::divider();
}
if ($canDo->get('core.edit.state')) {
if ($this->state->get('filter.published') != 2) {
JToolbarHelper::publishList('languages.publish');
JToolbarHelper::unpublishList('languages.unpublish');
}
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolbarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('languages.trash');
JToolbarHelper::divider();
}
if ($canDo->get('core.admin')) {
// Add install languages link to the lang installer component.
$bar = JToolbar::getInstance('toolbar');
$bar->appendButton('Link', 'upload', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
JToolbarHelper::divider();
JToolbarHelper::preferences('com_languages');
JToolbarHelper::divider();
}
JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
JHtmlSidebar::setAction('index.php?option=com_languages&view=languages');
}
开发者ID:adjaika,项目名称:J3Base,代码行数:42,代码来源:view.html.php
注:本文中的JToolbarHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论