aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates/layout.html
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-04-12 14:28:03 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-04-12 14:31:06 +0200
commitea60cca948469daaff940698f27f3cb9a53300c3 (patch)
tree3566cd8c213c621c83422f9d6783e5e9f748a5ff /pyaggr3g470r/templates/layout.html
parentno redirect from home if no feed has been tfiltered in (diff)
downloadnewspipe-ea60cca948469daaff940698f27f3cb9a53300c3.tar.gz
newspipe-ea60cca948469daaff940698f27f3cb9a53300c3.tar.bz2
newspipe-ea60cca948469daaff940698f27f3cb9a53300c3.zip
making the favorites link switch to home when the displayed page is favorites
Diffstat (limited to 'pyaggr3g470r/templates/layout.html')
-rw-r--r--pyaggr3g470r/templates/layout.html22
1 files changed, 13 insertions, 9 deletions
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index d15d99d8..e673a128 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -25,7 +25,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="/">pyAggr3g470r</a>
+ <a class="navbar-brand" href="{{ url_for("home") }}">pyAggr3g470r</a>
<span class="navbar-brand">{% if head_title %} - {{ head_title }}{% endif %}</span>
</div>
@@ -34,7 +34,11 @@
<ul class="nav navbar-nav navbar-right">
{% if g.user.is_authenticated() %}
<li><a href="{{ url_for("feed.form") }}"><span class="glyphicon glyphicon-plus-sign"></span>{{ _('Add a feed') }}</a></li>
- <li><a accesskey="f" href="/favorites"><span class="glyphicon glyphicon-star"></span> {{ _('Favorites') }}</a></li>
+ {% if favorites %}
+ <li><a href="{{ url_for("home") }}"><span class="glyphicon glyphicon-home"></span> {{ _('Home') }}</a></li>
+ {% else %}
+ <li><a accesskey="f" href="{{ url_for("favorites") }}"><span class="glyphicon glyphicon-star"></span> {{ _('Favorites') }}</a></li>
+ {% endif %}
{% if conf.ON_HEROKU and g.user.is_admin() %}
<li><a accesskey="r" href="/fetch"><span class="glyphicon glyphicon-import"></span>{{ _('Fetch') }}</a></li>
{% endif %}
@@ -43,22 +47,22 @@
<ul class="dropdown-menu">
<li><a href="{{ url_for("feeds.update", action="read") }}">{{ _('Mark all as read') }}</a></li>
<li role="presentation" class="divider"></li>
- <li><a accesskey="i" href="/inactives">{{ _('Inactive') }}</a></li>
- <li><a href="/history">{{ _('History') }}</a></li>
+ <li><a accesskey="i" href="{{ url_for("inactives") }}">{{ _('Inactive') }}</a></li>
+ <li><a href="{{ url_for("history") }}">{{ _('History') }}</a></li>
<li><a href="{{ url_for("feeds.feeds") }}">{{ _('All') }}</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ _('Tools') }} <b class="caret"></b></a>
<ul class="dropdown-menu">
- <li><a accesskey="m" href="/management"><span class="glyphicon glyphicon-cog"></span> {{ _('Management') }}</a></li>
+i <li><a accesskey="m" href="{{ url_for("management") }}"><span class="glyphicon glyphicon-cog"></span> {{ _('Management') }}</a></li>
{% if g.user.is_admin() %}
- <li><a href="{{ url_for('dashboard') }}"><span class="glyphicon glyphicon-dashboard"></span> {{ _('Dashboard') }}</a></li>
+ <li><a href="{{ url_for("dashboard") }}"><span class="glyphicon glyphicon-dashboard"></span> {{ _('Dashboard') }}</a></li>
{% endif %}
- <li><a href="/about"><span class="glyphicon glyphicon-question-sign"></span>{{ _('About') }}</a></li>
+ <li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span>{{ _('About') }}</a></li>
</ul>
</li>
- <li><a href="{{ url_for('logout') }}"><span class="glyphicon glyphicon-log-out"></span> {{ _('Logout') }}</a></li>
+ <li><a href="{{ url_for("logout") }}"><span class="glyphicon glyphicon-log-out"></span> {{ _('Logout') }}</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<div><span class="glyphicon glyphicon-search"></span>&nbsp;<b class="caret"></b></div>
@@ -74,7 +78,7 @@
</ul>
</li>
{% else %}
- <li><a href="/about">{{ _('About') }}</a></li>
+ <li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span>{{ _('About') }}</a></li>
{% endif %}
</ul>
</div><!-- /.navbar-collapse -->
bgstack15