Ejemplo n.º 1
2
 /**
  * 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');
     }
 }
Ejemplo n.º 2
2
 /**
  * Setup the Toolbar.
  */
 protected function _setToolbar()
 {
     $state = $this->get('State');
     $canDo = TemplatesHelper::getActions();
     $isSite = $state->get('filter.client_id') == 0;
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('style.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('styles.sethome', 'default.png', 'default_f2.png', 'Templates_Toolbar_Set_Home', true);
     }
     JToolBarHelper::title(JText::_('Templates_Manager_Styles'), 'thememanager');
     if ($canDo->get('core.create') && $isSite) {
         JToolBarHelper::addNew('styles.duplicate', 'Templates_Toolbar_Save_Copy');
     }
     if ($canDo->get('core.delete') && $isSite) {
         JToolBarHelper::deleteList('', 'styles.delete');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_templates');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.templates');
 }
Ejemplo n.º 3
2
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('user.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('user.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
         JToolBarHelper::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
         JToolBarHelper::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'users.delete');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_users');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_USERS_USER_MANAGER');
 }
Ejemplo n.º 4
0
 /**
  * Template types display method
  *
  * @copyright
  * @author 		RolandD
  * @todo
  * @see
  * @access 		public
  * @param
  * @return
  * @since 		4.0
  */
 public function display($tpl = null)
 {
     // Load the template types
     $this->templatetypes = $this->get('Items');
     // Get the pagination
     $this->pagination = $this->get('Pagination');
     // Load the user state
     $this->state = $this->get('State');
     // Render the submenu
     if (version_compare(JVERSION, '3.0', '>=')) {
         CsviHelper::addSubmenu('templatetypes');
         $this->sidebar = JHtmlSidebar::render();
     } else {
         // Get the panel
         $this->loadHelper('panel');
         $this->sidebar = '';
     }
     // Show the toolbar
     JToolBarHelper::title(JText::_('COM_CSVI_TEMPLATETYPES'), 'csvi_templates_48');
     JToolBarHelper::custom('templatetypes.reset', 'csvi_reset_32', 'csvi_reset_32', JText::_('COM_CSVI_RESET_SETTINGS'), false);
     JToolBarHelper::divider();
     JToolBarHelper::custom('templatetype.add', 'csvi_add_32', 'csvi_add_32', 'JTOOLBAR_NEW', false);
     JToolBarHelper::custom('templatetype.edit', 'csvi_edit_32', 'csvi_edit_32', 'JTOOLBAR_EDIT', true);
     JToolBarHelper::divider();
     JToolBarHelper::custom('templatetypes.publish', 'csvi_publish_32', 'csvi_publish_32', JText::_('JTOOLBAR_PUBLISH'), true);
     JToolBarHelper::custom('templatetypes.unpublish', 'csvi_unpublish_32', 'csvi_unpublish_32', JText::_('JTOOLBAR_UNPUBLISH'), true);
     //JToolBarHelper::help('about.html', true);
     // Display it all
     parent::display($tpl);
 }
Ejemplo n.º 5
0
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JToolBarHelper::addNew('portfolio.add');
     JToolBarHelper::editList('portfolio.edit');
     JToolBarHelper::custom('portfolios.rebuild', 'refresh.png', 'refresh_f2.png', 'COM_BT_PORTFOLIO_PORTFOLIOS_REBUILD_IMAGES', false);
     JToolBarHelper::divider();
     JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_PORTFOLIOS_MANAGER'), 'portfolio.png');
     JToolBarHelper::publish('portfolios.publish', 'JTOOLBAR_PUBLISH', true);
     JToolBarHelper::unpublish('portfolios.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     JToolBarHelper::custom('portfolios.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
     JToolBarHelper::divider();
     JToolBarHelper::checkin('portfolios.checkin');
     JToolBarHelper::deleteList('', 'portfolios.delete');
     JToolBarHelper::preferences('com_bt_portfolio');
     $this->sidebar = '';
     Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel'));
     //added since 2.0 for j3.0
     if (!$this->legacy) {
         JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=portfolios');
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true));
         JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_SELECT_FEATURED'), 'filter_featured', JHtml::_('select.options', Bt_portfolioHelper::getFeaturedOptions(), 'value', 'text', $this->state->get('filter.featured'), true));
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_catid', JHtml::_('select.options', Bt_portfolioHelper::getCategoryOptions(), 'value', 'text', $this->state->get('filter.catid')));
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
         $this->sidebar = JHtmlSidebar::render();
     }
 }
