/**
  * Display the view
  */
 public function display($tpl = null)
 {
     // Get data from the model
     $this->ftp = $this->get('Ftp');
     $this->option = $this->get('Option');
     $this->pagination = $this->get('Pagination');
     $this->rows = $this->get('Data');
     $this->state = $this->get('State');
     Document::setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
     $this->addToolbar();
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     $config = Component::params('com_media');
     $style = Request::getState('media.list.layout', 'layout', 'thumbs', 'word');
     Document::setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
     Html::behavior('framework', true);
     \Hubzero\Document\Assets::addComponentScript('com_media', 'mediamanager.js');
     \Hubzero\Document\Assets::addComponentStylesheet('com_media', 'mediamanager.css');
     Html::behavior('modal');
     Document::addScriptDeclaration("\n\t\tjQuery(document).ready(function(\$){\n\t\t\tdocument.preview = \$.fancybox;\n\t\t});");
     Html::asset('script', 'system/jquery.treeview.js', true, true, false, false);
     Html::asset('stylesheet', 'system/jquery.treeview.css', array(), true);
     if (Lang::isRTL()) {
         Html::asset('stylesheet', 'media/jquery.treeview_rtl.css', array(), true);
     }
     if (DIRECTORY_SEPARATOR == '\\') {
         $base = str_replace(DIRECTORY_SEPARATOR, "\\\\", COM_MEDIA_BASE);
     } else {
         $base = COM_MEDIA_BASE;
     }
     $js = "\n\t\t\tvar basepath = '" . $base . "';\n\t\t\tvar viewstyle = '" . $style . "';\n\t\t";
     Document::addScriptDeclaration($js);
     // Display form for FTP credentials?
     // Don't set them here, as there are other functions called before this one if there is any file write operation
     $ftp = !JClientHelper::hasCredentials('ftp');
     $session = App::get('session');
     $state = $this->get('state');
     $this->assignRef('session', $session);
     $this->assignRef('config', $config);
     $this->assignRef('state', $state);
     $this->require_ftp = $ftp;
     $this->folders_id = ' id="media-tree"';
     $this->folders = $this->get('folderTree');
     // Set the toolbar
     $this->addToolbar();
     parent::display($tpl);
     echo Html::behavior('keepalive');
 }
 /**
  * Method to catch the onAfterDispatch event.
  *
  * This is where we setup the click-through content highlighting for.
  * The highlighting is done with JavaScript so we just
  * need to check a few parameters and the JHtml behavior will do the rest.
  *
  * @return  boolean  True on success
  *
  * @since   2.5
  */
 public function onAfterDispatch()
 {
     // Check that we are in the site application.
     if (!App::isSite()) {
         return true;
     }
     // Set the variables
     $extension = Request::getCmd('option', '');
     // Check if the highlighter is enabled.
     if (!Component::params($extension)->get('highlight_terms', 1)) {
         return true;
     }
     // Check if the highlighter should be activated in this environment.
     if (Document::getType() !== 'html' || Request::getCmd('tmpl', '') === 'component') {
         return true;
     }
     // Get the terms to highlight from the request.
     $terms = Request::getVar('highlight', null, 'base64');
     $terms = $terms ? json_decode(base64_decode($terms)) : null;
     // Check the terms.
     if (empty($terms)) {
         return true;
     }
     // Clean the terms array
     $filter = JFilterInput::getInstance();
     $cleanTerms = array();
     foreach ($terms as $term) {
         $cleanTerms[] = htmlspecialchars($filter->clean($term, 'string'));
     }
     // Activate the highlighter.
     Html::behavior('highlighter', $cleanTerms);
     // Adjust the component buffer.
     $buf = Document::getBuffer('component');
     $buf = '<br id="highlighter-start" />' . $buf . '<br id="highlighter-end" />';
     Document::setBuffer($buf, 'component');
     return true;
 }
 /**
  * Setup the SubMenu
  *
  * @since	1.6
  */
 protected function _setSubMenu()
 {
     $contents = $this->loadTemplate('navigation');
     Document::setBuffer($contents, 'modules', 'submenu');
 }
Exemple #5
0
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// no direct access
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_SYSTEM_INFO'), 'systeminfo.png');
Toolbar::help('sysinfo');
// Add specific helper files for html generation
Html::addIncludePath(dirname(JPATH_COMPONENT) . '/helpers/html');
// Load switcher behavior
Html::behavior('switcher', 'submenu');
Document::setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
?>

<form action="<?php 
echo Route::url('index.php?option=' . $this->option . '&controller=' . $this->controller);
?>
" method="post" name="adminForm" id="adminForm">
	<div id="config-document">
		<div id="page-site" class="tab">
			<div class="noshow">
				<div class="width-100">
					<?php 
echo $this->loadTemplate('system');
?>
				</div>
			</div>