From 3471001b5c6504ed8bc282a20dac02e52ccddf3c Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Mon, 29 Feb 2016 19:56:06 +0000 Subject: [PATCH] Only show the "Upload new revision" button when the view will actually let you upload a new revision. Commit ready for merge. - Legacy-Id: 10880 --- ietf/doc/views_doc.py | 1 + ietf/templates/doc/document_material.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ietf/doc/views_doc.py b/ietf/doc/views_doc.py index f21693fce..89218495f 100644 --- a/ietf/doc/views_doc.py +++ b/ietf/doc/views_doc.py @@ -566,6 +566,7 @@ def document_main(request, name, rev=None): latest_rev=latest_rev, snapshot=snapshot, can_manage_material=can_manage_material, + in_group_materials_types = doc.group and doc.group.features.has_materials and doc.type_id in doc.group.features.material_types, other_types=other_types, presentations=presentations, ), diff --git a/ietf/templates/doc/document_material.html b/ietf/templates/doc/document_material.html index 2d2d56636..ebc6e6af6 100644 --- a/ietf/templates/doc/document_material.html +++ b/ietf/templates/doc/document_material.html @@ -116,7 +116,7 @@

- {% if not snapshot and can_manage_material %} + {% if not snapshot and can_manage_material and in_group_materials_types %} Upload New Revision {% endif %}