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:
parent
f542eeb1ce
commit
3471001b5c
|
@ -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,
|
||||
),
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue