示例#1
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $canDo = TemplatesHelper::getActions();
     Toolbar::title($isNew ? Lang::txt('COM_TEMPLATES_MANAGER_ADD_STYLE') : Lang::txt('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'thememanager');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         Toolbar::apply('style.apply');
         Toolbar::save('style.save');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('style.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('style.cancel');
     } else {
         Toolbar::cancel('style.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     // Get the help information for the template item.
     $lang = Lang::getRoot();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = Lang::txt($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     Toolbar::help('style');
     //$help->key, false, $url);
 }
示例#2
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = NewsfeedsHelper::getActions($state->get('filter.category_id'));
     Toolbar::title(Lang::txt('COM_NEWSFEEDS_MANAGER_NEWSFEEDS'), 'newsfeeds.png');
     if (count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         Toolbar::addNew('newsfeed.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('newsfeed.edit');
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('newsfeeds.publish', 'JTOOLBAR_PUBLISH', true);
         Toolbar::unpublish('newsfeeds.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         Toolbar::divider();
         Toolbar::archiveList('newsfeeds.archive');
     }
     if ($canDo->get('core.admin')) {
         Toolbar::checkin('newsfeeds.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::trash('newsfeeds.trash');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_newsfeeds');
         Toolbar::divider();
     }
     Toolbar::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS');
 }
示例#3
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = ModulesHelper::getActions();
     Toolbar::title(Lang::txt('COM_MODULES_MANAGER_MODULES'), 'module.png');
     if ($canDo->get('core.create')) {
         //Toolbar::addNew('module.add');
         Toolbar::appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_modules&view=select&tmpl=component', 850, 400);
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         Toolbar::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         Toolbar::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         Toolbar::divider();
         Toolbar::checkin('modules.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::trash('modules.trash');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_modules');
         Toolbar::divider();
     }
     Toolbar::help('modules');
 }
示例#4
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     $canDo = LanguagesHelper::getActions();
     Toolbar::title(Lang::txt('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('language.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('language.edit');
         Toolbar::divider();
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.published') != 2) {
             Toolbar::publishList('languages.publish');
             Toolbar::unpublishList('languages.unpublish');
         }
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::trash('languages.trash');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         // Add install languages link to the lang installer component
         Toolbar::appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
         Toolbar::divider();
         Toolbar::preferences('com_languages');
         Toolbar::divider();
     }
     Toolbar::help('languages');
 }
示例#5
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     Toolbar::title(Lang::txt('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('article.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('article.edit');
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         Toolbar::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         Toolbar::divider();
         Toolbar::archiveList('articles.archive');
         Toolbar::checkin('articles.checkin');
         Toolbar::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::trash('articles.trash');
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_content');
         Toolbar::divider();
     }
     Toolbar::help('featured');
 }
示例#6
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $userId = User::get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == User::get('id'));
     // Since we don't track these assets at the item level, use the category id.
     $canDo = NewsfeedsHelper::getActions($this->item->catid, 0);
     Toolbar::title(Lang::txt('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)) {
         Toolbar::apply('newsfeed.apply');
         Toolbar::save('newsfeed.save');
     }
     if (!$checkedOut && count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         Toolbar::save2new('newsfeed.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('newsfeed.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('newsfeed.cancel');
     } else {
         Toolbar::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
 }
示例#7
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     Toolbar::title(Lang::txt('COM_USERS_VIEW_USERS_TITLE'), 'user');
     if ($canDo->get('core.create')) {
         //Toolbar::addNew('user.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('user.edit');
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('users.approve', 'COM_USERS_TOOLBAR_APPROVE', true);
         Toolbar::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
         Toolbar::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
         Toolbar::divider();
     }
     if ($canDo->get('core.delete')) {
         Toolbar::deleteList('', 'users.delete');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_users');
         Toolbar::divider();
     }
     Toolbar::help('users');
 }
示例#8
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = TemplatesHelper::getActions();
     $isSite = $state->get('filter.client_id') == 0;
     Toolbar::title(Lang::txt('COM_TEMPLATES_MANAGER_STYLES'), 'thememanager');
     if ($canDo->get('core.edit.state')) {
         Toolbar::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME');
         Toolbar::divider();
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('style.edit');
     }
     if ($canDo->get('core.create')) {
         Toolbar::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
         Toolbar::divider();
     }
     if ($canDo->get('core.delete')) {
         Toolbar::deleteList('', 'styles.delete');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_templates');
         Toolbar::divider();
     }
     Toolbar::help('styles');
 }
示例#9
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     Request::setVar('hidemainmenu', 1);
     $isNew = empty($this->item->lang_id);
     $canDo = LanguagesHelper::getActions();
     Toolbar::title(Lang::txt($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'langmanager.png');
     // If a new item, can save.
     if ($isNew && $canDo->get('core.create')) {
         Toolbar::save('language.save');
     }
     //If an existing item, allow to Apply and Save.
     if (!$isNew && $canDo->get('core.edit')) {
         Toolbar::apply('language.apply');
         Toolbar::save('language.save');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if ($canDo->get('core.create')) {
         Toolbar::save2new('language.save2new');
     }
     if ($isNew) {
         Toolbar::cancel('language.cancel');
     } else {
         Toolbar::cancel('language.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('language');
 }
示例#10
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     Toolbar::title(Lang::txt($isNew ? 'COM_USERS_VIEW_NEW_LEVEL_TITLE' : 'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'levels-add');
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         Toolbar::apply('level.apply');
         Toolbar::save('level.save');
     }
     if ($canDo->get('core.create')) {
         Toolbar::save2new('level.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('level.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('level.cancel');
     } else {
         Toolbar::cancel('level.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('level');
 }
示例#11
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
     Toolbar::title(Lang::txt($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')) {
             Toolbar::apply('menu.apply');
         }
         Toolbar::save('menu.save');
     }
     // If user can edit, can save the item.
     if (!$isNew && $canDo->get('core.edit')) {
         Toolbar::apply('menu.apply');
         Toolbar::save('menu.save');
     }
     // If the user can create new items, allow them to see Save & New
     if ($canDo->get('core.create')) {
         Toolbar::save2new('menu.save2new');
     }
     if ($isNew) {
         Toolbar::cancel('menu.cancel');
     } else {
         Toolbar::cancel('menu.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('menu');
 }
示例#12
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $canDo = TemplatesHelper::getActions();
     Toolbar::title(Lang::txt('COM_TEMPLATES_MANAGER_VIEW_TEMPLATE'), 'thememanager');
     Toolbar::cancel('template.cancel', 'JTOOLBAR_CLOSE');
     Toolbar::divider();
     Toolbar::help('template');
 }
示例#13
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     Toolbar::title(Lang::txt('COM_ADMIN_VIEW_PROFILE_TITLE'), 'user-profile');
     Toolbar::apply('profile.apply');
     Toolbar::save('profile.save');
     Toolbar::cancel('profile.cancel', 'JTOOLBAR_CLOSE');
     Toolbar::divider();
     Toolbar::help('JHELP_ADMIN_USER_PROFILE_EDIT');
 }
示例#14
0
 /**
  * Add the page title and toolbar.
  *
  * @return	void
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = TemplatesHelper::getActions();
     Toolbar::title(Lang::txt('COM_TEMPLATES_MANAGER_TEMPLATES'), 'thememanager');
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_templates');
         Toolbar::divider();
     }
     Toolbar::help('templates');
 }
示例#15
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     Toolbar::title(Lang::txt('COM_USERS_MASS_MAIL'), 'massmail.png');
     Toolbar::custom('mail.send', 'send.png', 'send_f2.png', 'COM_USERS_TOOLBAR_MAIL_SEND_MAIL', false);
     Toolbar::cancel('mail.cancel');
     Toolbar::divider();
     Toolbar::preferences('com_users');
     Toolbar::divider();
     Toolbar::help('mail');
 }
示例#16
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $canDo = TemplatesHelper::getActions();
     Toolbar::title(Lang::txt('COM_TEMPLATES_MANAGER_EDIT_FILE'), 'thememanager');
     // Can save the item.
     if ($canDo->get('core.edit')) {
         Toolbar::apply('source.apply');
         Toolbar::save('source.save');
     }
     Toolbar::cancel('source.cancel');
     Toolbar::divider();
     Toolbar::help('source');
 }
示例#17
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     if ($this->getLayout() == 'edit') {
         Toolbar::title(Lang::txt('COM_MESSAGES_WRITE_PRIVATE_MESSAGE'), 'new-privatemessage.png');
         Toolbar::save('message.save', 'COM_MESSAGES_TOOLBAR_SEND');
         Toolbar::cancel('message.cancel');
         Toolbar::help('JHELP_COMPONENTS_MESSAGING_WRITE');
     } else {
         Toolbar::title(Lang::txt('COM_MESSAGES_VIEW_PRIVATE_MESSAGE'), 'inbox.png');
         $sender = JUser::getInstance($this->item->user_id_from);
         if ($sender->authorise('core.admin') || $sender->authorise('core.manage', 'com_messages') && $sender->authorise('core.login.admin')) {
             Toolbar::custom('message.reply', 'restore.png', 'restore_f2.png', 'COM_MESSAGES_TOOLBAR_REPLY', false);
         }
         Toolbar::cancel('message.cancel');
         Toolbar::help('JHELP_COMPONENTS_MESSAGING_READ');
     }
 }
示例#18
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $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'));
     Toolbar::title(Lang::txt($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')) {
             Toolbar::apply('item.apply');
         }
         Toolbar::save('item.save');
     }
     // If not checked out, can save the item.
     if (!$isNew && !$checkedOut && $canDo->get('core.edit')) {
         Toolbar::apply('item.apply');
         Toolbar::save('item.save');
     }
     // If the user can create new items, allow them to see Save & New
     if ($canDo->get('core.create')) {
         Toolbar::save2new('item.save2new');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('item.save2copy');
     }
     if ($isNew) {
         Toolbar::cancel('item.cancel');
     } else {
         Toolbar::cancel('item.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     // Get the help information for the menu item.
     $lang = Lang::getRoot();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = Lang::txt($help->url);
         $lang->setDebug($debug);
     } else {
         $url = $help->url;
     }
     Toolbar::help('item');
     //$help->key, $help->local, $url);
 }
示例#19
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     // Set the titlebar text
     Toolbar::title(Lang::txt('COM_MEDIA'), 'mediamanager.png');
     // Add a delete button
     if (User::authorise('core.delete', 'com_media')) {
         $title = Lang::txt('JTOOLBAR_DELETE');
         $dhtml = "<a href=\"#\" onclick=\"MediaManager.submit('folder.delete')\" data-title=\"{$title}\">\n\t\t\t\t\t\t<span class=\"icon-32-delete\">{$title}</span>\n\t\t\t\t\t</a>";
         Toolbar::appendButton('Custom', $dhtml, 'delete');
         Toolbar::divider();
     }
     // Add a delete button
     if (User::authorise('core.admin', 'com_media')) {
         Toolbar::preferences('com_media', 450, 800, 'JToolbar_Options', '', 'window.location.reload()');
         Toolbar::divider();
     }
     Toolbar::help('media');
 }
示例#20
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     $canDo = LanguagesHelper::getActions();
     Toolbar::title(Lang::txt('COM_LANGUAGES_VIEW_INSTALLED_TITLE'), 'langmanager.png');
     if ($canDo->get('core.edit.state')) {
         Toolbar::makeDefault('installed.setDefault');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         // Add install languages link to the lang installer component
         $bar = JToolBar::getInstance('toolbar');
         $bar->appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
         Toolbar::divider();
         Toolbar::preferences('com_languages');
         Toolbar::divider();
     }
     Toolbar::help('installed');
 }
示例#21
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     Toolbar::title(Lang::txt('COM_USERS_VIEW_GROUPS_TITLE'), 'groups');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('group.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('group.edit');
         Toolbar::divider();
     }
     if ($canDo->get('core.delete')) {
         Toolbar::deleteList('', 'groups.delete');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_users');
         Toolbar::divider();
     }
     Toolbar::help('groups');
 }
示例#22
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == User::get('id'));
     $canDo = ModulesHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     $item = $this->get('Item');
     Toolbar::title(Lang::txt('COM_MODULES_MANAGER_MODULE', Lang::txt($this->item->module)), 'module.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         Toolbar::apply('module.apply');
         Toolbar::save('module.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         Toolbar::save2new('module.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('module.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('module.cancel');
     } else {
         Toolbar::cancel('module.cancel', 'JTOOLBAR_CLOSE');
     }
     // Get the help information for the menu item.
     $lang = Lang::getRoot();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = Lang::txt($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     Toolbar::help('module');
     //$help->key, false, $url);
 }
示例#23
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     $isNew = $this->item->id == 0;
     $isProfile = $this->item->id == User::get('id');
     Toolbar::title(Lang::txt($isNew ? 'COM_USERS_VIEW_NEW_USER_TITLE' : ($isProfile ? 'COM_USERS_VIEW_EDIT_PROFILE_TITLE' : 'COM_USERS_VIEW_EDIT_USER_TITLE')), $isNew ? 'user-add' : ($isProfile ? 'user-profile' : 'user-edit'));
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         Toolbar::apply('user.apply');
         Toolbar::save('user.save');
     }
     if ($canDo->get('core.create') && $canDo->get('core.manage')) {
         Toolbar::save2new('user.save2new');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('user.cancel');
     } else {
         Toolbar::cancel('user.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('user');
 }
示例#24
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/menus.php';
     $canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
     Toolbar::title(Lang::txt('COM_MENUS_VIEW_MENUS_TITLE'), 'menumgr.png');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('menu.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('menu.edit');
     }
     if ($canDo->get('core.delete')) {
         Toolbar::divider();
         Toolbar::deleteList('', 'menus.delete');
     }
     Toolbar::custom('menus.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
     if ($canDo->get('core.admin')) {
         Toolbar::divider();
         Toolbar::preferences('com_menus');
     }
     Toolbar::divider();
     Toolbar::help('menus');
 }
示例#25
0
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Citations\Helpers\Permissions::getActions('type');
Toolbar::title(Lang::txt('CITATIONS') . ': ' . Lang::txt('CITATION_TYPES'), 'citation.png');
if ($canDo->get('core.create')) {
    Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
    Toolbar::editList();
}
if ($canDo->get('core.delete')) {
    Toolbar::spacer();
    Toolbar::deleteList();
}
Toolbar::spacer();
Toolbar::help('types');
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	if (pressbutton == 'cancel') {
		submitform(pressbutton);
		return;
	}
	// do field validation
	submitform(pressbutton);
}
</script>

<form action="<?php 
echo Route::url('index.php?option=' . $this->option);
示例#26
0
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Collections\Helpers\Permissions::getActions('post');
$text = $this->task == 'edit' ? Lang::txt('JACTION_EDIT') : Lang::txt('JACTION_CREATE');
Toolbar::title(Lang::txt('COM_COLLECTIONS') . ': ' . Lang::txt('COM_COLLECTIONS_POSTS') . ': ' . $text, 'collection.png');
if ($canDo->get('core.edit')) {
    Toolbar::apply();
    Toolbar::save();
    Toolbar::spacer();
}
Toolbar::cancel();
Toolbar::spacer();
Toolbar::help('collection');
if (!$this->row->get('id')) {
    $this->row->set('created_by', User::get('id'));
    $this->row->set('created', Date::toSql());
}
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;

	if (pressbutton == 'cancel') {
		submitform(pressbutton);
		return;
	}
示例#27
0
// No direct access
defined('_HZEXEC_') or die;
$canDo = Components\Answers\Helpers\Permissions::getActions('answer');
Toolbar::title(Lang::txt('COM_ANSWERS_TITLE') . ': ' . Lang::txt('COM_ANSWERS_RESPONSES'), 'answers');
if ($canDo->get('core.create') && $this->filters['question_id']) {
    Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
    Toolbar::editList();
    Toolbar::spacer();
}
if ($canDo->get('core.delete')) {
    Toolbar::deleteList();
    Toolbar::spacer();
}
Toolbar::help('responses');
?>

<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;
	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
	// do field validation
	submitform( pressbutton );
}
</script>
示例#28
0
// No direct access
defined('_HZEXEC_') or die;
$canDo = Components\Members\Helpers\Admin::getActions('component');
$text = $this->task == 'edit' ? Lang::txt('JACTION_EDIT') : Lang::txt('JACTION_CREATE');
Toolbar::title(Lang::txt('COM_MEMBERS') . ': ' . $text, 'user');
if ($canDo->get('core.edit') || $canDo->get('core.create')) {
    Toolbar::apply();
    Toolbar::save();
    Toolbar::spacer();
}
if ($canDo->get('core.create') && $canDo->get('core.manage')) {
    Toolbar::save2new();
}
Toolbar::cancel();
Toolbar::divider();
Toolbar::help('user');
Html::behavior('switcher', 'submenu');
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;

	if (pressbutton == 'cancel') {
		submitform(pressbutton);
		return;
	}

	submitform(pressbutton);
}
</script>
示例#29
0
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Answers\Helpers\Permissions::getActions('question');
$text = $this->task == 'edit' ? Lang::txt('JACTION_EDIT') : Lang::txt('JACTION_CREATE');
Toolbar::title(Lang::txt('COM_ANSWERS_TITLE') . ': ' . Lang::txt('COM_ANSWERS_QUESTIONS') . ': ' . $text, 'answers.png');
if ($canDo->get('core.edit')) {
    Toolbar::apply();
    Toolbar::save();
    Toolbar::spacer();
}
Toolbar::cancel();
Toolbar::spacer();
Toolbar::help('question');
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;

	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}

	<?php 
echo $this->editor()->save('text');
?>
示例#30
0
    Toolbar::preferences($this->option, '550');
    Toolbar::spacer();
}
if ($canDo->get('core.edit.state')) {
    Toolbar::publishList();
    Toolbar::unpublishList();
    Toolbar::spacer();
}
if ($canDo->get('core.create')) {
    Toolbar::addNew();
}
if ($canDo->get('core.delete')) {
    Toolbar::deleteList();
}
Toolbar::spacer();
Toolbar::help('sections');
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;
	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
	// do field validation
	submitform( pressbutton );
}
</script>

<form action="<?php