From 6bed64f6f360e1480bf5efc0d52d255b85791242 Mon Sep 17 00:00:00 2001 From: maTh Date: Sun, 18 Sep 2022 18:31:14 +0200 Subject: 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 * Update app/views/stats/idle.phtml Co-authored-by: Alexandre Alapetite Co-authored-by: Alexandre Alapetite --- app/views/index/global.phtml | 20 +++++++++++++++++--- app/views/stats/idle.phtml | 19 ++++++++++++++++--- app/views/subscription/index.phtml | 25 ++++++++++++++++++------- 3 files changed, 51 insertions(+), 13 deletions(-) (limited to 'app/views') 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 @@ 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(); ?> -
  • show_favicons): ?>✇ name() ?> diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml index 9dbfbf4ab..a88dbeb8a 100644 --- a/app/views/stats/idle.phtml +++ b/app/views/stats/idle.phtml @@ -26,10 +26,23 @@ feeds[$feedInPeriod['id']] ?? null; - $error = $feed == null || $feed->inError() ? ' error' : ''; - $empty = $feed != null && $feed->nbEntries() == 0 ? ' empty' : ''; + + $error_class = ''; + $error_title = ''; + if ($feed == null || $feed->inError()) { + $error_class = ' error'; + $error_title = _t('sub.feed.error'); + } + + $empty_class = ''; + $empty_title = ''; + if ($feed != null && $feed->nbEntries() == 0) { + $empty_class = ' empty'; + $empty_title = _t('sub.feed.empty'); + } + $mute_class = $feed->mute() ? ' mute' : ''; ?> -
  • +
  • show_favicons): ?>✇ diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index b546eea6d..f056214d2 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -45,14 +45,25 @@ if ($this->onlyFeedsWithError && !$feed->inError()) { continue; } - $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' : ''; ?> -
  • - +
  • + show_favicons): ?>✇ name() ?>
  • -- cgit v1.2.3