aside_flux.phtml 5.1 KB

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