aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-07-25 16:51:48 +0200
committerGravatar GitHub <noreply@github.com> 2019-07-25 16:51:48 +0200
commit82611c9622ed23b0e9fcf5f9f651ddffa1fd7706 (patch)
treefc2c97fd8dd84ec30473cb85b889d8326c9a831a /app/views
parent744a9e8cf00aef7dec0acfa5f90f0dcfa2ef8837 (diff)
parent042b40eeeea77db854daab1bec96fce5c2cdd4b2 (diff)
Merge pull request #2451 from FreshRSS/dev1.14.3
FreshRSS 1.14.3
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/shortcut.phtml20
-rw-r--r--app/views/feed/add.phtml2
-rw-r--r--app/views/helpers/category/update.phtml34
-rw-r--r--app/views/helpers/feed/update.phtml4
-rw-r--r--app/views/index/global.phtml5
-rw-r--r--app/views/index/normal.phtml5
-rw-r--r--app/views/index/reader.phtml5
-rw-r--r--app/views/subscription/category.phtml5
-rw-r--r--app/views/subscription/index.phtml49
9 files changed, 57 insertions, 72 deletions
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index 70a274edd..412ea676d 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -65,33 +65,33 @@
</div>
</div>
- <p class="alert alert-warn"><?php echo _t('conf.shortcut.navigation_no_mod_help');?></p>
-
<div class="form-group">
- <label class="group-name" for="skip_next_entry"><?php echo _t('conf.shortcut.skip_next_article'); ?></label>
+ <label class="group-name" for="first_entry"><?php echo _t('conf.shortcut.first_article'); ?></label>
<div class="group-controls">
- <input type="text" id="skip_next_entry" name="shortcuts[skip_next_entry]" list="keys" value="<?php echo $s['skip_next_entry']; ?>" data-leave-validation="<?php echo $s['skip_next_entry']; ?>"/>
+ <input type="text" id="first_entry" name="shortcuts[first_entry]" list="keys" value="<?php echo $s['first_entry']; ?>" data-leave-validation="<?php echo $s['first_entry']; ?>"/>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="skip_prev_entry"><?php echo _t('conf.shortcut.skip_previous_article'); ?></label>
+ <label class="group-name" for="last_entry"><?php echo _t('conf.shortcut.last_article'); ?></label>
<div class="group-controls">
- <input type="text" id="skip_prev_entry" name="shortcuts[skip_prev_entry]" list="keys" value="<?php echo $s['skip_prev_entry']; ?>" data-leave-validation="<?php echo $s['skip_prev_entry']; ?>"/>
+ <input type="text" id="last_entry" name="shortcuts[last_entry]" list="keys" value="<?php echo $s['last_entry']; ?>" data-leave-validation="<?php echo $s['last_entry']; ?>"/>
</div>
</div>
+ <p class="alert alert-warn"><?php echo _t('conf.shortcut.navigation_no_mod_help');?></p>
+
<div class="form-group">
- <label class="group-name" for="first_entry"><?php echo _t('conf.shortcut.first_article'); ?></label>
+ <label class="group-name" for="skip_next_entry"><?php echo _t('conf.shortcut.skip_next_article'); ?></label>
<div class="group-controls">
- <input type="text" id="first_entry" name="shortcuts[first_entry]" list="keys" value="<?php echo $s['first_entry']; ?>" data-leave-validation="<?php echo $s['first_entry']; ?>"/>
+ <input type="text" id="skip_next_entry" name="shortcuts[skip_next_entry]" list="keys" value="<?php echo $s['skip_next_entry']; ?>" data-leave-validation="<?php echo $s['skip_next_entry']; ?>"/>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="last_entry"><?php echo _t('conf.shortcut.last_article'); ?></label>
+ <label class="group-name" for="skip_prev_entry"><?php echo _t('conf.shortcut.skip_previous_article'); ?></label>
<div class="group-controls">
- <input type="text" id="last_entry" name="shortcuts[last_entry]" list="keys" value="<?php echo $s['last_entry']; ?>" data-leave-validation="<?php echo $s['last_entry']; ?>"/>
+ <input type="text" id="skip_prev_entry" name="shortcuts[skip_prev_entry]" list="keys" value="<?php echo $s['skip_prev_entry']; ?>" data-leave-validation="<?php echo $s['skip_prev_entry']; ?>"/>
</div>
</div>
diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml
index 823cf1b2f..340970b25 100644
--- a/app/views/feed/add.phtml
+++ b/app/views/feed/add.phtml
@@ -8,7 +8,7 @@
<form method="post" action="<?php echo _url('feed', 'add'); ?>" autocomplete="off">
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
- <legend><?php echo _t('sub.feed.informations'); ?></legend>
+ <legend><?php echo _t('sub.feed.information'); ?></legend>
<?php if ($this->load_ok) { ?>
<div class="form-group">
<label class="group-name"><?php echo _t('sub.feed.title'); ?></label>
diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml
new file mode 100644
index 000000000..a2ee3e2ef
--- /dev/null
+++ b/app/views/helpers/category/update.phtml
@@ -0,0 +1,34 @@
+<div class="post">
+ <h1><?php echo $this->category->name(); ?></h1>
+
+ <div>
+ <a href="<?php echo _url('index', 'index', 'get', 'c_' . $this->category->id()); ?>"><?php echo _i('link'); ?> <?php echo _t('gen.action.filter'); ?></a>
+ </div>
+
+ <form method="post" action="<?php echo _url('subscription', 'category', 'id', $this->category->id()); ?>" autocomplete="off">
+ <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
+ <legend><?php echo _t('sub.category.information'); ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="name"><?php echo _t('sub.category.title'); ?></label>
+ <div class="group-controls">
+ <input type="text" name="name" id="name" class="extend" value="<?php echo $this->category->name() ; ?>" />
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
+ <button class="btn btn-attention confirm"
+ data-str-confirm="<?php echo _t('gen.js.confirm_action_feed_cat'); ?>"
+ formaction="<?php echo _url('category', 'empty', 'id', $this->category->id()); ?>"
+ formmethod="post"><?php echo _t('gen.action.empty'); ?></button>
+ <?php if (!$this->category->isDefault()): ?>
+ <button class="btn btn-attention confirm"
+ data-str-confirm="<?php echo _t('gen.js.confirm_action_feed_cat'); ?>"
+ formaction="<?php echo _url('category', 'delete', 'id', $this->category->id()); ?>"
+ formmethod="post"><?php echo _t('gen.action.remove'); ?></button>
+ <?php endif;?>
+ </div>
+ </div>
+ </form>
+</div>
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index be8034c0d..620806d7b 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -19,7 +19,7 @@
<form method="post" action="<?php echo _url('subscription', 'feed', 'id', $this->feed->id()); ?>" autocomplete="off">
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
- <legend><?php echo _t('sub.feed.informations'); ?></legend>
+ <legend><?php echo _t('sub.feed.information'); ?></legend>
<div class="form-group">
<label class="group-name" for="name"><?php echo _t('sub.feed.title'); ?></label>
<div class="group-controls">
@@ -240,7 +240,7 @@
<div class="group-controls">
<textarea name="filteractions_read" id="filteractions_read"><?php
foreach ($this->feed->filtersAction('read') as $filterRead) {
- echo htmlspecialchars($filterRead->getRawInput(), ENT_NOQUOTES, 'UTF-8'), "\n\n";
+ echo htmlspecialchars($filterRead->getRawInput(), ENT_NOQUOTES, 'UTF-8'), PHP_EOL;
}
?></textarea>
<?php echo _i('help'); ?> <?php echo _t('sub.feed.filteractions.help'); ?>
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml
index 3566abe7e..2f25b6dc2 100644
--- a/app/views/index/global.phtml
+++ b/app/views/index/global.phtml
@@ -1,11 +1,6 @@
<?php
$this->partial('nav_menu');
- flush();
- if (isset($this->callbackBeforeEntries)) {
- call_user_func($this->callbackBeforeEntries, $this);
- }
-
$class = '';
if (FreshRSS_Context::$user_conf->hide_read_feeds &&
FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ) &&
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index d5ae8e2f9..ac2ea812d 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -3,11 +3,6 @@
$this->partial('aside_feed');
$this->partial('nav_menu');
-flush();
-if (isset($this->callbackBeforeEntries)) {
- call_user_func($this->callbackBeforeEntries, $this);
-}
-
if (!empty($this->entries)) {
$display_today = true;
$display_yesterday = true;
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index fbe37d2e3..129fae937 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -2,11 +2,6 @@
$this->partial('aside_feed');
$this->partial('nav_menu');
-flush();
-if (isset($this->callbackBeforeEntries)) {
- call_user_func($this->callbackBeforeEntries, $this);
-}
-
if (!empty($this->entries)) {
$lazyload = FreshRSS_Context::$user_conf->lazyload;
$content_width = FreshRSS_Context::$user_conf->content_width;
diff --git a/app/views/subscription/category.phtml b/app/views/subscription/category.phtml
new file mode 100644
index 000000000..38746f23c
--- /dev/null
+++ b/app/views/subscription/category.phtml
@@ -0,0 +1,5 @@
+<?php
+
+if ($this->category) {
+ $this->renderHelper('category/update');
+}
diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml
index 8b196cb00..20f72ad66 100644
--- a/app/views/subscription/index.phtml
+++ b/app/views/subscription/index.phtml
@@ -80,50 +80,9 @@
?>
<div class="box">
<div class="box-title">
- <form action="<?php echo _url('category', 'update', 'id', $cat->id()); ?>" method="post">
- <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
- <input type="text" name="name" value="<?php echo $cat->name(); ?>" />
-
- <div class="dropdown">
- <div id="dropdown-cat-<?php echo $cat->id(); ?>" class="dropdown-target"></div>
-
- <a class="dropdown-toggle btn" href="#dropdown-cat-<?php echo $cat->id(); ?>"><?php echo _i('down'); ?></a>
- <ul class="dropdown-menu">
- <li class="dropdown-close"><a href="#close">❌</a></li>
-
- <li class="item"><a href="<?php echo _url('index', 'index', 'get', 'c_' . $cat->id()); ?>"><?php echo _t('gen.action.filter'); ?></a></li>
-
- <?php
- $no_feed = empty($feeds);
- $is_default = ($cat->id() === $this->default_category->id());
-
- if (!$no_feed || !$is_default) {
- ?>
- <li class="separator"></li>
- <?php } if (!$no_feed) { ?>
- <li class="item">
- <button class="as-link confirm"
- data-str-confirm="<?php echo _t('gen.js.confirm_action_feed_cat'); ?>"
- type="submit"
- form="controller-category"
- formaction="<?php echo _url('category', 'empty', 'id', $cat->id()); ?>">
- <?php echo _t('gen.action.empty'); ?></button>
- </li>
- <?php } if (!$is_default) { ?>
- <li class="item">
- <button class="as-link confirm"
- data-str-confirm="<?php echo _t('gen.js.confirm_action_feed_cat'); ?>"
- type="submit"
- form="controller-category"
- formaction="<?php echo _url('category', 'delete', 'id', $cat->id()); ?>">
- <?php echo _t('gen.action.remove'); ?></button>
- </li>
- <?php } ?>
- </ul>
- </div>
- </form>
+ <a class="configure open-slider" href="<?php echo _url('subscription', 'category', 'id', $cat->id()); ?>"><?php echo _i('configure'); ?></a>
+ <?php echo $cat->name(); ?>
</div>
-
<ul class="box-content" data-cat-id="<?php echo $cat->id(); ?>">
<?php if (!empty($feeds)) { ?>
<?php
@@ -159,12 +118,14 @@
</ul>
</div>
-<?php $class = isset($this->feed) ? ' class="active"' : ''; ?>
+<?php $class = $this->displaySlider ? ' class="active"' : ''; ?>
<a href="#" id="close-slider"<?php echo $class; ?>></a>
<div id="slider"<?php echo $class; ?>>
<?php
if (isset($this->feed)) {
$this->renderHelper('feed/update');
+ } elseif (isset($this->category)) {
+ $this->renderHelper('category/update');
}
?>
</div>