diff farol/templates/vulnerability/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 6de88f98983c
children 08a24e470de2
line wrap: on
line diff
--- a/farol/templates/vulnerability/view.j2	Thu Oct 02 15:39:39 2014 +0200
+++ b/farol/templates/vulnerability/view.j2	Thu Oct 02 15:40:38 2014 +0200
@@ -42,7 +42,7 @@
     </div>
   {% endcall %}
 {% endif %}
-{% call panel(heading="Notes (%d)" % vulnerability._notes | length, title=3) %}
+{% call panel(heading="Notes", badge=vulnerability._notes | length, title=3) %}
   <ul>
     {% for note in vulnerability._notes %}
       <li><a href="{{ url_for('.view_note', ordinal=vulnerability._ordinal, note_ordinal=note._ordinal)}}">{{ note.getTitle() }}</a></li>
@@ -54,7 +54,7 @@
   {% if vulnerability._discoverydate %}{{ label_value("Discovery Date", vulnerability._discoverydate) }}{% endif %}
   {% if vulnerability._releasedate %}{{ label_value("Release Date", vulnerability._releasedate) }}{% endif %}
 </div>
-{% call panel(heading="Involvements (%d)" % vulnerability._involvements | length, title=3) %}
+{% call panel(heading="Involvements",  badge=vulnerability._involvements | length, title=3) %}
   <ul>
     {% for involvement in vulnerability._involvements %}
       <li><a href="{{ url_for('.view_involvement', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ involvement.getTitle() }}</a></li>
@@ -67,14 +67,14 @@
   {{ label_value("CVE", vulnerability._cve) }}
 </div>
 {% endif %}
-{% call panel(heading="CWE (%d)" % vulnerability._cwes | length, title=3) %}
+{% call panel(heading="CWE", badge=vulnerability._cwes | length, title=3) %}
   <ul>
   {% for cwe in vulnerability._cwes %}
     <li>{{ cwe._id }} - {{ cwe._value}} (<a href="{{ url_for('.edit_cwe', ordinal=vulnerability._ordinal, index=loop.index0)  }}">edit</a>)</li>
   {% endfor %}
   <a href="{{ url_for('.add_cwe', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a>
 {% endcall %}
-{% call panel(heading="Product Statuses (%d)" % vulnerability._productstatuses | length, title=3) %}
+{% call panel(heading="Product Statuses", badge=vulnerability._productstatuses | length, title=3) %}
   <ul>
     {% for status in vulnerability._productstatuses %}
       <li><a href="{{ url_for('.view_status', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ status.getTitle() }}</a></li>
@@ -82,7 +82,7 @@
   </ul>
   <a href="{{ url_for('.add_status', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a>
 {% endcall %}
-{% call panel(heading="Threats (%d)" % vulnerability._threats | length, title=3) %}
+{% call panel(heading="Threats", badge=vulnerability._threats | length, title=3) %}
   <ul>
     {% for threat in vulnerability._threats %}
       <li><a href="{{ url_for('.view_threat', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ threat.getTitle() }}</a></li>
@@ -90,7 +90,7 @@
   </ul>
   <a href="{{ url_for('.add_threat', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a>
 {% endcall %}
-{% call panel(heading="CVSS Score Sets (%d)" % vulnerability._cvsss | length, title=3) %}
+{% call panel(heading="CVSS Score Sets", badge=vulnerability._cvsss | length, title=3) %}
   <ul>
     {% for cvss in vulnerability._cvsss %}
       <li><a href="{{ url_for('.view_cvss', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ cvss._vector }} ({{ cvss._basescore }})</a></li>
@@ -98,7 +98,7 @@
   </ul>
   <a href="{{ url_for('.add_cvss', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a>
 {% endcall %}
-{% call panel(heading="Remediations (%d)" % vulnerability._remediations | length, title=3) %}
+{% call panel(heading="Remediations", badge=vulnerability._remediations | length, title=3) %}
   <ul>
     {% for remediation in vulnerability._remediations %}
       <li><a href="{{ url_for('.view_remediation', ordinal=vulnerability._ordinal, index=loop.index0) }}">{{ remediation.getTitle() }}</a></li>
@@ -106,7 +106,7 @@
   </ul>
   <a href="{{ url_for('.add_remediation', ordinal=vulnerability._ordinal) }}" class="pull-right">add</a>
 {% endcall %}
-{% call panel(heading="References (%d)" % vulnerability._references | length , title=3) %}
+{% call panel(heading="References", badge=vulnerability._references | length , title=3) %}
   <ul>
     {% for reference in vulnerability._references %}
       <li><a href="{{ reference._url }}" target="_blank">{{ reference._description }}{% if reference._type %} ({{ reference._type }}){% endif %}</a> (<a href="{{ url_for('.edit_reference', ordinal=vulnerability._ordinal, index=loop.index0) }}">edit</a>)</li>
@@ -114,7 +114,7 @@
   </ul>
   <a class="pull-right" href="{{ url_for('.add_reference', ordinal=vulnerability._ordinal) }}">add</a>
 {% endcall %}
-{% call panel(heading="Acknowledgments (%d)" % vulnerability._acknowledgments | length, title=3) %}
+{% call panel(heading="Acknowledgments", badge=vulnerability._acknowledgments | length, title=3) %}
   <ul>
     {% for ack in vulnerability._acknowledgments %}
       <li><a href="{{ url_for('.view_acknowledgment', ordinal=vulnerability._ordinal, index=loop.index0)}}">{{ ack.getTitle() }}</a></li>

http://farol.wald.intevation.org