summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-08-10 10:55:51 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-08-10 10:55:51 +0200
commit9a5d6245fbeb413766362fd6b2c4f5f5b6a22a22 (patch)
treec6171aa9ba1cb6c52261ac39392ff2ffb2e17a58 /app/views
parent7ed111b1bf152613d17254808a4fcf89f5774297 (diff)
Improve update API
Update script must implement 4 functions: - apply_update() to perform the update (most important). Return true if all is ok, else false. - need_info_update() returns true if we need more info for update, else false. If this function always returns false, you don't need to implement following functions (but it's better to not forget) - ask_info_update() should be a HTML form to ask infos. Method must be post and action must point to _url('update', 'apply') (or leave it blank) - save_info_update() is called for POST requests (to save form from ask_info_update())
Diffstat (limited to 'app/views')
-rw-r--r--app/views/update/apply.phtml9
-rw-r--r--app/views/update/index.phtml2
2 files changed, 11 insertions, 0 deletions
diff --git a/app/views/update/apply.phtml b/app/views/update/apply.phtml
new file mode 100644
index 000000000..d7ea466c5
--- /dev/null
+++ b/app/views/update/apply.phtml
@@ -0,0 +1,9 @@
+<?php $this->partial('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
+
+ <h1><?php echo _t('update_system'); ?></h1>
+
+ <?php ask_info_update(); ?>
+</div> \ No newline at end of file
diff --git a/app/views/update/index.phtml b/app/views/update/index.phtml
index 8f6ee6269..1824c02b8 100644
--- a/app/views/update/index.phtml
+++ b/app/views/update/index.phtml
@@ -1,6 +1,8 @@
<?php $this->partial('aside_configure'); ?>
<div class="post">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
+
<h1><?php echo _t('update_system'); ?></h1>
<?php if (!empty($this->message)) { ?>