summaryrefslogtreecommitdiff
path: root/modules/gallery/views/upgrade_checker_block.html.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-01-16 22:16:09 -0800
committerBharat Mediratta <bharat@menalto.com>2011-01-16 22:16:09 -0800
commit70abfb2a20734802c922c0e9917d2a1778aef3f2 (patch)
treefb8371b9c03da2eca3501372d330a53430fff7b9 /modules/gallery/views/upgrade_checker_block.html.php
parent84d576606d709dcccef2549fdb926d47494a876c (diff)
Upgrade checking code is now here, along with a bump of the Gallery
module to v46. There's a new block in the admin dashboard which controls whether automatic checking happens, and lets you check immediately. If a newer version is detected, a site status message appears for admins providing upgrade instructions. Automatic checking is not yet implemented (even though the UI claims that it exists). This is all for #1605.
Diffstat (limited to 'modules/gallery/views/upgrade_checker_block.html.php')
-rw-r--r--modules/gallery/views/upgrade_checker_block.html.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/modules/gallery/views/upgrade_checker_block.html.php b/modules/gallery/views/upgrade_checker_block.html.php
new file mode 100644
index 00000000..30e18305
--- /dev/null
+++ b/modules/gallery/views/upgrade_checker_block.html.php
@@ -0,0 +1,45 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<p>
+ <?= t("Gallery can check to see if there is a new version available for you to use. It is a good idea to upgrade your Gallery to get the latest features and security fixes. Your privacy is important so no information about your Gallery is shared during this process. You can disable this feature below.") ?>
+</p>
+
+<p>
+ <? if (gallery::RELEASE_CHANNEL == "release"): ?>
+ <?= t("You are using the official Gallery %version release, code named <i>%code_name</i>.", array("version" => gallery::VERSION, "code_name" => gallery::CODE_NAME)) ?>
+ <? else: ?>
+ <?= t("You are using an experimental snapshot of Gallery %version (build %build_number on branch %branch).", array("version" => gallery::VERSION, "branch" => gallery::RELEASE_BRANCH, "build_number" => gallery::build_number())) ?>
+ <? endif ?>
+</p>
+
+<p>
+ <a class="g-button ui-state-default ui-corner-all"
+ href="<?= url::site("admin/upgrade_checker/check_now?csrf=$csrf") ?>">
+ <?= t("Check now") ?>
+ </a>
+ <? if ($auto_check_enabled): ?>
+ <a class="g-button ui-state-default ui-corner-all"
+ href="<?= url::site("admin/upgrade_checker/set_auto/0?csrf=$csrf") ?>">
+ <?= t("Disable automatic checking") ?>
+ </a>
+ <? else: ?>
+ <a class="g-button ui-state-default ui-corner-all"
+ href="<?= url::site("admin/upgrade_checker/set_auto/1?csrf=$csrf") ?>">
+ <?= t("Enable automatic checking") ?>
+ </a>
+ <? endif ?>
+</p>
+
+<p class="g-text-small">
+ <? if ($auto_check_enabled): ?>
+ <?= t("Automatic upgrade checking is enabled.") ?>
+ <? else: ?>
+ <?= t("Automatic upgrade checking is disabled.") ?>
+ <? endif ?>
+ <? if (!$version_info): ?>
+ <?= t("No upgrade checks have been made yet.") ?>
+ <? else: ?>
+ <?= t("The last upgrade check was made on %date.",
+ array("date" => gallery::date_time($version_info->timestamp))) ?>
+ <? endif ?>
+</p>
+