diff options
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r-- | pyaggr3g470r/templates/layout.html | 22 | ||||
-rw-r--r-- | pyaggr3g470r/views/views.py | 4 |
2 files changed, 15 insertions, 11 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> <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 --> diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py index 512fdf06..4e610d63 100644 --- a/pyaggr3g470r/views/views.py +++ b/pyaggr3g470r/views/views.py @@ -265,13 +265,13 @@ def home(favorites=False): return render_template('home.html', gen_url=gen_url, feed_id=feed_id, filter_=filter_, limit=limit, feeds=feeds, unread=unread, articles=articles, in_error=in_error, - head_title=head_title, + head_title=head_title, favorites=favorites, default_max_error = conf.DEFAULT_MAX_ERROR) @app.route('/favorites') @login_required -def favorties(): +def favorites(): return home(favorites=True) |