diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-03-01 12:22:39 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-03-01 12:22:39 +0100 |
commit | a6f5d3e1e888f6c8ebe552dea97539707e06a009 (patch) | |
tree | aeea8c836d47ed5a79a75542d0348584a87aa954 | |
parent | 36a4ee27ba858b75a22989a5cddc1daa06693ed0 (diff) | |
parent | 97a624dba5f5b0d81f02f7942f72daee4282a6d1 (diff) | |
download | nextcloud-server-a6f5d3e1e888f6c8ebe552dea97539707e06a009.tar.gz nextcloud-server-a6f5d3e1e888f6c8ebe552dea97539707e06a009.zip |
Merge pull request #14614 from jakobsack/master
Show time difference of last cron run instead of absolute time
-rw-r--r-- | settings/js/admin.js | 2 | ||||
-rw-r--r-- | settings/templates/admin.php | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js index face18beef0..34bc2466048 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -39,6 +39,8 @@ $(document).ready(function(){ } ); }); + $('#backgroundjobs span.crondate').tipsy({fade: true, gravity: 's', live: true}); + $('#backgroundjobs input').change(function(){ if($(this).attr('checked')){ var mode = $(this).val(); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index a82d5ee8545..b7ea77a993b 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -236,14 +236,19 @@ if ($_['suggestedOverwriteCliUrl']) { <?php if ($_['cron_log']): ?> <p class="cronlog inlineblock"> <?php if ($_['lastcron'] !== false): - $human_time = OC_Util::formatDate($_['lastcron']); + $relative_time = relative_modified_date($_['lastcron']); + $absolute_time = OC_Util::formatDate($_['lastcron']); if (time() - $_['lastcron'] <= 3600): ?> <span class="cronstatus success"></span> - <?php p($l->t("Last cron was executed at %s.", array($human_time))); - else: ?> + <span class="crondate" original-title="<?php p($absolute_time);?>"> + <?php p($l->t("Last cron job execution: %s.", array($relative_time)));?> + </span> + <?php else: ?> <span class="cronstatus error"></span> - <?php p($l->t("Last cron was executed at %s. This is more than an hour ago, something seems wrong.", array($human_time))); - endif; + <span class="crondate" original-title="<?php p($absolute_time);?>"> + <?php p($l->t("Last cron job execution: %s. Something seems wrong.", array($relative_time)));?> + </span> + <?php endif; else: ?> <span class="cronstatus error"></span> <?php p($l->t("Cron was not executed yet!")); |