diff options
| author | 2025-09-25 23:20:50 +0200 | |
|---|---|---|
| committer | 2025-09-25 23:20:50 +0200 | |
| commit | e79c2866bda4bc2af77e26be60f50582f2375ed8 (patch) | |
| tree | a8cca42bb2e8137e7583291134bbaa6e80c2f28a /app | |
| parent | 9dd30f03ec8b6176de1a23ea8c3daa506103cc48 (diff) | |
fix: anonym. mode: Do not show config button in sharing menu (#8012)
* Ref #8001
Do not show the config button in the article sharing menu if it is in the anonym. mode
* Minor whitespace reduction
Because it is a section that is used many times
---------
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/helpers/index/normal/entry_share_menu.phtml | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/app/views/helpers/index/normal/entry_share_menu.phtml b/app/views/helpers/index/normal/entry_share_menu.phtml index ca41b23a5..6877dd94a 100644 --- a/app/views/helpers/index/normal/entry_share_menu.phtml +++ b/app/views/helpers/index/normal/entry_share_menu.phtml @@ -3,11 +3,16 @@ /** @var FreshRSS_View $this */ ?> <ul class="dropdown-menu"> - <li class="dropdown-header"><?= _t('index.share') ?> <a href="<?= _url('configure', 'integration') ?>"><?= _i('configure') ?></a></li><?php + <li class="dropdown-header"><?= _t('index.share') ?> <?php + if (FreshRSS_Auth::hasAccess()): + ?><a href="<?= _url('configure', 'integration') ?>"><?php + ?><?= _i('configure') ?></a><?php + endif; + ?></li><?php $id = '--entryId--'; $link = '--link--'; $title = '--titleText----websiteName----articleAuthors--'; - foreach (FreshRSS_Context::userConf()->sharing as $share_options) { + foreach (FreshRSS_Context::userConf()->sharing as $share_options): $share = FreshRSS_Share::get($share_options['type']); if ($share === null) { continue; @@ -17,20 +22,19 @@ $share_options['link'] = $link; $share_options['title'] = $title; $share->update($share_options); - ?><li class="item share<?= $cssClass ?>"> - <?php if ('GET' === $share->method()) { - if ($share->HTMLtag() !== 'button') {?> - <a target="_blank" rel="noreferrer" href="<?= $share->url() ?>" data-type="<?= $share->type() ?>"><?= $share->name() ?></a> - <?php } else { ?> - <button type="button" class="as-link" data-url="<?= $share->url() ?>" data-type="<?= $share->type() ?>" data-title="<?= htmlspecialchars($title) ?>"><?= $share->name() ?></button> - <?php + ?><li class="item share<?= $cssClass ?>"><?php + if ('GET' === $share->method()): + if ($share->HTMLtag() !== 'button') { + ?><a target="_blank" rel="noreferrer" href="<?= $share->url() ?>" data-type="<?= $share->type() ?>"><?= $share->name() ?></a><?php + } else { + ?><button type="button" class="as-link" data-url="<?= $share->url() ?>" data-type="<?= $share->type() ?>" data-title="<?= htmlspecialchars($title) ?>"><?= $share->name() ?></button><?php } - } else {?> - <a href="POST"><?= $share->name() ?></a> + else: + ?><a href="POST"><?= $share->name() ?></a> <form method="POST" action="<?= $share->url() ?>" disabled="disabled"> <input type="hidden" value="<?= $link ?>" name="<?= $share->field() ?>"/> - </form> - <?php } ?> + </form><?php + endif; ?> </li><?php - } + endforeach; ?></ul> |
