[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_users/tmpl/notes/ -> default.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_users
   6   *
   7   * @copyright   (C) 2011 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('table.columns')
  22      ->useScript('multiselect');
  23  
  24  $user       = Factory::getUser();
  25  $listOrder  = $this->escape($this->state->get('list.ordering'));
  26  $listDirn   = $this->escape($this->state->get('list.direction'));
  27  
  28  ?>
  29  <form action="<?php echo Route::_('index.php?option=com_users&view=notes'); ?>" method="post" name="adminForm" id="adminForm">
  30      <div class="row">
  31          <div class="col-md-12">
  32              <div id="j-main-container" class="j-main-container">
  33                  <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
  34  
  35                  <?php if (empty($this->items)) : ?>
  36                      <div class="alert alert-info">
  37                          <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
  38                          <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
  39                      </div>
  40                  <?php else : ?>
  41                  <table class="table">
  42                      <caption class="visually-hidden">
  43                          <?php echo Text::_('COM_USERS_NOTES_TABLE_CAPTION'); ?>,
  44                              <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
  45                              <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
  46                      </caption>
  47                      <thead>
  48                          <tr>
  49                              <td class="w-1 text-center">
  50                                  <?php echo HTMLHelper::_('grid.checkall'); ?>
  51                              </td>
  52                              <th scope="col" class="w-1 text-center">
  53                                  <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
  54                              </th>
  55                              <th scope="col">
  56                                  <?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_SUBJECT', 'a.subject', $listDirn, $listOrder); ?>
  57                              </th>
  58                              <th scope="col" class="w-20 d-none d-md-table-cell">
  59                                  <?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_USER', 'u.name', $listDirn, $listOrder); ?>
  60                              </th>
  61                              <th scope="col" class="w-10 d-none d-md-table-cell">
  62                                  <?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_REVIEW', 'a.review_time', $listDirn, $listOrder); ?>
  63                              </th>
  64                              <th scope="col" class="w-1 d-none d-md-table-cell">
  65                                  <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
  66                              </th>
  67                          </tr>
  68                      </thead>
  69                      <tbody>
  70                      <?php foreach ($this->items as $i => $item) :
  71                          $canEdit    = $user->authorise('core.edit', 'com_users.category.' . $item->catid);
  72                          $canCheckin = $user->authorise('core.admin', 'com_checkin') || $item->checked_out == $user->get('id') || is_null($item->checked_out);
  73                          $canChange  = $user->authorise('core.edit.state', 'com_users.category.' . $item->catid) && $canCheckin;
  74                          $subject    = $item->subject ?: Text::_('COM_USERS_EMPTY_SUBJECT');
  75                          ?>
  76                          <tr class="row<?php echo $i % 2; ?>">
  77                              <td class="text-center checklist">
  78                                  <?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $subject); ?>
  79                              </td>
  80                              <td class="text-center">
  81                                  <?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'notes.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
  82                              </td>
  83                              <th scope="row">
  84                                  <?php if ($item->checked_out) : ?>
  85                                      <?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'notes.', $canCheckin); ?>
  86                                  <?php endif; ?>
  87                                  <?php $subject = $item->subject ?: Text::_('COM_USERS_EMPTY_SUBJECT'); ?>
  88                                  <?php if ($canEdit) : ?>
  89                                      <a href="<?php echo Route::_('index.php?option=com_users&task=note.edit&id=' . $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($subject); ?>">
  90                                          <?php echo $this->escape($subject); ?></a>
  91                                  <?php else : ?>
  92                                      <?php echo $this->escape($subject); ?>
  93                                  <?php endif; ?>
  94                                  <div class="small">
  95                                      <?php echo Text::_('JCATEGORY') . ': ' . $this->escape($item->category_title); ?>
  96                                  </div>
  97                              </th>
  98                              <td class="d-none d-md-table-cell">
  99                                  <?php echo $this->escape($item->user_name); ?>
 100                              </td>
 101                              <td class="d-none d-md-table-cell">
 102                                  <?php if ($item->review_time !== null) : ?>
 103                                      <?php echo HTMLHelper::_('date', $item->review_time, Text::_('DATE_FORMAT_LC4')); ?>
 104                                  <?php else : ?>
 105                                      <?php echo Text::_('COM_USERS_EMPTY_REVIEW'); ?>
 106                                  <?php endif; ?>
 107                              </td>
 108                              <td class="d-none d-md-table-cell">
 109                                  <?php echo (int) $item->id; ?>
 110                              </td>
 111                          </tr>
 112                      <?php endforeach; ?>
 113                      </tbody>
 114                  </table>
 115  
 116                      <?php // load the pagination. ?>
 117                      <?php echo $this->pagination->getListFooter(); ?>
 118  
 119                  <?php endif; ?>
 120  
 121                  <div>
 122                      <input type="hidden" name="task" value="">
 123                      <input type="hidden" name="boxchecked" value="0">
 124                      <?php echo HTMLHelper::_('form.token'); ?>
 125                  </div>
 126              </div>
 127          </div>
 128      </div>
 129  </form>


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