Ejemplo n.º 6
0
 /**
  * Установки тулбара
  */
 protected function _setToolBar()
 {
     require_once JPATH_COMPONENT . '/helpers/smfaq.php';
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     SmFaqHelper::addSubmenu($this->_name);
     $canDo = SmFaqHelper::getActions($this->state->get('filter.category_id'));
     // Выводим нужные кнопки и заголовок
     JToolBarHelper::title(JText::_('COM_SMFAQ_MANAGER_QUESTIONS'), 'smfaq');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNewX('smfaq.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editListX('smfaq.edit', 'JTOOLBAR_EDIT');
     }
     JToolBarHelper::divider();
     JToolBarHelper::custom('smfaqlist.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
     JToolBarHelper::custom('smfaqlist.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
     JToolBarHelper::divider();
     JToolBarHelper::checkin('smfaqlist.checkin');
     // Замена тулбара карзины на удаление
     if ($this->state->get('filter.published') == -2) {
         JToolBarHelper::deleteList('COM_SMFAQ_YOU_WANT_DELETE_THIS', 'smfaqlist.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         JToolBarHelper::trash('smfaqlist.trash', 'JTOOLBAR_TRASH');
     }
     JToolBarHelper::divider();
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_smfaq');
     }
 }
Ejemplo n.º 7
0
 function display($tpl = null)
 {
     if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') {
         JToolBarHelper::title('J-HotelReservation : ' . JText::_('LNG_MANAGE_TAXES', true), 'generic.png');
         JRequest::setVar('hidemainmenu', 1);
         $hotel_id = $this->get('HotelId');
         if ($hotel_id > 0) {
             JToolBarHelper::addNew('managetaxes.edit');
             JToolBarHelper::editList('managetaxes.edit');
             JToolBarHelper::deleteList('', 'managetaxes.delete', JText::_('LNG_DELETE', true));
             JToolBarHelper::custom('managetaxes.back', JHotelUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false);
         }
         $this->hotel_id = $hotel_id;
         $items = $this->get('Datas');
         $this->items = $items;
         $hotels = $this->get('Hotels');
         $hotels = checkHotels(JFactory::getUser()->id, $hotels);
         $this->hotels = $hotels;
     } else {
         $item = $this->get('Data');
         $this->item = $item;
         $hotel_id = $this->get('HotelId');
         $this->hotel_id = $hotel_id;
         $hotel = $this->get('Hotel');
         $this->hotel = $hotel;
         JToolBarHelper::title('J-Hotel Reservation : ' . ($item->tax_id > 0 ? JText::_("LNG_EDIT", true) : JText::_("LNG_ADD_NEW", true)) . ' ' . JText::_('LNG_TAX', true), 'generic.png');
         JRequest::setVar('hidemainmenu', 1);
         JToolBarHelper::cancel('managetaxes.back');
         JToolBarHelper::save('managetaxes.save');
     }
     parent::display($tpl);
 }
Ejemplo n.º 8
0
 function registerToolbar()
 {
     JToolBarHelper::title(JText::_('COM_EASYBLOG_THEMES_TITLE'), 'themes');
     JToolbarHelper::back(JText::_('COM_EASYBLOG_TOOLBAR_HOME'), 'index.php?option=com_easyblog');
     JToolbarHelper::divider();
     JToolBarHelper::custom('makedefault', 'star', '', JText::_('COM_EASYBLOG_SET_DEFAULT'), false);
 }
Ejemplo n.º 9
0
 /**
  * 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 = JvpricetableHelper::getActions();
     JToolBarHelper::title(JText::_('COM_JVPRICETABLE_TITLE_ITEM'), 'item.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('item.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('item.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::custom('item.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('item.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('item.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('item.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::custom('item.template', 'briefcase', 'briefcase', 'COM_JVPRICETABLE_TEMPLATE', false);
     JToolBarHelper::custom('item.customcss', 'list', 'list', 'COM_JVPRICETABLE_CUSTOMCSS', false);
 }
Ejemplo n.º 10
0
 /**
  * About view display method
  * @return void
  * */
 function display($tpl = null)
 {
     // Load the form
     $this->form = $this->get('Form');
     // Load a list of tables
     $this->tablelist = $this->get('TableList');
     // Get ICEcat statistics
     $this->icecat_stats = $this->get('IcecatStats');
     // Render the submenu
     if (version_compare(JVERSION, '3.0', '>=')) {
         CsviHelper::addSubmenu('settings');
         $this->sidebar = JHtmlSidebar::render();
     } else {
         // Get the panel
         $this->loadHelper('panel');
         $this->sidebar = '';
     }
     // Show the toolbar
     JToolBarHelper::title(JText::_('COM_CSVI_SETTINGS_TITLE'), 'csvi_settings_48');
     JToolBarHelper::custom('settings.reset', 'csvi_reset_32', 'csvi_reset_32', JText::_('COM_CSVI_RESET_SETTINGS'), false);
     JToolBarHelper::custom('settings.save', 'csvi_save_32', 'csvi_save_32', JText::_('COM_CSVI_SAVE'), false);
     //JToolBarHelper::help('settings.html', true);
     // Display it all
     parent::display($tpl);
 }
Ejemplo n.º 11
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'));
     JToolBarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('article.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('article.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('articles.archive');
         JToolBarHelper::checkin('articles.checkin');
         JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::trash('articles.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_content');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
 }
Ejemplo n.º 12
0
 public function registerToolbar()
 {
     JToolBarHelper::title(JText::_('COM_EASYDISCUSS_RANKING'), 'ranks');
     JToolBarHelper::custom('home', 'arrow-left', '', JText::_('COM_EASYDISCUSS_TOOLBAR_HOME'), false);
     JToolBarHelper::divider();
     JToolBarHelper::custom('save', 'save.png', 'save_f2.png', JText::_('COM_EASYDISCUSS_SAVE_BUTTON'), false);
 }
Ejemplo n.º 13
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/contact.php';
     $canDo = ContactHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'contact.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0) {
         JToolBarHelper::addNew('contact.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('contact.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('contacts.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('contacts.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('contacts.archive', 'JTOOLBAR_ARCHIVE');
         JToolBarHelper::custom('contacts.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'contacts.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('contacts.trash', 'JTOOLBAR_TRASH');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_contact');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS');
 }
Ejemplo n.º 14
0
 protected function setToolbar()
 {
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     // Set the titlebar text
     JToolBarHelper::title(JText::_('COM_KUNENA') . ': ' . JText::_('COM_KUNENA_USER_MANAGER'), 'users');
     JToolBarHelper::spacer();
     JToolBarHelper::editList();
     JToolBarHelper::custom('logout', 'cancel.png', 'cancel_f2.png', 'COM_KUNENA_LOGOUT');
     JToolBarHelper::divider();
     JToolBarHelper::custom('move', 'move.png', 'move_f2.png', 'COM_KUNENA_MOVE_USERMESSAGES');
     if (version_compare(JVERSION, '3.0', '>')) {
         JHtml::_('bootstrap.modal', 'moderateModal');
         $title = JText::_('COM_KUNENA_VIEW_USERS_TOOLBAR_ASSIGN_MODERATORS');
         $dhtml = "<button data-toggle=\"modal\" data-target=\"#moderateModal\" class=\"btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"> </i>\n\t\t\t\t\t\t\t{$title}</button>";
         $bar->appendButton('Custom', $dhtml, 'batch');
     } else {
         JHtml::_('moobootstrap.modal', 'moderateModal');
         $title = JText::_('COM_KUNENA_VIEW_USERS_TOOLBAR_ASSIGN_MODERATORS');
         $dhtml = "<a data-toggle=\"modal\" data-target=\"#moderateModal\" class=\"toolbar\" href=\"javascript:void(null);\">\n\t\t\t\t\t\t<span class=\"icon-32-apply\" title=\"{$title}\"></span>\n\t\t\t\t\t\t\t{$title}</a>";
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     JToolBarHelper::divider();
     JToolBarHelper::custom('trashusermessages', 'trash.png', 'icon-32-move.png', 'COM_KUNENA_TRASH_USERMESSAGES');
     JToolBarHelper::deleteList();
     JToolBarHelper::spacer();
 }
Ejemplo n.º 15
0
 function display($tpl = null)
 {
     clm_core::$load->load_css("icons_images");
     JToolBarHelper::title(JText::_('TITLE_SWT_LEAGUE'), 'clm_headmenu_manager.png');
     JToolBarHelper::custom('save', 'save.png', 'save_f2.png', JText::_('SWT_LEAGUE_SAVE'), false);
     parent::display($tpl);
 }
Ejemplo n.º 16
0
	protected function setToolBarDefault() {
		// Set the titlebar text
		JToolBarHelper::title ( '&nbsp;', 'kunena.png' );
		JToolBarHelper::spacer();
		JToolBarHelper::custom('delete','restore.png','restore_f2.png', 'COM_KUNENA_GEN_DELETE');
		JToolBarHelper::spacer();
	}
Ejemplo n.º 17
0
 /**
  * Display the toolbar
  */
 protected function _setToolbar()
 {
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('Content_Featured_Title'), 'featured.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::custom('article.add', 'new.png', 'new_f2.png', 'New', false);
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::custom('article.edit', 'edit.png', 'edit_f2.png', 'Edit', true);
     }
     JToolBarHelper::divider();
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('articles.publish', 'publish.png', 'publish_f2.png', 'Publish', true);
         JToolBarHelper::custom('articles.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true);
         JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JToolbar_Remove', true);
         if ($this->state->get('filter.published') != -1) {
             JToolBarHelper::archiveList('articles.archive');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_content');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.content.featured');
 }
Ejemplo n.º 18
0
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('GURU_ORDER_MANAGER_TITLE'), 'generic.png');
     JToolBarHelper::custom('approve_order', 'publish', 'publish', JText::_('GURU_APROVE'), false);
     JToolBarHelper::custom('make_pending', 'forward.png', 'forward_f2.png', JText::_('GURU_MAKE_PENDING'), false);
     JToolBarHelper::addNew();
     JToolBarHelper::deleteList(JText::_('GURU_CONFIRM_DEL'));
     $orders = $this->get('Items');
     $pagination = $this->get('Pagination');
     $this->assignRef('orders', $orders);
     $this->assignRef('pagination', $pagination);
     @($configs->time_format = "Y-m-d");
     $now = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
     $tomorrow = $now + 3600 * 24;
     $start_month = mktime(0, 0, 0, date("m"), 1, date("Y"));
     $end_month = mktime(0, 0, 0, date("m") + 1, 1, date("Y")) - 3600 * 24;
     $start_month1 = mktime(0, 0, 0, date("m") - 1, 1, date("Y"));
     $end_month1 = mktime(0, 0, 0, date("m"), 1, date("Y")) - 3600 * 24;
     $dates['start_date']['today'] = date($configs->time_format);
     $dates['end_date']['today'] = date($configs->time_format);
     $dates['start_date']['yesterday'] = date($configs->time_format, $now - 3600 * 24);
     $dates['end_date']['yesterday'] = date($configs->time_format, $now - 3600 * 24);
     $dates['start_date']['lastweek'] = date($configs->time_format, $now - 3600 * 24 * 7);
     $dates['end_date']['lastweek'] = date($configs->time_format, $now);
     $dates['start_date']['thismonth'] = date($configs->time_format, $start_month);
     $dates['end_date']['thismonth'] = date($configs->time_format, $end_month);
     $dates['start_date']['lastmonth'] = date($configs->time_format, $start_month1);
     $dates['end_date']['lastmonth'] = date($configs->time_format, $end_month1);
     $this->assign("dates", $dates);
     $datetype = $this->get('DateType');
     $this->assignRef('datetype', $datetype);
     parent::display($tpl);
 }
Ejemplo n.º 19
0
 public function display($tpl = null)
 {
     JHTML::stylesheet('joomfish.css', 'administrator/components/com_joomfish/assets/css/');
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('JOOMFISH_TITLE') . ' :: ' . JText::_('TITLE_Statistics'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('TITLE_Statistics'), 'statistics');
     JToolBarHelper::custom('cpanel.show', 'joomfish', 'joomfish', 'CONTROL PANEL', false);
     JToolBarHelper::help('screen.statistics', true);
     JSubMenuHelper::addEntry(JText::_('Control Panel'), 'index2.php?option=com_joomfish');
     JSubMenuHelper::addEntry(JText::_('Translation'), 'index2.php?option=com_joomfish&amp;task=translate.overview');
     JSubMenuHelper::addEntry(JText::_('Orphans'), 'index2.php?option=com_joomfish&amp;task=translate.orphans');
     JSubMenuHelper::addEntry(JText::_('Manage Translations'), 'index2.php?option=com_joomfish&amp;task=manage.overview', false);
     JSubMenuHelper::addEntry(JText::_('Statistics'), 'index2.php?option=com_joomfish&amp;task=statistics.overview', true);
     JSubMenuHelper::addEntry(JText::_('Language Configuration'), 'index2.php?option=com_joomfish&amp;task=languages.show', false);
     JSubMenuHelper::addEntry(JText::_('Content elements'), 'index2.php?option=com_joomfish&amp;task=elements.show', false);
     JSubMenuHelper::addEntry(JText::_('HELP AND HOWTO'), 'index2.php?option=com_joomfish&amp;task=help.show', false);
     $this->panelStates = $this->get('PanelStates');
     $this->contentInfo = $this->get('ContentInfo');
     $this->publishedTabs = $this->get('PublishedTabs');
     $this->assignRef('panelStates', $this->panelStates);
     $this->assignRef('contentInfo', $this->contentInfo);
     $this->assignRef('publishedTabs', $this->publishedTabs);
     JHTML::_('behavior.tooltip');
     parent::display($tpl);
 }
Ejemplo n.º 20
0
 function overview($tpl = null)
 {
     // WHY THE HELL DO THEY BREAK PUBLIC FUNCTIONS !!!
     if (JVersion::isCompatible("1.6.0")) {
         JHTML::stylesheet('administrator/components/' . JEV_COM_COMPONENT . '/assets/css/eventsadmin.css');
     } else {
         JHTML::stylesheet('eventsadmin.css', 'administrator/components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('ICAL_EVENTS'));
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('ICAL_EVENTS'), 'jevents');
     //JToolBarHelper::custom('icalevent.csvimport','upload.png','upload.png','JEV_ADMIN_CSVIMPORT',false);
     JToolBarHelper::publishList('icalevent.publish');
     JToolBarHelper::unpublishList('icalevent.unpublish');
     JToolBarHelper::addNew('icalevent.edit');
     JToolBarHelper::editList('icalevent.edit');
     JToolBarHelper::custom('icalevent.editcopy', 'copy.png', 'copy.png', 'JEV_ADMIN_COPYEDIT');
     JToolBarHelper::deleteList('Delete Event and all repeats?', 'icalevent.delete');
     JToolBarHelper::spacer();
     JToolBarHelper::custom('cpanel.cpanel', 'default.png', 'default.png', 'JEV_ADMIN_CPANEL', false);
     //JToolBarHelper::help( 'screen.ical', true);
     JSubMenuHelper::addEntry(JText::_('CONTROL_PANEL'), 'index.php?option=' . JEV_COM_COMPONENT, true);
     $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
     //$section = $params->getValue("section",0);
     JHTML::_('behavior.tooltip');
 }
Ejemplo n.º 21
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'jms.php';
     $state = $this->get('State');
     $canDo = JmsHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('COM_JMS_TITLE_COUPONS'), 'coupon.png');
     //Check if the form exists before showing the add/edit buttons
     $formPath = JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'coupon';
     if (file_exists($formPath)) {
         if ($canDo->get('core.create')) {
             JToolBarHelper::addNew('coupon.add', 'JTOOLBAR_NEW');
         }
         if ($canDo->get('core.edit')) {
             JToolBarHelper::editList('coupon.edit', 'JTOOLBAR_EDIT');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('coupons.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('coupons.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::archiveList('coupons.archive', 'JTOOLBAR_ARCHIVE');
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::divider();
         JToolBarHelper::deleteList('', 'coupons.delete', 'JTOOLBAR_DELETE');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_jms');
     }
 }
Ejemplo n.º 22
0
 public function add()
 {
     // disable menu
     YRequest::setVar('hidemainmenu', 1);
     // get application metadata
     $metadata = $this->application->getMetaData();
     // set toolbar items
     $this->joomla->set('JComponentTitle', $this->application->getToolbarTitle(JText::_('New App') . ': ' . $metadata['name']));
     JToolBarHelper::save();
     JToolBarHelper::custom('', 'back', '', 'Back', false);
     ZooHelper::toolbarHelp();
     // get params
     $this->params = $this->application->getParams();
     // set default template
     $this->params->set('template', 'default');
     // template select
     $options = array(JHTML::_('select.option', '', '- ' . JText::_('Select Template') . ' -'));
     foreach ($this->application->getTemplates() as $template) {
         $metadata = $template->getMetaData();
         $options[] = JHTML::_('select.option', $template->name, $metadata['name']);
     }
     $this->lists['select_template'] = JHTML::_('select.genericlist', $options, 'template', '', 'value', 'text', $this->params->get('template'));
     // display view
     $this->getView()->setLayout('application')->display();
 }
Ejemplo n.º 23
0
 function displayShow($tpl = null)
 {
     JToolBarHelper::title($this->order->order_number, 'generic.png');
     JToolBarHelper::back();
     JToolBarHelper::custom('send', 'send', 'send', _JSHOP_SEND_MAIL, false);
     parent::display($tpl);
 }
Ejemplo n.º 24
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;
     JToolBarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES'), 'thememanager');
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('style.edit');
     }
     if ($canDo->get('core.create')) {
         JToolBarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'styles.delete');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_templates');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES');
 }
