Exemplo n.º 1
0
 public static function renderSidebar()
 {
     // Collect display data
     $data = new stdClass();
     $data->list = JHtmlSidebar::getEntries();
     $data->filters = JHtmlSidebar::getFilters();
     $data->action = JHtmlSidebar::getAction();
     $data->displayMenu = count($data->list);
     $data->displayFilters = count($data->filters);
     $data->hide = JFactory::getApplication()->input->getBool('hidemainmenu');
     // Create a layout object and ask it to render the sidebar
     $layout = new JLayoutFile('sidebars.submenu');
     $sidebarHtml = $layout->render($data);
     return $sidebarHtml;
 }
 /**
  * Echoes any HTML to show after the view template
  *
  * @param   string    $view    The current view
  * @param   string    $task    The current task
  * @param   FOFInput  $input   The input array (request parameters)
  * @param   array     $config  The view configuration array
  *
  * @return  void
  */
 public function postRender($view, $task, $input, $config = array())
 {
     $format = $input->getCmd('format', 'html');
     if ($format != 'html' || FOFPlatform::getInstance()->isCli()) {
         return;
     }
     if (!FOFPlatform::getInstance()->isCli() && FOFPlatform::getInstance()->checkVersion(JVERSION, '3.0', 'ge')) {
         $sidebarEntries = JHtmlSidebar::getEntries();
         if (!empty($sidebarEntries)) {
             echo '</div>';
         }
     }
     echo "</div>\n";
     echo "</div>\n";
 }
Exemplo n.º 3
0
 protected function getOptions()
 {
     $options = parent::getOptions();
     foreach (JHtmlSidebar::getEntries() as $entry) {
         if (strpos($entry[1], 'com_categories') === false) {
             continue;
         }
         $uri = JUri::getInstance($entry[1]);
         $extension = $uri->getVar('extension');
         if ($extension) {
             $options[] = JHtml::_('select.option', $extension . '.category', JText::_('JCategory'));
         }
     }
     return $options;
 }
Exemplo n.º 4
0
 /**
  * Echoes any HTML to show after the view template
  *
  * @param   string  $view   The current view
  * @param   string  $task   The current task
  * @param   array   $input  The input array (request parameters)
  */
 public function postRender($view, $task, $input, $config = array())
 {
     list($isCli, ) = FOFDispatcher::isCliAdmin();
     $format = $input->getCmd('format', 'html');
     if ($format != 'html' || $isCli) {
         return;
     }
     if (!$isCli && version_compare(JVERSION, '3.0.0', 'ge')) {
         $sidebarEntries = JHtmlSidebar::getEntries();
         if (!empty($sidebarEntries)) {
             echo '</div>';
         }
     }
     echo "</div>\n";
     echo "</div>\n";
 }
Exemplo n.º 5
0
 public function display($tpl = null)
 {
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $hide = JFactory::getApplication()->input->getBool('hidemainmenu', false);
         $sidebar = count(JHtmlSidebar::getEntries()) + count(JHtmlSidebar::getFilters());
         if (!$hide && $sidebar > 0) {
             $start = array('<div id="j-sidebar-container" class="span2">', JHtmlSidebar::render(), '</div>', '<div id="j-main-container" class="span10">');
         } else {
             $start = array('<div id="j-main-container">');
         }
         echo join("\n", $start) . "\n";
         parent::display($tpl);
         echo "\n</div>";
     } else {
         parent::display($tpl);
     }
     $this->displayFooter();
 }
Exemplo n.º 6
0
 /**
  * Echoes any HTML to show after the view template
  *
  * @param   string    $view    The current view
  * @param   string    $task    The current task
  * @param   FOFInput  $input   The input array (request parameters)
  * @param   array     $config  The view configuration array
  *
  * @return  void
  */
 public function postRender($view, $task, $input, $config = array())
 {
     $format = $input->getCmd('format', 'html');
     if ($format != 'html' || FOFPlatform::getInstance()->isCli()) {
         return;
     }
     if (!FOFPlatform::getInstance()->isCli() && version_compare(JVERSION, '3.0', 'ge')) {
         $sidebarEntries = JHtmlSidebar::getEntries();
         if (!empty($sidebarEntries)) {
             echo '</div>';
         }
     }
     echo "</div>\n";
     // Closes row-fluid div
     echo "</div>\n";
     // Closes akeeba-bootstrap div
     echo "</div>\n";
     // Closes joomla-version div
 }
Exemplo n.º 7
0
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_modules');
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolbar::getInstance('toolbar');
     if ($state->get('client_id') == 1) {
         JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_ADMIN'), 'cube module');
     } else {
         JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES_SITE'), 'cube module');
     }
     if ($canDo->get('core.create')) {
         // Instantiate a new JLayoutFile instance and render the layout
         $layout = new JLayoutFile('toolbar.newmodule');
         $bar->appendButton('Custom', $layout->render(array()), 'new');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::checkin('modules.checkin');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_modules') && $user->authorise('core.edit', 'com_modules') && $user->authorise('core.edit.state', 'com_modules')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('modules.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_modules');
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
     if (JHtmlSidebar::getEntries()) {
         $this->sidebar = JHtmlSidebar::render();
     }
 }
Exemplo n.º 8
0
<?php

/**
 * @package     Windwalker.Framework
 * @subpackage  Layouts
 *
 * @copyright   Copyright (C) 2012 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      Generated by AKHelper - http://asikart.com
 */
// no direct access
defined('_JEXEC') or die;
if (JVERSION >= 3) {
    $list = JHtmlSidebar::getEntries();
} else {
    include_once JPATH_ADMINISTRATOR . '/modules/mod_submenu/helper.php';
    $list = modSubMenuHelper::getItems();
}
$displayMenu = count($list);
$hide = JFactory::getApplication()->input->getBool('hidemainmenu');
if ($hide) {
    $displayMenu = false;
}
?>

<?php 
if (JVERSION >= 3) {
    ?>
<div id="ak-submenu">
    <?php 
    if ($displayMenu) {
Exemplo n.º 9
0
 /**
  * Echoes any HTML to show after the view template
  *
  * @param   string    $view    The current view
  * @param   string    $task    The current task
  *
  * @return  void
  */
 public function postRender($view, $task)
 {
     $input = $this->container->input;
     $platform = $this->container->platform;
     $format = $input->getCmd('format', 'html');
     if ($format != 'html' || $platform->isCli()) {
         return;
     }
     $sidebarEntries = \JHtmlSidebar::getEntries();
     if (!empty($sidebarEntries)) {
         echo '</div>';
     }
     echo "</div>\n";
     // Closes row-fluid div
     echo "</div>\n";
     // Closes akeeba-bootstrap div
     echo "</div>\n";
     // Closes joomla-version div
 }