Skip to content

Commit 0db5b30

Browse files
committed
take advantage of new filters to simplify page a little
- Legacy-Id: 8437
1 parent 7e60f91 commit 0db5b30

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

ietf/templates/doc/document_material.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
<tr>
2323
<td>Title:</td>
2424
<td>
25-
<a {% if not snapshot and can_manage_material %} class="editlink" href="{% url "material_edit" name=doc.name action="title" name=doc.name %}"{% endif %}>{{ doc.title }}</a>
25+
{% if not snapshot and can_manage_material %}
26+
{% url "material_edit" name=doc.name action="title" as editurl %}
27+
{{ doc.title | format_editable:editurl }}
28+
{% else %}
29+
{{ doc.title }}
30+
{% endif %}
2631
</td>
2732
</tr>
2833

@@ -43,7 +48,12 @@
4348
<tr>
4449
<td>State:</td>
4550
<td>
46-
<a title="{{ doc.get_state.desc }}"{% if not snapshot and can_manage_material %} class="editlink" href="{% url "material_edit" name=doc.name action="state" %}"{% endif %}>{{ doc.get_state.name }}</a>
51+
{% if not snapshot and can_manage_material %}
52+
{% url "material_edit" name=doc.name action="state" as editurl %}
53+
{{ doc.get_state.name | format_editable:editurl }}
54+
{% else %}
55+
{{ doc.get_state.name }}
56+
{% endif %}
4757
</td>
4858
</tr>
4959

@@ -65,9 +75,9 @@
6575
<a {% if not snapshot and can_manage_material %} class="editlink" href="{% url "material_presentations" name=doc.name %}"{%endif%}>
6676
{% if presentations %}
6777
{% for pres in presentations %}{{pres.session.short_name}} at {{pres.session.meeting}} {% if pres.rev != doc.rev %}(version -{{pres.rev}}){% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}
68-
{% else %}
78+
{% else %}
6979
None
70-
{% endif %}
80+
{% endif %}
7181
</a>
7282
</td>
7383
</tr>

0 commit comments

Comments
 (0)