Skip to content

Commit

Permalink
Show updated at timestamp in module + template list
Browse files Browse the repository at this point in the history
  • Loading branch information
tadhgboyle committed Jan 16, 2022
1 parent 22526c5 commit ade5f9d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 deletions.
1 change: 1 addition & 0 deletions custom/languages/EnglishUK/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@
'module_disabled' => 'Module disabled.',
'author' => 'Author:',
'author_x' => 'Author: {x}', // Don't replace {x}
'updated_x' => 'Updated at: {x}', // Don't replace {x}
'module_outdated' => 'We have detected that this module is intended for Nameless version {x}, but you are running Nameless version {y}', // Don't replace "{x}" or "{y}"
'find_modules' => 'Find Modules',
'view_all_modules' => 'View all modules',
Expand Down
4 changes: 3 additions & 1 deletion custom/panel_templates/Default/core/modules.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
<strong>{$item.name}</strong> <small>{$item.latest_version}</small>
<br />
<small>{$item.author_x}</small>
<br />
<small>{$item.updated_x}</small>
</td>
<td>
<div class="star-rating view">
Expand Down Expand Up @@ -193,4 +195,4 @@

</body>

</html>
</html>
2 changes: 2 additions & 0 deletions custom/panel_templates/Default/core/panel_templates.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
<strong>{$item.name}</strong> <small>{$item.latest_version}</small>
<br />
<small>{$item.author_x}</small>
<br />
<small>{$item.updated_x}</small>
</td>
<td>
<div class="star-rating view">
Expand Down
2 changes: 2 additions & 0 deletions custom/panel_templates/Default/core/templates.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@
<strong>{$item.name}</strong> <small>{$item.latest_version}</small>
<br />
<small>{$item.author_x}</small>
<br />
<small>{$item.updated_x}</small>
</td>
<td>
<div class="star-rating view">
Expand Down
6 changes: 1 addition & 5 deletions modules/Core/pages/panel/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@
'description_short' => Util::truncate(Output::getPurified($item->description)),
'author' => Output::getClean($item->author),
'author_x' => str_replace('{x}', Output::getClean($item->author), $language->get('admin', 'author_x')),
'contributors' => Output::getClean($item->contributors),
'created' => $timeago->inWords(date('d M Y, H:i', $item->created), $language->getTimeLanguage()),
'created_full' => date('d M Y, H:i', $item->created),
'updated' => $timeago->inWords(date('d M Y, H:i', $item->updated), $language->getTimeLanguage()),
'updated_full' => date('d M Y, H:i', $item->updated),
'updated_x' => str_replace('{x}', date('d M Y, H:i', $item->updated), $language->get('admin', 'updated_x')),
'url' => Output::getClean($item->url),
'latest_version' => Output::getClean($item->latest_version),
'rating' => Output::getClean($item->rating),
Expand Down
6 changes: 1 addition & 5 deletions modules/Core/pages/panel/panel_templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@
'description_short' => Util::truncate(Output::getPurified($item->description)),
'author' => Output::getClean($item->author),
'author_x' => str_replace('{x}', Output::getClean($item->author), $language->get('admin', 'author_x')),
'contributors' => Output::getClean($item->contributors),
'created' => $timeago->inWords(date('d M Y, H:i', $item->created), $language->getTimeLanguage()),
'created_full' => date('d M Y, H:i', $item->created),
'updated' => $timeago->inWords(date('d M Y, H:i', $item->updated), $language->getTimeLanguage()),
'updated_full' => date('d M Y, H:i', $item->updated),
'updated_x' => str_replace('{x}', date('d M Y, H:i', $item->updated), $language->get('admin', 'updated_x')),
'url' => Output::getClean($item->url),
'latest_version' => Output::getClean($item->latest_version),
'rating' => Output::getClean($item->rating),
Expand Down
6 changes: 1 addition & 5 deletions modules/Core/pages/panel/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,7 @@
'description_short' => Util::truncate(Output::getPurified($item->description)),
'author' => Output::getClean($item->author),
'author_x' => str_replace('{x}', Output::getClean($item->author), $language->get('admin', 'author_x')),
'contributors' => Output::getClean($item->contributors),
'created' => $timeago->inWords(date('d M Y, H:i', $item->created), $language->getTimeLanguage()),
'created_full' => date('d M Y, H:i', $item->created),
'updated' => $timeago->inWords(date('d M Y, H:i', $item->updated), $language->getTimeLanguage()),
'updated_full' => date('d M Y, H:i', $item->updated),
'updated_x' => str_replace('{x}', date('d M Y, H:i', $item->updated), $language->get('admin', 'updated_x')),
'url' => Output::getClean($item->url),
'latest_version' => Output::getClean($item->latest_version),
'rating' => Output::getClean($item->rating),
Expand Down

0 comments on commit ade5f9d

Please sign in to comment.