Move cron status to the right of the heading

This commit is contained in:
kondou 2014-03-12 17:29:26 +01:00
parent 547b563464
commit c5440fa133
2 changed files with 22 additions and 18 deletions

View file

@ -167,6 +167,10 @@ table.shareAPI td { padding-bottom: 0.8em; }
width: 40px;
}
.cronlog {
margin-left: 10px;
}
.cronstatus {
display: inline-block;
height: 16px;

View file

@ -153,7 +153,24 @@ if (!$_['internetconnectionworking']) {
;?>
<fieldset class="personalblock" id="backgroundjobs">
<h2><?php p($l->t('Cron'));?></h2>
<h2 class="inlineblock"><?php p($l->t('Cron'));?></h2>
<?php if ($_['cron_log']): ?>
<p class="cronlog inlineblock">
<?php if ($_['lastcron'] !== false):
$human_time = date('Y-m-d H:i', $_['lastcron']) . " UTC";
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="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;
else: ?>
<span class="cronstatus error"></span>
<?php p($l->t("Cron was not executed yet!"));
endif; ?>
</p>
<?php endif; ?>
<p>
<input type="radio" name="mode" value="ajax"
id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") {
@ -178,23 +195,6 @@ if (!$_['internetconnectionworking']) {
<label for="backgroundjobs_cron">Cron</label><br/>
<em><?php p($l->t("Use systems cron service to call the cron.php file every 15 minutes.")); ?></em>
</p>
<?php if ($_['cron_log']): ?>
<p>
<?php if ($_['lastcron'] !== false):
$human_time = date('Y-m-d H:i', $_['lastcron']) . " UTC";
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="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;
else: ?>
<span class="cronstatus error"></span>
<?php p($l->t("Cron was not executed yet!"));
endif; ?>
</p>
<?php endif; ?>
</fieldset>
<fieldset class="personalblock" id="shareAPI">