diff options
-rw-r--r-- | pyaggr3g470r/templates/edit_feed.html | 49 | ||||
-rw-r--r-- | pyaggr3g470r/views/article.py | 1 | ||||
-rw-r--r-- | pyaggr3g470r/views/feed.py | 12 |
3 files changed, 37 insertions, 25 deletions
diff --git a/pyaggr3g470r/templates/edit_feed.html b/pyaggr3g470r/templates/edit_feed.html index be63aa53..a56238d5 100644 --- a/pyaggr3g470r/templates/edit_feed.html +++ b/pyaggr3g470r/templates/edit_feed.html @@ -2,23 +2,46 @@ {% block content %} <div class="container"> <div class="well"> - <h1>{{ action }}</h1> - <form action="" method="post" name="save"> + <h3>{{ action }}</h3> + <form action="" method="post" name="save" class="form-horizontal"> {{ form.hidden_tag() }} + <div class="form-group"> + <label for="{{ form.link.id }}" class="col-sm-3 control-label">{{ form.link.label }}</label> + <div class="col-sm-9"> + {{ form.link(size="100%") }} + </div> + {% for error in form.link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} + </div> - {{ form.link.label }} - {{ form.link(class_="form-control") }} {% for error in form.link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} + <div class="form-group"> + <label for="{{ form.title.id }}" class="col-sm-3 control-label">{{ form.title.label }}</label> + <div class="col-sm-9"> + {{ form.title(size="100%", placeholder=_('Optional')) }} + </div> + {% for error in form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} + </div> - {{ form.title.label }} - {{ form.title(class_="form-control", placeholder=_('Optional')) }} {% for error in form.title.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} + <div class="form-group"> + <label for="{{ form.site_link.id }}" class="col-sm-3 control-label">{{ form.site_link.label }}</label> + <div class="col-sm-9"> + {{ form.site_link(size="100%", placeholder=_('Optional')) }} + </div> + {% for error in form.site_link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} + </div> - {{ form.site_link.label }} - {{ form.site_link(class_="form-control", placeholder=_('Optional')) }} {% for error in form.site_link.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} - - {{ form.enabled.label }} - {{ form.enabled(class_="checkbox") }} - <br /> - {{ form.submit(class_="btn btn-default") }} + <div class="form-group"> + <label for="{{ form.enabled.id }}" class="col-sm-3 control-label">{{ form.enabled.label }}</label> + <div class="col-sm-9"> + <div class="checkbox"> + {{ form.enabled(style="margin-left: 0px;") }} + </div> + </div> + </div> + <div class="form-group"> + <div class="col-sm-offset-3 col-sm-9"> + {{ form.submit(class_="btn btn-default") }} + </div> + </div> </form> </div> </div><!-- /.container --> diff --git a/pyaggr3g470r/views/article.py b/pyaggr3g470r/views/article.py index 5843551e..6de07ad3 100644 --- a/pyaggr3g470r/views/article.py +++ b/pyaggr3g470r/views/article.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 - from flask import Blueprint, g, render_template, redirect -from sqlalchemy import desc from pyaggr3g470r import controllers, utils from pyaggr3g470r.decorators import pyagg_default_decorator diff --git a/pyaggr3g470r/views/feed.py b/pyaggr3g470r/views/feed.py index d50d0883..022980f4 100644 --- a/pyaggr3g470r/views/feed.py +++ b/pyaggr3g470r/views/feed.py @@ -27,8 +27,7 @@ def feeds(): return render_template('feeds.html', feeds=FeedController(g.user.id).read(), unread_article_count=art_contr.count_by_feed(readed=False), - article_count=art_contr.count_by_feed(), - ) + article_count=art_contr.count_by_feed()) @feed_bp.route('/<int:feed_id>', methods=['GET']) @@ -110,15 +109,6 @@ def bookmarklet(): return redirect(url_for('feed.form', feed_id=feed.id)) -@feed_bp.route('/read/<int:feed_id>', methods=['GET', 'POST']) -@login_required -def read(feed_id): - FeedController(g.user.id).update(readed=True) - flash(gettext('Feed successfully updated.', - feed_title=feed.title), 'success') - return redirect(request.referrer or url_for('home')) - - @feed_bp.route('/update/<action>/<int:feed_id>', methods=['GET', 'POST']) @feeds_bp.route('/update/<action>', methods=['GET', 'POST']) @login_required |