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


PHP JToolBarHelper::cancel方法代码示例

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


在下文中一共展示了JToolBarHelper::cancel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
     if (isset($this->item->checked_out)) {
         $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     } else {
         $checkedOut = false;
     }
     $canDo = SomosmaestrosHelper::getActions();
     JToolBarHelper::title(JText::_('COM_SOMOSMAESTROS_TITLE_FORMACION'), 'formacion.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('formacion.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('formacion.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::custom('formacion.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('formacion.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('formacion.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('formacion.cancel', 'JTOOLBAR_CLOSE');
     }
 }
开发者ID:emeraldstudio,项目名称:somosmaestros,代码行数:33,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('COM_REDSOCIALSTREAM_CONFIGURE'), 'configure.png');
     JToolBarHelper::apply();
     JToolBarHelper::cancel('cancel', 'COM_REDSOCIALSTREAM_CLOSE');
     //DEVNOTE: set document title
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_REDSOCIALSTREAM_REDSOCIALSTREAMS'));
     $mainframe = JFactory::getApplication();
     $context = "config";
     $model = $this->getModel('configure');
     $db = JFactory::getDbo();
     $q = "SELECT * FROM #__redsocialstream_settings";
     $db->setQuery($q);
     $this->settingsrows = $db->loadObjectList();
     $typelist = $this->get('type_list_sorted');
     $pagination = $this->get('Pagination');
     //DEVNOTE:give me ordering from request
     $filter_order = $mainframe->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'ordering');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '');
     $this->assignRef('lists', $lists);
     $this->assignRef("typelist", $typelist);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
开发者ID:prox91,项目名称:joomla-dev,代码行数:25,代码来源:view.html.php

示例3: 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

