From c6d3613e576aa8d0cfa943df5ad51f53c749219d Mon Sep 17 00:00:00 2001 From: otapi <31888571+otapi@users.noreply.github.com> Date: Thu, 11 Oct 2018 18:20:38 +0200 Subject: [PATCH] Add UI link button to shelves --- cps/templates/shelf.html | 6 +++++- cps/web.py | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cps/templates/shelf.html b/cps/templates/shelf.html index 28cd20bb..645dad74 100644 --- a/cps/templates/shelf.html +++ b/cps/templates/shelf.html @@ -2,9 +2,13 @@ {% block body %}

{{title}}

+ {% if g.user.role_download() %} + {{ _('Download') }} + {% endif %} {% if g.user.is_authenticated %} {% if (g.user.role_edit_shelfs() and shelf.is_public ) or not shelf.is_public %} -
{{ _('Delete this Shelf') }}
+ +
{{ _('Delete this Shelf') }}
{{ _('Edit Shelf') }} {{ _('Change order') }} {% endif %} diff --git a/cps/web.py b/cps/web.py index b18a2ecc..d8d4bab1 100644 --- a/cps/web.py +++ b/cps/web.py @@ -2677,7 +2677,6 @@ def show_shelf(shelf_id): @app.route("/shelfdown/") -@login_required_if_no_ano def show_shelf_down(shelf_id): if current_user.is_anonymous: shelf = ub.session.query(ub.Shelf).filter(ub.Shelf.is_public == 1, ub.Shelf.id == shelf_id).first()