Ejemplo n.º 25
0
 function display($tpl = null)
 {
     $prod =& $this->get('Data');
     $isNew = $prod->id < 1;
     $text = $isNew ? JText::_("NEW") : JText::_("EDIT");
     JToolBarHelper::title(JText::_("PRODUCT") . ': <small><small>[ ' . $text . ' ]</small></small>', 'fst_prods');
     if (FST_Helper::Is16()) {
         JToolBarHelper::custom('translate', 'translate', 'translate', 'Translate', false);
         JToolBarHelper::spacer();
     }
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'Close');
     }
     FSTAdminHelper::DoSubToolbar();
     $this->assignRef('prod', $prod);
     $path = JPATH_SITE . DS . 'images' . DS . 'fst' . DS . 'products';
     if (!file_exists($path)) {
         mkdir($path, 0777, true);
     }
     $files = JFolder::files($path, '(.png$|.jpg$|.jpeg$|.gif$)');
     $sections[] = JHTML::_('select.option', '', JText::_("NO_IMAGE"), 'id', 'title');
     foreach ($files as $file) {
         $sections[] = JHTML::_('select.option', $file, $file, 'id', 'title');
     }
     $lists['images'] = JHTML::_('select.genericlist', $sections, 'image', 'class="inputbox" size="1" ', 'id', 'title', $prod->image);
     $this->assignRef('lists', $lists);
     parent::display($tpl);
 }
