Mercurial > farol
changeset 111:e5c047d392ca
merged
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Wed, 15 Oct 2014 15:23:15 +0200 |
parents | 86b843748c81 (current diff) f68944a92b5e (diff) |
children | 1feed9a3156e |
files | |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/farol/templates/base.j2 Wed Oct 15 15:22:59 2014 +0200 +++ b/farol/templates/base.j2 Wed Oct 15 15:23:15 2014 +0200 @@ -47,7 +47,7 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a class="navbar-brand" href="{{ url_for('welcome') }}">Farol</a> + <a class="navbar-brand" href="{{ url_for('welcome') }}" title="A Security Advisory Management Platform">Farol</a> </div> {# Collect the nav links, forms, and other content for toggling #} @@ -61,6 +61,10 @@ <li class="dropdown{{ ' active' if active == 'product' }}"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Products <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> + <li role="presentation"> + <a role="menuitem" tabindex="-1" href="{{ url_for('producttree.view') }}">View Product Tree</a> + </li> + <li role="presentation" class="divider"></li> {% for name, productid in products %} <li><a href="{{ url_for('producttree.view_product', productid=productid) }}">{{ name }}</a></li> {% endfor %} @@ -98,7 +102,8 @@ <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cache <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> - <li role="presentation"{{ ' class="disabled"' if not has_current }}><a role="menuitem" tabindex="-1" href="{{ url_for('cache.save') }}">Save {{ current_id }}</a> + <li role="presentation"{{ ' class="disabled"' if not has_current }}> + <a role="menuitem" tabindex="-1" href="{{ url_for('cache.save') }}">Save {{ current_id }}</a> </li> <li role="presentation" class="divider"></li> {% for element in cache | sort %}
--- a/farol/templates/producttree/view.j2 Wed Oct 15 15:22:59 2014 +0200 +++ b/farol/templates/producttree/view.j2 Wed Oct 15 15:23:15 2014 +0200 @@ -114,5 +114,11 @@ {% endfor %} <div class="pull-right">{{ add_button(url_for('.add_group')) }}</div> {% endcall %} -<div class="pull-right">{{ delete_button(url_for('.delete'), text="delete whole Product Tree") }}</div> +<div class="pull-right"> +{% if cvrf.isProductTreeOrphan() %} + {{ delete_button(url_for('.delete'), text="delete whole Product Tree") }} +{% else %} + <p class="text-danger"><small>The Product Treecannot be deleted as some of its elements are referenced in the Document</small></p> +{% endif %} +</div> {% endblock %}