[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_newsfeeds/tmpl/newsfeeds/ -> modal.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_newsfeeds
   6   *
   7   * @copyright   (C) 2010 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\Multilanguage;
  16  use Joomla\CMS\Language\Text;
  17  use Joomla\CMS\Layout\LayoutHelper;
  18  use Joomla\CMS\Router\Route;
  19  use Joomla\Component\Newsfeeds\Site\Helper\RouteHelper;
  20  
  21  HTMLHelper::_('behavior.core');
  22  
  23  $app = Factory::getApplication();
  24  
  25  $function  = $app->input->getCmd('function', 'jSelectNewsfeed');
  26  $listOrder = $this->escape($this->state->get('list.ordering'));
  27  $listDirn  = $this->escape($this->state->get('list.direction'));
  28  $multilang = Multilanguage::isEnabled();
  29  ?>
  30  <div class="container-popup">
  31  
  32      <form action="<?php echo Route::_('index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component&function=' . $function); ?>" method="post" name="adminForm" id="adminForm">
  33  
  34          <?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
  35  
  36          <?php if (empty($this->items)) : ?>
  37              <div class="alert alert-info">
  38                  <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
  39                  <?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
  40              </div>
  41          <?php else : ?>
  42              <table class="table table-sm">
  43                  <caption class="visually-hidden">
  44                      <?php echo Text::_('COM_NEWSFEEDS_TABLE_CAPTION'); ?>,
  45                              <span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
  46                              <span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
  47                  </caption>
  48                  <thead>
  49                      <tr>
  50                          <th scope="col" class="w-1 text-center">
  51                              <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
  52                          </th>
  53                          <th scope="col" class="title">
  54                              <?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder); ?>
  55                          </th>
  56                          <th scope="col" class="w-15 d-none d-md-table-cell">
  57                              <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
  58                          </th>
  59                          <?php if ($multilang) : ?>
  60                              <th scope="col" class="w-15 d-none d-md-table-cell">
  61                                  <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?>
  62                              </th>
  63                          <?php endif; ?>
  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
  71                  $iconStates = array(
  72                      -2 => 'icon-trash',
  73                      0  => 'icon-times',
  74                      1  => 'icon-check',
  75                      2  => 'icon-folder',
  76                  );
  77                  ?>
  78                  <?php foreach ($this->items as $i => $item) : ?>
  79                      <?php if ($item->language && $multilang) {
  80                          $tag = strlen($item->language);
  81                          if ($tag == 5) {
  82                              $lang = substr($item->language, 0, 2);
  83                          } elseif ($tag == 6) {
  84                              $lang = substr($item->language, 0, 3);
  85                          } else {
  86                              $lang = '';
  87                          }
  88                      } elseif (!$multilang) {
  89                          $lang = '';
  90                      }
  91                      ?>
  92                      <tr class="row<?php echo $i % 2; ?>">
  93                          <td class="text-center">
  94                              <span class="tbody-icon">
  95                                  <span class="<?php echo $iconStates[$this->escape($item->published)]; ?>" aria-hidden="true"></span>
  96                              </span>
  97                          </td>
  98                          <th scope="row">
  99                              <a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function); ?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->name)); ?>', '<?php echo $this->escape($item->catid); ?>', null, '<?php echo $this->escape(RouteHelper::getNewsfeedRoute($item->id, $item->catid, $item->language)); ?>', '<?php echo $this->escape($lang); ?>', null);">
 100                              <?php echo $this->escape($item->name); ?></a>
 101                              <div class="small">
 102                                  <?php echo Text::_('JCATEGORY') . ': ' . $this->escape($item->category_title); ?>
 103                              </div>
 104                          </th>
 105                          <td class="small d-none d-md-table-cell">
 106                              <?php echo $this->escape($item->access_level); ?>
 107                          </td>
 108                          <?php if ($multilang) : ?>
 109                              <td class="small d-none d-md-table-cell">
 110                                  <?php echo LayoutHelper::render('joomla.content.language', $item); ?>
 111                              </td>
 112                          <?php endif; ?>
 113                          <td class="d-none d-md-table-cell">
 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          <input type="hidden" name="forcedLanguage" value="<?php echo $app->input->get('forcedLanguage', '', 'CMD'); ?>">
 129          <?php echo HTMLHelper::_('form.token'); ?>
 130  
 131      </form>
 132  </div>


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