From f567b0c5af8a9b6db45f41cd464001d0d8124c56 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 28 Nov 2022 20:40:45 +0300 Subject: [PATCH] fix: Don't show reorder UI fixtures unless user can reorder (#4785) Fixes #4773 Co-authored-by: Robert Sparks --- ietf/templates/meeting/session_details.html | 4 +- .../meeting/session_details_panel.html | 39 +++++++++++-------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ietf/templates/meeting/session_details.html b/ietf/templates/meeting/session_details.html index c1b9f31fc..03e6fa195 100644 --- a/ietf/templates/meeting/session_details.html +++ b/ietf/templates/meeting/session_details.html @@ -3,8 +3,8 @@ {% load origin ietf_filters static %} {% block title %}{{ meeting }} : {{ acronym }}{% endblock %} {% block morecss %} - .slides tr { - cursor:pointer; + .draggable { + cursor: pointer; } {% endblock %} {% block content %} diff --git a/ietf/templates/meeting/session_details_panel.html b/ietf/templates/meeting/session_details_panel.html index c5c51af78..f23db1374 100644 --- a/ietf/templates/meeting/session_details_panel.html +++ b/ietf/templates/meeting/session_details_panel.html @@ -66,9 +66,13 @@ {{ pres.document.title }} ({{ pres.document.name }}) - - {% if user|has_role:"Secretariat" or can_manage_materials %} + {% if pres.document.type.slug != 'bluesheets' or user|has_role:"Secretariat" or meeting.type.slug == 'interim' and can_manage_materials %} + {% if pres.document.type.slug == 'minutes' %} + Import from notes.ietf.org + {% endif %} + Upload revision + {% endif %} {% if pres.document.type.slug == 'minutes' %} {% url 'ietf.meeting.views.upload_session_minutes' session_id=session.pk num=session.meeting.number as upload_url %} {% elif pres.document.type.slug == 'agenda' %} @@ -76,12 +80,6 @@ {% else %} {% url 'ietf.meeting.views.upload_session_bluesheets' session_id=session.pk num=session.meeting.number as upload_url %} {% endif %} - {% if pres.document.type.slug != 'bluesheets' or user|has_role:"Secretariat" or meeting.type.slug == 'interim' and can_manage_materials %} - {% if pres.document.type.slug == 'minutes' %} - Import from notes.ietf.org - {% endif %} - Upload revision - {% endif %} {% endif %} @@ -136,24 +134,31 @@ data-remove-from-session="{% url 'ietf.meeting.views.ajax_remove_slides_from_session' session_id=session.pk num=session.meeting.number %}" data-reorder-in-session="{% url 'ietf.meeting.views.ajax_reorder_slides_in_session' session_id=session.pk num=session.meeting.number %}"> {% for pres in session.filtered_slides %} - + {% url 'ietf.doc.views_doc.document_main' name=pres.document.name as url %} - + {% if can_manage_materials %} + + + + {% endif %} - {{ pres.document.title }} - ({{ pres.document.name }}) - - {% if can_manage_materials %} - Upload revision - Remove {% endif %} + {{ pres.document.title }} + ({{ pres.document.name }}) {% endfor %} @@ -206,4 +211,4 @@ {% endif %} {% endwith %} -{% endfor %} +{% endfor %} \ No newline at end of file