aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-12-15 23:04:29 +0100
committerGravatar GitHub <noreply@github.com> 2023-12-15 23:04:29 +0100
commit6bb45a87268157aab961a6a4a728d9a9bbe043b0 (patch)
treed1c36638d5ee61e2e663d214d724a71f07a89354 /app/views
parenta3ed8269132303eebc03d3e6df822f1f101fa95b (diff)
Add filter actions (auto mark read) at category and global levels (#5942)
* Add filter actions (auto mark read) at category level fix https://github.com/FreshRSS/FreshRSS/issues/3497 * Add filter actions (auto mark read) at global level fix https://github.com/FreshRSS/FreshRSS/issues/2788 * Fix feed category ID * Minor comment
Diffstat (limited to 'app/views')
-rw-r--r--app/views/category/update.phtml (renamed from app/views/subscription/category.phtml)0
-rw-r--r--app/views/configure/reading.phtml15
-rw-r--r--app/views/helpers/category/update.phtml22
-rw-r--r--app/views/subscription/index.phtml2
4 files changed, 37 insertions, 2 deletions
diff --git a/app/views/subscription/category.phtml b/app/views/category/update.phtml
index daf4523bb..daf4523bb 100644
--- a/app/views/subscription/category.phtml
+++ b/app/views/category/update.phtml
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml
index 5f22d4daf..94cf51977 100644
--- a/app/views/configure/reading.phtml
+++ b/app/views/configure/reading.phtml
@@ -346,6 +346,21 @@
</fieldset>
<fieldset>
+ <legend><?= _t('sub.feed.filteractions') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
+ <div class="group-controls">
+ <textarea name="filteractions_read" id="filteractions_read" class="w100"><?php
+ foreach (FreshRSS_Context::$user_conf->filtersAction('read') as $filterRead) {
+ echo $filterRead->getRawInput(), PHP_EOL;
+ }
+ ?></textarea>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ </div>
+ </div>
+ </fieldset>
+
+ <fieldset>
<legend><?= _t('conf.reading.headline.misc') ?></legend>
<div class="form-group">
<div class="group-controls">
diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml
index 4e3b7ae9e..68132ad27 100644
--- a/app/views/helpers/category/update.phtml
+++ b/app/views/helpers/category/update.phtml
@@ -12,7 +12,7 @@
<a href="<?= _url('index', 'index', 'get', 'c_' . $this->category->id()) ?>"><?= _i('link') ?> <?= _t('gen.action.filter') ?></a>
</div>
- <form method="post" action="<?= _url('subscription', 'category', 'id', $this->category->id(), '#', 'slider') ?>" autocomplete="off">
+ <form method="post" action="<?= _url('category', 'update', 'id', $this->category->id(), '#', 'slider') ?>" autocomplete="off">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<legend><?= _t('sub.category.information') ?></legend>
@@ -68,6 +68,26 @@
</div>
<?php endif; ?>
+ <legend><?= _t('sub.feed.filteractions') ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="filteractions_read"><?= _t('conf.reading.read.when') ?></label>
+ <div class="group-controls">
+ <textarea name="filteractions_read" id="filteractions_read" class="w100"><?php
+ foreach ($this->category->filtersAction('read') as $filterRead) {
+ echo $filterRead->getRawInput(), PHP_EOL;
+ }
+ ?></textarea>
+ <p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
+ <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
+ </div>
+ </div>
+
<legend><?= _t('sub.category.archiving') ?></legend>
<?php
$archiving = $this->category->attributes('archiving');
diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml
index 280799f2d..a1a874b31 100644
--- a/app/views/subscription/index.phtml
+++ b/app/views/subscription/index.phtml
@@ -34,7 +34,7 @@
?>
<div class="box">
<div class="box-title">
- <a class="configure open-slider" href="<?= _url('subscription', 'category', 'id', $cat->id()) ?>" data-cat-position="<?= $cat->attributes('position') ?>"><?= _i('configure') ?></a>
+ <a class="configure open-slider" href="<?= _url('category', 'update', 'id', $cat->id()) ?>" data-cat-position="<?= $cat->attributes('position') ?>"><?= _i('configure') ?></a>
<h2><?= $cat->name() ?><?php if ($cat->kind() == FreshRSS_Category::KIND_DYNAMIC_OPML) { echo " " . _i('opml-dyn'); } ?></h2>
</div>
<ul class="box-content drop-zone scrollbar-thin" dropzone="move" data-cat-id="<?= $cat->id() ?>">