Commit 59bf568f authored by Kennyl's avatar Kennyl Committed by GitHub

Merge branch 'master' into fix/python3-patch-20170308

parents d7afbdc3 74a3e684
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<input name="detail_view" type="checkbox" checked> {{_('view book after edit')}} <input name="detail_view" type="checkbox" checked> {{_('view book after edit')}}
</label> </label>
</div> </div>
<a href="#" id="get_meta" class="btn btn-default" data-toggle="modal" data-target="#metaModal">{{_('Get Metadata')}}</a> <a href="#" id="get_meta" class="btn btn-default" data-toggle="modal" data-target="#metaModal">{{_('Get metadata')}}</a>
<button type="submit" class="btn btn-default">{{_('Submit')}}</button> <button type="submit" class="btn btn-default">{{_('Submit')}}</button>
<a href="{{ url_for('show_book',id=book.id) }}" class="btn btn-default">{{_('Back')}}</a> <a href="{{ url_for('show_book',id=book.id) }}" class="btn btn-default">{{_('Back')}}</a>
</form> </form>
...@@ -150,9 +150,7 @@ ...@@ -150,9 +150,7 @@
</script> </script>
<script src="{{ url_for('static', filename='js/libs/typeahead.bundle.js') }}"></script> <script src="{{ url_for('static', filename='js/libs/typeahead.bundle.js') }}"></script>
<script src="{{ url_for('static', filename='js/edit_books.js') }}"></script> <script src="{{ url_for('static', filename='js/edit_books.js') }}"></script>
<<<<<<< HEAD
<script src="{{ url_for('static', filename='js/libs/bootstrap-rating-input.min.js') }}"></script> <script src="{{ url_for('static', filename='js/libs/bootstrap-rating-input.min.js') }}"></script>
=======
<script src="{{ url_for('static', filename='js/get_meta.js') }}"></script> <script src="{{ url_for('static', filename='js/get_meta.js') }}"></script>
{% endblock %} {% endblock %}
{% block header %} {% block header %}
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</button> </button>
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop1"> <ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
{% for format in entry.data %} {% for format in entry.data %}
<li><a href="{{ url_for('get_download_link', book_id=entry.id, format=format.format|lower) }}">{{format.format}}</a></li> <li><a href="{{ url_for('get_download_link_ext', book_id=entry.id, format=format.format|lower, anyname=entry.id|string+'.'+format.format) }}">{{format.format}}</a></li>
{%endfor%} {%endfor%}
</ul> </ul>
</div> </div>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -60,9 +60,8 @@ except ImportError as e: ...@@ -60,9 +60,8 @@ except ImportError as e:
try: try:
from wand.image import Image from wand.image import Image
use_generic_pdf_cover = False use_generic_pdf_cover = False
except ImportError as e: except ImportError:
use_generic_pdf_cover = True use_generic_pdf_cover = True
from cgi import escape from cgi import escape
...@@ -1312,7 +1311,6 @@ def read_book(book_id, format): ...@@ -1312,7 +1311,6 @@ def read_book(book_id, format):
flash(_(u"Error opening eBook. File does not exist or file is not accessible:"), category="error") flash(_(u"Error opening eBook. File does not exist or file is not accessible:"), category="error")
return redirect(url_for("index")) return redirect(url_for("index"))
@app.route("/download/<int:book_id>/<format>") @app.route("/download/<int:book_id>/<format>")
@login_required_if_no_ano @login_required_if_no_ano
@download_required @download_required
...@@ -1339,6 +1337,11 @@ def get_download_link(book_id, format): ...@@ -1339,6 +1337,11 @@ def get_download_link(book_id, format):
else: else:
abort(404) abort(404)
@app.route("/download/<int:book_id>/<format>/<anyname>")
@login_required_if_no_ano
@download_required
def get_download_link_ext(book_id, format, anyname):
return get_download_link(book_id, format)
@app.route('/register', methods=['GET', 'POST']) @app.route('/register', methods=['GET', 'POST'])
def register(): def register():
...@@ -1859,12 +1862,15 @@ def edit_mailsettings(): ...@@ -1859,12 +1862,15 @@ def edit_mailsettings():
except e: except e:
flash(e, category="error") flash(e, category="error")
if "test" in to_save and to_save["test"]: if "test" in to_save and to_save["test"]:
if current_user.kindle_mail:
result = helper.send_test_mail(current_user.kindle_mail) result = helper.send_test_mail(current_user.kindle_mail)
if result is None: if result is None:
flash(_(u"Test E-Mail successfully send to %(kindlemail)s", kindlemail=current_user.kindle_mail), flash(_(u"Test E-Mail successfully send to %(kindlemail)s", kindlemail=current_user.kindle_mail),
category="success") category="success")
else: else:
flash(_(u"There was an error sending the Test E-Mail: %(res)s", res=result), category="error") flash(_(u"There was an error sending the Test E-Mail: %(res)s", res=result), category="error")
else:
flash(_(u"Please configure your kindle email address first..."), category="error")
else: else:
flash(_(u"E-Mail settings updated"), category="success") flash(_(u"E-Mail settings updated"), category="success")
return render_title_template("email_edit.html", content=content, title=_(u"Edit mail settings")) return render_title_template("email_edit.html", content=content, title=_(u"Edit mail settings"))
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment