aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-01 11:27:41 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-01 11:27:41 +0200
commit1eef7893068655f8d145a3e06061a9e6296ac1f3 (patch)
treeec9cc77f2dc39baedf92a155da124bb6bd800984 /app/views
parentfdb63fbbe695b6a6bc32f0e93f2ff702ca42329c (diff)
Reorganize subscription management code
There is still a lot of work to do. Some links are broken. See https://github.com/marienfressinaud/FreshRSS/issues/646
Diffstat (limited to 'app/views')
-rw-r--r--app/views/importExport/index.phtml2
-rw-r--r--app/views/subscription/feed.phtml (renamed from app/views/configure/feed.phtml)4
-rw-r--r--app/views/subscription/index.phtml (renamed from app/views/configure/categorize.phtml)48
3 files changed, 48 insertions, 6 deletions
diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml
index 35371faca..36c0eab4e 100644
--- a/app/views/importExport/index.phtml
+++ b/app/views/importExport/index.phtml
@@ -1,4 +1,4 @@
-<?php $this->partial('aside_feed'); ?>
+<?php $this->partial('aside_subscription'); ?>
<div class="post ">
<a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
diff --git a/app/views/configure/feed.phtml b/app/views/subscription/feed.phtml
index f58ac65af..e047741a1 100644
--- a/app/views/configure/feed.phtml
+++ b/app/views/subscription/feed.phtml
@@ -1,6 +1,6 @@
<?php
if (!Minz_Request::param('ajax')) {
- $this->partial('aside_feed');
+ $this->partial('aside_subscription');
}
?>
@@ -19,7 +19,7 @@
<p class="alert alert-warn"><?php echo Minz_Translate::t ('feed_empty'); ?></p>
<?php } ?>
- <form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>" autocomplete="off">
+ <form method="post" action="<?php echo _url ('subscription', 'feed', 'id', $this->flux->id ()); ?>" autocomplete="off">
<legend><?php echo Minz_Translate::t ('informations'); ?></legend>
<div class="form-group">
<label class="group-name" for="name"><?php echo Minz_Translate::t ('title'); ?></label>
diff --git a/app/views/configure/categorize.phtml b/app/views/subscription/index.phtml
index f5030ef2c..444dc9d9b 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/subscription/index.phtml
@@ -1,9 +1,51 @@
-<?php $this->partial('aside_feed'); ?>
+<?php $this->partial('aside_subscription'); ?>
<div class="post">
<a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a>
- <h2><?php echo _t('categories_management'); ?></h2>
+ <h2><?php echo _t('subscription_management'); ?></h2>
+
+ <form id="add_rss" method="post" action="<?php echo _url('feed', 'add'); ?>" autocomplete="off">
+ <div class="stick">
+ <input type="url" name="url_rss" class="extend" placeholder="<?php echo _t('add_rss_feed'); ?>" />
+ <div class="dropdown">
+ <div id="dropdown-cat" class="dropdown-target"></div>
+
+ <a class="dropdown-toggle btn" href="#dropdown-cat"><?php echo _i('down'); ?></a>
+ <ul class="dropdown-menu">
+ <li class="dropdown-close"><a href="#close">❌</a></li>
+
+ <li class="dropdown-header"><?php echo _t('category'); ?></li>
+
+ <li class="input">
+ <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 _t('new_category'); ?></option>
+ </select>
+ </li>
+
+ <li class="input" style="display:none">
+ <input type="text" name="new_category[name]" id="new_category_name" autocomplete="off" placeholder="<?php echo _t('new_category'); ?>" />
+ </li>
+
+ <li class="separator"></li>
+
+ <li class="dropdown-header"><?php echo _t('http_authentication'); ?></li>
+ <li class="input">
+ <input type="text" name="http_user" id="http_user_add" autocomplete="off" placeholder="<?php echo _t('username'); ?>" />
+ </li>
+ <li class="input">
+ <input type="password" name="http_pass" id="http_pass_add" autocomplete="off" placeholder="<?php echo _t('password'); ?>" />
+ </li>
+ </ul>
+ </div>
+ <button class="btn" type="submit"><?php echo _i('add'); ?></button>
+ </div>
+ </form>
<p class="alert alert-warn">
<?php echo _t('feeds_moved_category_deleted', $this->default_category->name()); ?>
@@ -73,7 +115,7 @@
$empty = $feed->nbEntries() == 0 ? ' empty' : '';
?>
<li class="item<?php echo $error, $empty; ?>">
- <a class="configure open-slider" href="<?php echo _url('configure', 'feed', 'id', $feed->id()); ?>"><?php echo _i('configure'); ?></a>
+ <a class="configure open-slider" href="<?php echo _url('subscription', 'feed', 'id', $feed->id()); ?>"><?php echo _i('configure'); ?></a>
<img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <?php echo $feed->name(); ?>
</li>
<?php }