Skip to content

Commit e80613d

Browse files
committed
Merged in [10880] from rjsparks@nostrum.com:
Only show the \'Upload new revision\' button when the view will actually let you upload a new revision. - Legacy-Id: 10882 Note: SVN reference [10880] has been migrated to Git commit 3471001
2 parents 860a3f8 + 3471001 commit e80613d

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/doc/views_doc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ def document_main(request, name, rev=None):
566566
latest_rev=latest_rev,
567567
snapshot=snapshot,
568568
can_manage_material=can_manage_material,
569+
in_group_materials_types = doc.group and doc.group.features.has_materials and doc.type_id in doc.group.features.material_types,
569570
other_types=other_types,
570571
presentations=presentations,
571572
),

ietf/templates/doc/document_material.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
</table>
117117

118118
<p class="buttonlist">
119-
{% if not snapshot and can_manage_material %}
119+
{% if not snapshot and can_manage_material and in_group_materials_types %}
120120
<a class="btn btn-default" href="{% url "material_edit" name=doc.name action="revise" %}">Upload New Revision</a>
121121
{% endif %}
122122
</p>

0 commit comments

Comments
 (0)