diff farol/templates/macros.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 4a9f23230eba
children 22d89f53e34c
line wrap: on
line diff
--- a/farol/templates/macros.j2	Thu Oct 02 15:39:39 2014 +0200
+++ b/farol/templates/macros.j2	Thu Oct 02 15:40:38 2014 +0200
@@ -76,7 +76,7 @@
 </div>
 {% endmacro %}
 
-{% macro panel(type="default", heading=None, title=0, collapsible=True, extended=False) %}
+{% macro panel(type="default", heading=None, badge=None, title=0, collapsible=True, extended=False) %}
 {% if not heading %}
   {% set collapsible = False %}
 {% endif %}
@@ -85,7 +85,7 @@
   <div class="panel-heading">
     {%- if title %}<h{{ title }} class="panel-title">{% endif -%}
     {%- if collapsible %}<a data-toggle="collapse" href="#{{ heading | secure_filename }}">{% endif -%}
-    {{ heading }}
+    {{ heading }}{% if badge is not none %}<span class="pull-right badge">{{ badge }}</span>{% endif %}
     {%- if collapsible %}</a>{% endif -%}
     {%- if title %}</h{{ title }}>{% endif -%}
   </div>

http://farol.wald.intevation.org