fix: Don't show reorder UI fixtures unless user can reorder (#4785)
Fixes #4773 Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
This commit is contained in:
parent
baaa8f15c2
commit
f567b0c5af
|
@ -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 %}
|
||||
|
|
|
@ -66,9 +66,13 @@
|
|||
<td>
|
||||
<a href="{{ pres.document.get_href }}">{{ pres.document.title }}</a>
|
||||
<a href="{{ url }}">({{ pres.document.name }})</a>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{% 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' %}
|
||||
<a class="btn btn-primary btn-sm float-end ms-1" href="{% url 'ietf.meeting.views.import_session_minutes' num=session.meeting.number session_id=session.pk %}">Import from notes.ietf.org</a>
|
||||
{% endif %}
|
||||
<a class="btn btn-primary btn-sm float-end ms-1" href="{{ upload_url }}">Upload revision</a>
|
||||
{% 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' %}
|
||||
<a class="btn btn-primary btn-sm" href="{% url 'ietf.meeting.views.import_session_minutes' num=session.meeting.number session_id=session.pk %}">Import from notes.ietf.org</a>
|
||||
{% endif %}
|
||||
<a class="btn btn-primary btn-sm" href="{{ upload_url }}">Upload revision</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -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 %}
|
||||
<tr data-name="{{ pres.document.name }}" title="Drag to reorder.">
|
||||
<tr data-name="{{ pres.document.name }}"
|
||||
{% if can_manage_materials %}
|
||||
class="draggable"
|
||||
title="Drag to reorder."
|
||||
{% endif %}
|
||||
>
|
||||
{% url 'ietf.doc.views_doc.document_main' name=pres.document.name as url %}
|
||||
<td><i class="bi bi-grip-vertical"></i></td>
|
||||
{% if can_manage_materials %}
|
||||
<td>
|
||||
<i class="bi bi-grip-vertical"></i>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<a href="{{ pres.document.get_href }}">{{ pres.document.title }}</a>
|
||||
<a href="{{ url }}">({{ pres.document.name }})</a>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{% if can_manage_materials %}
|
||||
<a class="btn btn-primary btn-sm"
|
||||
<a class="btn btn-primary btn-sm float-end ms-1"
|
||||
href="{% url 'ietf.meeting.views.upload_session_slides' session_id=session.pk num=session.meeting.number name=pres.document.name %}">
|
||||
Upload revision
|
||||
</a>
|
||||
<a class="btn btn-danger btn-sm"
|
||||
<a class="btn btn-danger btn-sm float-end ms-1"
|
||||
href="{% url 'ietf.meeting.views.remove_sessionpresentation' session_id=session.pk num=session.meeting.number name=pres.document.name %}">
|
||||
Remove
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{{ pres.document.get_href }}">{{ pres.document.title }}</a>
|
||||
<a href="{{ url }}">({{ pres.document.name }})</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -206,4 +211,4 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
Loading…
Reference in a new issue