Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/com_templates.tar
Назад
tables/style.php 0000604 00000006176 15245570520 0007702 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\Registry\Registry; /** * Template style table class. * * @since 1.6 */ class TemplatesTableStyle extends JTable { /** * Constructor * * @param JDatabaseDriver &$db A database connector object * * @since 1.6 */ public function __construct(&$db) { parent::__construct('#__template_styles', 'id', $db); } /** * Overloaded bind function to pre-process the params. * * @param array $array Named array * @param mixed $ignore An optional array or space separated list of properties to ignore while binding. * * @return null|string null if operation was satisfactory, otherwise returns an error * * @since 1.6 */ public function bind($array, $ignore = '') { if (isset($array['params']) && is_array($array['params'])) { $registry = new Registry($array['params']); $array['params'] = (string) $registry; } // Verify that the default style is not unset if ($array['home'] == '0' && $this->home == '1') { $this->setError(JText::_('COM_TEMPLATES_ERROR_CANNOT_UNSET_DEFAULT_STYLE')); return false; } return parent::bind($array, $ignore); } /** * Overloaded check method to ensure data integrity. * * @return boolean True on success. * * @since 1.6 */ public function check() { if (empty($this->title)) { $this->setError(JText::_('COM_TEMPLATES_ERROR_STYLE_REQUIRES_TITLE')); return false; } return true; } /** * Overloaded store method to ensure unicity of default style. * * @param boolean $updateNulls True to update fields even if they are null. * * @return boolean True on success. * * @since 1.6 */ public function store($updateNulls = false) { if ($this->home != '0') { $query = $this->_db->getQuery(true) ->update('#__template_styles') ->set('home=\'0\'') ->where('client_id=' . (int) $this->client_id) ->where('home=' . $this->_db->quote($this->home)); $this->_db->setQuery($query); $this->_db->execute(); } return parent::store($updateNulls); } /** * Overloaded store method to unsure existence of a default style for a template. * * @param mixed $pk An optional primary key value to delete. If not set the instance property value is used. * * @return boolean True on success. * * @since 1.6 */ public function delete($pk = null) { $k = $this->_tbl_key; $pk = is_null($pk) ? $this->$k : $pk; if (!is_null($pk)) { $query = $this->_db->getQuery(true) ->from('#__template_styles') ->select('id') ->where('client_id=' . (int) $this->client_id) ->where('template=' . $this->_db->quote($this->template)); $this->_db->setQuery($query); $results = $this->_db->loadColumn(); if (count($results) == 1 && $results[0] == $pk) { $this->setError(JText::_('COM_TEMPLATES_ERROR_CANNOT_DELETE_LAST_STYLE')); return false; } } return parent::delete($pk); } } views/styles/tmpl/default.php 0000604 00000015574 15245570520 0012352 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); $user = JFactory::getUser(); $clientId = (int) $this->state->get('client_id', 0); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $colSpan = $clientId === 1 ? 5 : 6; ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=styles'); ?>" method="post" name="adminForm" id="adminForm"> <?php if (!empty($this->sidebar)) : ?> <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> </div> <div id="j-main-container" class="span10"> <?php else : ?> <div id="j-main-container"> <?php endif; ?> <?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('selectorFieldName' => 'client_id'))); ?> <?php if ($this->total > 0) : ?> <table class="table table-striped" id="styleList"> <thead> <tr> <th width="1%" class="nowrap center">   </th> <th class="nowrap"> <?php echo JHtml::_('searchtools.sort', 'COM_TEMPLATES_HEADING_STYLE', 'a.title', $listDirn, $listOrder); ?> </th> <th width="1%" class="nowrap center"> <?php echo JHtml::_('searchtools.sort', 'COM_TEMPLATES_HEADING_DEFAULT', 'a.home', $listDirn, $listOrder); ?> </th> <?php if ($clientId === 0) : ?> <th width="20%" class="nowrap hidden-phone"> <?php echo JText::_('COM_TEMPLATES_HEADING_PAGES'); ?> </th> <?php endif; ?> <th width="30%" class="hidden-phone hidden-tablet"> <?php echo JHtml::_('searchtools.sort', 'COM_TEMPLATES_HEADING_TEMPLATE', 'a.template', $listDirn, $listOrder); ?> </th> <th width="1%" class="nowrap hidden-phone hidden-tablet"> <?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="<?php echo $colSpan; ?>"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php foreach ($this->items as $i => $item) : $canCreate = $user->authorise('core.create', 'com_templates'); $canEdit = $user->authorise('core.edit', 'com_templates'); $canChange = $user->authorise('core.edit.state', 'com_templates'); ?> <tr class="row<?php echo $i % 2; ?>"> <td width="1%" class="center"> <?php echo JHtml::_('grid.id', $i, $item->id); ?> </td> <td> <?php if ($this->preview && $item->client_id == '0') : ?> <a target="_blank" href="<?php echo JUri::root() . 'index.php?tp=1&templateStyle=' . (int) $item->id ?>" class="jgrid"> <span class="icon-eye-open hasTooltip" aria-hidden="true" title="<?php echo JHtml::_('tooltipText', JText::_('COM_TEMPLATES_TEMPLATE_PREVIEW'), $item->title, 0); ?>"></span> <span class="element-invisible"><?php echo JText::_('COM_TEMPLATES_TEMPLATE_PREVIEW'); ?></span> </a> <?php elseif ($item->client_id == '1') : ?> <span class="icon-eye-close disabled hasTooltip" aria-hidden="true" title="<?php echo JHtml::_('tooltipText', 'COM_TEMPLATES_TEMPLATE_NO_PREVIEW_ADMIN'); ?>"></span> <span class="element-invisible"><?php echo JText::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW_ADMIN'); ?></span> <?php else: ?> <span class="icon-eye-close disabled hasTooltip" aria-hidden="true" title="<?php echo JHtml::_('tooltipText', 'COM_TEMPLATES_TEMPLATE_NO_PREVIEW'); ?>"></span> <span class="element-invisible"><?php echo JText::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW'); ?></span> <?php endif; ?> <?php if ($canEdit) : ?> <a href="<?php echo JRoute::_('index.php?option=com_templates&task=style.edit&id=' . (int) $item->id); ?>"> <?php echo $this->escape($item->title); ?></a> <?php else : ?> <?php echo $this->escape($item->title); ?> <?php endif; ?> </td> <td class="center"> <?php if ($item->home == '0' || $item->home == '1') : ?> <?php echo JHtml::_('jgrid.isdefault', $item->home != '0', $i, 'styles.', $canChange && $item->home != '1'); ?> <?php elseif ($canChange) : ?> <a href="<?php echo JRoute::_('index.php?option=com_templates&task=styles.unsetDefault&cid[]=' . $item->id . '&' . JSession::getFormToken() . '=1'); ?>"> <?php if ($item->image) : ?> <?php echo JHtml::_('image', 'mod_languages/' . $item->image . '.gif', $item->language_title, array('title' => JText::sprintf('COM_TEMPLATES_GRID_UNSET_LANGUAGE', $item->language_title)), true); ?> <?php else : ?> <span class="label" title="<?php echo JText::sprintf('COM_TEMPLATES_GRID_UNSET_LANGUAGE', $item->language_title); ?>"><?php echo $item->language_sef; ?></span> <?php endif; ?> </a> <?php else : ?> <?php if ($item->image) : ?> <?php echo JHtml::_('image', 'mod_languages/' . $item->image . '.gif', $item->language_title, array('title' => $item->language_title), true); ?> <?php else : ?> <span class="label" title="<?php echo $item->language_title; ?>"><?php echo $item->language_sef; ?></span> <?php endif; ?> <?php endif; ?> </td> <?php if ($clientId === 0) : ?> <td class="small hidden-phone"> <?php if ($item->home == '1') : ?> <?php echo JText::_('COM_TEMPLATES_STYLES_PAGES_ALL'); ?> <?php elseif ($item->home != '0' && $item->home != '1') : ?> <?php echo JText::sprintf('COM_TEMPLATES_STYLES_PAGES_ALL_LANGUAGE', $this->escape($item->language_title)); ?> <?php elseif ($item->assigned > 0) : ?> <?php echo JText::sprintf('COM_TEMPLATES_STYLES_PAGES_SELECTED', $this->escape($item->assigned)); ?> <?php else : ?> <?php echo JText::_('COM_TEMPLATES_STYLES_PAGES_NONE'); ?> <?php endif; ?> </td> <?php endif; ?> <td class="hidden-phone hidden-tablet"> <label for="cb<?php echo $i; ?>" class="small"> <a href="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . (int) $item->e_id); ?> "> <?php echo ucfirst($this->escape($item->template)); ?> </a> </label> </td> <td class="hidden-phone hidden-tablet"> <?php echo (int) $item->id; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHtml::_('form.token'); ?> </div> </form> views/styles/tmpl/default.xml 0000604 00000000320 15245570520 0012342 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_TEMPLATES_STYLE_VIEW_DEFAULT_TITLE"> <message> <![CDATA[COM_TEMPLATES_STYLE_VIEW_DEFAULT_DESC]]> </message> </layout> </metadata> views/styles/view.html.php 0000604 00000005331 15245570520 0011655 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View class for a list of template styles. * * @since 1.6 */ class TemplatesViewStyles extends JViewLegacy { protected $items; protected $pagination; protected $state; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->total = $this->get('Total'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); $this->preview = JComponentHelper::getParams('com_templates')->get('template_positions_display'); TemplatesHelper::addSubmenu('styles'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); $this->sidebar = JHtmlSidebar::render(); return parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $canDo = JHelperContent::getActions('com_templates'); // Set the title. if ((int) $this->get('State')->get('client_id') === 1) { JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES_ADMIN'), 'eye thememanager'); } else { JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_STYLES_SITE'), 'eye thememanager'); } if ($canDo->get('core.edit.state')) { JToolbarHelper::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME'); JToolbarHelper::divider(); } if ($canDo->get('core.edit')) { JToolbarHelper::editList('style.edit'); } if ($canDo->get('core.create')) { JToolbarHelper::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true); JToolbarHelper::divider(); } if ($canDo->get('core.delete')) { JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'styles.delete', 'JTOOLBAR_DELETE'); JToolbarHelper::divider(); } if ($canDo->get('core.admin') || $canDo->get('core.options')) { JToolbarHelper::preferences('com_templates'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES'); JHtmlSidebar::setAction('index.php?option=com_templates&view=styles'); } } views/templates/tmpl/default.php 0000604 00000010234 15245570520 0013011 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); JHtml::_('formbehavior.chosen', 'select'); $user = JFactory::getUser(); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=templates'); ?>" method="post" name="adminForm" id="adminForm"> <?php if (!empty($this->sidebar)) : ?> <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> </div> <div id="j-main-container" class="span10"> <?php else : ?> <div id="j-main-container"> <?php endif; ?> <?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('selectorFieldName' => 'client_id'))); ?> <?php if ($this->total > 0) : ?> <table class="table table-striped" id="template-mgr"> <thead> <tr> <th class="col1template hidden-phone" width="20%"> <?php echo JText::_('COM_TEMPLATES_HEADING_IMAGE'); ?> </th> <th width="30%"> <?php echo JHtml::_('searchtools.sort', 'COM_TEMPLATES_HEADING_TEMPLATE', 'a.element', $listDirn, $listOrder); ?> </th> <th width="10%" class="hidden-phone"> <?php echo JText::_('JVERSION'); ?> </th> <th width="15%" class="hidden-phone"> <?php echo JText::_('JDATE'); ?> </th> <th width="25%" class="hidden-phone"> <?php echo JText::_('JAUTHOR'); ?> </th> </tr> </thead> <tfoot> <tr> <td colspan="5"> <?php echo $this->pagination->getListFooter(); ?> </td> </tr> </tfoot> <tbody> <?php foreach ($this->items as $i => $item) : ?> <tr class="row<?php echo $i % 2; ?>"> <td class="center hidden-phone"> <?php echo JHtml::_('templates.thumb', $item->element, $item->client_id); ?> <?php echo JHtml::_('templates.thumbModal', $item->element, $item->client_id); ?> </td> <td class="template-name"> <a href="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . (int) $item->extension_id . '&file=' . $this->file); ?>"> <?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_DETAILS', ucfirst($item->name)); ?></a> <div> <?php if ($this->preview && $item->client_id == '0') : ?> <a href="<?php echo JRoute::_(JUri::root() . 'index.php?tp=1&template=' . $item->element); ?>" target="_blank"> <?php echo JText::_('COM_TEMPLATES_TEMPLATE_PREVIEW'); ?> </a> <?php elseif ($item->client_id == '1') : ?> <?php echo JText::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW_ADMIN'); ?> <?php else : ?> <span class="hasTooltip" title="<?php echo JHtml::_('tooltipText', 'COM_TEMPLATES_TEMPLATE_NO_PREVIEW_DESC'); ?>"><?php echo JText::_('COM_TEMPLATES_TEMPLATE_NO_PREVIEW'); ?></span> <?php endif; ?> </div> </td> <td class="small hidden-phone"> <?php echo $this->escape($item->xmldata->get('version')); ?> </td> <td class="small hidden-phone"> <?php echo $this->escape($item->xmldata->get('creationDate')); ?> </td> <td class="hidden-phone"> <?php if ($author = $item->xmldata->get('author')) : ?> <div><?php echo $this->escape($author); ?></div> <?php else : ?> — <?php endif; ?> <?php if ($email = $item->xmldata->get('authorEmail')) : ?> <div><?php echo $this->escape($email); ?></div> <?php endif; ?> <?php if ($url = $item->xmldata->get('authorUrl')) : ?> <div><a href="<?php echo $this->escape($url); ?>"><?php echo $this->escape($url); ?></a></div> <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo JHtml::_('form.token'); ?> </div> </form> views/templates/tmpl/default.xml 0000604 00000000330 15245570520 0013016 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_TEMPLATES_TEMPLATES_VIEW_DEFAULT_TITLE"> <message> <![CDATA[COM_TEMPLATES_TEMPLATES_VIEW_DEFAULT_DESC]]> </message> </layout> </metadata> views/templates/view.html.php 0000604 00000004645 15245570520 0012337 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View class for a list of template styles. * * @since 1.6 */ class TemplatesViewTemplates extends JViewLegacy { /** * @var array * @since 1.6 */ protected $items; /** * @var object * @since 1.6 */ protected $pagination; /** * @var object * @since 1.6 */ protected $state; /** * @var string * @since 3.2 */ protected $file; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ public function display($tpl = null) { $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->total = $this->get('Total'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); $this->preview = JComponentHelper::getParams('com_templates')->get('template_positions_display'); $this->file = base64_encode('home'); TemplatesHelper::addSubmenu('templates'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); return parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { $canDo = JHelperContent::getActions('com_templates'); // Set the title. if ((int) $this->get('State')->get('client_id') === 1) { JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_TEMPLATES_ADMIN'), 'eye thememanager'); } else { JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_TEMPLATES_SITE'), 'eye thememanager'); } if ($canDo->get('core.admin') || $canDo->get('core.options')) { JToolbarHelper::preferences('com_templates'); JToolbarHelper::divider(); } JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES'); JHtmlSidebar::setAction('index.php?option=com_templates&view=templates'); $this->sidebar = JHtmlSidebar::render(); } } views/style/view.json.php 0000604 00000002363 15245570520 0011501 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View to edit a template style. * * @since 1.6 */ class TemplatesViewStyle extends JViewLegacy { /** * The JObject (on success, false on failure) * * @var JObject */ protected $item; /** * The form object * * @var JForm */ protected $form; /** * The model state * * @var JObject */ protected $state; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ public function display($tpl = null) { try { $this->item = $this->get('Item'); } catch (Exception $e) { $app = JFactory::getApplication(); $app->enqueueMessage($e->getMessage(), 'error'); return false; } $paramsList = $this->item->getProperties(); unset($paramsList['xml']); $paramsList = json_encode($paramsList); return $paramsList; } } views/style/view.html.php 0000604 00000004761 15245570520 0011500 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View to edit a template style. * * @since 1.6 */ class TemplatesViewStyle extends JViewLegacy { /** * The JObject (on success, false on failure) * * @var JObject */ protected $item; /** * The form object * * @var JForm */ protected $form; /** * The model state * * @var JObject */ protected $state; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. * * @since 1.6 */ public function display($tpl = null) { $this->item = $this->get('Item'); $this->state = $this->get('State'); $this->form = $this->get('Form'); $this->canDo = JHelperContent::getActions('com_templates'); // Check for errors. if (count($errors = $this->get('Errors'))) { throw new Exception(implode("\n", $errors), 500); } $this->addToolbar(); return parent::display($tpl); } /** * Add the page title and toolbar. * * @return void * * @since 1.6 */ protected function addToolbar() { JFactory::getApplication()->input->set('hidemainmenu', true); $isNew = ($this->item->id == 0); $canDo = $this->canDo; JToolbarHelper::title( $isNew ? JText::_('COM_TEMPLATES_MANAGER_ADD_STYLE') : JText::_('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'eye thememanager' ); // If not checked out, can save the item. if ($canDo->get('core.edit')) { JToolbarHelper::apply('style.apply'); JToolbarHelper::save('style.save'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolbarHelper::save2copy('style.save2copy'); } if (empty($this->item->id)) { JToolbarHelper::cancel('style.cancel'); } else { JToolbarHelper::cancel('style.cancel', 'JTOOLBAR_CLOSE'); } JToolbarHelper::divider(); // Get the help information for the template item. $lang = JFactory::getLanguage(); $help = $this->get('Help'); if ($lang->hasKey($help->url)) { $debug = $lang->setDebug(false); $url = JText::_($help->url); $lang->setDebug($debug); } else { $url = null; } JToolbarHelper::help($help->key, false, $url); } } views/style/tmpl/edit.php 0000604 00000006567 15245570520 0011472 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('behavior.formvalidator'); JHtml::_('behavior.keepalive'); JHtml::_('formbehavior.chosen', 'select'); $user = JFactory::getUser(); JFactory::getDocument()->addScriptDeclaration(" Joomla.submitbutton = function(task) { if (task == 'style.cancel' || document.formvalidator.isValid(document.getElementById('style-form'))) { Joomla.submitform(task, document.getElementById('style-form')); } }; "); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="style-form" class="form-validate"> <?php echo JLayoutHelper::render('joomla.edit.title_alias', $this); ?> <div class="form-horizontal"> <?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', JText::_('JDETAILS')); ?> <div class="row-fluid"> <div class="span9"> <h2> <?php echo JText::_($this->item->template); ?> </h2> <div class="info-labels"> <span class="label hasTooltip" title="<?php echo JHtml::_('tooltipText', 'COM_TEMPLATES_FIELD_CLIENT_LABEL'); ?>"> <?php echo $this->item->client_id == 0 ? JText::_('JSITE') : JText::_('JADMINISTRATOR'); ?> </span> </div> <div> <p><?php echo JText::_($this->item->xml->description); ?></p> <?php $this->fieldset = 'description'; $description = JLayoutHelper::render('joomla.edit.fieldset', $this); ?> <?php if ($description) : ?> <p class="readmore"> <a href="#" onclick="jQuery('.nav-tabs a[href=\'#description\']').tab('show');"> <?php echo JText::_('JGLOBAL_SHOW_FULL_DESCRIPTION'); ?> </a> </p> <?php endif; ?> </div> <?php $this->fieldset = 'basic'; $html = JLayoutHelper::render('joomla.edit.fieldset', $this); echo $html ? '<hr />' . $html : ''; ?> </div> <div class="span3"> <?php // Set main fields. $this->fields = array( 'home', 'client_id', 'template' ); ?> <?php echo JLayoutHelper::render('joomla.edit.global', $this); ?> </div> </div> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php if ($description) : ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'description', JText::_('JGLOBAL_FIELDSET_DESCRIPTION')); ?> <?php echo $description; ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php endif; ?> <?php $this->fieldsets = array(); $this->ignore_fieldsets = array('basic', 'description'); echo JLayoutHelper::render('joomla.edit.params', $this); ?> <?php if ($user->authorise('core.edit', 'com_menus') && $this->item->client_id == 0 && $this->canDo->get('core.edit.state')) : ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'assignment', JText::_('COM_TEMPLATES_MENUS_ASSIGNMENT')); ?> <?php echo $this->loadTemplate('assignment'); ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php endif; ?> <?php echo JHtml::_('bootstrap.endTabSet'); ?> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> </div> </form> views/style/tmpl/edit_options.php 0000604 00000002442 15245570520 0013231 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Load chosen.css JHtml::_('formbehavior.chosen', 'select'); ?> <?php echo JHtml::_('bootstrap.startAccordion', 'templatestyleOptions', array('active' => 'collapse0')); $fieldSets = $this->form->getFieldsets('params'); $i = 0; foreach ($fieldSets as $name => $fieldSet) : $label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_TEMPLATES_' . $name . '_FIELDSET_LABEL'; echo JHtml::_('bootstrap.addSlide', 'templatestyleOptions', JText::_($label), 'collapse' . ($i++)); if (isset($fieldSet->description) && trim($fieldSet->description)) : echo '<p class="tip">' . $this->escape(JText::_($fieldSet->description)) . '</p>'; endif; ?> <?php foreach ($this->form->getFieldset($name) as $field) : ?> <div class="control-group"> <div class="control-label"> <?php echo $field->label; ?> </div> <div class="controls"> <?php echo $field->input; ?> </div> </div> <?php endforeach; echo JHtml::_('bootstrap.endSlide'); endforeach; echo JHtml::_('bootstrap.endAccordion'); views/style/tmpl/edit_assignment.php 0000604 00000004224 15245570520 0013706 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Initialise related data. JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php'); $menuTypes = MenusHelper::getMenuLinks(); $user = JFactory::getUser(); ?> <label id="jform_menuselect-lbl" for="jform_menuselect"><?php echo JText::_('JGLOBAL_MENU_SELECTION'); ?></label> <div class="btn-toolbar"> <button class="btn jform-rightbtn" type="button" onclick="jQuery('.chk-menulink').attr('checked', !jQuery('.chk-menulink').attr('checked'));"> <span class="icon-checkbox-partial" aria-hidden="true"></span> <?php echo JText::_('JGLOBAL_SELECTION_INVERT_ALL'); ?> </button> </div> <div id="menu-assignment"> <ul class="menu-links"> <?php foreach ($menuTypes as &$type) : ?> <li> <div class="menu-links-block"> <button class="btn jform-rightbtn" type="button" onclick="jQuery('.menutype-<?php echo $type->menutype; ?>').attr('checked', !jQuery('.menutype-<?php echo $type->menutype; ?>').attr('checked'));"> <span class="icon-checkbox-partial" aria-hidden="true"></span> <?php echo JText::_('JGLOBAL_SELECTION_INVERT'); ?> </button> <h5><?php echo $type->title ?: $type->menutype; ?></h5> <?php foreach ($type->links as $link) : ?> <label class="checkbox small" for="link<?php echo (int) $link->value; ?>" > <input type="checkbox" name="jform[assigned][]" value="<?php echo (int) $link->value; ?>" id="link<?php echo (int) $link->value; ?>"<?php if ($link->template_style_id == $this->item->id) : ?> checked="checked"<?php endif; ?><?php if ($link->checked_out && $link->checked_out != $user->id) : ?> disabled="disabled"<?php else : ?> class="chk-menulink menutype-<?php echo $type->menutype; ?>"<?php endif; ?> /> <?php echo JLayoutHelper::render('joomla.html.treeprefix', array('level' => $link->level)) . $link->text; ?> </label> <?php endforeach; ?> </div> </li> <?php endforeach; ?> </ul> </div> views/template/view.html.php 0000604 00000015766 15245570520 0012162 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * View to edit a template style. * * @since 1.6 */ class TemplatesViewTemplate extends JViewLegacy { /** * For loading extension state */ protected $state; /** * For loading template details */ protected $template; /** * For loading the source form */ protected $form; /** * For loading source file contents */ protected $source; /** * Extension id */ protected $id; /** * Encrypted file path */ protected $file; /** * List of available overrides */ protected $overridesList; /** * Name of the present file */ protected $fileName; /** * Type of the file - image, source, font */ protected $type; /** * For loading image information */ protected $image; /** * Template id for showing preview button */ protected $preview; /** * For loading font information */ protected $font; /** * A nested array containing lst of files and folders */ protected $files; /** * An array containing a list of compressed files */ protected $archive; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise an Error object. */ public function display($tpl = null) { $app = JFactory::getApplication(); $this->file = $app->input->get('file'); $this->fileName = JFilterInput::getInstance()->clean(base64_decode($this->file), 'string'); $explodeArray = explode('.', $this->fileName); $ext = end($explodeArray); $this->files = $this->get('Files'); $this->state = $this->get('State'); $this->template = $this->get('Template'); $this->preview = $this->get('Preview'); $params = JComponentHelper::getParams('com_templates'); $imageTypes = explode(',', $params->get('image_formats')); $sourceTypes = explode(',', $params->get('source_formats')); $fontTypes = explode(',', $params->get('font_formats')); $archiveTypes = explode(',', $params->get('compressed_formats')); if (in_array($ext, $sourceTypes)) { $this->form = $this->get('Form'); $this->form->setFieldAttribute('source', 'syntax', $ext); $this->source = $this->get('Source'); $this->type = 'file'; } elseif (in_array($ext, $imageTypes)) { $this->image = $this->get('Image'); $this->type = 'image'; } elseif (in_array($ext, $fontTypes)) { $this->font = $this->get('Font'); $this->type = 'font'; } elseif (in_array($ext, $archiveTypes)) { $this->archive = $this->get('Archive'); $this->type = 'archive'; } else { $this->type = 'home'; } $this->overridesList = $this->get('OverridesList'); $this->id = $this->state->get('extension.id'); // Check for errors. if (count($errors = $this->get('Errors'))) { $app->enqueueMessage(implode("\n", $errors)); return false; } $this->addToolbar(); if (!JFactory::getUser()->authorise('core.admin')) { $this->setLayout('readonly'); } return parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 * * @return void */ protected function addToolbar() { $app = JFactory::getApplication(); $user = JFactory::getUser(); $app->input->set('hidemainmenu', true); // User is global SuperUser $isSuperUser = $user->authorise('core.admin'); // Get the toolbar object instance $bar = JToolbar::getInstance('toolbar'); $explodeArray = explode('.', $this->fileName); $ext = end($explodeArray); JToolbarHelper::title(JText::sprintf('COM_TEMPLATES_MANAGER_VIEW_TEMPLATE', ucfirst($this->template->name)), 'eye thememanager'); // Only show file edit buttons for global SuperUser if ($isSuperUser) { // Add an Apply and save button if ($this->type == 'file') { JToolbarHelper::apply('template.apply'); JToolbarHelper::save('template.save'); } // Add a Crop and Resize button elseif ($this->type == 'image') { JToolbarHelper::custom('template.cropImage', 'move', 'move', 'COM_TEMPLATES_BUTTON_CROP', false); JToolbarHelper::modal('resizeModal', 'icon-refresh', 'COM_TEMPLATES_BUTTON_RESIZE'); } // Add an extract button elseif ($this->type == 'archive') { JToolbarHelper::custom('template.extractArchive', 'arrow-down', 'arrow-down', 'COM_TEMPLATES_BUTTON_EXTRACT_ARCHIVE', false); } // Add a copy template button (Hathor override doesn't need the button) if ($app->getTemplate() != 'hathor') { JToolbarHelper::modal('copyModal', 'icon-copy', 'COM_TEMPLATES_BUTTON_COPY_TEMPLATE'); } } // Add a Template preview button if ($this->preview->client_id == 0) { $bar->appendButton('Popup', 'picture', 'COM_TEMPLATES_BUTTON_PREVIEW', JUri::root() . 'index.php?tp=1&templateStyle=' . $this->preview->id, 800, 520); } // Only show file manage buttons for global SuperUser if ($isSuperUser) { // Add Manage folders button JToolbarHelper::modal('folderModal', 'icon-folder icon white', 'COM_TEMPLATES_BUTTON_FOLDERS'); // Add a new file button JToolbarHelper::modal('fileModal', 'icon-file', 'COM_TEMPLATES_BUTTON_FILE'); // Add a Rename file Button (Hathor override doesn't need the button) if ($app->getTemplate() != 'hathor' && $this->type != 'home') { JToolbarHelper::modal('renameModal', 'icon-refresh', 'COM_TEMPLATES_BUTTON_RENAME_FILE'); } // Add a Delete file Button if ($this->type != 'home') { JToolbarHelper::modal('deleteModal', 'icon-remove', 'COM_TEMPLATES_BUTTON_DELETE_FILE'); } // Add a Compile Button if ($ext == 'less') { JToolbarHelper::custom('template.less', 'play', 'play', 'COM_TEMPLATES_BUTTON_LESS', false); } } if ($this->type == 'home') { JToolbarHelper::cancel('template.cancel', 'JTOOLBAR_CLOSE'); } else { JToolbarHelper::cancel('template.close', 'COM_TEMPLATES_BUTTON_CLOSE_FILE'); } JToolbarHelper::divider(); JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES_EDIT'); } /** * Method for creating the collapsible tree. * * @param array $array The value of the present node for recursion * * @return string * * @note Uses recursion * @since 3.2 */ protected function directoryTree($array) { $temp = $this->files; $this->files = $array; $txt = $this->loadTemplate('tree'); $this->files = $temp; return $txt; } /** * Method for listing the folder tree in modals. * * @param array $array The value of the present node for recursion * * @return string * * @note Uses recursion * @since 3.2 */ protected function folderTree($array) { $temp = $this->files; $this->files = $array; $txt = $this->loadTemplate('folders'); $this->files = $temp; return $txt; } } views/template/tmpl/default_modal_folder_footer.php 0000604 00000001540 15245570520 0016713 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $input = JFactory::getApplication()->input; ?> <form id="deleteFolder" method="post" action="<?php echo JRoute::_('index.php?option=com_templates&task=template.deleteFolder&id=' . $input->getInt('id') . '&file=' . $this->file); ?>"> <fieldset> <button type="button" class="btn" data-dismiss="modal"><?php echo JText::_('COM_TEMPLATES_TEMPLATE_CLOSE'); ?></button> <input type="hidden" class="address" name="address" /> <?php echo JHtml::_('form.token'); ?> <input type="submit" value="<?php echo JText::_('COM_TEMPLATES_BUTTON_DELETE'); ?>" class="btn btn-danger" /> </fieldset> </form> views/template/tmpl/default.php 0000604 00000044237 15245570520 0012640 0 ustar 00 <?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('bootstrap.tooltip'); JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.formvalidator'); JHtml::_('behavior.keepalive'); JHtml::_('behavior.tabstate'); $input = JFactory::getApplication()->input; // No access if not global SuperUser if (!JFactory::getUser()->authorise('core.admin')) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); } if ($this->type == 'image') { JHtml::_('script', 'system/jquery.Jcrop.min.js', array('version' => 'auto', 'relative' => true)); JHtml::_('stylesheet', 'system/jquery.Jcrop.min.css', array('version' => 'auto', 'relative' => true)); } JFactory::getDocument()->addScriptDeclaration(" jQuery(document).ready(function($){ // Hide all the folder when the page loads $('.folder ul, .component-folder ul, .plugin-folder ul, .layout-folder ul').hide(); // Display the tree after loading $('.directory-tree').removeClass('directory-tree'); // Show all the lists in the path of an open file $('.show > ul').show(); // Stop the default action of anchor tag on a click event $('.folder-url, .component-folder-url, .plugin-folder-url, .layout-folder-url').click(function(event){ event.preventDefault(); }); // Prevent the click event from proliferating $('.file, .component-file-url, .plugin-file-url').bind('click',function(e){ e.stopPropagation(); }); // Toggle the child indented list on a click event $('.folder, .component-folder, .plugin-folder, .layout-folder').bind('click',function(e){ $(this).children('ul').toggle(); e.stopPropagation(); }); // New file tree $('#fileModal .folder-url').bind('click',function(e){ $('.folder-url').removeClass('selected'); e.stopPropagation(); $('#fileModal input.address').val($(this).attr('data-id')); $(this).addClass('selected'); }); // Folder manager tree $('#folderModal .folder-url').bind('click',function(e){ $('.folder-url').removeClass('selected'); e.stopPropagation(); $('#folderModal input.address').val($(this).attr('data-id')); $(this).addClass('selected'); }); var containerDiv = document.querySelector('.span3.tree-holder'), treeContainer = containerDiv.querySelector('.nav.nav-list'), liEls = treeContainer.querySelectorAll('.folder.show'), filePathEl = document.querySelector('p.lead.hidden.path'); if(filePathEl) var filePathTmp = document.querySelector('p.lead.hidden.path').innerText; if(filePathTmp && filePathTmp.charAt( 0 ) === '/' ) { filePathTmp = filePathTmp.slice( 1 ); filePathTmp = filePathTmp.split('/'); filePathTmp = filePathTmp[filePathTmp.length - 1]; for (var i = 0, l = liEls.length; i < l; i++) { liEls[i].querySelector('a').classList.add('active'); if (i === liEls.length - 1) { var parentUl = liEls[i].querySelector('ul'), allLi = parentUl.querySelectorAll('li'); for (var i = 0, l = allLi.length; i < l; i++) { aEl = allLi[i].querySelector('a'), spanEl = aEl.querySelector('span'); if (spanEl && filePathTmp === $.trim(spanEl.innerText)) { aEl.classList.add('active'); } } } } } });"); if ($this->type == 'image') { JFactory::getDocument()->addScriptDeclaration(" jQuery(document).ready(function($) { var jcrop_api; // Configuration for image cropping $('#image-crop').Jcrop({ onChange: showCoords, onSelect: showCoords, onRelease: clearCoords, trueSize: [" . $this->image['width'] . ',' . $this->image['height'] . "] },function(){ jcrop_api = this; }); // Function for calculating the crop coordinates function showCoords(c) { $('#x').val(c.x); $('#y').val(c.y); $('#w').val(c.w); $('#h').val(c.h); }; // Function for clearing the coordinates function clearCoords() { $('#adminForm input').val(''); }; });"); } JFactory::getDocument()->addStyleDeclaration(' /* Styles for modals */ .selected{ background: #08c; color: #fff; } .selected:hover{ background: #08c !important; color: #fff; } .modal-body .column-left { float: left; max-height: 70vh; overflow-y: auto; } .modal-body .column-right { float: right; } @media (max-width: 767px) { .modal-body .column-right { float: left; } } #deleteFolder{ margin: 0; } #image-crop{ max-width: 100% !important; width: auto; height: auto; } .directory-tree{ display: none; } .tree-holder{ overflow-x: auto; } '); if ($this->type == 'font') { JFactory::getDocument()->addStyleDeclaration( "/* Styles for font preview */ @font-face { font-family: previewFont; src: url('" . $this->font['address'] . "') } .font-preview{ font-family: previewFont !important; }" ); } ?> <?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'editor')); ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'editor', JText::_('COM_TEMPLATES_TAB_EDITOR')); ?> <div class="row-fluid"> <div class="span12"> <?php if ($this->type == 'file') : ?> <p class="lead"><?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', $this->source->filename, $this->template->element); ?></p> <p class="lead path hidden"><?php echo $this->source->filename; ?></p> <?php endif; ?> <?php if ($this->type == 'image') : ?> <p class="lead"><?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', $this->image['path'], $this->template->element); ?></p> <p class="lead path hidden"><?php echo $this->image['path']; ?></p> <?php endif; ?> <?php if ($this->type == 'font') : ?> <p class="lead"><?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', $this->font['rel_path'], $this->template->element); ?></p> <p class="lead path hidden"><?php echo $this->font['rel_path']; ?></p> <?php endif; ?> </div> </div> <div class="row-fluid"> <div class="span3 tree-holder"> <?php echo $this->loadTemplate('tree'); ?> </div> <div class="span9"> <?php if ($this->type == 'home') : ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm" class="form-horizontal"> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> <div class="hero-unit" style="text-align: justify;"> <h2><?php echo JText::_('COM_TEMPLATES_HOME_HEADING'); ?></h2> <p><?php echo JText::_('COM_TEMPLATES_HOME_TEXT'); ?></p> <p> <a href="https://docs.joomla.org/Special:MyLanguage/J3.x:How_to_use_the_Template_Manager" target="_blank" class="btn btn-primary btn-large"> <?php echo JText::_('COM_TEMPLATES_HOME_BUTTON'); ?> </a> </p> </div> </form> <?php endif; ?> <?php if ($this->type == 'file') : ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm" class="form-horizontal"> <div class="editor-border"> <?php echo $this->form->getInput('source'); ?> </div> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> <?php echo $this->form->getInput('extension_id'); ?> <?php echo $this->form->getInput('filename'); ?> </form> <?php endif; ?> <?php if ($this->type == 'archive') : ?> <legend><?php echo JText::_('COM_TEMPLATES_FILE_CONTENT_PREVIEW'); ?></legend> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm" class="form-horizontal"> <ul class="nav nav-stacked nav-list well"> <?php foreach ($this->archive as $file) : ?> <li> <?php if (substr($file, -1) === DIRECTORY_SEPARATOR) : ?> <span class="icon-folder" aria-hidden="true"></span> <?php echo $file; ?> <?php endif; ?> <?php if (substr($file, -1) != DIRECTORY_SEPARATOR) : ?> <span class="icon-file" aria-hidden="true"></span> <?php echo $file; ?> <?php endif; ?> </li> <?php endforeach; ?> </ul> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> </form> <?php endif; ?> <?php if ($this->type == 'image') : ?> <img id="image-crop" src="<?php echo $this->image['address'] . '?' . time(); ?>" /> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm" class="form-horizontal"> <fieldset class="adminform"> <input type ="hidden" id="x" name="x" /> <input type ="hidden" id="y" name="y" /> <input type ="hidden" id="h" name="h" /> <input type ="hidden" id="w" name="w" /> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> </fieldset> </form> <?php endif; ?> <?php if ($this->type == 'font') : ?> <div class="font-preview"> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm" class="form-horizontal"> <fieldset class="adminform"> <p class="lead">H1</p><h1>Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML </h1> <p class="lead">H2</p><h2>Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML </h2> <p class="lead">H3</p><h3>Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML </h3> <p class="lead">H4</p><h4>Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML </h4> <p class="lead">H5</p><h5>Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML </h5> <p class="lead">H6</p> <h6>Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML </h6> <p class="lead">Bold</p><b>Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML </b> <p class="lead">Italics</p><i>Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML </i> <p class="lead">Unordered List</p> <ul> <li>Item</li> <li>Item</li> <li>Item<br /> <ul> <li>Item</li> <li>Item</li> <li>Item<br /> <ul> <li>Item</li> <li>Item</li> <li>Item</li> </ul> </li> </ul> </li> </ul> <p class="lead">Ordered List</p> <ol> <li>Item</li> <li>Item</li> <li>Item<br /> <ul> <li>Item</li> <li>Item</li> <li>Item<br /> <ul> <li>Item</li> <li>Item</li> <li>Item</li> </ul> </li> </ul> </li> </ol> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> </fieldset> </form> </div> <?php endif; ?> </div> </div> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'overrides', JText::_('COM_TEMPLATES_TAB_OVERRIDES')); ?> <div class="row-fluid"> <div class="span3"> <legend><?php echo JText::_('COM_TEMPLATES_OVERRIDES_MODULES'); ?></legend> <ul class="nav nav-list"> <?php $token = JSession::getFormToken() . '=' . 1; ?> <?php foreach ($this->overridesList['modules'] as $module) : ?> <li> <?php $overrideLinkUrl = 'index.php?option=com_templates&view=template&task=template.overrides&folder=' . $module->path . '&id=' . $input->getInt('id') . '&file=' . $this->file . '&' . $token; ?> <a href="<?php echo JRoute::_($overrideLinkUrl); ?>"> <span class="icon-copy" aria-hidden="true"></span> <?php echo $module->name; ?> </a> </li> <?php endforeach; ?> </ul> </div> <div class="span3"> <legend><?php echo JText::_('COM_TEMPLATES_OVERRIDES_COMPONENTS'); ?></legend> <ul class="nav nav-list"> <?php $token = JSession::getFormToken() . '=' . 1; ?> <?php foreach ($this->overridesList['components'] as $key => $value) : ?> <li class="component-folder"> <a href="#" class="component-folder-url"> <span class="icon-folder" aria-hidden="true"></span> <?php echo $key; ?> </a> <ul class="nav nav-list"> <?php foreach ($value as $view) : ?> <li> <?php $overrideLinkUrl = 'index.php?option=com_templates&view=template&task=template.overrides&folder=' . $view->path . '&id=' . $input->getInt('id') . '&file=' . $this->file . '&' . $token; ?> <a class="component-file-url" href="<?php echo JRoute::_($overrideLinkUrl); ?>"> <span class="icon-copy" aria-hidden="true"></span> <?php echo $view->name; ?> </a> </li> <?php endforeach; ?> </ul> </li> <?php endforeach; ?> </ul> </div> <div class="span3"> <legend><?php echo JText::_('COM_TEMPLATES_OVERRIDES_PLUGINS'); ?></legend> <ul class="nav nav-list"> <?php $token = JSession::getFormToken() . '=' . 1; ?> <?php foreach ($this->overridesList['plugins'] as $key => $group) : ?> <li class="plugin-folder"> <a href="#" class="plugin-folder-url"> <span class="icon-folder" aria-hidden="true"></span> <?php echo $key; ?> </a> <ul class="nav nav-list"> <?php foreach ($group as $plugin) : ?> <li> <?php $overrideLinkUrl = 'index.php?option=com_templates&view=template&task=template.overrides&folder=' . $plugin->path . '&id=' . $input->getInt('id') . '&file=' . $this->file . '&' . $token; ?> <a class="plugin-file-url" href="<?php echo JRoute::_($overrideLinkUrl); ?>"> <span class="icon-copy" aria-hidden="true"></span> <?php echo $plugin->name; ?> </a> </li> <?php endforeach; ?> </ul> </li> <?php endforeach; ?> </ul> </div> <div class="span3"> <legend><?php echo JText::_('COM_TEMPLATES_OVERRIDES_LAYOUTS'); ?></legend> <ul class="nav nav-list"> <?php $token = JSession::getFormToken() . '=' . 1; ?> <?php foreach ($this->overridesList['layouts'] as $key => $value) : ?> <li class="layout-folder"> <a href="#" class="layout-folder-url"> <span class="icon-folder" aria-hidden="true"></span> <?php echo $key; ?> </a> <ul class="nav nav-list"> <?php foreach ($value as $layout) : ?> <li> <?php $overrideLinkUrl = 'index.php?option=com_templates&view=template&task=template.overrides&folder=' . $layout->path . '&id=' . $input->getInt('id') . '&file=' . $this->file . '&' . $token; ?> <a href="<?php echo JRoute::_($overrideLinkUrl); ?>"> <span class="icon-copy" aria-hidden="true"></span> <?php echo $layout->name; ?> </a> </li> <?php endforeach; ?> </ul> </li> <?php endforeach; ?> </ul> </div> </div> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'description', JText::_('COM_TEMPLATES_TAB_DESCRIPTION')); ?> <?php echo $this->loadTemplate('description'); ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php echo JHtml::_('bootstrap.endTabSet'); ?> <?php // Collapse Modal $copyModalData = array( 'selector' => 'copyModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_TEMPLATE_COPY'), 'footer' => $this->loadTemplate('modal_copy_footer'), ), 'body' => $this->loadTemplate('modal_copy_body'), ); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&task=template.copy&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm"> <?php echo JLayoutHelper::render('joomla.modal.main', $copyModalData); ?> <?php echo JHtml::_('form.token'); ?> </form> <?php if ($this->type != 'home') : ?> <?php // Rename Modal $renameModalData = array( 'selector' => 'renameModal', 'params' => array( 'title' => JText::sprintf('COM_TEMPLATES_RENAME_FILE', $this->fileName), 'footer' => $this->loadTemplate('modal_rename_footer'), ), 'body' => $this->loadTemplate('modal_rename_body'), ); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&task=template.renameFile&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post"> <?php echo JLayoutHelper::render('joomla.modal.main', $renameModalData); ?> <?php echo JHtml::_('form.token'); ?> </form> <?php endif; ?> <?php if ($this->type != 'home') : ?> <?php // Delete Modal $deleteModalData = array( 'selector' => 'deleteModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_ARE_YOU_SURE'), 'footer' => $this->loadTemplate('modal_delete_footer'), ), 'body' => $this->loadTemplate('modal_delete_body'), ); ?> <?php echo JLayoutHelper::render('joomla.modal.main', $deleteModalData); ?> <?php endif; ?> <?php // File Modal $fileModalData = array( 'selector' => 'fileModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_NEW_FILE_HEADER'), 'footer' => $this->loadTemplate('modal_file_footer'), ), 'body' => $this->loadTemplate('modal_file_body'), ); ?> <?php echo JLayoutHelper::render('joomla.modal.main', $fileModalData); ?> <?php // Folder Modal $folderModalData = array( 'selector' => 'folderModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_MANAGE_FOLDERS'), 'footer' => $this->loadTemplate('modal_folder_footer'), ), 'body' => $this->loadTemplate('modal_folder_body'), ); ?> <?php echo JLayoutHelper::render('joomla.modal.main', $folderModalData); ?> <?php if ($this->type == 'image') : ?> <?php // Resize Modal $resizeModalData = array( 'selector' => 'resizeModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_RESIZE_IMAGE'), 'footer' => $this->loadTemplate('modal_resize_footer'), ), 'body' => $this->loadTemplate('modal_resize_body'), ); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&task=template.resizeImage&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post"> <?php echo JLayoutHelper::render('joomla.modal.main', $resizeModalData); ?> <?php echo JHtml::_('form.token'); ?> </form> <?php endif; ?>