aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-05-13 21:03:32 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-05-13 21:03:32 +0200
commita86a51cca69b7256d3a8dcf1c68447b6d5abe917 (patch)
treeb461e144d54656fb3c2c95aee96d6303cf6fa12c /app/views
parent88fa624a02d0346c2eb9173b1e9a02fc38b56d50 (diff)
parente763cd407a57e4829c2b6ffbddb164e5676670d7 (diff)
Merge branch 'dev' into 320-template
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/categorize.phtml4
-rw-r--r--app/views/configure/display.phtml118
-rw-r--r--app/views/configure/importExport.phtml40
-rw-r--r--app/views/configure/reading.phtml125
-rw-r--r--app/views/configure/sharing.phtml75
-rw-r--r--app/views/configure/shortcut.phtml9
-rw-r--r--app/views/configure/users.phtml39
-rw-r--r--app/views/feed/add.phtml91
-rw-r--r--app/views/helpers/export/articles.phtml47
-rw-r--r--app/views/helpers/export/opml.phtml28
-rw-r--r--app/views/helpers/javascript_vars.phtml7
-rw-r--r--app/views/helpers/view/normal_view.phtml77
-rwxr-xr-xapp/views/helpers/view/rss_view.phtml2
-rw-r--r--app/views/importExport/index.phtml52
-rw-r--r--app/views/index/index.phtml6
15 files changed, 444 insertions, 276 deletions
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml
index a564e8cdd..c0171d2dc 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/configure/categorize.phtml
@@ -17,11 +17,11 @@
<input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
<?php if ($cat->nbFeed () > 0) { ?>
- <a class="confirm" href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Minz_Translate::t ('ask_empty'); ?></a>
+ <button type="submit" class="btn btn-attention confirm" formaction="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Minz_Translate::t ('ask_empty'); ?></button>
<?php } ?>
(<?php echo Minz_Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
- <?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
+ <?php if ($cat->id () === $this->defaultCategory->id ()) { ?>
<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('can_not_be_deleted'); ?>
<?php } ?>
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 9104e4ef1..5a94376ad 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -4,7 +4,7 @@
<a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
<form method="post" action="<?php echo _url ('configure', 'display'); ?>">
- <legend><?php echo Minz_Translate::t ('theme'); ?></legend>
+ <legend><?php echo Minz_Translate::t ('display_configuration'); ?></legend>
<div class="form-group">
<label class="group-name" for="language"><?php echo Minz_Translate::t ('language'); ?></label>
@@ -35,122 +35,8 @@
</div>
</div>
- <div class="form-group form-actions">
- <div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
- <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
- </div>
- </div>
-
- <legend><?php echo Minz_Translate::t ('reading_configuration'); ?></legend>
-
- <div class="form-group">
- <label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('articles_per_page'); ?></label>
- <div class="group-controls">
- <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" />
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="sort_order"><?php echo Minz_Translate::t ('sort_order'); ?></label>
- <div class="group-controls">
- <select name="sort_order" id="sort_order">
- <option value="DESC"<?php echo $this->conf->sort_order === 'DESC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('newer_first'); ?></option>
- <option value="ASC"<?php echo $this->conf->sort_order === 'ASC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('older_first'); ?></option>
- </select>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="view_mode"><?php echo Minz_Translate::t ('default_view'); ?></label>
- <div class="group-controls">
- <select name="view_mode" id="view_mode">
- <option value="normal"<?php echo $this->conf->view_mode === 'normal' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('normal_view'); ?></option>
- <option value="reader"<?php echo $this->conf->view_mode === 'reader' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('reader_view'); ?></option>
- <option value="global"<?php echo $this->conf->view_mode === 'global' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('global_view'); ?></option>
- </select>
- <label class="radio" for="radio_all">
- <input type="radio" name="default_view" id="radio_all" value="all"<?php echo $this->conf->default_view === 'all' ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('show_all_articles'); ?>
- </label>
- <label class="radio" for="radio_not_read">
- <input type="radio" name="default_view" id="radio_not_read" value="not_read"<?php echo $this->conf->default_view === 'not_read' ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('show_not_reads'); ?>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <div class="group-controls">
- <label class="checkbox" for="auto_load_more">
- <input type="checkbox" name="auto_load_more" id="auto_load_more" value="1"<?php echo $this->conf->auto_load_more ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('auto_load_more'); ?>
- <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <div class="group-controls">
- <label class="checkbox" for="display_posts">
- <input type="checkbox" name="display_posts" id="display_posts" value="1"<?php echo $this->conf->display_posts ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('display_articles_unfolded'); ?>
- <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <div class="group-controls">
- <label class="checkbox" for="lazyload">
- <input type="checkbox" name="lazyload" id="lazyload" value="1"<?php echo $this->conf->lazyload ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('img_with_lazyload'); ?>
- <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('auto_read_when'); ?></label>
- <div class="group-controls">
- <label class="checkbox" for="check_open_article">
- <input type="checkbox" name="mark_open_article" id="check_open_article" value="1"<?php echo $this->conf->mark_when['article'] ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('article_selected'); ?>
- </label>
- <label class="checkbox" for="check_open_site">
- <input type="checkbox" name="mark_open_site" id="check_open_site" value="1"<?php echo $this->conf->mark_when['site'] ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('article_open_on_website'); ?>
- </label>
- <label class="checkbox" for="check_scroll">
- <input type="checkbox" name="mark_scroll" id="check_scroll" value="1"<?php echo $this->conf->mark_when['scroll'] ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('scroll'); ?>
- </label>
- <label class="checkbox" for="check_reception">
- <input type="checkbox" name="mark_upon_reception" id="check_reception" value="1"<?php echo $this->conf->mark_when['reception'] ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('upon_reception'); ?>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('after_onread'); ?></label>
- <div class="group-controls">
- <label class="checkbox" for="onread_jump_next">
- <input type="checkbox" name="onread_jump_next" id="onread_jump_next" value="1"<?php echo $this->conf->onread_jump_next ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ('jump_next'); ?>
- </label>
- </div>
- </div>
-
- <div class="form-group form-actions">
- <div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
- <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
- </div>
- </div>
-
- <legend><?php echo Minz_Translate::t ('reading_icons'); ?></legend>
<div class="form-group">
+ <label class="group-name" for="theme"><?php echo Minz_Translate::t ('article_icons'); ?></label>
<table>
<thead>
<tr>
diff --git a/app/views/configure/importExport.phtml b/app/views/configure/importExport.phtml
deleted file mode 100644
index e2217d9ed..000000000
--- a/app/views/configure/importExport.phtml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-require_once(LIB_PATH . '/lib_opml.php');
-if ($this->req == 'export') {
- 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>
-<?php } else { ?>
-<?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 Minz_Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'import'))); ?>" enctype="multipart/form-data">
- <legend><?php echo Minz_Translate::t ('import_export_opml'); ?></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 ('configure', 'importExport', 'q', 'export'); ?>"><?php echo Minz_Translate::t ('export'); ?></a>
- </div>
- </div>
- </form>
-</div>
-<?php } ?>
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml
new file mode 100644
index 000000000..456ab9522
--- /dev/null
+++ b/app/views/configure/reading.phtml
@@ -0,0 +1,125 @@
+<?php $this->partial ('aside_configure'); ?>
+
+<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 ('configure', 'reading'); ?>">
+ <legend><?php echo Minz_Translate::t ('reading_configuration'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('articles_per_page'); ?></label>
+ <div class="group-controls">
+ <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="sort_order"><?php echo Minz_Translate::t ('sort_order'); ?></label>
+ <div class="group-controls">
+ <select name="sort_order" id="sort_order">
+ <option value="DESC"<?php echo $this->conf->sort_order === 'DESC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('newer_first'); ?></option>
+ <option value="ASC"<?php echo $this->conf->sort_order === 'ASC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('older_first'); ?></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="view_mode"><?php echo Minz_Translate::t ('default_view'); ?></label>
+ <div class="group-controls">
+ <select name="view_mode" id="view_mode">
+ <option value="normal"<?php echo $this->conf->view_mode === 'normal' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('normal_view'); ?></option>
+ <option value="reader"<?php echo $this->conf->view_mode === 'reader' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('reader_view'); ?></option>
+ <option value="global"<?php echo $this->conf->view_mode === 'global' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('global_view'); ?></option>
+ </select>
+ <label class="radio" for="radio_all">
+ <input type="radio" name="default_view" id="radio_all" value="<?php echo FreshRSS_Entry::STATE_ALL; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_ALL ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('show_all_articles'); ?>
+ </label>
+ <label class="radio" for="radio_not_read">
+ <input type="radio" name="default_view" id="radio_not_read" value="<?php echo FreshRSS_Entry::STATE_NOT_READ; ?>"<?php echo $this->conf->default_view === FreshRSS_Entry::STATE_NOT_READ ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('show_not_reads'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="auto_load_more">
+ <input type="checkbox" name="auto_load_more" id="auto_load_more" value="1"<?php echo $this->conf->auto_load_more ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('auto_load_more'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="display_posts">
+ <input type="checkbox" name="display_posts" id="display_posts" value="1"<?php echo $this->conf->display_posts ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('display_articles_unfolded'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="lazyload">
+ <input type="checkbox" name="lazyload" id="lazyload" value="1"<?php echo $this->conf->lazyload ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('img_with_lazyload'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="sticky_post">
+ <input type="checkbox" name="sticky_post" id="sticky_post" value="1"<?php echo $this->conf->sticky_post ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('sticky_post'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t ('auto_read_when'); ?></label>
+ <div class="group-controls">
+ <label class="checkbox" for="check_open_article">
+ <input type="checkbox" name="mark_open_article" id="check_open_article" value="1"<?php echo $this->conf->mark_when['article'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('article_selected'); ?>
+ </label>
+ <label class="checkbox" for="check_open_site">
+ <input type="checkbox" name="mark_open_site" id="check_open_site" value="1"<?php echo $this->conf->mark_when['site'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('article_open_on_website'); ?>
+ </label>
+ <label class="checkbox" for="check_scroll">
+ <input type="checkbox" name="mark_scroll" id="check_scroll" value="1"<?php echo $this->conf->mark_when['scroll'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('scroll'); ?>
+ </label>
+ <label class="checkbox" for="check_reception">
+ <input type="checkbox" name="mark_upon_reception" id="check_reception" value="1"<?php echo $this->conf->mark_when['reception'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('upon_reception'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t ('after_onread'); ?></label>
+ <div class="group-controls">
+ <label class="checkbox" for="onread_jump_next">
+ <input type="checkbox" name="onread_jump_next" id="onread_jump_next" value="1"<?php echo $this->conf->onread_jump_next ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('jump_next'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
+ </div>
+ </div>
+
+ </form>
+</div>
diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml
index e3ea11665..ddb404ef5 100644
--- a/app/views/configure/sharing.phtml
+++ b/app/views/configure/sharing.phtml
@@ -3,54 +3,41 @@
<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 ('configure', 'sharing'); ?>">
+ <form method="post" action="<?php echo _url ('configure', 'sharing'); ?>"
+ data-simple='<div class="form-group"><label class="group-name">##label##</label><div class="group-controls"><a href="#" class="share remove"><?php echo FreshRSS_Themes::icon('close'); ?></a>
+ <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /></div></div>'
+ data-advanced='<div class="form-group"><label class="group-name">##label##</label><div class="group-controls"><a href="#" class="share remove"><?php echo FreshRSS_Themes::icon('close'); ?></a>
+ <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" />
+ <input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="" placeholder="<?php echo Minz_Translate::t ('share_name'); ?>" size="64" />
+ <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?php echo Minz_Translate::t ('share_url'); ?>" size="64" />
+ <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="##help##"><?php echo Minz_Translate::t ('more_information'); ?></a></div></div>'>
<legend><?php echo Minz_Translate::t ('sharing'); ?></legend>
- <div class="form-group">
- <label class="group-name" for="shaarli">
- <?php echo Minz_Translate::t ('your_shaarli'); ?>
- </label>
- <div class="group-controls">
- <input type="url" id="shaarli" name="shaarli" class="extend" value="<?php echo $this->conf->sharing ('shaarli'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
-
- <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli"><?php echo Minz_Translate::t ('more_information'); ?></a>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="wallabag">
- <?php echo Minz_Translate::t ('your_wallabag'); ?>
- </label>
- <div class="group-controls">
- <input type="url" id="wallabag" name="wallabag" class="extend" value="<?php echo $this->conf->sharing ('wallabag'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
-
- <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://www.wallabag.org"><?php echo Minz_Translate::t ('more_information'); ?></a>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="diaspora">
- <?php echo Minz_Translate::t ('your_diaspora_pod'); ?>
- </label>
- <div class="group-controls">
- <input type="url" id="diaspora" name="diaspora" class="extend" value="<?php echo $this->conf->sharing ('diaspora'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
-
- <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="https://diasporafoundation.org/"><?php echo Minz_Translate::t ('more_information'); ?></a>
+ <?php foreach ($this->conf->sharing as $key => $sharing): ?>
+ <?php $share = $this->conf->shares[$sharing['type']]; ?>
+ <div class="form-group">
+ <label class="group-name">
+ <?php echo Minz_Translate::t ($sharing['type']); ?>
+ </label>
+ <div class="group-controls">
+ <a href='#' class='share remove'><?php echo FreshRSS_Themes::icon('close'); ?></a>
+ <input type='hidden' id='share_<?php echo $key;?>_type' name="share[<?php echo $key;?>][type]" value='<?php echo $sharing['type']?>' />
+ <?php if ($share['form'] === 'advanced'):?>
+ <input type="text" id="share_<?php echo $key;?>_name" name="share[<?php echo $key;?>][name]" class="extend" value="<?php echo $sharing['name']?>" placeholder="<?php echo Minz_Translate::t ('share_name'); ?>" size="64" />
+ <input type="url" id="share_<?php echo $key;?>_url" name="share[<?php echo $key;?>][url]" class="extend" value="<?php echo $sharing['url']?>" placeholder="<?php echo Minz_Translate::t ('share_url'); ?>" size="64" />
+ <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="<?php echo $share['help']?>"><?php echo Minz_Translate::t ('more_information'); ?></a>
+ <?php endif;?>
+ </div>
</div>
- </div>
+ <?php endforeach;?>
- <div class="form-group">
- <label class="group-name"><?php echo Minz_Translate::t ('activate_sharing'); ?></label>
+ <div class="form-group form-actions">
<div class="group-controls">
- <?php
- $services = array ('twitter', 'g+', 'facebook', 'email', 'print');
-
- foreach ($services as $service) {
- ?>
- <label class="checkbox" for="<?php echo $service; ?>">
- <input type="checkbox" name="<?php echo $service; ?>" id="<?php echo $service; ?>" value="1"<?php echo $this->conf->sharing($service) ? ' checked="checked"' : ''; ?> />
- <?php echo Minz_Translate::t ($service); ?>
- </label>
- <?php } ?>
+ <a href='#' class='share add'><?php echo FreshRSS_Themes::icon('add'); ?></a>
+ <select>
+ <?php foreach($this->conf->shares as $key => $params):?>
+ <option value='<?php echo $key?>' data-form='<?php echo $params['form']?>' data-help='<?php if (!empty($params['help'])) {echo $params['help'];}?>'><?php echo Minz_Translate::t($key) ?></option>
+ <?php endforeach; ?>
+ </select>
</div>
</div>
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index 748a65d17..bfb13f003 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -12,7 +12,7 @@
<?php $s = $this->conf->shortcuts; ?>
<form method="post" action="<?php echo _url ('configure', 'shortcut'); ?>">
- <legend><?php echo Minz_Translate::t ('shortcuts_management'); ?></legend>
+ <legend><?php echo Minz_Translate::t ('shortcuts'); ?></legend>
<noscript><p class="alert alert-error"><?php echo Minz_Translate::t ('javascript_for_shortcuts'); ?></p></noscript>
@@ -96,6 +96,13 @@
</div>
</div>
+ <div class="form-group">
+ <label class="group-name" for="focus_search_shortcut"><?php echo Minz_Translate::t ('focus_search'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="focus_search_shortcut" name="shortcuts[focus_search]" list="keys" value="<?php echo $s['focus_search']; ?>" />
+ </div>
+ </div>
+
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml
index 1305feac9..fdc94cd18 100644
--- a/app/views/configure/users.phtml
+++ b/app/views/configure/users.phtml
@@ -20,11 +20,22 @@
<div class="form-group">
<label class="group-name" for="passwordPlain"><?php echo Minz_Translate::t('password_form'); ?></label>
<div class="group-controls">
- <input type="password" id="passwordPlain" name="passwordPlain" autocomplete="off" pattern=".{7,}" />
+ <input type="password" id="passwordPlain" name="passwordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
+ <a class="btn toggle-password"/><?php echo FreshRSS_Themes::icon('key'); ?></a>
<noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
</div>
</div>
+ <?php if (Minz_Configuration::apiEnabled()) { ?>
+ <div class="form-group">
+ <label class="group-name" for="apiPasswordPlain"><?php echo Minz_Translate::t('password_api'); ?></label>
+ <div class="group-controls">
+ <input type="password" id="apiPasswordPlain" name="apiPasswordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
+ <noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+ <?php } ?>
+
<div class="form-group">
<label class="group-name" for="mail_login"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
<?php $mail = $this->conf->mail_login; ?>
@@ -52,7 +63,7 @@
<?php if (!in_array(Minz_Configuration::authType(), array('form', 'persona', 'http_auth', 'none'))) { ?>
<option selected="selected"></option>
<?php } ?>
- <option value="form"<?php echo Minz_Configuration::authType() === 'form' ? ' selected="selected"' : '', version_compare(PHP_VERSION, '5.3', '<') ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_form'); ?></option>
+ <option value="form"<?php echo Minz_Configuration::authType() === 'form' ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"'; ?>><?php echo Minz_Translate::t('auth_form'); ?></option>
<option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : '', $this->conf->mail_login == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_persona'); ?></option>
<option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('http_auth'); ?> (REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
<option value="none"<?php echo Minz_Configuration::authType() === 'none' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t('auth_none'); ?></option>
@@ -80,18 +91,39 @@
</div>
</div>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="unsafe_autologin">
+ <input type="checkbox" name="unsafe_autologin" id="unsafe_autologin" value="1"<?php echo Minz_Configuration::unsafeAutologinEnabled() ? ' checked="checked"' : '',
+ Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
+ <?php echo Minz_Translate::t('unsafe_autologin'); ?>
+ <kbd>p/i/?a=formLogin&amp;u=Alice&amp;p=1234</kbd>
+ </label>
+ </div>
+ </div>
+
<?php if (Minz_Configuration::canLogIn()) { ?>
<div class="form-group">
<label class="group-name" for="token"><?php echo Minz_Translate::t('auth_token'); ?></label>
<?php $token = $this->conf->token; ?>
<div class="group-controls">
- <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>"<?php
+ <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>"<?php
echo Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
<?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('explain_token', Minz_Url::display(null, 'html', true), $token); ?>
</div>
</div>
<?php } ?>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="api_enabled">
+ <input type="checkbox" name="api_enabled" id="api_enabled" value="1"<?php echo Minz_Configuration::apiEnabled() ? ' checked="checked"' : '',
+ Minz_Configuration::needsLogin() ? '' : ' disabled="disabled"'; ?> />
+ <?php echo Minz_Translate::t('api_enabled'); ?>
+ </label>
+ </div>
+ </div>
+
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
@@ -147,6 +179,7 @@
<label class="group-name" for="new_user_passwordPlain"><?php echo Minz_Translate::t('password_form'); ?></label>
<div class="group-controls">
<input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" autocomplete="off" pattern=".{7,}" />
+ <a class="btn toggle-password"/><?php echo FreshRSS_Themes::icon('key'); ?></a>
<noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
</div>
</div>
diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml
new file mode 100644
index 000000000..56ac5f8dd
--- /dev/null
+++ b/app/views/feed/add.phtml
@@ -0,0 +1,91 @@
+<?php if ($this->feed) { ?>
+<div class="post">
+ <h1><?php echo Minz_Translate::t ('add_rss_feed'); ?></h1>
+
+ <?php if (!$this->load_ok) { ?>
+ <p class="alert alert-error"><span class="alert-head"><?php echo Minz_Translate::t('damn'); ?></span> <?php echo Minz_Translate::t('internal_problem_feed', _url('index', 'logs')); ?></p>
+ <?php } ?>
+
+ <form method="post" action="<?php echo _url('feed', 'add'); ?>" autocomplete="off">
+ <legend><?php echo Minz_Translate::t('informations'); ?></legend>
+ <?php if ($this->load_ok) { ?>
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t('title'); ?></label>
+ <div class="group-controls">
+ <label><?php echo $this->feed->name() ; ?></label>
+ </div>
+ </div>
+
+ <?php $desc = $this->feed->description(); if ($desc != '') { ?>
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t('feed_description'); ?></label>
+ <div class="group-controls">
+ <label><?php echo htmlspecialchars($desc, ENT_NOQUOTES, 'UTF-8'); ?></label>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t('website_url'); ?></label>
+ <div class="group-controls">
+ <label>
+ <?php echo $this->feed->website(); ?>
+ <a target="_blank" href="<?php echo $this->feed->website(); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
+ </label>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div class="form-group">
+ <label class="group-name" for="url"><?php echo Minz_Translate::t('feed_url'); ?></label>
+ <div class="group-controls">
+ <input type="text" name="url_rss" id="url" class="extend" value="<?php echo $this->feed->url(); ?>" />
+ <a target="_blank" href="<?php echo $this->feed->url(); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
+   <a class="btn" target="_blank" href="http://validator.w3.org/feed/check.cgi?url=<?php echo $this->feed->url(); ?>"><?php echo Minz_Translate::t('feed_validator'); ?></a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="group-name" for="category"><?php echo Minz_Translate::t('category'); ?></label>
+ <div class="group-controls">
+ <select name="category" id="category">
+ <?php foreach ($this->categories as $cat) { ?>
+ <option value="<?php echo $cat->id(); ?>"<?php echo $cat->id() == 1 ? ' selected="selected"' : ''; ?>>
+ <?php echo $cat->name(); ?>
+ </option>
+ <?php } ?>
+ <option value="nc"><?php echo Minz_Translate::t('new_category'); ?></option>
+ </select>
+
+ <span style="display: none;">
+ <input type="text" name="new_category[name]" id="new_category_name" autocomplete="off" placeholder="<?php echo Minz_Translate::t('new_category'); ?>" />
+ </span>
+ </div>
+ </div>
+
+ <legend><?php echo Minz_Translate::t('http_authentication'); ?></legend>
+ <?php $auth = $this->feed->httpAuth(false); ?>
+ <div class="form-group">
+ <label class="group-name" for="http_user"><?php echo Minz_Translate::t('http_username'); ?></label>
+ <div class="group-controls">
+ <input type="text" name="http_user" id="http_user" class="extend" value="<?php echo $auth['username']; ?>" autocomplete="off" />
+ </div>
+
+ <label class="group-name" for="http_pass"><?php echo Minz_Translate::t('http_password'); ?></label>
+ <div class="group-controls">
+ <input type="password" name="http_pass" id="http_pass" class="extend" value="<?php echo $auth['password']; ?>" autocomplete="off" />
+ </div>
+
+ <div class="group-controls">
+ <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('access_protected_feeds'); ?>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
+ </div>
+ </div>
+ </form>
+</div>
+<?php } ?>
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml
new file mode 100644
index 000000000..ffdca1daa
--- /dev/null
+++ b/app/views/helpers/export/articles.phtml
@@ -0,0 +1,47 @@
+<?php
+ $username = Minz_Session::param('currentUser', '_');
+
+ $articles = array(
+ 'id' => 'user/' . str_replace('/', '', $username) . '/state/org.freshrss/' . $this->type,
+ 'title' => $this->list_title,
+ 'author' => $username,
+ 'items' => array()
+ );
+
+ foreach ($this->entries as $entry) {
+ if (!isset($this->feed)) {
+ $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $entry->feed ());
+ } else {
+ $feed = $this->feed;
+ }
+
+ $articles['items'][] = array(
+ 'id' => $entry->guid(),
+ 'categories' => array_values($entry->tags()),
+ 'title' => $entry->title(),
+ 'author' => $entry->author(),
+ 'published' => $entry->date(true),
+ 'updated' => $entry->date(true),
+ 'alternate' => array(array(
+ 'href' => $entry->link(),
+ 'type' => 'text/html'
+ )),
+ 'content' => array(
+ 'content' => $entry->content()
+ ),
+ 'origin' => array(
+ 'streamId' => $feed->id(),
+ 'title' => $feed->name(),
+ 'htmlUrl' => $feed->website(),
+ 'feedUrl' => $feed->url()
+ )
+ );
+ }
+
+ $options = 0;
+ if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
+ $options = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
+ }
+
+ echo json_encode($articles, $options);
+?>
diff --git a/app/views/helpers/export/opml.phtml b/app/views/helpers/export/opml.phtml
new file mode 100644
index 000000000..f667d093c
--- /dev/null
+++ b/app/views/helpers/export/opml.phtml
@@ -0,0 +1,28 @@
+<?php
+
+$opml_array = array(
+ 'head' => array(
+ 'title' => Minz_Configuration::title(),
+ 'dateCreated' => date('D, d M Y H:i:s')
+ ),
+ 'body' => array()
+);
+
+foreach ($this->categories as $key => $cat) {
+ $opml_array['body'][$key] = array(
+ 'text' => $cat['name'],
+ '@outlines' => array()
+ );
+
+ foreach ($cat['feeds'] as $feed) {
+ $opml_array['body'][$key]['@outlines'][] = array(
+ 'text' => htmlspecialchars_decode($feed->name()),
+ 'type' => 'rss',
+ 'xmlUrl' => $feed->url(),
+ 'htmlUrl' => $feed->website(),
+ 'description' => $feed->description()
+ );
+ }
+}
+
+echo libopml_render($opml_array);
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 3d7c8a98f..6e0a20de3 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -5,12 +5,14 @@ echo '"use strict";', "\n";
$mark = $this->conf->mark_when;
echo 'var ',
'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true',
+ ',display_order="', Minz_Request::param('order', $this->conf->sort_order), '"',
',auto_mark_article=', $mark['article'] ? 'true' : 'false',
',auto_mark_site=', $mark['site'] ? 'true' : 'false',
',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false',
',auto_load_more=', $this->conf->auto_load_more ? 'true' : 'false',
',full_lazyload=', $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'true' : 'false',
- ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false';
+ ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false',
+ ',sticky_post=', $this->conf->sticky_post ? 'true' : 'false';
$s = $this->conf->shortcuts;
echo ',shortcuts={',
@@ -23,7 +25,8 @@ echo ',shortcuts={',
'last_entry:"', $s['last_entry'], '",',
'collapse_entry:"', $s['collapse_entry'], '",',
'load_more:"', $s['load_more'], '",',
- 'auto_share:"', $s['auto_share'], '"',
+ 'auto_share:"', $s['auto_share'], '",',
+ 'focus_search:"', $s['focus_search'], '"',
"},\n";
if (Minz_Request::param ('output') === 'global') {
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index ae93b627c..b5cdd3039 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -8,19 +8,10 @@ if (!empty($this->entries)) {
$display_yesterday = true;
$display_others = true;
if ($this->loginOk) {
- $shaarli = $this->conf->sharing ('shaarli');
- $wallabag = $this->conf->sharing ('wallabag');
- $diaspora = $this->conf->sharing ('diaspora');
+ $sharing = $this->conf->sharing;
} else {
- $shaarli = '';
- $wallabag = '';
- $diaspora = '';
+ $sharing = array();
}
- $twitter = $this->conf->sharing ('twitter');
- $google_plus = $this->conf->sharing ('g+');
- $facebook = $this->conf->sharing ('facebook');
- $email = $this->conf->sharing ('email');
- $print = $this->conf->sharing ('print');
$hidePosts = !$this->conf->display_posts;
$lazyload = $this->conf->lazyload;
$topline_read = $this->conf->topline_read;
@@ -29,9 +20,7 @@ if (!empty($this->entries)) {
$topline_link = $this->conf->topline_link;
$bottomline_read = $this->conf->bottomline_read;
$bottomline_favorite = $this->conf->bottomline_favorite;
- $bottomline_sharing = $this->conf->bottomline_sharing && (
- $shaarli || $wallabag || $diaspora || $twitter ||
- $google_plus || $facebook || $email || $print);
+ $bottomline_sharing = $this->conf->bottomline_sharing && (count($sharing));
$bottomline_tags = $this->conf->bottomline_tags;
$bottomline_date = $this->conf->bottomline_date;
$bottomline_link = $this->conf->bottomline_link;
@@ -39,7 +28,7 @@ if (!empty($this->entries)) {
<div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php
?><div id="new-article">
- <a href="<?php echo _url('index', 'index'); ?>"><?php echo Minz_Translate::t ('new_article'); ?></a>
+ <a href="<?php echo Minz_Url::display ($this->url); ?>"><?php echo Minz_Translate::t ('new_article'); ?></a>
</div><?php
foreach ($this->entries as $item) {
if ($display_today && $item->isDay (FreshRSS_Days::TODAY, $this->today)) {
@@ -99,7 +88,7 @@ if (!empty($this->entries)) {
<div class="flux_content">
<div class="content">
- <h1 class="title"><?php echo $item->title (); ?></h1>
+ <h1 class="title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></h1>
<?php
$author = $item->author ();
echo $author != '' ? '<div class="author">' . Minz_Translate::t ('by_author', $author) . '</div>' : '';
@@ -146,55 +135,13 @@ if (!empty($this->entries)) {
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
- <?php if ($shaarli) { ?>
- <li class="item share">
- <a target="_blank" href="<?php echo $shaarli . '?post=' . $link . '&amp;title=' . $title . '&amp;source=FreshRSS'; ?>">
- <?php echo Minz_Translate::t ('shaarli'); ?>
- </a>
- </li>
- <?php } if ($wallabag) { ?>
- <li class="item share">
- <a target="_blank" href="<?php echo $wallabag . '?action=add&amp;url=' . base64_encode (urldecode($link)); ?>">
- <?php echo Minz_Translate::t ('wallabag'); ?>
- </a>
- </li>
- <?php } if ($diaspora) { ?>
- <li class="item share">
- <a target="_blank" href="<?php echo $diaspora . '/bookmarklet?url=' . $link . '&amp;title=' . $title; ?>">
- <?php echo Minz_Translate::t ('diaspora'); ?>
- </a>
- </li>
- <?php } if ($twitter) { ?>
- <li class="item share">
- <a target="_blank" href="https://twitter.com/share?url=<?php echo $link; ?>&amp;text=<?php echo $title; ?>">
- <?php echo Minz_Translate::t ('twitter'); ?>
- </a>
- </li>
- <?php } if ($google_plus) { ?>
- <li class="item share">
- <a target="_blank" href="https://plus.google.com/share?url=<?php echo $link; ?>">
- <?php echo Minz_Translate::t ('g+'); ?>
- </a>
- </li>
- <?php } if ($facebook) { ?>
- <li class="item share">
- <a target="_blank" href="https://www.facebook.com/sharer.php?u=<?php echo $link; ?>&amp;t=<?php echo $title; ?>">
- <?php echo Minz_Translate::t ('facebook'); ?>
- </a>
- </li>
- <?php } if ($email) { ?>
- <li class="item share">
- <a href="mailto:?subject=<?php echo urldecode($title); ?>&amp;body=<?php echo $link; ?>">
- <?php echo Minz_Translate::t ('by_email'); ?>
- </a>
- </li>
- <?php } if ($print) { ?>
- <li class="item share">
- <a href="#" class="print-article">
- <?php echo Minz_Translate::t ('print'); ?>
- </a>
- </li>
- <?php } ?>
+ <?php foreach ($sharing as $share) :?>
+ <li class="item share">
+ <a target="_blank" href="<?php echo FreshRSS_Share::generateUrl($this->conf->shares, $share, $item->link(), $item->title() . ' . ' . $feed->name())?>">
+ <?php echo Minz_Translate::t ($share['name']);?>
+ </a>
+ </li>
+ <?php endforeach;?>
</ul>
</div>
<?php } ?>
diff --git a/app/views/helpers/view/rss_view.phtml b/app/views/helpers/view/rss_view.phtml
index 620bf1388..2c6ca610b 100755
--- a/app/views/helpers/view/rss_view.phtml
+++ b/app/views/helpers/view/rss_view.phtml
@@ -6,7 +6,7 @@
<description><?php echo Minz_Translate::t ('rss_feeds_of', $this->rss_title); ?></description>
<pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate>
<lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate>
- <atom:link href="<?php echo Minz_Url::display ($this->rss_url, 'html', true); ?>" rel="self" type="application/rss+xml" />
+ <atom:link href="<?php echo Minz_Url::display ($this->url, 'html', true); ?>" rel="self" type="application/rss+xml" />
<?php
foreach ($this->entries as $item) {
?>
diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml
new file mode 100644
index 000000000..309058959
--- /dev/null
+++ b/app/views/importExport/index.phtml
@@ -0,0 +1,52 @@
+<?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'); ?></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>
+ </div>
+ </div>
+ </form>
+
+ <?php if (count($this->feeds) > 0) { ?>
+ <form method="post" action="<?php echo _url('importExport', 'export'); ?>">
+ <legend><?php echo Minz_Translate::t ('export'); ?></legend>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="export_opml">
+ <input type="checkbox" name="export_opml" id="export_opml" value="1" checked="checked" />
+ <?php echo Minz_Translate::t ('export_opml'); ?>
+ </label>
+
+ <label class="checkbox" for="export_starred">
+ <input type="checkbox" name="export_starred" id="export_starred" value="1" checked="checked" />
+ <?php echo Minz_Translate::t ('export_starred'); ?>
+ </label>
+
+ <select name="export_feeds[]" size="<?php echo min(10, count($this->feeds)); ?>" multiple="multiple">
+ <?php foreach ($this->feeds as $feed) { ?>
+ <option value="<?php echo $feed->id(); ?>"><?php echo $feed->name(); ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('export'); ?></button>
+ </div>
+ </div>
+ </form>
+ <?php } ?>
+</div>
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 78271291e..1ff36ca8e 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -3,12 +3,14 @@
$output = Minz_Request::param ('output', 'normal');
if ($this->loginOk || Minz_Configuration::allowAnonymous()) {
- if ($output === 'rss') {
- $this->renderHelper ('view/rss_view');
+ if ($output === 'normal') {
+ $this->renderHelper ('view/normal_view');
} elseif ($output === 'reader') {
$this->renderHelper ('view/reader_view');
} elseif ($output === 'global') {
$this->renderHelper ('view/global_view');
+ } elseif ($output === 'rss') {
+ $this->renderHelper ('view/rss_view');
} else {
Minz_Request::_param ('output', 'normal');
$output = 'normal';