aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2014-06-12 21:54:10 +0200
committerCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2014-06-12 21:54:10 +0200
commitd27279bd9ce6a5031da273af556c85a7139563ae (patch)
treedc97beb480f0a7d064e3162806fde2187f25715c
parentMerged in jaesivsm/pyaggr3g470r/ui_tweak (pull request #3) (diff)
parentmore ui_tweak for menus (diff)
downloadnewspipe-d27279bd9ce6a5031da273af556c85a7139563ae.tar.gz
newspipe-d27279bd9ce6a5031da273af556c85a7139563ae.tar.bz2
newspipe-d27279bd9ce6a5031da273af556c85a7139563ae.zip
Merged in jaesivsm/pyaggr3g470r (pull request #4)
Some UI improvements
-rw-r--r--pyaggr3g470r/templates/home.html29
-rw-r--r--pyaggr3g470r/templates/layout.html2
-rw-r--r--pyaggr3g470r/views.py2
3 files changed, 26 insertions, 7 deletions
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html
index 96cd83a5..14408f9a 100644
--- a/pyaggr3g470r/templates/home.html
+++ b/pyaggr3g470r/templates/home.html
@@ -1,30 +1,49 @@
{% extends "layout.html" %}
{% block content %}
-<div id="affix-nav" class="col-md-1 sidebar hidden-xs hidden-sm">
- <ul class="nav sidenav affix affix-top" data-spy="affix" data-offset-top="0" data-offset-bottom="0">
+<style>
+ li.feed-commands {display: none; text-align: right;}
+ li.feed-commands > span > a {margin-right: 10px;}
+ li.feed-menu:hover + li.feed-commands, li.feed-commands:hover {display: block;}
+</style>
+<div id="affix-nav" class="col-md-3 sidebar hidden-xs hidden-sm">
+ <ul class="nav sidenav navbar-collapse pre-scrollable" data-offset-top="0" data-offset-bottom="0" style="min-height: 600px;">
<li><a href="{{ gen_url(feed=0) }}">
{% if not feed_id %}<b>{% endif %}
{{ _('All feeds') }}
{% if not feed_id %}</b>{% endif %}
</a></li>
{% for fid in unread %}
- <li><a href="{{ gen_url(feed=fid) }}">
+ <li class="feed-menu"><a href="{{ gen_url(feed=fid) }}">
{% if feed_id == fid %}<b>{% endif %}
<span class="badge pull-right">{{ unread[fid] }}</span>
{{ feeds[fid]|safe }}
{% if feed_id == fid %}</b>{% endif %}
</a></li>
+ <li class="feed-commands"><span>
+ <a href="/articles/{{ fid }}/100"><i class="glyphicon glyphicon-th-list" title="{{ _('Articles') }}"></i></a>
+ <a href="/edit_feed/{{ fid }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this feed') }}"></i></a>
+ <a href="/delete_feed/{{ fid }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this feed') }}" onclick="return confirm('{{ _('You are going to delete this feed.') }}');"></i></a>
+ <a href="/mark_as/read/feed/{{ fid }}"><i class="glyphicon glyphicon-check" title="{{ _('Mark this feed as read') }}"></i></a>
+ <a href="/mark_as/unread/feed/{{ fid }}"><i class="glyphicon glyphicon-unchecked" title="{{ _('Mark this feed as unread') }}"></i></a>
+ </span></li>
{% endfor %}
{% for fid, ftitle in feeds.items() if not fid in unread %}
- <li><a href="{{ gen_url(feed=fid) }}">
+ <li class="feed-menu"><a href="{{ gen_url(feed=fid) }}">
{% if feed_id == fid %}<b>{% endif %}
{{ ftitle|safe }}
{% if feed_id == fid %}</b>{% endif %}
</a></li>
+ <li class="feed-commands"><span>
+ <a href="/articles/{{ fid }}/100"><i class="glyphicon glyphicon-th-list" title="{{ _('Articles') }}"></i></a>
+ <a href="/edit_feed/{{ fid }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this feed') }}"></i></a>
+ <a href="/delete_feed/{{ fid }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this feed') }}" onclick="return confirm('{{ _('You are going to delete this feed.') }}');"></i></a>
+ <a href="/mark_as/read/feed/{{ fid }}"><i class="glyphicon glyphicon-check" title="{{ _('Mark this feed as read') }}"></i></a>
+ <a href="/mark_as/unread/feed/{{ fid }}"><i class="glyphicon glyphicon-unchecked" title="{{ _('Mark this feed as unread') }}"></i></a>
+ </span></li>
{% endfor %}
</ul>
</div>
-<div class="container col-md-9" style="float: right;">
+<div class="container col-md-9">
<h1>{{ _('Your articles') }} ({{ articles.__len__() }})</h1>
<div>
{% if filter_ == 'all' %}<b>{% endif %}
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index 543fc823..8fc88d74 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -145,7 +145,7 @@ deployed on Heroku or on a traditional server." />
</div><!-- /.container -->
</nav>
- <div class="container" style="float: right">
+ <div class="container">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 1b3be75e..8a3ccbe9 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -358,7 +358,7 @@ def mark_as(new_value='read', feed_id=None, article_id=None):
db.session.commit()
if readed:
return redirect(redirect_url())
- return redirect(redirect_url())
+ return redirect(url_for('home'))
@app.route('/like/<int:article_id>', methods=['GET'])
@login_required
bgstack15