[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_privacy/tmpl/requests/ -> default.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_privacy
   6   *
   7   * @copyright   (C) 2018 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\Date\Date;
  14  use Joomla\CMS\Factory;
  15  use Joomla\CMS\HTML\HTMLHelper;
  16  use Joomla\CMS\Language\Text;
  17  use Joomla\CMS\Layout\LayoutHelper;
  18  use Joomla\CMS\Router\Route;
  19  use Joomla\CMS\String\PunycodeHelper;
  20  
  21  /** @var \Joomla\Component\Privacy\Administrator\View\Request\HtmlView $this */
  22  
  23  /** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
  24  $wa = $this->document->getWebAssetManager();
  25  $wa->useScript('table.columns')
  26      ->useScript('multiselect');
  27  
  28  $user      = Factory::getUser();
  29  $listOrder = $this->escape($this->state->get('list.ordering'));
  30  $listDirn  = $this->escape($this->state->get('list.direction'));
  31  $now       = Factory::getDate();
  32  
  33  $urgentRequestDate = clone $now;
  34  $urgentRequestDate->sub(new DateInterval('P' . $this->urgentRequestAge . 'D'));
  35  
  36  ?>
  37  <form action="<?php echo Route::_('index.php?option=com_privacy&view=requests'); ?>" method="post" name="adminForm" id="adminForm">
  38      <div id="j-main-container">
  39          <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
  40          <?php if (empty($this->items)) : ?>
  41              <div class="alert alert-info">
  42                  <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
  43                  <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
  44              </div>
  45          <?php else : ?>
  46              <table class="table" id="requestList">
  47                  <caption class="visually-hidden">
  48                      <?php echo Text::_('COM_PRIVACY_TABLE_CAPTION'); ?>,
  49                              <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
  50                              <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
  51                  </caption>
  52                  <thead>
  53                      <tr>
  54                          <th scope="col" class="w-5 text-center">
  55                              <?php echo Text::_('COM_PRIVACY_HEADING_ACTIONS'); ?>
  56                          </th>
  57                          <th scope="col" class="w-5 text-center">
  58                              <?php echo Text::_('JSTATUS'); ?>
  59                          </th>
  60                          <th scope="col">
  61                              <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_EMAIL', 'a.email', $listDirn, $listOrder); ?>
  62                          </th>
  63                          <th scope="col" class="w-10">
  64                              <?php echo HTMLHelper::_('searchtools.sort', 'COM_PRIVACY_HEADING_REQUEST_TYPE', 'a.request_type', $listDirn, $listOrder); ?>
  65                          </th>
  66                          <th scope="col" class="w-15">
  67                              <?php echo HTMLHelper::_('searchtools.sort', 'COM_PRIVACY_HEADING_REQUESTED_AT', 'a.requested_at', $listDirn, $listOrder); ?>
  68                          </th>
  69                          <th scope="col" class="w-1">
  70                              <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
  71                          </th>
  72                      </tr>
  73                  </thead>
  74                  <tbody>
  75                      <?php foreach ($this->items as $i => $item) : ?>
  76                          <?php
  77                          $itemRequestedAt = new Date($item->requested_at);
  78                          ?>
  79                          <tr>
  80                              <td class="text-center">
  81                                  <div class="btn-group">
  82                                      <?php if ($item->status == 1 && $item->request_type === 'export') : ?>
  83                                          <a class="btn tbody-icon" href="<?php echo Route::_('index.php?option=com_privacy&task=request.export&format=xml&id=' . (int) $item->id); ?>" title="<?php echo Text::_('COM_PRIVACY_ACTION_EXPORT_DATA'); ?>"><span class="icon-download" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('COM_PRIVACY_ACTION_EXPORT_DATA'); ?></span></a>
  84                                          <?php if ($this->sendMailEnabled) : ?>
  85                                              <a class="btn tbody-icon" href="<?php echo Route::_('index.php?option=com_privacy&task=request.emailexport&id=' . (int) $item->id . '&' . Factory::getSession()->getFormToken() . '=1'); ?>" title="<?php echo Text::_('COM_PRIVACY_ACTION_EMAIL_EXPORT_DATA'); ?>"><span class="icon-mail" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('COM_PRIVACY_ACTION_EMAIL_EXPORT_DATA'); ?></span></a>
  86                                          <?php endif; ?>
  87                                      <?php endif; ?>
  88                                      <?php if ($item->status == 1 && $item->request_type === 'remove') : ?>
  89                                          <a class="btn tbody-icon" href="<?php echo Route::_('index.php?option=com_privacy&task=request.remove&id=' . (int) $item->id . '&' . Factory::getSession()->getFormToken() . '=1'); ?>" title="<?php echo Text::_('COM_PRIVACY_ACTION_DELETE_DATA'); ?>"><span class="icon-times" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('COM_PRIVACY_ACTION_DELETE_DATA'); ?></span></a>
  90                                      <?php endif; ?>
  91                                  </div>
  92                              </td>
  93                              <td class="text-center">
  94                                  <?php echo HTMLHelper::_('privacy.statusLabel', $item->status); ?>
  95                              </td>
  96                              <th scope="row">
  97                                  <?php if ($item->status == 1 && $urgentRequestDate >= $itemRequestedAt) : ?>
  98                                      <span class="float-end badge bg-danger"><?php echo Text::_('COM_PRIVACY_BADGE_URGENT_REQUEST'); ?></span>
  99                                  <?php endif; ?>
 100                                  <a href="<?php echo Route::_('index.php?option=com_privacy&view=request&id=' . (int) $item->id); ?>" title="<?php echo Text::_('COM_PRIVACY_ACTION_VIEW'); ?>">
 101                                      <?php echo PunycodeHelper::emailToUTF8($this->escape($item->email)); ?>
 102                                  </a>
 103                              </th>
 104                              <td>
 105                                  <?php echo Text::_('COM_PRIVACY_HEADING_REQUEST_TYPE_TYPE_' . $item->request_type); ?>
 106                              </td>
 107                              <td>
 108                                  <?php echo HTMLHelper::_('date.relative', $itemRequestedAt, null, $now); ?>
 109                                  <div class="small">
 110                                      <?php echo HTMLHelper::_('date', $item->requested_at, Text::_('DATE_FORMAT_LC6')); ?>
 111                                  </div>
 112                              </td>
 113                              <td>
 114                                  <?php echo (int) $item->id; ?>
 115                              </td>
 116                          </tr>
 117                      <?php endforeach; ?>
 118                  </tbody>
 119              </table>
 120  
 121              <?php // load the pagination. ?>
 122              <?php echo $this->pagination->getListFooter(); ?>
 123  
 124          <?php endif; ?>
 125  
 126          <input type="hidden" name="task" value="" />
 127          <input type="hidden" name="boxchecked" value="0" />
 128          <?php echo HTMLHelper::_('form.token'); ?>
 129      </div>
 130  </form>


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