view.html.php
1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
// Check to ensure this file is included in Joomla!
defined('JPATH_PLATFORM') or die;
class JceViewBrowser extends JViewLegacy
{
protected $icons;
protected $state;
/**
* Display the view.
*/
public function display($tpl = null)
{
if (!JPluginHelper::isEnabled('quickicon', 'jce')) {
JFactory::getApplication()->redirect('index.php?option=com_jce');
}
$user = JFactory::getUser();
$this->state = $this->get('State');
$this->params = JComponentHelper::getParams('com_jce');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
JHtml::_('jquery.framework');
$document = JFactory::getDocument();
$document->addStyleSheet('components/com_jce/media/css/browser.min.css');
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JToolbarHelper::title('JCE - ' . JText::_('WF_BROWSER_TITLE'), 'picture');
JHtmlSidebar::setAction('index.php?option=com_jce&view=browser');
}
}