Skip to content

Commit ca0980a

Browse files
committed
Change the edit buttons on the materials page to be links. Move where the link appears. Commit ready for merge.
- Legacy-Id: 12318
1 parent 0c816ea commit ca0980a

3 files changed

Lines changed: 87 additions & 30 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{% load ietf_filters session_filters %}
22
{% if session|can_manage_materials:user and not session.past_cutoff_date %}
33
{% with gt=session.group.type_id %}
4+
{%comment%}
45
<a class="button btn-default btn-sm" href="{% url 'ietf.meeting.views.session_details' num=session.meeting.number acronym=session.group.acronym %}{% if gt == 'wg' or gt == 'rg' or gt == 'ag' %}{% else %}#session_{{session.pk}}{% endif %}">Edit</a>
6+
{%endcomment%}
7+
<a class="" href="{% url 'ietf.meeting.views.session_details' num=session.meeting.number acronym=session.group.acronym %}{% if gt == 'wg' or gt == 'rg' or gt == 'ag' %}{% else %}#session_{{session.pk}}{% endif %}">Edit materials</a>
58
{% endwith %}
69
{% endif %}

ietf/templates/meeting/group_materials.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{# Copyright The IETF Trust 2015, All Rights Reserved #}{% load origin %}{% origin %}
2-
{% load ietf_filters proceedings_filters %}
2+
{% load ietf_filters proceedings_filters managed_groups %}
33
<tr>
44
<td>
55
{% comment %}
@@ -8,17 +8,21 @@
88
<a name="session.group-{{ session.group.acronym }}"></a>
99
{% endcomment %}
1010
{% if session.name %}
11-
<div class="anchor-target" id="{{ session.name|slugify }}">{{ session.name }}{% include "meeting/edit_materials_button.html" %}</div>
11+
<div class="anchor-target" id="{{ session.name|slugify }}">{{ session.name }}</div>
1212
{% else %}
13-
<div class="anchor-target" id="{{session.group.acronym}}"><a href="{% url 'ietf.group.views.group_home' acronym=session.group.acronym %}">{{session.group.acronym}}</a>{% include "meeting/edit_materials_button.html" %}</div>
13+
<div class="anchor-target" id="{{session.group.acronym}}"><a href="{% url 'ietf.group.views.group_home' acronym=session.group.acronym %}">{{session.group.acronym}}</a></div>
1414
{% if session.group.state.slug == "bof" %}
1515
<span class="label label-success">{{ session.group.state.slug|upper }}</span>
1616
{% endif %}
1717
{% endif %}
1818
</td>
1919

2020
{% if session.status_id == 'canceled' %}
21-
<td colspan="3"><span class="label label-danger">Session cancelled</span></td>
21+
{% if user and user.is_authenticated and user|managed_groups %}
22+
<td colspan="4"><span class="label label-danger">Session cancelled</span></td>
23+
{% else %}
24+
<td colspan="3"><span class="label label-danger">Session cancelled</span></td>
25+
{% endif %}
2226
{% else %}
2327
<td>
2428
{% if session.agenda %}
@@ -57,6 +61,11 @@
5761
{% endfor %}
5862
{% endwith %}
5963
</td>
64+
{% if user and user.is_authenticated and user|managed_groups %}
65+
<td>
66+
<div>{% include "meeting/edit_materials_button.html" %}</div>
67+
</td>
68+
{% endif %}
6069
{% endif %}
6170
</tr>
6271

ietf/templates/meeting/materials.html

Lines changed: 71 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{# Copyright The IETF Trust 2015, All Rights Reserved #}
33
{% load origin %}
44

5-
{% load ietf_filters staticfiles %}
5+
{% load ietf_filters staticfiles managed_groups %}
66

77
{% block pagehead %}
88
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">
@@ -40,11 +40,20 @@ <h2 class="anchor-target" id="plenaries">Plenaries</h2>
4040
<table class="table table-condensed table-striped tablesorter">
4141
<thead>
4242
<tr>
43-
<th class="col-md-1">Group</th>
44-
<th class="col-md-1">Agenda</th>
45-
<th class="col-md-1">Minutes</th>
46-
<th class="col-md-6">Slides</th>
47-
<th class="col-md-3">Drafts</th>
43+
{% if user and user.is_authenticated and user|managed_groups %}
44+
<th class="col-md-1">Group</th>
45+
<th class="col-md-1">Agenda</th>
46+
<th class="col-md-1">Minutes</th>
47+
<th class="col-md-5">Slides</th>
48+
<th class="col-md-2">Drafts</th>
49+
<th class="col-md-2">&nbsp;</th>
50+
{% else %}
51+
<th class="col-md-1">Group</th>
52+
<th class="col-md-1">Agenda</th>
53+
<th class="col-md-1">Minutes</th>
54+
<th class="col-md-6">Slides</th>
55+
<th class="col-md-3">Drafts</th>
56+
{% endif %}
4857
</tr>
4958
</thead>
5059

@@ -63,11 +72,20 @@ <h2 class="anchor-target" id="{{sessions.list.0.group.parent.acronym}}">{{sessio
6372
<table class="table table-condensed table-striped tablesorter">
6473
<thead>
6574
<tr>
66-
<th class="col-md-1">Group</th>
67-
<th class="col-md-1">Agenda</th>
68-
<th class="col-md-1">Minutes</th>
69-
<th class="col-md-6">Slides</th>
70-
<th class="col-md-3">Drafts</th>
75+
{% if user and user.is_authenticated and user|managed_groups %}
76+
<th class="col-md-1">Group</th>
77+
<th class="col-md-1">Agenda</th>
78+
<th class="col-md-1">Minutes</th>
79+
<th class="col-md-5">Slides</th>
80+
<th class="col-md-2">Drafts</th>
81+
<th class="col-md-2">&nbsp;</th>
82+
{% else %}
83+
<th class="col-md-1">Group</th>
84+
<th class="col-md-1">Agenda</th>
85+
<th class="col-md-1">Minutes</th>
86+
<th class="col-md-6">Slides</th>
87+
<th class="col-md-3">Drafts</th>
88+
{% endif %}
7189
</tr>
7290
</thead>
7391

@@ -88,11 +106,20 @@ <h2 class="anchor-target" id="training">Training</h2>
88106
<table class="table table-condensed table-striped tablesorter">
89107
<thead>
90108
<tr>
91-
<th class="col-md-1">Group</th>
92-
<th class="col-md-1">Agenda</th>
93-
<th class="col-md-1">Minutes</th>
94-
<th class="col-md-6">Slides</th>
95-
<th class="col-md-3">Drafts</th>
109+
{% if user and user.is_authenticated and user|managed_groups %}
110+
<th class="col-md-1">Group</th>
111+
<th class="col-md-1">Agenda</th>
112+
<th class="col-md-1">Minutes</th>
113+
<th class="col-md-5">Slides</th>
114+
<th class="col-md-2">Drafts</th>
115+
<th class="col-md-2">&nbsp;</th>
116+
{% else %}
117+
<th class="col-md-1">Group</th>
118+
<th class="col-md-1">Agenda</th>
119+
<th class="col-md-1">Minutes</th>
120+
<th class="col-md-6">Slides</th>
121+
<th class="col-md-3">Drafts</th>
122+
{% endif %}
96123
</tr>
97124
</thead>
98125

@@ -113,11 +140,20 @@ <h2 class="anchor-target" id="iab">IAB <small>Internet Architecture Board</small
113140
<table class="table table-condensed table-striped tablesorter">
114141
<thead>
115142
<tr>
116-
<th class="col-md-1">Group</th>
117-
<th class="col-md-1">Agenda</th>
118-
<th class="col-md-1">Minutes</th>
119-
<th class="col-md-6">Slides</th>
120-
<th class="col-md-3">Drafts</th>
143+
{% if user and user.is_authenticated and user|managed_groups %}
144+
<th class="col-md-1">Group</th>
145+
<th class="col-md-1">Agenda</th>
146+
<th class="col-md-1">Minutes</th>
147+
<th class="col-md-5">Slides</th>
148+
<th class="col-md-2">Drafts</th>
149+
<th class="col-md-2">&nbsp;</th>
150+
{% else %}
151+
<th class="col-md-1">Group</th>
152+
<th class="col-md-1">Agenda</th>
153+
<th class="col-md-1">Minutes</th>
154+
<th class="col-md-6">Slides</th>
155+
<th class="col-md-3">Drafts</th>
156+
{% endif %}
121157
</tr>
122158
</thead>
123159

@@ -137,11 +173,20 @@ <h2 class="anchor-target" id="irtf">IRTF <small>Internet Research Task Force</sm
137173
<table class="table table-condensed table-striped tablesorter">
138174
<thead>
139175
<tr>
140-
<th class="col-md-1">Group</th>
141-
<th class="col-md-1">Agenda</th>
142-
<th class="col-md-1">Minutes</th>
143-
<th class="col-md-6">Slides</th>
144-
<th class="col-md-3">Drafts</th>
176+
{% if user and user.is_authenticated and user|managed_groups %}
177+
<th class="col-md-1">Group</th>
178+
<th class="col-md-1">Agenda</th>
179+
<th class="col-md-1">Minutes</th>
180+
<th class="col-md-5">Slides</th>
181+
<th class="col-md-2">Drafts</th>
182+
<th class="col-md-2">&nbsp;</th>
183+
{% else %}
184+
<th class="col-md-1">Group</th>
185+
<th class="col-md-1">Agenda</th>
186+
<th class="col-md-1">Minutes</th>
187+
<th class="col-md-6">Slides</th>
188+
<th class="col-md-3">Drafts</th>
189+
{% endif %}
145190
</tr>
146191
</thead>
147192

0 commit comments

Comments
 (0)