aside_flux.phtml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <div class="aside aside_flux<?php if ($this->conf->hide_read_feeds && ($this->state & FreshRSS_Entry::STATE_NOT_READ) && !($this->state & FreshRSS_Entry::STATE_READ)) echo ' state_unread'; ?>" id="aside_flux">
  2. <a class="toggle_aside" href="#close"><?php echo _i('close'); ?></a>
  3. <ul class="categories">
  4. <?php if ($this->loginOk) { ?>
  5. <form id="mark-read-aside" method="post" style="display: none"></form>
  6. <li>
  7. <div class="stick configure-feeds">
  8. <a class="btn btn-important" href="<?php echo _url('subscription', 'index'); ?>"><?php echo _t('subscription_management'); ?></a>
  9. <a class="btn btn-important" href="<?php echo _url('importExport', 'index'); ?>"><?php echo _i('import'); ?></a>
  10. </div>
  11. </li>
  12. <?php } elseif (Minz_Configuration::needsLogin()) { ?>
  13. <li><a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('about_freshrss'); ?></a></li>
  14. <?php } ?>
  15. <?php
  16. $arUrl = array('c' => 'index', 'a' => 'index', 'params' => array());
  17. if ($this->conf->view_mode !== Minz_Request::param('output', 'normal')) {
  18. $arUrl['params']['output'] = 'normal';
  19. }
  20. ?>
  21. <li>
  22. <div class="category all<?php echo $this->get_c == 'a' ? ' active' : ''; ?>">
  23. <a data-unread="<?php echo formatNumber($this->nb_not_read); ?>" class="btn<?php echo $this->get_c == 'a' ? ' active' : ''; ?>" href="<?php echo Minz_Url::display($arUrl); ?>">
  24. <?php echo _i('all'); ?>
  25. <?php echo _t('main_stream'); ?>
  26. </a>
  27. </div>
  28. </li>
  29. <li>
  30. <div class="category favorites<?php echo $this->get_c == 's' ? ' active' : ''; ?>">
  31. <a data-unread="<?php echo formatNumber($this->nb_favorites['unread']); ?>" class="btn<?php echo $this->get_c == 's' ? ' active' : ''; ?>" href="<?php $arUrl['params']['get'] = 's'; echo Minz_Url::display($arUrl); ?>">
  32. <?php echo _i('bookmark'); ?>
  33. <?php echo _t('favorite_feeds', formatNumber($this->nb_favorites['all'])); ?>
  34. </a>
  35. </div>
  36. </li>
  37. <?php
  38. foreach ($this->cat_aside as $cat) {
  39. $feeds = $cat->feeds();
  40. if (!empty($feeds)) {
  41. $c_active = false;
  42. $c_show = false;
  43. if ($this->get_c == $cat->id()) {
  44. $c_active = true;
  45. if (!$this->conf->display_categories || $this->get_f) {
  46. $c_show = true;
  47. }
  48. }
  49. ?><li data-unread="<?php echo $cat->nbNotRead(); ?>"<?php if ($c_active) echo ' class="active"'; ?>><?php
  50. ?><div class="category stick<?php echo $c_active ? ' active' : ''; ?>"><?php
  51. ?><a data-unread="<?php echo formatNumber($cat->nbNotRead()); ?>" class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php $arUrl['params']['get'] = 'c_' . $cat->id(); echo Minz_Url::display($arUrl); ?>"><?php echo $cat->name(); ?></a><?php
  52. ?><a class="btn dropdown-toggle" href="#"><?php echo _i($c_show ? 'up' : 'down'); ?></a><?php
  53. ?></div><?php
  54. ?><ul class="feeds<?php echo $c_show ? ' active' : ''; ?>"><?php
  55. foreach ($feeds as $feed) {
  56. $feed_id = $feed->id();
  57. $nbEntries = $feed->nbEntries();
  58. $f_active = ($this->get_f == $feed_id);
  59. ?><li id="f_<?php echo $feed_id; ?>" class="item<?php echo $f_active ? ' active' : ''; ?><?php echo $feed->inError() ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>"><?php
  60. ?><div class="dropdown"><?php
  61. ?><div class="dropdown-target"></div><?php
  62. ?><a class="dropdown-toggle" data-fweb="<?php echo $feed->website(); ?>"><?php echo _i('configure'); ?></a><?php
  63. /* feed_config_template */
  64. ?></div><?php
  65. ?> <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <?php
  66. ?><a class="feed" data-unread="<?php echo formatNumber($feed->nbNotRead()); ?>" data-priority="<?php echo $feed->priority(); ?>" href="<?php $arUrl['params']['get'] = 'f_' . $feed_id; echo Minz_Url::display($arUrl); ?>"><?php echo $feed->name(); ?></a><?php
  67. ?></li><?php
  68. }
  69. ?></ul><?php
  70. ?></li><?php
  71. }
  72. } ?>
  73. </ul>
  74. <span class="aside_flux_ender"><!-- For fixed menu --></span>
  75. </div>
  76. <script id="feed_config_template" type="text/html">
  77. <ul class="dropdown-menu">
  78. <li class="dropdown-close"><a href="#close">❌</a></li>
  79. <li class="item"><a href="<?php echo _url('index', 'index', 'get', 'f_!!!!!!'); ?>"><?php echo _t('filter'); ?></a></li>
  80. <?php if ($this->loginOk) { ?>
  81. <li class="item"><a href="<?php echo _url('stats', 'repartition', 'id', '!!!!!!'); ?>"><?php echo _t('stats'); ?></a></li>
  82. <?php } ?>
  83. <li class="item"><a target="_blank" href="http://example.net/"><?php echo _t('see_website'); ?></a></li>
  84. <?php if ($this->loginOk) { ?>
  85. <li class="separator"></li>
  86. <li class="item"><a href="<?php echo _url('subscription', 'index', 'id', '!!!!!!'); ?>"><?php echo _t('administration'); ?></a></li>
  87. <li class="item"><a href="<?php echo _url('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo _t('actualize'); ?></a></li>
  88. <li class="item">
  89. <?php $confirm = $this->conf->reading_confirm ? 'confirm' : ''; ?>
  90. <button class="read_all as-link <?php echo $confirm; ?>"
  91. form="mark-read-aside"
  92. formaction="<?php echo _url('entry', 'read', 'get', 'f_!!!!!!'); ?>"
  93. type="submit"><?php echo _t('mark_read'); ?></button>
  94. </li>
  95. <?php } ?>
  96. </ul>
  97. </script>