Ejemplo n.º 26
0
 /**
  * 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');
     }
 }
Ejemplo n.º 27
0
 /**
  * Setting the toolbar
  */
 public function addToolbar()
 {
     $input = JFactory::getApplication()->input;
     $input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->id;
     $isNew = $this->item->id == 0;
     JToolbarHelper::title($isNew ? JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLD_NEW') : JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLD_EDIT'));
     if ($isNew) {
         if ($this->canDo->get('core.create')) {
             JToolBarHelper::apply('helloworld.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('helloworld.save', 'JTOOLBAR_SAVE');
             JToolBarHelper::custom('helloworld.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
         }
         JToolBarHelper::cancel('helloworld.cancel', 'JTOOLBAR_CANCEL');
         JToolbarHelper::save('helloworld.save');
         JToolbarHelper::cancel('helloworld.cancel', $isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE');
     } else {
         if ($this->canDo->get('core.edit')) {
             // We can save the new record
             JToolBarHelper::apply('helloworld.apply', 'JTOOLBAR_APPLY');
             JToolBarHelper::save('helloworld.save', 'JTOOLBAR_SAVE');
             // We can save this record, but check the create permission to see
             // if we can return to make a new one.
             if ($this->canDo->get('core.create')) {
                 JToolBarHelper::custom('helloworld.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
             }
         }
         if ($this->canDo->get('core.create')) {
             JToolBarHelper::custom('helloworld.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
         }
         JToolBarHelper::cancel('helloworld.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Ejemplo n.º 28
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', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('newsfeed.save', 'JTOOLBAR_SAVE');
     }
     if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         JToolBarHelper::custom('newsfeed.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('newsfeed.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
 }
Ejemplo n.º 29
0
 /**
  * Setup the Toolbar
  *
  * @since	1.6
  */
 protected function _setToolbar()
 {
     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 = WeblinksHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title(JText::_('Weblinks_Manager_Weblink'));
     // If not checked out, can save the item.
     if (!$checkedOut && $canDo->get('core.edit')) {
         JToolBarHelper::apply('weblink.apply', 'JToolbar_Apply');
         JToolBarHelper::save('weblink.save', 'JToolbar_Save');
         JToolBarHelper::addNew('weblink.save2new', 'JToolbar_Save_and_new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('weblink.save2copy', 'copy.png', 'copy_f2.png', 'JToolbar_Save_as_Copy', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('weblink.cancel', 'JToolbar_Cancel');
     } else {
         JToolBarHelper::cancel('weblink.cancel', 'JToolbar_Close');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.weblink.edit');
 }
Ejemplo n.º 30
-3
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'article.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_content', 'core.create')) > 0) {
         JToolBarHelper::addNew('article.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('article.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('articles.archive');
         JToolBarHelper::checkin('articles.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('articles.trash');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_content');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
 }