A free, self-hostable news aggregator…
Move button to apply update outside the message
Marien Fressinauda3b5e72729be
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.phpindex 72244e9c7..78d636163 100644--- a/app/Controllers/updateController.php+++ b/app/Controllers/updateController.php@@ -11,6 +11,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {}Minz_View::prependTitle(_t('update_system') . ' · ');+ $this->view->update_to_apply = false;$this->view->last_update_time = 'unknown';$this->view->check_last_hour = false;$timestamp = (int)@file_get_contents(DATA_PATH . '/last_update.txt');@@ -29,10 +30,11 @@ class FreshRSS_update_Controller extends Minz_ActionController {);} elseif (file_exists(UPDATE_FILENAME)) {// There is an update file to apply!+ $this->view->update_to_apply = true;$this->view->message = array('status' => 'good','title' => _t('ok'),- 'body' => _t('update_can_apply', _url('update', 'apply'))+ 'body' => _t('update_can_apply'));}}diff --git a/app/i18n/en.php b/app/i18n/en.phpindex 562697585..f84593cb5 100644--- a/app/i18n/en.php+++ b/app/i18n/en.php@@ -428,7 +428,8 @@ return array ('update_system' => 'Update system','update_check' => 'Check for new updates','update_last' => 'Last verification: %s',- 'update_can_apply' => 'There is an available update. <a class="btn" href="%s">Apply</a>',+ 'update_can_apply' => 'There is an available update.',+ 'update_apply' => 'Apply','update_server_not_found' => 'Update server cannot be found. [%s]','no_update' => 'No update to apply','update_problem' => 'Update has encountered an error: %s',diff --git a/app/i18n/fr.php b/app/i18n/fr.phpindex 9516f66cb..da5819529 100644--- a/app/i18n/fr.php+++ b/app/i18n/fr.php@@ -428,7 +428,8 @@ return array ('update_system' => 'Système de mise à jour','update_check' => 'Vérifier les mises à jour','update_last' => 'Dernière vérification : %s',- 'update_can_apply' => 'Il y’a une mise à jour à appliquer. <a class="btn" href="%s">Appliquer la mise à jour</a>',+ 'update_can_apply' => 'Il y’a une mise à jour à appliquer.',+ 'update_apply' => 'Appliquer la mise à jour','update_server_not_found' => 'Le serveur de mise à jour n’a pas été trouvé. [%s]','no_update' => 'Aucune mise à jour à appliquer','update_problem' => 'La mise à jour a rencontré un problème : %s',diff --git a/app/views/update/index.phtml b/app/views/update/index.phtmlindex 5be8b1e8b..401f6acd6 100644--- a/app/views/update/index.phtml+++ b/app/views/update/index.phtml@@ -29,4 +29,8 @@<a href="<?php echo _url('update', 'check'); ?>" class="btn"><?php echo _t('update_check'); ?></a></p><?php } ?>++ <?php if ($this->update_to_apply) { ?>+ <a class="btn btn-important" href="<?php echo _url('update', 'apply'); ?>"><?php echo _t('update_apply'); ?></a>+ <?php } ?></div>