Skip to content

Commit

Permalink
Add version info in admin page
Browse files Browse the repository at this point in the history
This adds version information in the administration area, with a hint towards possible new releases.

Helps moonmoon#30.

Should the version also appear in the public signature at the signature of the index page?
  • Loading branch information
rdalverny committed Jan 5, 2022
1 parent ee9c408 commit 303d6b5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions admin/administration.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

HTML;

$repo_url = 'https://github.com/moonmoon/moonmoon';
$releases_url = "$repo_url/releases";
$link_url = "<a href='$releases_url'>$releases_url</a>";
$version_action = str_replace('%s', $link_url, $l10n->getString('Check for a more recent release from %s.'));

$page_content = <<<"FRAGMENT"

<div class="widget">
Expand All @@ -38,6 +43,12 @@
</form>
</div>
<div class="widget">
<h3>{$l10n->getString('Version')} $moon_version </h3>
<form>
<p>{$version_action}</p>
</form>
</div>
FRAGMENT;

$footer_extra = '';
Expand Down

0 comments on commit 303d6b5

Please sign in to comment.