diff farol/templates/macros.j2 @ 105:09915cbdf549

Unify the add / edit / delete buttons
author Benoît Allard <benoit.allard@greenbone.net>
date Tue, 14 Oct 2014 14:36:31 +0200
parents 0e0572780aff
children e0830bcab004
line wrap: on
line diff
--- a/farol/templates/macros.j2	Tue Oct 14 10:36:58 2014 +0200
+++ b/farol/templates/macros.j2	Tue Oct 14 14:36:31 2014 +0200
@@ -185,6 +185,14 @@
 </form>
 {% endmacro %}
 
-{% macro delete_button(url, hiddens={}, text="delete") %}
+{% macro edit_button(url, text="edit") -%}
+  <a href="{{ url }}" class="btn btn-default btn-xs" role="btn">{{ text }}</a>
+{%- endmacro %}
+
+{% macro add_button(url, text="add") -%}
+  <a href="{{ url }}" class="btn btn-success btn-xs" role="btn">{{ text }}</a>
+{%- endmacro %}
+
+{% macro delete_button(url, hiddens={}, text="delete") -%}
   {{ POST_button(url, text, hiddens, style="btn-danger btn-xs") }}
-{% endmacro %}
+{%- endmacro %}

http://farol.wald.intevation.org