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
This commit is contained in:
Robert Sparks 2016-02-29 19:56:06 +00:00
parent f542eeb1ce
commit 3471001b5c
2 changed files with 2 additions and 1 deletions

View file

@ -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,
),

View file

@ -116,7 +116,7 @@
</table>
<p class="buttonlist">
{% if not snapshot and can_manage_material %}
{% if not snapshot and can_manage_material and in_group_materials_types %}
<a class="btn btn-default" href="{% url "material_edit" name=doc.name action="revise" %}">Upload New Revision</a>
{% endif %}
</p>