entry_header.phtml 1.8 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. $topline_read = FreshRSS_Context::$user_conf->topline_read;
  3. $topline_favorite = FreshRSS_Context::$user_conf->topline_favorite;
  4. $topline_date = FreshRSS_Context::$user_conf->topline_date;
  5. $topline_link = FreshRSS_Context::$user_conf->topline_link;
  6. ?><ul class="horizontal-list flux_header"><?php
  7. if (FreshRSS_Auth::hasAccess()) {
  8. if ($topline_read) {
  9. ?><li class="item manage"><?php
  10. $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $this->entry->id()));
  11. if ($this->entry->isRead()) {
  12. $arUrl['params']['is_read'] = 0;
  13. }
  14. ?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
  15. echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
  16. ?></li><?php
  17. }
  18. if ($topline_favorite) {
  19. ?><li class="item manage"><?php
  20. $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $this->entry->id()));
  21. if ($this->entry->isFavorite()) {
  22. $arUrl['params']['is_favorite'] = 0;
  23. }
  24. ?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
  25. echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
  26. ?></li><?php
  27. }
  28. }
  29. ?><li class="item website"><a href="<?php echo _url('index', 'index', 'get', 'f_' . $this->feed->id()); ?>"><img class="favicon" src="<?php echo $this->feed->favicon(); ?>" alt="✇" /> <span><?php echo $this->feed->name(); ?></span></a></li>
  30. <li class="item title"><a target="_blank" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a></li>
  31. <?php if ($topline_date) { ?><li class="item date"><?php echo $this->entry->date(); ?> </li><?php } ?>
  32. <?php if ($topline_link) { ?><li class="item link"><a target="_blank" href="<?php echo $this->entry->link(); ?>"><?php echo _i('link'); ?></a></li><?php } ?>
  33. </ul>