[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_templates/tmpl/style/ -> edit.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_templates
   6   *
   7   * @copyright   (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\Factory;
  14  use Joomla\CMS\HTML\HTMLHelper;
  15  use Joomla\CMS\Language\Text;
  16  use Joomla\CMS\Layout\LayoutHelper;
  17  use Joomla\CMS\Router\Route;
  18  
  19  /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
  20  $wa = $this->document->getWebAssetManager();
  21  $wa->useScript('keepalive')
  22      ->useScript('form.validate');
  23  
  24  $this->useCoreUI = true;
  25  
  26  $user = Factory::getUser();
  27  ?>
  28  
  29  <form action="<?php echo Route::_('index.php?option=com_templates&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="style-form" aria-label="<?php echo Text::_('COM_TEMPLATES_STYLE_FORM_EDIT'); ?>" class="form-validate">
  30  
  31      <?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>
  32  
  33      <div class="main-card">
  34          <?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details', 'recall' => true, 'breakpoint' => 768]); ?>
  35  
  36          <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'details', Text::_('JDETAILS')); ?>
  37  
  38          <div class="row">
  39              <div class="col-lg-9">
  40                  <h2>
  41                      <?php echo Text::_($this->item->template); ?>
  42                  </h2>
  43                  <div class="info-labels">
  44                      <span class="badge bg-secondary">
  45                          <?php echo $this->item->client_id == 0 ? Text::_('JSITE') : Text::_('JADMINISTRATOR'); ?>
  46                      </span>
  47                  </div>
  48                  <div>
  49                      <p><?php echo Text::_($this->item->xml->description); ?></p>
  50                      <?php
  51                      $this->fieldset = 'description';
  52                      $description = LayoutHelper::render('joomla.edit.fieldset', $this);
  53                      ?>
  54                      <?php if ($description) : ?>
  55                          <p class="readmore">
  56                              <a href="#" onclick="document.querySelector('#tab-description').click();">
  57                                  <?php echo Text::_('JGLOBAL_SHOW_FULL_DESCRIPTION'); ?>
  58                              </a>
  59                          </p>
  60                      <?php endif; ?>
  61                  </div>
  62                  <?php
  63                  $this->fieldset = 'basic';
  64                  $html = LayoutHelper::render('joomla.edit.fieldset', $this);
  65                  echo $html ? '<hr>' . $html : '';
  66                  ?>
  67              </div>
  68              <div class="col-lg-3">
  69                  <?php
  70                  // Set main fields.
  71                  $this->fields = array(
  72                      'home',
  73                      'client_id',
  74                      'template'
  75                  );
  76                  ?>
  77                  <?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
  78                  <?php echo $this->form->renderField('inheritable'); ?>
  79                  <?php echo $this->form->renderField('parent'); ?>
  80              </div>
  81          </div>
  82          <?php echo HTMLHelper::_('uitab.endTab'); ?>
  83  
  84          <?php if ($description) : ?>
  85              <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'description', Text::_('JGLOBAL_FIELDSET_DESCRIPTION')); ?>
  86              <fieldset id="fieldset-description" class="options-form">
  87                  <legend><?php echo Text::_('JGLOBAL_FIELDSET_DESCRIPTION'); ?></legend>
  88                  <div>
  89                  <?php echo $description; ?>
  90                  </div>
  91              </fieldset>
  92              <?php echo HTMLHelper::_('uitab.endTab'); ?>
  93          <?php endif; ?>
  94  
  95          <?php
  96          $this->fieldsets = array();
  97          $this->ignore_fieldsets = array('basic', 'description');
  98          echo LayoutHelper::render('joomla.edit.params', $this);
  99          ?>
 100  
 101          <?php if ($user->authorise('core.edit', 'com_menus') && $this->item->client_id == 0 && $this->canDo->get('core.edit.state')) : ?>
 102              <?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'assignment', Text::_('COM_TEMPLATES_MENUS_ASSIGNMENT')); ?>
 103              <fieldset id="fieldset-assignment" class="options-form">
 104                  <legend><?php echo Text::_('COM_TEMPLATES_MENUS_ASSIGNMENT'); ?></legend>
 105                  <div>
 106                  <?php echo $this->loadTemplate('assignment'); ?>
 107                  </div>
 108              </fieldset>
 109              <?php echo HTMLHelper::_('uitab.endTab'); ?>
 110          <?php endif; ?>
 111  
 112          <?php echo HTMLHelper::_('uitab.endTabSet'); ?>
 113  
 114          <input type="hidden" name="task" value="">
 115          <?php echo HTMLHelper::_('form.token'); ?>
 116      </div>
 117  </form>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer