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 3471001b5c
This commit is contained in:
Henrik Levkowetz 2016-02-29 21:55:19 +00:00
commit e80613d9be
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>