diff options
Diffstat (limited to 'app/layout/aside_feed.phtml')
| -rw-r--r-- | app/layout/aside_feed.phtml | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index c106c9ed9..a9705a296 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -57,9 +57,9 @@ $t_show = ($t_active && in_array(FreshRSS_Context::userConf()->display_categories, ['active', 'remember'], true)) || FreshRSS_Context::userConf()->display_categories === 'all'; ?> <li id="tags" class="tree-folder category tags<?= $t_active ? ' active' : '' ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>"> - <div class="tree-folder-title"> - <a class="dropdown-toggle" href="#"><?= _i($t_show ? 'up' : 'down') ?></a><a class="title" data-unread="<?= format_number($this->nbUnreadTags) ?>" href="<?= _url('index', $actual_view, 'get', 'T') . $state_filter_manual ?>"><?= _t('index.menu.tags') ?></a> - </div> + <a href="<?= _url('index', $actual_view, 'get', 'T') . $state_filter_manual ?>" class="tree-folder-title"> + <button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($t_show ? 'up' : 'down') ?></button><span class="title" title="<?= _t('sub.category.open') ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>"><?= _t('index.menu.tags') ?></span> + </a> <ul class="tree-folder-items<?= $t_show ? ' active' : '' ?>"> <?php foreach ($this->tags as $tag): @@ -93,16 +93,18 @@ ?> <li id="c_<?= $cat->id() ?>" class="tree-folder category<?= $c_active ? ' active' : '' ?>"<?= null === $position ? '' : " data-position='$position'" ?> data-unread="<?= $cat->nbNotRead() ?>"> - <div class="tree-folder-title"> - <a class="dropdown-toggle" href="#"><?= _i($c_show ? 'up' : 'down') ?></a><a class="title<?= $cat->hasFeedsWithError() ? ' error' : '' ?>" data-unread="<?= - format_number($cat->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'c_' . $cat->id()) . $state_filter_manual ?>"><?= + <a href="<?= _url('index', $actual_view, 'get', 'c_' . $cat->id()) . $state_filter_manual ?>" class="tree-folder-title"> + <button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($c_show ? 'up' : 'down') ?></button><span title="<?= _t('sub.category.open') ?>" class="title<?= $cat->hasFeedsWithError() ? ' error' : '' ?>" data-unread="<?= + format_number($cat->nbNotRead()) ?>" ><?= $cat->name() - ?><?php if ($cat->kind() == FreshRSS_Category::KIND_DYNAMIC_OPML) { echo _i('opml-dyn'); } ?></a> - </div> + ?><?php if ($cat->kind() == FreshRSS_Category::KIND_DYNAMIC_OPML) { echo _i('opml-dyn'); } ?></span> + </a> <ul class="tree-folder-items<?= $c_show ? ' active' : '' ?>"> <?php // NB: Reduce whitespace in that loop + $show_favicon = FreshRSS_Context::userConf()->show_favicons && $nbFeedsTotal < FreshRSS_Context::userConf()->simplify_over_n_feeds; + foreach ($feeds as $feed): $f_active = FreshRSS_Context::isCurrentGet('f_' . $feed->id()); $f_active_class = $f_active ? ' active' : ''; @@ -122,16 +124,23 @@ } $mute_class = $feed->mute() ? ' mute' : ''; ?> -<li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active_class, $mute_class, $error_class, $empty_class ?>" title="<?= $error_title, $empty_title ?>" +<li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active_class, $mute_class, $error_class, $empty_class ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"><?php if ($f_active || $nbFeedsTotal < FreshRSS_Context::userConf()->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 */ ?> - </div><?php - if (FreshRSS_Context::userConf()->show_favicons) { ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php } + ?><div class="dropdown no-mobile"> + <div id="dropdown-<?= $feed->id() ?>" class="dropdown-target"></div><a href="#dropdown-<?= $feed->id() ?>" class="dropdown-toggle" title="<?= _t('gen.action.menu.open') ?>" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a><?php /* feed_config_template */ ?> + </div><?php endif; - ?><a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= - _url('index', $actual_view, 'get', 'f_' . $feed->id()) . $state_filter_manual ?>"><?= $feed->name() ?></a></li> + $title = _t('sub.feed.open_feed', $feed->name()); + $title .= $error_title !== '' ? ' ⚠ ' . $error_title : ''; + $title .= $empty_title !== '' ? ' ' . $empty_title : ''; + $title .= $feed->mute() ? ' 🔇 ' . _t('sub.feed.mute.state_is_muted') : ''; + ?><a class="item-title" title="<?= $title ?>" + data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= + _url('index', $actual_view, 'get', 'f_' . $feed->id()) . $state_filter_manual ?>"> + <?php + if ($show_favicon || $f_active) { ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php } + ?><span class="title"><?= $feed->name() ?></span></a></li> <?php endforeach; ?> |
