Mercurial > farol > farol
diff farol/templates/document/view.j2 @ 32:9b0fb5ca7eff
Replace the (%d)s with badges
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 02 Oct 2014 15:40:38 +0200 |
parents | 79b76911444e |
children | 7c4d001839e7 |
line wrap: on
line diff
--- a/farol/templates/document/view.j2 Thu Oct 02 15:39:39 2014 +0200 +++ b/farol/templates/document/view.j2 Thu Oct 02 15:40:38 2014 +0200 @@ -102,7 +102,7 @@ {% endcall %} <div class="clearfix"> <div class="col-sm-4"> - {% call panel(type="success", heading="Notes (%d)" % cvrf._notes | length , title=3) %} + {% call panel(type="success", heading="Notes", badge=cvrf._notes | length , title=3) %} <ul> {% for note in cvrf._notes %} <li><a href="{{ url_for('.view_note', ordinal=note._ordinal) }}">{{ note.getTitle() }}</a></li> @@ -112,7 +112,7 @@ {% endcall %} </div> <div class="col-sm-4"> - {% call panel(type="warning", heading="References (%d)" % cvrf._references | length, title=3) %} + {% call panel(type="warning", heading="References", badge=cvrf._references | length, title=3) %} <ul> {% for reference in cvrf._references %} <li><a href="{{ reference._url }}" target="_blank">{{ reference._description }}{% if reference._type %} ({{ reference._type }}){% endif %}</a> (<a href="{{ url_for('.edit_reference', index=loop.index0) }}">edit</a>)</li> @@ -122,7 +122,7 @@ {% endcall %} </div> <div class="col-sm-4"> - {% call panel(type="info", heading="Acknowledgments (%d)" % cvrf._acknowledgments | length, title=3) %} + {% call panel(type="info", heading="Acknowledgments", badge=cvrf._acknowledgments | length, title=3) %} <ul> {% for ack in cvrf._acknowledgments %} <li><a href="{{ url_for('.view_acknowledgment', index=loop.index0) }}">{{ ack.getTitle() }}</a></li> @@ -138,7 +138,7 @@ <div class="col-md-6"> {% call panel(type="danger", heading="Product Tree", title=3) %} {% if cvrf._producttree %} - {% call panel(heading="Branches (%d)" % cvrf._producttree._branches | length, title=4, extended=True) %} + {% call panel(heading="Branches", badge=cvrf._producttree._branches | length, title=4, extended=True) %} {% for branch in cvrf._producttree._branches recursive %} {% call panel() %} <p>{{ branch._type}}: <em>{{ branch._name }}</em> (<a href="{{ url_for('producttree.edit_branch', path=branch.getPath() | join('/')) }}">edit</a>)</p> @@ -154,13 +154,13 @@ {% endfor %} <a href="{{ url_for('producttree.add_branch') }}" class="pull-right">add branch</a> {% endcall %} - {% call panel(heading="Products (%d)" % cvrf._producttree.nbProducts(), title=4) %} + {% call panel(heading="Products", badge=cvrf._producttree.nbProducts(), title=4) %} {% for product in cvrf._producttree._products if product._parent is sameas cvrf._producttree %} <p><strong><a href="{{ url_for('producttree.view_product', productid=product._productid) }}">{{ product._name }}</a></strong> (<a href="{{ url_for('producttree.edit_product', productid=product._productid) }}">edit</a>)</p> {% endfor %} <a href="{{ url_for('producttree.add_product') }}" class="pull-right">add product</a> {% endcall %} - {% call panel(heading="Relationships (%d)" % cvrf._producttree._relationships | length, title=4) %} + {% call panel(heading="Relationships", badge=cvrf._producttree._relationships | length, title=4) %} {% for relationship in cvrf._producttree._relationships %} {% call panel() %} <p><em>{{ cvrf.getProductForID(relationship._productreference)._name }}</em> as {{ relationship._relationtype | lower }} <em>{{ cvrf.getProductForID(relationship._relatestoproductreference)._name }}</em> (<a href="{{ url_for('producttree.edit_relationship', index=loop.index0) }}">edit</a>)</p> @@ -172,7 +172,7 @@ {% endfor %} <a href="{{ url_for('producttree.add_relationship') }}" class="pull-right">add</a> {% endcall %} - {% call panel(heading="Groups (%d)" % cvrf._producttree._groups | length, title=4) %} + {% call panel(heading="Groups", badge=cvrf._producttree._groups | length, title=4) %} {% for group in cvrf._producttree._groups %} {% call panel() %} <a href="{{ url_for('producttree.edit_group', groupid=group._groupid) }}" class="pull-right">edit</a> @@ -198,7 +198,7 @@ </div> <div class="col-md-6"> - {% call panel(type="primary", heading="Vulnerabilities (%d)" % cvrf._vulnerabilities | length, title=3) %} + {% call panel(type="primary", heading="Vulnerabilities", badge=cvrf._vulnerabilities | length, title=3) %} <ul> {% for vulnerability in cvrf._vulnerabilities %} <li><a href="{{ url_for('vulnerability.view', ordinal=vulnerability._ordinal) }}">{{ vulnerability.getTitle() }}</a></li>