- md5
- 1d43b40779714d69380125d7d90fd96c
- sha1
- 3c430973fc0f42590792602709ea285b5b6d626a
- sha256
- 76e45da71213569ad89695755fa3c57abcfeb8257e86d098dd983dc87c4e59bf
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_popular
*
* @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;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
$moduleId = str_replace(' ', '', $module->title) . $module->id;
?>
<?php if ($record_hits === 0) : ?>
<?php echo LayoutHelper::render('joomla.content.emptystate_module', [
'title' => 'JGLOBAL_RECORD_HITS_DISABLED',
'icon' => 'icon-minus-circle',
]); ?>
<?php else : ?>
<?php if (\count($list)) : ?>
<table class="table" id="<?php echo str_replace(' ', '', $module->title) . $module->id; ?>">
<caption class="visually-hidden"><?php echo $module->title; ?></caption>
<thead>
<tr>
<th scope="col" class="w-60"><?php echo Text::_('JGLOBAL_TITLE'); ?></th>
<th scope="col" class="w-20"><?php echo Text::_('JGLOBAL_HITS'); ?></th>
<th scope="col" class="w-20"><?php echo Text::_('JDATE'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($list as $i => $item) : ?>
<?php // Calculate popular items ?>
<?php $hits = (int) $item->hits; ?>
<?php $hits_class = ($hits >= 10000 ? 'danger' : ($hits >= 1000 ? 'warning' : ($hits >= 100 ? 'info' : 'secondary'))); ?>
<tr>
<th scope="row">
<?php if ($item->checked_out) : ?>
<?php echo HTMLHelper::_('jgrid.checkedout', $moduleId . $i, $item->editor, $item->checked_out_time); ?>
<?php endif; ?>
<?php if ($item->link) : ?>
<a href="<?php echo $item->link; ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>">
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>
</a>
<?php else : ?>
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>
<?php endif; ?>
</th>
<td>
<span class="badge bg-<?php echo $hits_class; ?>"><?php echo $item->hits; ?></span>
</td>
<td>
<?php echo HTMLHelper::_('date', $item->publish_up, Text::_('DATE_FORMAT_LC4')); ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else : ?>
<?php
// If there are no articles to display, show empty state.
$app->getLanguage()->load('com_content');
echo LayoutHelper::render('joomla.content.emptystate_module', [
'textPrefix' => 'COM_CONTENT',
'icon' => 'icon-copy',
]);
?>
<?php endif; ?>
<?php endif; ?>
The same content is in 39 releases, Joomla 6.0.0-beta1 to 6.2.0-beta1. See them all, or every version of this file.