Merge branch 'feature/download-suffix-20170308' into travis
This commit is contained in:
commit
a766784ef1
|
@ -126,7 +126,7 @@
|
|||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
|
||||
{% 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.title+'.'+format.format) }}">{{format.format}}</a></li>
|
||||
{%endfor%}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1309,7 +1309,6 @@ def read_book(book_id, format):
|
|||
flash(_(u"Error opening eBook. File does not exist or file is not accessible:"), category="error")
|
||||
return redirect(url_for("index"))
|
||||
|
||||
|
||||
@app.route("/download/<int:book_id>/<format>")
|
||||
@login_required_if_no_ano
|
||||
@download_required
|
||||
|
@ -1336,6 +1335,11 @@ def get_download_link(book_id, format):
|
|||
else:
|
||||
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'])
|
||||
def register():
|
||||
|
|
Loading…
Reference in New Issue
Block a user