示例4: display

	function display ($tpl = null) {

		// Load the helper(s)


		jimport('joomla.filesystem.file');
		$config = JFactory::getConfig();
		$log_path = $config->get('log_path', VMPATH_ROOT . "/log");
		$layoutName = vRequest::getCmd('layout', 'default');
		VmConfig::loadJLang('com_virtuemart_log');

		if ($layoutName == 'edit') {
			$logFile = vRequest::getString('logfile', '');
			$this->SetViewTitle('LOG', $logFile);
			$fileContent = file_get_contents($log_path . DS . $logFile);
			$fileContentByLine = explode("\n", $fileContent);

			$this->assignRef('fileContentByLine', $fileContentByLine);
			JToolBarHelper::cancel();

		} else {
			if(!class_exists('JFolder')) require(VMPATH_LIBS.DS.'joomla'.DS.'filesystem'.DS.'folder.php');

			$logFiles = JFolder::files($log_path, $filter = '.', true, false, array('index.html'));

			$this->SetViewTitle('LOG');
			$this->assignRef('logFiles', $logFiles);
			$this->assignRef('path', $log_path);
		}

		parent::display($tpl);
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:32,代码来源:view.html.php

示例5: 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

示例6: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = BannersHelper::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_CLIENT_NEW') : JText::_('COM_BANNERS_MANAGER_CLIENT_EDIT'), 'banners-clients.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('client.apply');
         JToolBarHelper::save('client.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('client.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('client.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('client.cancel');
     } else {
         JToolBarHelper::cancel('client.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS_EDIT');
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:33,代码来源:view.html.php

示例7: 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

示例8: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = JDownloadsHelper::getActions();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     $title = $isNew ? JText::_('COM_JDOWNLOADS_LICEDIT_ADD') : JText::_('COM_JDOWNLOADS_LICEDIT_EDIT');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . $title, 'jdlicenses');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('license.apply');
         JToolBarHelper::save('license.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('license.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('license.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('license.cancel');
     } else {
         JToolBarHelper::cancel('license.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.license', true);
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:37,代码来源:view.html.php

示例9: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $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'), 'menu.png');
     // 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:christianesperar,项目名称:joomla-example,代码行数:36,代码来源:view.html.php

示例10: addToolBar

 /**
  * Sets the toolbar.
  */
 protected function addToolBar()
 {
     $canDo = SimpleCustomRouterHelper::getActions();
     $isNew = $this->item->id == 0;
     if ($isNew) {
         JToolBarHelper::title(JText::_('COM_SIMPLECUSTOMROUTER_MANAGER_ROUTE_NEW'));
         if ($canDo->get('core.create')) {
             JToolBarHelper::apply('route.apply');
             JToolBarHelper::save('route.save');
             JToolBarHelper::save2new('route.save2new');
         }
         JToolBarHelper::cancel('route.cancel');
     } else {
         JToolBarHelper::title(JText::_('COM_SIMPLECUSTOMROUTER_MANAGER_ROUTE_EDIT'));
         if ($canDo->get('core.edit')) {
             JToolBarHelper::apply('route.apply');
             JToolBarHelper::save('route.save');
             if ($canDo->get('core.create')) {
                 JToolBarHelper::save2new('route.save2new');
             }
         }
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2copy('route.save2copy');
         }
         JToolBarHelper::cancel('route.cancel', 'JTOOLBAR_CLOSE');
     }
 }
开发者ID:A-Bush,项目名称:pprod,代码行数:30,代码来源:view.html.php

示例11: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = TemplatesHelper::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_TEMPLATES_MANAGER_ADD_STYLE') : JText::_('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'thememanager');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('style.apply');
         JToolBarHelper::save('style.save');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('style.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('style.cancel');
     } else {
         JToolBarHelper::cancel('style.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     // Get the help information for the template item.
     $lang = JFactory::getLanguage();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = JText::_($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     JToolBarHelper::help($help->key, false, $url);
 }
开发者ID:carmerin,项目名称:cesae-web,代码行数:39,代码来源:view.html.php

示例12: 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

示例13: addToolbar

 /**
  * Add the page title and toolbar.
  *
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $uid = JFactory::getUser()->get('id');
     $access = PFtasksHelper::getListActions($this->item->id);
     $checked_out = !($this->item->checked_out == 0 || $this->item->checked_out == $uid);
     $is_new = $this->item->id == 0;
     JToolBarHelper::title(JText::_('COM_PROJECTFORK_PAGE_' . ($checked_out ? 'VIEW_TASKLIST' : ($is_new ? 'ADD_TASKLIST' : 'EDIT_TASKLIST'))), 'article-add.png');
     // Built the actions for new and existing records.
     // For new records, check the create permission.
     if ($is_new) {
         JToolBarHelper::apply('tasklist.apply');
         JToolBarHelper::save('tasklist.save');
         JToolBarHelper::save2new('tasklist.save2new');
         JToolBarHelper::cancel('tasklist.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checked_out) {
             if ($access->get('core.edit') || $access->get('core.edit.own') && $this->item->created_by == $uid) {
                 JToolBarHelper::apply('tasklist.apply');
                 JToolBarHelper::save('tasklist.save');
                 JToolBarHelper::save2new('tasklist.save2new');
             }
         }
         JToolBarHelper::save2copy('tasklist.save2copy');
         JToolBarHelper::cancel('tasklist.cancel', 'JTOOLBAR_CLOSE');
     }
 }
开发者ID:johngrange,项目名称:wookeyholeweb,代码行数:32,代码来源:view.html.php

示例14: __construct

 function __construct($default = array())
 {
     parent::__construct($default);
     $task = JRequest::getWord('task', '');
     switch ($task) {
         case 'add':
         case 'save':
         case 'apply':
         case 'edit':
             JToolBarHelper::apply();
             JToolBarHelper::save();
             JToolBarHelper::cancel();
             break;
         default:
             JToolBarHelper::addNew();
             JToolBarHelper::deleteList();
             JToolBarHelper::makeDefault('publish');
             break;
     }
     // Register Extra tasks
     JRequest::setVar('view', 'services');
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
     $this->registerTask('publish', 'setDefault');
 }
开发者ID:Tommar,项目名称:remate,代码行数:25,代码来源:services.php

示例15: addToolBar

 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->id;
     $isNew = $this->item->id == 0;
     $canDo = MailUPHelper::getActions($this->item->id);
     JToolBarHelper::title($isNew ? JText::_('COM_MAILUP_MANAGER_MAILUP_NEW') : JText::_('COM_MAILUP_MANAGER_MAILUP_EDIT'), 'group');
     // Built the actions for new and existing records.
     if ($isNew) {
         // For new records, check the create permission.
         if ($canDo->get('core.create')) {
             //JToolBarHelper::apply('group.save', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('group.applyGroup', 'JTOOLBAR_SAVE');
             //JToolBarHelper::custom('group.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
         }
         JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CANCEL');
     } else {
         if ($canDo->get('core.edit')) {
             // We can save the new record
             //JToolBarHelper::apply('group.save', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('group.updateGroup', 'JTOOLBAR_SAVE');
             // We can save this record, but check the create permission to see if we can return to make a new one.
             if ($canDo->get('core.create')) {
                 //JToolBarHelper::custom('group.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
             }
         }
         if ($canDo->get('core.create')) {
             //JToolBarHelper::custom('group.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
         }
         JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE');
     }
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:36,代码来源:view.html.php


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