comparison 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
comparison
equal deleted inserted replaced
104:0e0572780aff 105:09915cbdf549
183 <button type="submit" class="btn {{ style }}">{{ text }}</button> 183 <button type="submit" class="btn {{ style }}">{{ text }}</button>
184 {% endif %} 184 {% endif %}
185 </form> 185 </form>
186 {% endmacro %} 186 {% endmacro %}
187 187
188 {% macro delete_button(url, hiddens={}, text="delete") %} 188 {% macro edit_button(url, text="edit") -%}
189 <a href="{{ url }}" class="btn btn-default btn-xs" role="btn">{{ text }}</a>
190 {%- endmacro %}
191
192 {% macro add_button(url, text="add") -%}
193 <a href="{{ url }}" class="btn btn-success btn-xs" role="btn">{{ text }}</a>
194 {%- endmacro %}
195
196 {% macro delete_button(url, hiddens={}, text="delete") -%}
189 {{ POST_button(url, text, hiddens, style="btn-danger btn-xs") }} 197 {{ POST_button(url, text, hiddens, style="btn-danger btn-xs") }}
190 {% endmacro %} 198 {%- endmacro %}

http://farol.wald.intevation.org