Skip to content
Snippets Groups Projects
Commit 9ad58988 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Merge branch 'master' of git.fsmpi.rwth-aachen.de:redl/redeleitsystem

parents 9ff22054 df2e165a
No related branches found
No related tags found
No related merge requests found
......@@ -3,5 +3,5 @@
{% block admin_title %}Add Statement{% endblock %}
{% block content %}
{{ render_form(form, action_url=url_for(".statement_new"), action_text="Add", title="Add Statement") }}
{{ render_form(form, action_url=url_for(".statement_new"), btn_list=[("","Add Statement","add_statement"), ("redl-btn-meta","Add Meta","add_meta_statement")]) }}
{% endblock %}
......@@ -47,7 +47,7 @@
</div>
<div class="mdl-separator rede-separator"></div>
<div class="mdl-cell mdl-cell--3-col mdl-cell--3-col-tablet mdl-cell--4-col-phone mdl-grid mdl-grid--no-spacing">
{{ render_form(form, action_url=url_for(".statement_new"), action_text="Add", title="Add Statement", class_="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone") }}
{{ render_form(form, action_url=url_for(".statement_new"), action_text="Add", title="Add Statement", class_="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone", btn_list=[("","Add Statement","add_statement"), ("redl-btn-meta","Add Meta","add_meta_statement")] ) }}
<div class="mdl-cell mdl-card mdl-shadow--2dp mdl-cell--12-col mdl-cell--8-col-tablet mdl-cell--4-col-phone">
<ul class="rede-list-no-bullet">
{% if topic.sorted_statements()|length() > 0 %}
......
......@@ -104,7 +104,7 @@
{%- endmacro %}
{% macro render_form(form, action_url="", title=None, action_text="Submit", class_="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone", title_class="mdl-card__title", title_text_class="mdl-card__title-text", content_class="mdl-card__supporting-text", action_class="mdl-card__actions", btn_class="mdl-button mdl-js-button mdl-button--raised mdl-button-colored") -%}
{% macro render_form(form, action_url="", title=None, action_text="Submit", class_="mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--4-col-phone", title_class="mdl-card__title", title_text_class="mdl-card__title-text", content_class="mdl-card__supporting-text", action_class="mdl-card__actions", btn_class="mdl-button mdl-js-button mdl-button--raised mdl-button-colored", btn_value="", btn_list=None) -%}
<div class="{{ class_ }}">
<form method="POST" action="{{ action_url }}">
<div class="{{ title_class }}">
......@@ -133,8 +133,16 @@
{% endfor %}
</div>
<div class="{{ action_class }}">
<button type="submit" class="{{ btn_class }}">{{ action_text }}</button>
{% if btn_list != none %}
{%for this_btn_class, action_text, btn_value in btn_list %}
<button type="submit" class="{{ btn_class }} {{ this_btn_class }}", value="{{ btn_value }}">{{ action_text }}</button>
{% endfor %}
{% else %}
<button type="submit" class="{{ btn_class }}", value="{{ btn_value }}">{{ action_text }}</button>
{% endif %}
</div>
</form>
</div>
{%- endmacro %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment