예제 #1
0
파일: view.html.php 프로젝트: Tommar/remate
 /**
  * Setting the toolbar
  */
 protected function addToolbar()
 {
     JRequest::setVar('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);
     JToolBarHelper::title($isNew ? JText::_('COM_BT_PORTFOLIO_NEW_CATEGORY') : JText::_('COM_BT_PORTFOLIO_EDIT_CATEGORY'), 'category-add.png');
     if ($isNew) {
         JToolBarHelper::apply('category.apply');
         JToolBarHelper::save('category.save');
         JToolBarHelper::save2new('category.save2new');
         JToolBarHelper::save2copy('category.save2copy');
         JToolBarHelper::cancel('category.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checkedOut) {
             JToolBarHelper::apply('category.apply');
             JToolBarHelper::save('category.save');
             JToolBarHelper::save2new('category.save2new');
         }
         JToolBarHelper::save2copy('category.save2copy');
         JToolBarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #2
0
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $doc = JFactory::getDocument();
     $doc->addStyleDeclaration('.icon-48-babioon {background-image: url(../media/babioon/images/icon-48-babioon.png);}');
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     $canDo = BabioonDownloadHelpers::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_BABIOONDOWNLOAD_DOWNLOAD_NEW') : JText::_('COM_BABIOONDOWNLOAD_DOWNLOAD_EDIT'), 'babioon.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_babioondownload', 'core.create')) > 0)) {
         JToolBarHelper::apply('download.apply');
         JToolBarHelper::save('download.save');
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2new('download.save2new');
         }
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('download.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('download.cancel');
     } else {
         JToolBarHelper::cancel('download.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #3
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('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');
 }
예제 #4
0
 /**
  * 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 = NewsfeedsHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)) {
         JToolBarHelper::apply('newsfeed.apply');
         JToolBarHelper::save('newsfeed.save');
     }
     if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         JToolBarHelper::save2new('newsfeed.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('newsfeed.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('newsfeed.cancel');
     } else {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
 }
예제 #5
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('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);
     $canDo = RentalHelper::getActions($this->state->get('filter.category_id'));
     JToolBarHelper::title($isNew ? JText::_('COM_RENTAL_MANAGER_APARTMENT_NEW') : JText::_('COM_RENTAL_MANAGER_APARTMENT_EDIT'), '#xs#.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_rental', 'core.create')) > 0)) {
         JToolBarHelper::apply('apartment.apply');
         JToolBarHelper::save('apartment.save');
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2new('apartment.save2new');
         }
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('apartment.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('apartment.cancel');
     } else {
         JToolBarHelper::cancel('apartment.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #6
0
 /**
  * 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 = MenusHelper::getActions($this->state->get('filter.parent_id'));
     JToolBarHelper::title(JText::_($isNew ? 'COM_MENUS_VIEW_NEW_ITEM_TITLE' : 'COM_MENUS_VIEW_EDIT_ITEM_TITLE'), 'menu-add');
     // 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('adminitem.apply');
         }
         JToolBarHelper::save('adminitem.save');
     }
     // If not checked out, can save the item.
     if (!$isNew && !$checkedOut && $canDo->get('core.edit')) {
         JToolBarHelper::apply('adminitem.apply');
         JToolBarHelper::save('adminitem.save');
     }
     // If the user can create new items, allow them to see Save & New
     if ($canDo->get('core.create')) {
         JToolBarHelper::save2new('adminitem.save2new');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('adminitem.save2copy');
     }
     if ($isNew) {
         JToolBarHelper::cancel('adminitem.cancel');
     } else {
         JToolBarHelper::cancel('adminitem.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #7
0
 protected function addToolbar()
 {
     $jinput = JFactory::getApplication()->input;
     $jinput->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $canDo = Bt_SocialconnectAdminHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title($isNew ? JText::_('COM_BT_SOCIALCONNECT_PUBLISH_NEW') : JText::_('COM_BT_SOCIALCONNECT_PUBLISH_EDIT'), 'socialconnect-add.png');
     if ($isNew && count($user->getAuthorisedCategories('com_bt_socialconnect', 'core.create')) > 0) {
         JToolBarHelper::apply('channel.apply');
         JToolBarHelper::save('channel.save');
         JToolBarHelper::cancel('channel.cancel');
     } else {
         if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) {
             JToolBarHelper::apply('channel.apply');
             JToolBarHelper::save('channel.save');
         }
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2copy('channel.save2copy');
         }
         JToolBarHelper::cancel('channel.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
 }
예제 #8
0
 /**
  * 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');
     }
 }
예제 #9
0
 /**
  * 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');
 }
예제 #10
0
 /**
  * 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);
 }
예제 #11
0
파일: view.html.php 프로젝트: ngxuanmui/hp3
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('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);
     $canDo = Jnt_HanhphucHelper::getActions($this->state->get('filter.category_id'));
     JToolBarHelper::title($isNew ? JText::_('User Content: Edit') : JText::_('User Content: New'), 'article.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_je_content', 'core.create')) > 0)) {
         JToolBarHelper::apply('article.apply');
         JToolBarHelper::save('article.save');
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2new('article.save2new');
         }
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('article.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('article.cancel');
     } else {
         JToolBarHelper::cancel('article.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #12
0
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     $jinput = JFactory::getApplication()->input;
     $jinput->set('hidemainmenu', true);
     $recurrence = $this->item->recurrence_groupcheck;
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = JemHelperBackend::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_JEM_ADD_EVENT') : JText::_('COM_JEM_EDIT_EVENT'), 'eventedit');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('event.apply');
         JToolBarHelper::save('event.save');
     }
     if (!$recurrence) {
         if (!$checkedOut && $canDo->get('core.create')) {
             JToolBarHelper::save2new('event.save2new');
         }
         // If an existing item, can save to a copy.
         if (!$isNew && $canDo->get('core.create')) {
             JToolBarHelper::save2copy('event.save2copy');
         }
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('event.cancel');
     } else {
         JToolBarHelper::cancel('event.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('editevents', true);
 }
예제 #13
0
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $doc = JFactory::getDocument();
     $bar = JToolBar::getInstance();
     $user = JFactory::getUser();
     $canDo = JHelperContent::getActions('com_tz_portfolio_plus');
     $isNew = $this->item->id == 0;
     JToolBarHelper::title(JText::sprintf('COM_TZ_PORTFOLIO_PLUS_TEMPLATES_MANAGER_TASK', JText::_($isNew ? 'COM_TZ_PORTFOLIO_PLUS_PAGE_ADD_TEMPLATE' : 'COM_TZ_PORTFOLIO_PLUS_PAGE_EDIT_TEMPLATE')), 'palette');
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('template_style.apply');
         JToolBarHelper::save('template_style.save');
     }
     // If checked out, we can still save
     if (!$isNew && $user->authorise('core.edit.state', 'com_tz_portfolio_plus')) {
         JToolBarHelper::save2copy('template_style.save2copy');
     }
     JToolBarHelper::cancel('template_style.cancel', JText::_('JTOOLBAR_CLOSE'));
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER', false, 'http://wiki.templaza.com/TZ_Portfolio_Plus_v3:Administration#How_to_Add_or_Edit_3');
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio_plus/fonts/font-awesome-4.5.0/css/font-awesome.min.css');
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio_plus/css/style.min.css');
     // Special HTML workaround to get send popup working
     $docClass = ' class="btn btn-small"';
     $youtubeIcon = '<i class="tz-icon-youtube tz-icon-14"></i>&nbsp;';
     $wikiIcon = '<i class="tz-icon-wikipedia tz-icon-14"></i>&nbsp;';
     $youtubeTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_VIDEO_TUTORIALS');
     $wikiTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_WIKIPEDIA_TUTORIALS');
     $videoTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://www.youtube.com/channel/UCykS6SX6L2GOI-n3IOPfTVQ/videos\', \'' . $youtubeTitle . '\', 800, 500, 1)"' . ' href="#">' . $youtubeIcon . $youtubeTitle . '</a>';
     $wikiTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://wiki.templaza.com/Main_Page\', \'' . $wikiTitle . '\', 800, 500, 1)"' . ' href="#">' . $wikiIcon . $wikiTitle . '</a>';
     $bar->appendButton('Custom', $videoTutorial, 'youtube');
     $bar->appendButton('Custom', $wikiTutorial, 'wikipedia');
 }
예제 #14
0
 /**
  * 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);
 }
예제 #15
0
파일: view.html.php 프로젝트: A-Bush/pprod
 /**
  * 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');
     }
 }
예제 #16
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_GROUP_TITLE' : 'COM_USERS_VIEW_EDIT_GROUP_TITLE'), 'groups-add');
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         JToolBarHelper::apply('group.apply');
         JToolBarHelper::save('group.save');
     }
     if ($canDo->get('core.create')) {
         JToolBarHelper::save2new('group.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('group.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('group.cancel');
     } else {
         JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_USERS_GROUPS_EDIT');
 }
예제 #17
0
 /**
  * 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 = J2XMLHelper::getActions();
     $doc = JFactory::getDocument();
     $icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
     $doc->addStyleDeclaration($icon_48_websites);
     JToolBarHelper::title($isNew ? JText::_('COM_J2XML_MANAGER_WEBSITE_NEW') : JText::_('COM_J2XML_MANAGER_WEBSITE_EDIT'), 'websites.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('website.apply');
         JToolBarHelper::save('website.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('website.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('website.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('website.cancel');
     } else {
         JToolBarHelper::cancel('website.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #18
0
 protected function addToolbar()
 {
     JToolBarHelper::title('JDeveloper Table');
     JToolBarHelper::apply('table.apply');
     JToolBarHelper::save('table.save');
     JToolBarHelper::save2new('table.save2new');
     JToolBarHelper::save2copy('table.save2copy');
     JToolBarHelper::cancel('table.cancel', 'JTOOLBAR_CANCEL');
 }
예제 #19
0
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     JToolBarHelper::title(JText::_('JOOMDOC_CUSTOM_FIELD'), 'field');
     JToolBarHelper::apply('field.apply');
     JToolBarHelper::save('field.save');
     JToolBarHelper::save2new('field.save2new');
     JToolBarHelper::save2copy('field.save2copy');
     JToolBarHelper::cancel('field.cancel');
 }
예제 #20
0
 protected function addToolbar()
 {
     JToolBarHelper::title(JText::_('COM_JDEVELOPER_FORMRULE'));
     if ($this->item->get("name", "") == "") {
         JToolBarHelper::apply('formrule.apply');
     } else {
         JToolBarHelper::apply('formrule.apply');
         JToolBarHelper::save('formrule.save');
         JToolBarHelper::save2new('formrule.save2new');
         JToolBarHelper::save2copy('formrule.save2copy');
     }
     JToolBarHelper::cancel('formrule.cancel', 'JTOOLBAR_CANCEL');
 }
예제 #21
0
 protected function addToolbar()
 {
     if ($this->_layout == "default") {
         JToolBarHelper::title(JText::_('COM_JDEVELOPER_LIBRARY'));
     } else {
         JToolBarHelper::title(JText::_('COM_JDEVELOPER_LIBRARY'));
         JToolBarHelper::apply('library.apply');
         JToolBarHelper::save('library.save');
         JToolBarHelper::save2copy('library.save2copy');
         JToolBarHelper::save2new('library.save2new');
         JToolBarHelper::cancel('library.cancel', 'JTOOLBAR_CANCEL');
     }
 }
예제 #22
0
 protected function setToolBarEdit()
 {
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_KUNENA'), 'categories');
     JToolbarHelper::spacer();
     JToolBarHelper::apply('apply');
     JToolBarHelper::save('save');
     JToolBarHelper::save2new('save2new');
     // If an existing item, can save to a copy.
     if ($this->category->exists()) {
         JToolBarHelper::save2copy('save2copy');
     }
     JToolBarHelper::cancel();
     JToolbarHelper::spacer();
 }
예제 #23
0
 protected function setToolBarEdit()
 {
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_KUNENA'), 'kunena.png');
     if (version_compare(JVERSION, '1.7', '>')) {
         JToolBarHelper::apply('apply');
         JToolBarHelper::save('save');
         JToolBarHelper::save2new('save2new');
         // If an existing item, can save to a copy.
         if ($this->category->exists()) {
             JToolBarHelper::save2copy('save2copy');
         }
     } else {
         JToolBarHelper::save();
     }
     JToolBarHelper::cancel();
 }
예제 #24
0
 /**
  * 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 = MenusHelper::getActions($this->state->get('filter.parent_id'));
     JToolBarHelper::title(JText::_($isNew ? 'COM_MENUS_VIEW_NEW_ITEM_TITLE' : 'COM_MENUS_VIEW_EDIT_ITEM_TITLE'), 'menu-add');
     // 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('item.apply');
         }
         JToolBarHelper::save('item.save');
     }
     // If not checked out, can save the item.
     if (!$isNew && !$checkedOut && $canDo->get('core.edit')) {
         JToolBarHelper::apply('item.apply');
         JToolBarHelper::save('item.save');
     }
     // If the user can create new items, allow them to see Save & New
     if ($canDo->get('core.create')) {
         JToolBarHelper::save2new('item.save2new');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('item.save2copy');
     }
     if ($isNew) {
         JToolBarHelper::cancel('item.cancel');
     } else {
         JToolBarHelper::cancel('item.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     // Get the help information for the menu 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 = $help->url;
     }
     JToolBarHelper::help($help->key, $help->local, $url);
 }
예제 #25
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', 1);
     $option = JFactory::getApplication()->input->get('option');
     $view = JFactory::getApplication()->input->get('view');
     $lang = JFactory::getLanguage();
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     $canDo = RokCandyHelper::getActions($this->state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('COM_ROKCANDY_MANAGER_MACRO'), 'rokcandy.png');
     // Build the actions for new and existing records.
     if ($isNew) {
         // For new records, check the create permission.
         if ($isNew && count($user->getAuthorisedCategories('com_rokcandy', 'core.create')) > 0) {
             JToolBarHelper::apply('candymacro.apply');
             JToolBarHelper::save('candymacro.save');
             JToolBarHelper::save2new('candymacro.save2new');
         }
         JToolBarHelper::cancel('candymacro.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checkedOut) {
             // Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
             if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) {
                 JToolBarHelper::apply('candymacro.apply');
                 JToolBarHelper::save('candymacro.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::save2new('candymacro.save2new');
                 }
             }
         }
         // If checked out, we can still save
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2copy('candymacro.save2copy');
         }
         JToolBarHelper::cancel('candymacro.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help(strtoupper($option) . '_' . strtoupper($view) . '_HELP_URL', TRUE, '', $option);
 }
예제 #26
0
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $doc = JFactory::getDocument();
     $bar = JToolBar::getInstance();
     $user = JFactory::getUser();
     $canDo = JHelperContent::getActions('com_jvisualcontent');
     $isNew = $this->item->id == 0;
     JToolBarHelper::title(JText::sprintf('COM_JVISUALCONTENT_EXTRAFIELD_MANAGER_TASK', ' <small><small>' . JText::_($isNew ? 'COM_JVISUALCONTENT_PAGE_ADD_TEMPLATE' : 'COM_JVISUALCONTENT_PAGE_EDIT_TEMPLATE') . '</small></small>'));
     JToolBarHelper::apply('extrafield.apply');
     JToolBarHelper::save('extrafield.save');
     JToolBarHelper::save2new('extrafield.save2new');
     // If checked out, we can still save
     if (!$isNew && ($user->authorise('core.edit.state', 'com_jvisualcontent') || $canDo->get('core.edit.state'))) {
         JToolBarHelper::save2copy('extrafield.save2copy');
     }
     JToolBarHelper::cancel('extrafield.cancel', JText::_('JTOOLBAR_CLOSE'));
     JToolBarHelper::divider();
 }
예제 #27
0
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     JToolBarHelper::title(JText::_('COM_XMAP_PAGE_' . ($isNew ? 'ADD_SITEMAP' : 'EDIT_SITEMAP')), 'list');
     if ($isNew && $this->canDo->get('core.create')) {
         JToolBarHelper::apply('sitemap.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('sitemap.save', 'JTOOLBAR_SAVE');
         JToolBarHelper::save2new('sitemap.save2new');
     } else {
         if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own')) {
             JToolBarHelper::apply('sitemap.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('sitemap.save', 'JTOOLBAR_SAVE');
         }
     }
     if ($this->canDo->get('core.create')) {
         JToolBarHelper::save2copy('sitemap.save2copy');
     }
     JToolBarHelper::cancel('sitemap.cancel', 'JTOOLBAR_CLOSE');
 }
예제 #28
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('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 = ContactHelper::getActions($this->item->catid, 0);
     JToolBarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACT'), 'contact.png');
     // Build the actions for new and existing records.
     if ($isNew) {
         // For new records, check the create permission.
         if ($isNew && count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0) {
             JToolBarHelper::apply('contact.apply');
             JToolBarHelper::save('contact.save');
             JToolBarHelper::save2new('contact.save2new');
         }
         JToolBarHelper::cancel('contact.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checkedOut) {
             // Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
             if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) {
                 JToolBarHelper::apply('contact.apply');
                 JToolBarHelper::save('contact.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::save2new('contact.save2new');
                 }
             }
         }
         // If checked out, we can still save
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2copy('contact.save2copy');
         }
         JToolBarHelper::cancel('contact.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS_EDIT');
 }
예제 #29
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar($max_id)
 {
     JRequest::setVar('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.
     $text = $isNew ? JText::_('New') : JText::_('Edit');
     JToolBarHelper::title(JText::_('Creative Form') . ': <small><small>[ ' . $text . ' ]</small></small>', 'manage.png');
     // Build the actions for new and existing records.
     if ($max_id == 0 || !$isNew) {
         JToolBarHelper::apply('creativeform.apply');
         JToolBarHelper::save('creativeform.save');
         JToolBarHelper::save2new('creativeform.save2new');
     }
     if (!$isNew) {
         JToolBarHelper::save2copy('creativeform.save2copy');
     }
     JToolBarHelper::cancel('creativeform.cancel', 'close');
 }
예제 #30
0
파일: view.html.php 프로젝트: grlf/eyedock
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     JToolBarHelper::title($isNew ? JText::_('COM_ALFCONTACT_MANAGER_ALFCONTACT_NEW') : JText::_('COM_ALFCONTACT_MANAGER_ALFCONTACT_EDIT'), 'alfcontact');
     if ($user->authorise('core.edit')) {
         JToolBarHelper::apply('alfcontact.apply');
         JToolBarHelper::save('alfcontact.save');
     }
     if ($user->authorise('core.create')) {
         JToolBarHelper::save2new('alfcontact.save2new');
     }
     if (!$isNew && $user->authorise('core.create')) {
         JToolBarHelper::save2copy('alfcontact.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('alfcontact.cancel');
     } else {
         JToolBarHelper::cancel('alfcontact.cancel', 'JTOOLBAR_CLOSE');
     }
 }