diff options
| author | 2023-03-04 14:51:07 +0100 | |
|---|---|---|
| committer | 2023-03-04 14:51:07 +0100 | |
| commit | d3966befafab3fe65e753d0ab2166a8bf5fb0d75 (patch) | |
| tree | 1f77b9874bfe9c557ca4370d34a0c6bbe3257e9f /app/views | |
| parent | 27c7367534518f1adfd9b12551a2c7a45459cab3 (diff) | |
feat: create config to display website icon only / name only / icon and name / none on feeds (#4969)
* feat: create config to display website icon only / name only / icon and name / none on feeds
* fix title hovering
* reverted: column in .phtml
* Update app/i18n/fr/conf.php
---------
Co-authored-by: mathContao <math-home@web.de>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/display.phtml | 21 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 12 |
2 files changed, 29 insertions, 4 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 44ca242ad..dc410a00a 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -136,6 +136,27 @@ </div> </div> + <?php $topline_website = FreshRSS_Context::$user_conf->topline_website; ?> + <div class="form-group"> + <label class="group-name" for="topline_website"><?= _t('conf.display.website.label') ?></label> + <div class="group-controls"> + <select name="topline_website" id="topline_website" required="" data-leave-validation="<?= $topline_website ?>"> + <option value="none" <?= $topline_website === 'none' ? 'selected="selected"' : '' ?>> + <?= _t('conf.display.website.none') ?> + </option> + <option value="icon" <?= $topline_website === 'icon' ? 'selected="selected"' : '' ?>> + <?= _t('conf.display.website.icon') ?> + </option> + <option value="name" <?= $topline_website === 'name' ? 'selected="selected"' : '' ?>> + <?= _t('conf.display.website.name') ?> + </option> + <option value="full" <?= $topline_website === 'full' ? 'selected="selected"' : '' ?>> + <?= _t('conf.display.website.full') ?> + </option> + </select> + </div> + </div> + <?php $topline_thumbnail = FreshRSS_Context::$user_conf->topline_thumbnail; ?> <div class="form-group"> <label class="group-name" for="topline_thumbnail"><?= _t('conf.display.thumbnail.label') ?></label> diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 92eacf617..4cfb5beda 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -2,13 +2,14 @@ /** @var FreshRSS_View $this */ $topline_read = FreshRSS_Context::$user_conf->topline_read; $topline_favorite = FreshRSS_Context::$user_conf->topline_favorite; + $topline_website = FreshRSS_Context::$user_conf->topline_website; $topline_thumbnail = FreshRSS_Context::$user_conf->topline_thumbnail; $topline_summary = FreshRSS_Context::$user_conf->topline_summary; $topline_display_authors = FreshRSS_Context::$user_conf->topline_display_authors; $topline_date = FreshRSS_Context::$user_conf->topline_date; $topline_link = FreshRSS_Context::$user_conf->topline_link; $lazyload = FreshRSS_Context::$user_conf->lazyload; -?><ul class="horizontal-list flux_header"><?php +?><ul class="horizontal-list flux_header website<?= $topline_website ?>"><?php if (FreshRSS_Auth::hasAccess()) { if ($topline_read) { ?><li class="item manage"><?php @@ -31,11 +32,14 @@ ?></li><?php } } - ?><li class="item website"> + + if ($topline_website !== 'none'): + ?><li class="item website <?= $topline_website ?>"> <a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>" class="item-element" title="<?= _t('gen.action.filter') ?>: <?= $this->feed->name() ?>"> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?><span><?= $this->feed->name() ?></span> + <?php if (FreshRSS_Context::$user_conf->show_favicons && 'name' !== $topline_website): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?><?php if ('icon' !== $topline_website): ?><span class="websiteName"><?= $this->feed->name() ?></span><?php endif; ?> </a> - </li> + </li><?php + endif; ?> <?php if ($topline_thumbnail !== 'none'): |
