aboutsummaryrefslogtreecommitdiff
path: root/app/views/importExport
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-03-16 19:34:04 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-03-16 19:34:04 +0100
commitdbdda1d0c19b48d06b30879e8fe78679f79cc0c4 (patch)
tree28cca8318b5887f74d1b42a9631e806c2455e7f4 /app/views/importExport
parent7bbd6133af93238dce759016df7f661a7cfbffed (diff)
Move import/export operations into an independant class
- import and export are now two methods of importExportController - "opml" has been removed from the title
Diffstat (limited to 'app/views/importExport')
-rw-r--r--app/views/importExport/export.phtml15
-rw-r--r--app/views/importExport/index.phtml23
2 files changed, 38 insertions, 0 deletions
diff --git a/app/views/importExport/export.phtml b/app/views/importExport/export.phtml
new file mode 100644
index 000000000..2e66e5054
--- /dev/null
+++ b/app/views/importExport/export.phtml
@@ -0,0 +1,15 @@
+<?php
+require_once(LIB_PATH . '/lib_opml.php');
+
+echo '<?xml version="1.0" encoding="UTF-8" ?>';
+?>
+<!-- Generated by <?php echo Minz_Configuration::title (); ?> -->
+<opml version="2.0">
+ <head>
+ <title><?php echo Minz_Configuration::title (); ?> OPML Feed</title>
+ <dateCreated><?php echo date('D, d M Y H:i:s'); ?></dateCreated>
+ </head>
+ <body>
+<?php echo opml_export ($this->categories); ?>
+ </body>
+</opml>
diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml
new file mode 100644
index 000000000..c7db752a7
--- /dev/null
+++ b/app/views/importExport/index.phtml
@@ -0,0 +1,23 @@
+<?php $this->partial ('aside_feed'); ?>
+
+<div class="post ">
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
+
+ <form method="post" action="<?php echo _url('importExport', 'import'); ?>" enctype="multipart/form-data">
+ <legend><?php echo Minz_Translate::t ('import_export'); ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="file"><?php echo Minz_Translate::t ('file_to_import'); ?></label>
+ <div class="group-controls">
+ <input type="file" name="file" id="file" />
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('import'); ?></button>
+ <?php echo Minz_Translate::t ('or'); ?>
+ <a target="_blank" class="btn btn-important" href="<?php echo _url ('importExport', 'export'); ?>"><?php echo Minz_Translate::t ('export'); ?></a>
+ </div>
+ </div>
+ </form>
+</div>