entry_header.phtml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. $topline_read = FreshRSS_Context::$user_conf->topline_read;
  3. $topline_favorite = FreshRSS_Context::$user_conf->topline_favorite;
  4. $topline_display_authors = FreshRSS_Context::$user_conf->topline_display_authors;
  5. $topline_date = FreshRSS_Context::$user_conf->topline_date;
  6. $topline_link = FreshRSS_Context::$user_conf->topline_link;
  7. ?><ul class="horizontal-list flux_header"><?php
  8. if (FreshRSS_Auth::hasAccess()) {
  9. if ($topline_read) {
  10. ?><li class="item manage"><?php
  11. $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $this->entry->id()));
  12. if ($this->entry->isRead()) {
  13. $arUrl['params']['is_read'] = 0;
  14. }
  15. ?><a class="read" href="<?= Minz_Url::display($arUrl) ?>"><?php
  16. echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
  17. ?></li><?php
  18. }
  19. if ($topline_favorite) {
  20. ?><li class="item manage"><?php
  21. $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $this->entry->id()));
  22. if ($this->entry->isFavorite()) {
  23. $arUrl['params']['is_favorite'] = 0;
  24. }
  25. ?><a class="bookmark" href="<?= Minz_Url::display($arUrl) ?>"><?php
  26. echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
  27. ?></li><?php
  28. }
  29. }
  30. ?><li class="item website"><a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>"><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" /> <span><?= $this->feed->name() ?></span></a></li>
  31. <li class="item title" dir="auto"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>"><?= $this->entry->title() ?></a><?php
  32. if ($topline_display_authors):
  33. ?><div class="item author"><?php
  34. $authors = $this->entry->authors();
  35. if (is_array($authors)) {
  36. $first = true;
  37. foreach ($authors as $author) {
  38. echo $first ? $author : ', ' . $author;
  39. $first = false;
  40. }
  41. }
  42. ?></div><?php
  43. endif;
  44. ?></li>
  45. <?php if ($topline_date) { ?><li class="item date"><?= $this->entry->date() ?> </li><?php } ?>
  46. <?php if ($topline_link) { ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>"><?= _i('link') ?></a></li><?php } ?>
  47. </ul>