Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions administrator/components/com_templates/View/Template/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
Expand All @@ -31,7 +33,7 @@ class HtmlView extends BaseHtmlView
/**
* The Model state
*
* @var \JObject
* @var CMSObject
*/
protected $state;

Expand All @@ -45,7 +47,7 @@ class HtmlView extends BaseHtmlView
/**
* For loading the source form
*
* @var \JForm
* @var Form
*/
protected $form;

Expand Down Expand Up @@ -261,7 +263,12 @@ protected function addToolbar()
// Add a Template preview button
if ($this->preview->client_id == 0)
{
$bar->appendButton('Popup', 'picture', 'COM_TEMPLATES_BUTTON_PREVIEW', Uri::root() . 'index.php?tp=1&templateStyle=' . $this->preview->id, 800, 520);
$bar->popupButton('preview')
->icon('icon-picture')
->text('COM_TEMPLATES_BUTTON_PREVIEW')
->url(Uri::root() . 'index.php?tp=1&templateStyle=' . $this->preview->id)
->iframeWidth(800)
->iframeHeight(520);
}

// Only show file manage buttons for global SuperUser
Expand Down