Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Admin Module Latest #43216

Merged
merged 10 commits into from
Apr 30, 2024
2 changes: 2 additions & 0 deletions administrator/language/en-GB/mod_latest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ MOD_LATEST_FIELD_VALUE_AUTHORS_BY_ME="Added or modified by me"
MOD_LATEST_FIELD_VALUE_AUTHORS_NOT_BY_ME="Not added or modified by me"
MOD_LATEST_FIELD_VALUE_ORDERING_ADDED="Recently Added First"
MOD_LATEST_FIELD_VALUE_ORDERING_MODIFIED="Recently Modified First"
MOD_LATEST_HEADING_DATE_CREATED="Date Created"
MOD_LATEST_HEADING_DATE_MODIFIED="Date Modified"
MOD_LATEST_LATEST_ITEMS="Latest Items"
MOD_LATEST_NO_MATCHING_RESULTS="No Matching Results"
MOD_LATEST_TITLE="Recently Created Articles"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function getList(Registry $params, ArticlesModel $model)
$user = Factory::getUser();

// Set List SELECT
$model->setState('list.select', 'a.id, a.title, a.checked_out, a.checked_out_time, ' .
$model->setState('list.select', 'a.id, a.title, a.checked_out, a.checked_out_time, a.modified,' .
' a.access, a.created, a.created_by, a.created_by_alias, a.featured, a.state, a.publish_up, a.publish_down');

// Set Ordering filter
Expand Down
7 changes: 5 additions & 2 deletions administrator/modules/mod_latest/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
<th scope="col" class="w-20"><?php echo Text::_('JSTAGE'); ?></th>
<?php endif; ?>
<th scope="col" class="w-20"><?php echo Text::_('JAUTHOR'); ?></th>
<th scope="col" class="w-20"><?php echo Text::_('JDATE'); ?></th>
<th scope="col" class="w-20">
<?php echo ($params->get('ordering', 'c_dsc') == 'm_dsc') ? Text::_('MOD_LATEST_HEADING_DATE_MODIFIED') : Text::_('MOD_LATEST_HEADING_DATE_CREATED'); ?>
</th>

</tr>
brianteeman marked this conversation as resolved.
Show resolved Hide resolved
</thead>
<tbody>
Expand Down Expand Up @@ -53,7 +56,7 @@
<?php echo $item->author_name; ?>
</td>
<td>
<?php echo HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC4')); ?>
<?php echo ($params->get('ordering', 'c_dsc') == 'm_dsc') ? HTMLHelper::_('date', $item->modified, Text::_('DATE_FORMAT_LC4')) : HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC4')); ?>
</td>
</tr>
<?php endforeach; ?>
Expand Down