entry_bottom.phtml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. $sharing = array();
  3. if (FreshRSS_Auth::hasAccess()) {
  4. $sharing = FreshRSS_Context::$conf->sharing;
  5. }
  6. $bottomline_read = FreshRSS_Context::$conf->bottomline_read;
  7. $bottomline_favorite = FreshRSS_Context::$conf->bottomline_favorite;
  8. $bottomline_sharing = FreshRSS_Context::$conf->bottomline_sharing && (count($sharing) > 0);
  9. $bottomline_tags = FreshRSS_Context::$conf->bottomline_tags;
  10. $bottomline_date = FreshRSS_Context::$conf->bottomline_date;
  11. $bottomline_link = FreshRSS_Context::$conf->bottomline_link;
  12. ?><ul class="horizontal-list bottom"><?php
  13. if (FreshRSS_Auth::hasAccess()) {
  14. if ($bottomline_read) {
  15. ?><li class="item manage"><?php
  16. $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $this->entry->id()));
  17. if ($this->entry->isRead()) {
  18. $arUrl['params']['is_read'] = 0;
  19. }
  20. ?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
  21. echo _i($this->entry->isRead() ? 'read' : 'unread'); ?></a><?php
  22. ?></li><?php
  23. }
  24. if ($bottomline_favorite) {
  25. ?><li class="item manage"><?php
  26. $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $this->entry->id()));
  27. if ($this->entry->isFavorite()) {
  28. $arUrl['params']['is_favorite'] = 0;
  29. }
  30. ?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
  31. echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php
  32. ?></li><?php
  33. }
  34. } ?>
  35. <li class="item"><?php
  36. if ($bottomline_sharing) {
  37. $link = urlencode($this->entry->link());
  38. $title = urlencode($this->entry->title() . ' · ' . $feed->name());
  39. ?><div class="dropdown">
  40. <div id="dropdown-share-<?php echo $this->entry->id();?>" class="dropdown-target"></div>
  41. <a class="dropdown-toggle" href="#dropdown-share-<?php echo $this->entry->id();?>">
  42. <?php echo _i('share'); ?>
  43. <?php echo _t('share'); ?>
  44. </a>
  45. <ul class="dropdown-menu">
  46. <li class="dropdown-close"><a href="#close">❌</a></li>
  47. <?php foreach ($sharing as $share) :?>
  48. <li class="item share">
  49. <a target="_blank" href="<?php echo FreshRSS_Share::generateUrl(FreshRSS_Context::$conf->shares, $share, $this->entry->link(), $this->entry->title() . ' . ' . $feed->name())?>">
  50. <?php echo _t($share['name']);?>
  51. </a>
  52. </li>
  53. <?php endforeach;?>
  54. </ul>
  55. </div>
  56. <?php } ?>
  57. </li><?php
  58. $tags = $bottomline_tags ? $this->entry->tags() : null;
  59. if (!empty($tags)) {
  60. ?><li class="item">
  61. <div class="dropdown">
  62. <div id="dropdown-tags-<?php echo $this->entry->id();?>" class="dropdown-target"></div>
  63. <?php echo _i('tag'); ?>
  64. <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $this->entry->id();?>"><?php
  65. echo _t('related_tags');
  66. ?></a>
  67. <ul class="dropdown-menu">
  68. <li class="dropdown-close"><a href="#close">❌</a></li><?php
  69. foreach($tags as $tag) {
  70. ?><li class="item"><a href="<?php echo _url('index', 'index', 'search', urlencode('#' . $tag)); ?>"><?php echo $tag; ?></a></li><?php
  71. } ?>
  72. </ul>
  73. </div>
  74. </li><?php
  75. }
  76. if ($bottomline_date) {
  77. ?><li class="item date"><?php echo $this->entry->date(); ?></li><?php
  78. }
  79. if ($bottomline_link) {
  80. ?><li class="item link"><a target="_blank" href="<?php echo $this->entry->link(); ?>"><?php echo _i('link'); ?></a></li><?php
  81. } ?>
  82. </ul>