# HG changeset patch # User BenoƮt Allard # Date 1413358532 -7200 # Node ID f68944a92b5ec69b2370ec2242bbc0811d3e20f3 # Parent ce64f90e58c444531bf1091e0bfdd8ba6017be45 Only allow producttree deletion if possible diff -r ce64f90e58c4 -r f68944a92b5e farol/templates/producttree/view.j2 --- a/farol/templates/producttree/view.j2 Wed Oct 15 08:58:47 2014 +0200 +++ b/farol/templates/producttree/view.j2 Wed Oct 15 09:35:32 2014 +0200 @@ -114,5 +114,11 @@ {% endfor %}
{{ add_button(url_for('.add_group')) }}
{% endcall %} -
{{ delete_button(url_for('.delete'), text="delete whole Product Tree") }}
+
+{% if cvrf.isProductTreeOrphan() %} + {{ delete_button(url_for('.delete'), text="delete whole Product Tree") }} +{% else %} +

The Product Treecannot be deleted as some of its elements are referenced in the Document

+{% endif %} +
{% endblock %}