Source for file view.html.php
Documentation is available at view.html.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* HTML View class for the Media component
* @package Joomla.Administrator
public function display($tpl =
null)
return $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'warning');
$style =
$app->getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word');
JHtml::_('behavior.framework', true);
JHtml::_('script', 'media/mediamanager.js', true, true);
JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
JHtml::_('stylesheet', 'media/mediamanager_rtl.css', array(), true);
$document->addScriptDeclaration("
window.addEvent('domready', function()
document.preview = SqueezeBox;
// JHtml::_('script', 'system/mootree.js', true, true, false, false);
JHtml::_('stylesheet', 'system/mootree.css', array(), true);
JHtml::_('stylesheet', 'media/mootree_rtl.css', array(), true);
if (DIRECTORY_SEPARATOR ==
'\\')
var basepath = '".
$base.
"';
var viewstyle = '".
$style.
"';
$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
$state =
$this->get('state');
$this->session =
$session;
$this->config =
&$config;
$this->require_ftp =
$ftp;
$this->folders_id =
' id="media-tree"';
$this->folders =
$this->get('folderTree');
echo
JHtml::_('behavior.keepalive');
* Add the page title and toolbar.
// Get the toolbar object instance
$bar =
JToolBar::getInstance('toolbar');
// The toolbar functions depend on Bootstrap JS
JHtml::_('bootstrap.framework');
if ($user->authorise('core.create', 'com_media'))
// Instantiate a new JLayoutFile instance and render the layout
$bar->appendButton('Custom', $layout->render(array()), 'upload');
// Add a create folder button
if ($user->authorise('core.create', 'com_media'))
// Instantiate a new JLayoutFile instance and render the layout
$bar->appendButton('Custom', $layout->render(array()), 'upload');
if ($user->authorise('core.delete', 'com_media'))
// Instantiate a new JLayoutFile instance and render the layout
$bar->appendButton('Custom', $layout->render(array()), 'upload');
// Add a preferences button
if ($user->authorise('core.admin', 'com_media'))
$this->folders_id =
null;
if (isset
($folder['children']) &&
count($folder['children']))
$this->folders =
$folder;
Documentation generated on Tue, 19 Nov 2013 15:18:07 +0100 by phpDocumentor 1.4.3