aboutsummaryrefslogtreecommitdiff
path: root/app/layout/aside_feed.phtml
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2022-09-18 18:31:14 +0200
committerGravatar GitHub <noreply@github.com> 2022-09-18 18:31:14 +0200
commit6bed64f6f360e1480bf5efc0d52d255b85791242 (patch)
tree72efa94a28f042562cd6c7ed689711fe9acde7d5 /app/layout/aside_feed.phtml
parent67ea2d16b7723719f7dc5aeeecc45a00605df20f (diff)
Improved: Mouse title on empty feeds (#4617)
* Update aside_feed.phtml * Update global.phtml * Update idle.phtml * Update index.phtml * Update idle.phtml * improved * Update app/views/subscription/index.phtml Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/views/stats/idle.phtml Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/layout/aside_feed.phtml')
-rw-r--r--app/layout/aside_feed.phtml21
1 files changed, 18 insertions, 3 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index 3ddb958f2..79a83e1ba 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -99,10 +99,25 @@
// NB: Reduce whitespace in that loop
foreach ($feeds as $feed):
$f_active = FreshRSS_Context::isCurrentGet('f_' . $feed->id());
+ $f_active_class = $f_active ? ' active' : '';
+
+ $error_class = '';
+ $error_title = '';
+ if ($feed->inError()) {
+ $error_class = ' error';
+ $error_title = _t('sub.feed.error');
+ }
+
+ $empty_class = '';
+ $empty_title = '';
+ if ($feed->nbEntries() <= 0) {
+ $empty_class = ' empty';
+ $empty_title = _t('sub.feed.empty');
+ }
+ $mute_class = $feed->mute() ? ' mute' : '';
?>
-<li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active ? ' active' : '', $feed->mute() ? ' mute' : '' ?><?=
- $feed->inError() ? ' error' : '' ?><?= $feed->nbEntries() <= 0 ? ' empty' : ''
- ?>" title="<?= $feed->inError() ? _t('sub.feed.error') : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"><?php
+<li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active_class, $mute_class, $error_class, $empty_class ?>" title="<?= $error_title, $empty_title ?>"
+ data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"><?php
if ($f_active || $nbFeedsTotal < FreshRSS_Context::$user_conf->simplify_over_n_feeds):
?><div class="dropdown no-mobile">
<div class="dropdown-target"></div><a class="dropdown-toggle" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a><?php /* feed_config_template */ ?>