diff options
| author | 2014-09-17 13:26:32 +0200 | |
|---|---|---|
| committer | 2014-09-17 13:26:32 +0200 | |
| commit | a3b5e72729be08f79585c782d497f49edd11c064 (patch) | |
| tree | df9f198519b2d54a3333907668e8e1c770c24e7b /app | |
| parent | 6e140d82b033e1304d7495d990ec0295fa7ffaa1 (diff) | |
Move button to apply update outside the message
Diffstat (limited to 'app')
| -rw-r--r-- | app/Controllers/updateController.php | 4 | ||||
| -rw-r--r-- | app/i18n/en.php | 3 | ||||
| -rw-r--r-- | app/i18n/fr.php | 3 | ||||
| -rw-r--r-- | app/views/update/index.phtml | 4 |
4 files changed, 11 insertions, 3 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php index 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.php index 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.php index 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.phtml index 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> |
