diff options
| author | 2022-09-18 18:31:14 +0200 | |
|---|---|---|
| committer | 2022-09-18 18:31:14 +0200 | |
| commit | 6bed64f6f360e1480bf5efc0d52d255b85791242 (patch) | |
| tree | 72efa94a28f042562cd6c7ed689711fe9acde7d5 /app/views/index | |
| parent | 67ea2d16b7723719f7dc5aeeecc45a00605df20f (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/views/index')
| -rw-r--r-- | app/views/index/global.phtml | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index 9bc291fca..7348c9cd1 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -41,11 +41,25 @@ <?php foreach ($feeds as $feed) { $nb_not_read = $feed->nbNotRead(); - $error = $feed->inError() ? ' error' : ''; - $empty = $feed->nbEntries() === 0 ? ' empty' : ''; + + $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' : ''; + $url_base['params']['get'] = 'f_' . $feed->id(); ?> - <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>" + <li id="f_<?= $feed->id() ?>" class="item feed<?= $error_class, $empty_class, $mute_class ?>" title="<?= $error_title, $empty_title ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $feed->name() ?></a> |
