Esempio n. 1
0
 /**
  * Configure the linkbar.
  *
  * @param   string  $vName  The name of the active view
  *
  * @return  void
  */
 public static function addSubmenu($vName = 'profiles')
 {
     if (JFactory::getApplication()->input->getCmd('tmpl', null) == null) {
         // Get 5 most-recent items
         $items = self::getProfiles(5);
         // Declare 1st-level menu items
         JSNMenuHelper::addEntry('profiles', 'JSN_MOBILIZE_SUB_MENU_MOBILIZATION_TEXT', 'index.php?option=com_mobilize', $vName == '' or $vName == 'profiles', 'administrator/components/com_mobilize/assets/images/icons-16/icon-mobilize.png', 'sub-menu');
         JSNMenuHelper::addEntry('configuration', 'JSN_MOBILIZE_SUB_MENU_CONFIGURARTION_TEXT', '', false, 'administrator/components/com_mobilize/assets/images/icons-16/icon-cog.png', 'sub-menu');
         JSNMenuHelper::addEntry('about', 'JSN_MOBILIZE_SUB_MENU_ABOUT_TEXT', 'index.php?option=com_mobilize&view=about', $vName == 'about', 'administrator/components/com_mobilize/assets/images/icons-16/icon-about.png', 'sub-menu');
         // Declare 2nd-level menu items	for 'items' entry
         JSNMenuHelper::addEntry('all-profiles', 'All Profiles', 'index.php?option=com_mobilize&view=profiles', false, '', 'sub-menu.profiles');
         if ($items) {
             JSNMenuHelper::addEntry('recent-profiles', 'Recent Profiles', '', false, '', 'sub-menu.profiles');
             foreach ($items as $item) {
                 JSNMenuHelper::addEntry('item-' . $item->profile_id, $item->profile_title, 'index.php?option=com_mobilize&view=profile&task=profile.edit&layout=edit&profile_id=' . $item->profile_id, false, '', 'sub-menu.profiles.recent-profiles');
             }
         }
         JSNMenuHelper::addSeparator('sub-menu.profiles');
         JSNMenuHelper::addEntry('item-new', 'Create New Profile', 'index.php?option=com_mobilize&view=profile&layout=edit', false, '', 'sub-menu.profiles');
         // Declare 2nd-level menu items	for 'configuration' entry
         JSNMenuHelper::addEntry('global-params', 'Global Parameters', 'index.php?option=com_mobilize&view=configuration&s=configuration&g=configs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('messages', 'Messages', 'index.php?option=com_mobilize&view=configuration&s=configuration&g=msgs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('languages', 'Languages', 'index.php?option=com_mobilize&view=configuration&s=configuration&g=langs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('update', 'Product Update', 'index.php?option=com_mobilize&view=configuration&s=configuration&g=update', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('maintenance', 'Maintenance', '', false, '', 'sub-menu.configuration');
         // Declare 3rd-level menu items	for 'maintenance' entry
         JSNMenuHelper::addEntry('data', 'Data', 'index.php?option=com_mobilize&view=configuration&s=maintenance&g=data', false, '', 'sub-menu.configuration.maintenance');
         JSNMenuHelper::addEntry('permissions', 'Permissions', 'index.php?option=com_mobilize&view=configuration&s=maintenance&g=permissions', false, '', 'sub-menu.configuration.maintenance');
         // Render the sub-menu
         JSNMenuHelper::render('sub-menu');
     }
 }
Esempio n. 2
0
 /**
  * Method to add side menu
  *
  * @param   string  $vName  The name of the active view
  *
  * @return	void
  */
 public static function addSubmenu($vName)
 {
     if (JRequest::getVar('tmpl') != 'component' && JRequest::getVar('tmpl') != 'ajax' && !JRequest::getVar('ajax') && $vName != 'installer') {
         JSNMenuHelper::addEntry('pa-submenu-rawmode', 'JSN_POWERADMIN_MENU_RAWMODE_TEXT', 'index.php?option=' . JRequest::getCmd('option', 'com_poweradmin') . '&view=rawmode', $vName == 'rawmode', 'administrator/components/com_poweradmin/assets/images/icons-16/icon-monitor.png', 'pa-submenu');
         JSNMenuHelper::addEntry('pa-submenu-search', 'JSN_POWERADMIN_MENU_SITESEARCH_TEXT', 'index.php?option=' . JRequest::getCmd('option', 'com_poweradmin') . '&task=search.query', $vName == 'search', 'administrator/components/com_poweradmin/assets/images/icons-16/icon-search.png', 'pa-submenu');
         JSNMenuHelper::addEntry('pa-submenu-configuration', 'JSN_POWERADMIN_MENU_CONFIGURATION_TEXT', 'index.php?option=' . JRequest::getCmd('option', 'com_poweradmin') . '&view=configuration', $vName == 'configuration', 'administrator/components/com_poweradmin/assets/images/icons-16/icon-cog.png', 'pa-submenu');
         JSNMenuHelper::addEntry('pa-submenu-help', 'JSN_POWERADMIN_MENU_ABOUT_TEXT', 'index.php?option=' . JRequest::getCmd('option', 'com_poweradmin') . '&view=about', $vName == 'about', 'administrator/components/com_poweradmin/assets/images/icons-16/icon-star.png', 'pa-submenu');
         // Add submenu of Config
         JSNMenuHelper::addEntry('global-params', JText::_('JSN_EXTFW_CONFIG_GLOBAL_PARAMETERS'), 'index.php?option=com_poweradmin&view=configuration&s=configuration&g=configs', false, '', 'pa-submenu.pa-submenu-configuration');
         JSNMenuHelper::addEntry('languages', JText::_('JSN_EXTFW_CONFIG_LANGUAGES'), 'index.php?option=com_poweradmin&view=configuration&s=configuration&g=langs', false, '', 'pa-submenu.pa-submenu-configuration');
         JSNMenuHelper::addEntry('permissions', JText::_('JSN_EXTFW_CONFIG_PERMISSIONS'), 'index.php?option=com_poweradmin&view=configuration&s=configuration&g=permissions', false, '', 'pa-submenu.pa-submenu-configuration');
         JSNMenuHelper::addEntry('update', JText::_('JSN_EXTFW_CONFIG_UPDATE'), 'index.php?option=com_poweradmin&view=configuration&s=configuration&g=update', false, '', 'pa-submenu.pa-submenu-configuration');
         JSNMenuHelper::addEntry('extensions', JText::_('JSN_POWERADMIN_EXTPAGE_SUPORTED_EXT'), 'index.php?option=com_poweradmin&view=configuration&s=maintainence&g=extensions', false, '', 'pa-submenu.pa-submenu-configuration');
         // Render menu
         JSNMenuHelper::render('pa-submenu');
     }
 }
Esempio n. 3
0
 /**
  * Typical view method for MVC based architecture
  *
  * This function is provide as a default implementation, in most cases
  * you will need to override it in your own controllers.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JController  A JController object to support chaining.
  *
  * @since   11.1
  */
 function display($cachable = false, $urlparams = false)
 {
     // Get input object
     $input = JFactory::getApplication()->input;
     // Set default view if not set
     $input->set('view', $input->getCmd('view', 'about'));
     $vName = $input->getCmd('view', 'about');
     //Add submenus
     if (JRequest::getVar('tmpl') != 'component' && JRequest::getVar('tmpl') != 'ajax' && !JRequest::getVar('ajax') && $vName != 'installer') {
         JSNMenuHelper::addEntry('pb-submenu-manager', 'COM_PAGEBUILDER_PAGE_MANAGER', 'index.php?option=' . JRequest::getCmd('option', 'com_pagebuilder') . '&view=manager', $vName == 'manager', 'administrator/components/com_pagebuilder/assets/images/icons-16/icon-monitor.png', 'pb-submenu');
         JSNMenuHelper::addEntry('pb-submenu-configuration', 'COM_PAGEBUILDER_CONFIGURATION', 'index.php?option=' . JRequest::getCmd('option', 'com_pagebuilder') . '&view=configuration', $vName == 'configuration', 'administrator/components/com_pagebuilder/assets/images/icons-16/icon-cog.png', 'pb-submenu');
         JSNMenuHelper::addEntry('pb-submenu-about', 'COM_PAGEBUILDER_ABOUT', 'index.php?option=' . JRequest::getCmd('option', 'com_pagebuilder') . '&view=about', $vName == 'about', 'administrator/components/com_pagebuilder/assets/images/icons-16/icon-star.png', 'pb-submenu');
         // Render menu
         JSNMenuHelper::render('pb-submenu');
     }
     // Call parent method
     parent::display($cachable, $urlparams);
 }
Esempio n. 4
0
 public static function addSubmenu($vName)
 {
     // Declare 1st-level menu items
     JSNMenuHelper::addEntry('launchpad', 'JSN_IMAGESHOW_MENU_LAUNCHPAD', 'index.php?option=com_imageshow', $vName == '' or $vName == 'cpanel', 'administrator/components/com_imageshow/assets/images/icons-16/icon-off.png', 'sub-menu');
     if (self::getAccesses('showlist')) {
         JSNMenuHelper::addEntry('showlists', 'JSN_MENU_SHOWLISTS', 'index.php?option=com_imageshow&view=showlist', $vName == 'showlists', 'administrator/components/com_imageshow/assets/images/icons-16/icon-file.png', 'sub-menu');
     }
     if (self::getAccesses('showcase')) {
         JSNMenuHelper::addEntry('showcases', 'JSN_MENU_SHOWCASES', 'index.php?option=com_imageshow&view=showcase', $vName == 'showcases', 'administrator/components/com_imageshow/assets/images/icons-16/icon-monitor.png', 'sub-menu');
     }
     if (self::getAccesses('configuration')) {
         JSNMenuHelper::addEntry('configuration', 'JSN_MENU_CONFIGURATION_AND_MAINTENANCE', 'index.php?option=com_imageshow&view=configuration', $vName == 'configuration' || $vName == 'maintenance', 'administrator/components/com_imageshow/assets/images/icons-16/icon-cog.png', 'sub-menu');
     }
     JSNMenuHelper::addEntry('about', 'JSN_MENU_ABOUT', 'index.php?option=com_imageshow&view=about', $vName == 'about', 'administrator/components/com_imageshow/assets/images/icons-16/icon-star.png', 'sub-menu');
     // Declare 2nd-level menu items	for 'items' entry
     JSNMenuHelper::addEntry('all-showlists', JText::_('JSN_IMAGESHOW_SUB_MENU_ALL_SHOWLISTS', true), 'index.php?option=com_imageshow&view=showlist', false, '', 'sub-menu.showlists');
     JSNMenuHelper::addEntry('all-showcases', JText::_('JSN_IMAGESHOW_SUB_MENU_ALL_SHOWCASES', true), 'index.php?option=com_imageshow&view=showcase', false, '', 'sub-menu.showcases');
     $objJSNShowlist = new JSNISShowlist();
     $objJSNShowcase = new JSNISShowcase();
     $showlist = $objJSNShowlist->getLastestShowlist(5);
     $showcase = $objJSNShowcase->getLastestShowcase(5);
     if ($showlist) {
         JSNMenuHelper::addEntry('recent-showlist', JText::_('JSN_IMAGESHOW_SUB_MENU_RECENT_SHOWLISTS', true), '', false, '', 'sub-menu.showlists');
         foreach ($showlist as $item) {
             JSNMenuHelper::addEntry('showlist-' . $item->item_id, $item->item_title, 'index.php?option=com_imageshow&controller=showlist&task=edit&cid[]=' . $item->item_id, false, '', 'sub-menu.showlists.recent-showlist');
         }
     }
     if ($showcase) {
         JSNMenuHelper::addEntry('recent-showcase', JText::_('JSN_IMAGESHOW_SUB_MENU_RECENT_SHOWCASES', true), '', false, '', 'sub-menu.showcases');
         foreach ($showcase as $item) {
             JSNMenuHelper::addEntry('showcase-' . $item->item_id, $item->item_title, 'index.php?option=com_imageshow&controller=showcase&task=edit&cid[]=' . $item->item_id, false, '', 'sub-menu.showcases.recent-showcase');
         }
     }
     JSNMenuHelper::addSeparator('sub-menu.showlists');
     JSNMenuHelper::addSeparator('sub-menu.showcases');
     JSNMenuHelper::addEntry('showlist-new', JText::_('JSN_IMAGESHOW_SUB_MENU_CREATE_NEW_SHOWLIST', true), 'index.php?option=com_imageshow&controller=showlist&task=add', false, '', 'sub-menu.showlists');
     JSNMenuHelper::addEntry('showcase-new', JText::_('JSN_IMAGESHOW_SUB_MENU_CREATE_NEW_SHOWCASE', true), 'index.php?option=com_imageshow&controller=showcase&task=add', false, '', 'sub-menu.showcases');
     // Render the sub-menu
     if (JFactory::getApplication()->input->getCmd('tmpl', '') == '') {
         JSNMenuHelper::render('sub-menu');
     }
 }
Esempio n. 5
0
 /**
  * Configure the Linkbar.
  *
  * @param   string  $vName  The name of the active view.
  *
  * @return void
  *
  * @since    1.6
  */
 public static function addSubmenu($vName = 'forms')
 {
     if (JFactory::getApplication()->input->getCmd('tmpl', null) == null) {
         // Get 5 most-recent items
         $items = self::getForms(5);
         // Declare 1st-level menu items
         JSNMenuHelper::addEntry('forms', 'JSN_UNIFORM_SUBMENU_FORMS', 'index.php?option=com_uniform', $vName == '' or $vName == 'forms', 'administrator/components/com_uniform/assets/images/icons-16/icon-forms.png', 'sub-menu');
         JSNMenuHelper::addEntry('submissions', 'JSN_UNIFORM_SUBMENU_SUBMISSION', 'index.php?option=com_uniform&view=submissions', $vName == '' or $vName == 'submissions', 'administrator/components/com_uniform/assets/images/icons-16/icon-submissions.png', 'sub-menu');
         JSNMenuHelper::addEntry('configuration', 'JSN_UNIFORM_SUBMENU_CONFIGURATION', '', $vName == '' or $vName == 'configuration', 'administrator/components/com_uniform/assets/images/icons-16/icon-cog.png', 'sub-menu');
         JSNMenuHelper::addEntry('about', 'JSN_UNIFORM_SUBMENU_ABOUT', 'index.php?option=com_uniform&view=about', $vName == 'about', 'administrator/components/com_uniform/assets/images/icons-16/icon-about.png', 'sub-menu');
         // Declare 2nd-level menu items	for 'items' entry
         JSNMenuHelper::addEntry('all-forms', 'All Forms', 'index.php?option=com_uniform&view=forms', false, '', 'sub-menu.forms');
         if ($items) {
             JSNMenuHelper::addEntry('recent-forms', 'Recent Forms', '', false, '', 'sub-menu.forms');
             foreach ($items as $item) {
                 JSNMenuHelper::addEntry('item-' . $item->form_id, $item->form_title, 'index.php?option=com_uniform&view=form&task=form.edit&layout=edit&form_id=' . $item->form_id, false, '', 'sub-menu.forms.recent-forms');
             }
         }
         JSNMenuHelper::addSeparator('sub-menu.forms');
         JSNMenuHelper::addEntry('item-new', 'Create New Form', 'index.php?option=com_uniform&view=form&layout=edit', false, '', 'sub-menu.forms');
         // Declare 2nd-level menu items	for 'configuration' entry
         JSNMenuHelper::addEntry('global-params', 'Global Parameters', 'index.php?option=com_uniform&view=configuration&s=configuration&g=configs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('messages', 'Messages', 'index.php?option=com_uniform&view=configuration&s=configuration&g=msgs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('languages', 'Languages', 'index.php?option=com_uniform&view=configuration&s=configuration&g=langs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('update', 'Product Update', 'index.php?option=com_uniform&view=configuration&s=configuration&g=update', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('maintenance', 'Maintenance', '', false, '', 'sub-menu.configuration');
         // Declare 3rd-level menu items	for 'maintenance' entry
         JSNMenuHelper::addEntry('data', 'Data', 'index.php?option=com_uniform&view=configuration&s=maintenance&g=data', false, '', 'sub-menu.configuration.maintenance');
         JSNMenuHelper::addEntry('permissions', 'Permissions', 'index.php?option=com_uniform&view=configuration&s=maintenance&g=permissions', false, '', 'sub-menu.configuration.maintenance');
         // Render the sub-menu
         JSNMenuHelper::render('sub-menu');
     }
 }
Esempio n. 6
0
 /**
  * Configure the linkbar
  *
  * @param   string $vName The name of the active view
  *
  * @return    void
  */
 public static function addSubmenu($vName)
 {
     if (JFactory::getApplication()->input->getCmd('tmpl', null) == null) {
         // Get 5 most-recent sliders
         $objJSNEasySliderSliders = new JSNEasySliderSliders();
         $sliders = $objJSNEasySliderSliders->getSlidersWithoutState(5);
         JSNMenuHelper::addEntry('sliders', 'JSN_MENU_SLIDERS', '', $vName == 'sliders', 'administrator/components/com_easyslider/assets/images/icons-16/icon-items.png', 'sub-menu');
         JSNMenuHelper::addEntry('configuration', 'JSN_MENU_CONFIGURATION_AND_MAINTENANCE', '', $vName == 'maintenance' or $vName == 'configuration', 'administrator/components/com_easyslider/assets/images/icons-16/icon-configuration.png', 'sub-menu');
         JSNMenuHelper::addEntry('about', 'JSN_MENU_ABOUT', 'index.php?option=com_easyslider&view=about', $vName == 'about', 'administrator/components/com_easyslider/assets/images/icons-16/icon-about.png', 'sub-menu');
         // Declare 2nd-level menu sliders	for 'sliders' entry
         JSNMenuHelper::addEntry('slider-new', JText::_('JSN_EASYSLIDER_CREATE_NEW_SLIDER', true), 'index.php?option=com_easyslider&view=slider&layout=edit', false, '', 'sub-menu.sliders');
         JSNMenuHelper::addSeparator('sub-menu.sliders');
         if ($sliders) {
             JSNMenuHelper::addEntry('recent-sliders', JText::_('JSN_EASYSLIDER_RECENT_SLIDERS', true), '', false, '', 'sub-menu.sliders');
             foreach ($sliders as $slider) {
                 JSNMenuHelper::addEntry('slider-' . $slider->slider_id, $slider->slider_title, 'index.php?option=com_easyslider&view=slider&layout=edit&slider_id=' . $slider->slider_id, false, '', 'sub-menu.sliders.recent-sliders');
             }
         }
         JSNMenuHelper::addEntry('all-sliders', JText::_('JSN_EASYSLIDER_ALL_SLIDERS', true), 'index.php?option=com_easyslider&view=sliders', false, '', 'sub-menu.sliders');
         // Declare 2nd-level menu sliders	for 'configuration' entry
         JSNMenuHelper::addEntry('global-params', JText::_('JSN_EASYSLIDER_ALL_GLOBAL_PARAMETERS', true), 'index.php?option=com_easyslider&view=configuration&s=configuration&g=configs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('messages', JText::_('JSN_EASYSLIDER_ALL_GLOBAL_MESSAGES', true), 'index.php?option=com_easyslider&view=configuration&s=configuration&g=msgs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('languages', JText::_('JSN_EASYSLIDER_ALL_GLOBAL_LANGUAGES', true), 'index.php?option=com_easyslider&view=configuration&s=configuration&g=langs', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('update', JText::_('JSN_EASYSLIDER_ALL_GLOBAL_PRODUCT_UPDATE', true), 'index.php?option=com_easyslider&view=configuration&s=configuration&g=update', false, '', 'sub-menu.configuration');
         JSNMenuHelper::addEntry('maintenance', JText::_('JSN_EASYSLIDER_ALL_GLOBAL_PRODUCT_MAINTENANCE', true), '', false, '', 'sub-menu.configuration');
         // Declare 3rd-level menu sliders	for 'maintenance' entry
         JSNMenuHelper::addEntry('data', JText::_('JSN_EASYSLIDER_ALL_GLOBAL_PRODUCT_DATA', true), 'index.php?option=com_easyslider&view=configuration&s=maintenance&g=data', false, '', 'sub-menu.configuration.maintenance');
         JSNMenuHelper::addEntry('permissions', JText::_('JSN_EASYSLIDER_ALL_GLOBAL_PERMISSIONS', true), 'index.php?option=com_easyslider&view=configuration&s=maintenance&g=permissions', false, '', 'sub-menu.configuration.maintenance');
         // Render the sub-menu
         JSNMenuHelper::render('sub-menu');
     }
 }