|
1 | 1 | <?php |
2 | 2 | declare(strict_types=1); |
3 | 3 | /** @var FreshRSS_View $this */ |
4 | | - if ($this->feed === null) { |
5 | | - throw new FreshRSS_Context_Exception('Feed not initialised!'); |
6 | | - } |
7 | 4 | $topline_read = FreshRSS_Context::userConf()->topline_read; |
8 | 5 | $topline_favorite = FreshRSS_Context::userConf()->topline_favorite; |
| 6 | + $topline_sharing = FreshRSS_Context::userConf()->topline_sharing; |
9 | 7 | $topline_website = FreshRSS_Context::userConf()->topline_website; |
10 | 8 | $topline_thumbnail = FreshRSS_Context::userConf()->topline_thumbnail; |
11 | 9 | $topline_summary = FreshRSS_Context::userConf()->topline_summary; |
|
17 | 15 | if (FreshRSS_Auth::hasAccess()) { |
18 | 16 | if ($topline_read) { |
19 | 17 | ?><li class="item manage"><?php |
20 | | - $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $this->entry->id())); |
| 18 | + $arUrl = ['c' => 'entry', 'a' => 'read', 'params' => ['id' => $this->entry->id()]]; |
21 | 19 | if ($this->entry->isRead()) { |
22 | | - $arUrl['params']['is_read'] = 0; |
| 20 | + $arUrl['params']['is_read'] = '0'; |
23 | 21 | } |
24 | 22 | ?><a class="item-element read" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_read') ?>"><?php |
25 | 23 | echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php |
|
37 | 35 |
|
38 | 36 | if ($topline_favorite) { |
39 | 37 | ?><li class="item manage"><?php |
40 | | - $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $this->entry->id())); |
| 38 | + $arUrl = ['c' => 'entry', 'a' => 'bookmark', 'params' => ['id' => $this->entry->id()]]; |
41 | 39 | if ($this->entry->isFavorite()) { |
42 | | - $arUrl['params']['is_favorite'] = 0; |
| 40 | + $arUrl['params']['is_favorite'] = '0'; |
43 | 41 | } |
44 | 42 | ?><a class="item-element bookmark" href="<?= Minz_Url::display($arUrl) ?>" title="<?= _t('conf.shortcut.mark_favorite') ?>"><?php |
45 | 43 | echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php |
|
64 | 62 | endif; |
65 | 63 | ?></li><?php |
66 | 64 | endif; ?> |
67 | | - |
68 | | - <li class="item title<?= (($topline_thumbnail !== 'none') || $topline_summary) ? ' multiline' : '' ?>" dir="auto"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" class="item-element"><?= $this->entry->title() ?><?php |
| 65 | + <li class="item titleAuthorSummaryDate"> |
| 66 | + <a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" class="item-element title<?= (($topline_thumbnail !== 'none') || $topline_summary) ? ' multiline' : '' ?>" dir="auto"><?= $this->entry->title() ?><?php |
69 | 67 | if ($topline_display_authors): |
70 | 68 | ?><span class="author"><?php |
71 | 69 | $authors = $this->entry->authors(); |
|
78 | 76 | } |
79 | 77 | ?></span><?php |
80 | 78 | endif; |
| 79 | + ?></a> |
| 80 | + <?php |
81 | 81 | if ($topline_summary): |
82 | 82 | ?><div class="summary"><?= trim(mb_substr(strip_tags($this->entry->content(false)), 0, 500, 'UTF-8')) ?></div><?php |
83 | | - endif; |
84 | | - ?></a></li> |
85 | | - <?php if ($topline_date) { ?><li class="item date"><time datetime="<?= $this->entry->machineReadableDate() ?>" class="item-element"><?= $this->entry->date() ?></time> </li><?php } ?> |
| 83 | + endif; ?> |
| 84 | + <?php if ($topline_date) { ?><span class="item-element date"><time datetime="<?= $this->entry->machineReadableDate() ?>"><?= $this->entry->date() ?></time> </span><?php } ?> |
| 85 | + </li> |
| 86 | + <?php if ($topline_sharing) { ?> |
| 87 | + <li class="item share"> |
| 88 | + <div class="item-element dropdown"> |
| 89 | + <div id="dropdown-share2-<?= $this->entry->id() ?>" class="dropdown-target"></div> |
| 90 | + <a class="dropdown-toggle" href="#dropdown-share2-<?= $this->entry->id() ?>" title="<?= _t('index.share') ?>"> |
| 91 | + <?= _i('share') ?> |
| 92 | + </a> |
| 93 | + <?php $this->renderHelper('index/normal/entry_share_menu'); ?> |
| 94 | + <a class="dropdown-close" href="#close">❌</a> |
| 95 | + </div> |
| 96 | + </li> |
| 97 | + <?php } ?> |
86 | 98 | <?php if ($topline_link) { ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" class="item-element" title="<?= |
87 | 99 | _t('conf.shortcut.see_on_website') ?>"><?= _i('link') ?></a></li><?php } ?> |
88 | 100 | </ul> |
0 commit comments