Add upstream plugins

Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
2019-10-25 22:42:20 +02:00
parent 5d3c2ec184
commit 290736650a
1186 changed files with 302577 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
{% macro input( id, name = '', value = '', type = "text", attributes = [] ) %}
{% if name == '' %}
{% set id = name %}
{% endif %}
<input
type="{{ type }}"
name="{{ name }}"
value="{{ value }}"
id="{{ id }}"
class="{% if type not in [ 'radio', 'checkbox' ] %}ai1ec-form-control{% endif %}
{{ attributes.class }}"
{% for attribute, value in attributes %}
{% if attribute != 'class' %}
{{ attribute }}="{{ value }}"
{% endif %}
{% endfor %}
/>
{% endmacro %}
{% macro button( id, name = '', value = '', type = "text", attributes = [] ) %}
{% if name == '' %}
{% set id = name %}
{% endif %}
<button
type="{{ type }}"
name="{{ name }}"
id="{{ id }}"
{% for attribute, value in attributes %}
{{ attribute }}="{{ value }}"
{% endfor %}
>{{ value | raw }}</button>
{% endmacro %}

View File

@@ -0,0 +1,37 @@
{% macro select( id, name='', attributes = [], options = [] ) %}
{% if name == '' %}
{% set name = id %}
{% endif %}
<select
name="{{ name }}"
id="{{ id }}"
class="ai1ec-form-control {{ attributes.class }}"
{% for attribute, value in attributes %}
{% if attribute != 'class' %}
{{ attribute }}="{{ value }}"
{% endif %}
{% endfor %}
>
{% for key, option in options %}
{% if key is string %}
<optgroup label="{{ key }}">
{% for opt in option %}
<option
value="{{ opt.value }}"
{% for attribute, value in opt.args %}
{{ attribute }}="{{ value }}"
{% endfor %}
>{{ opt.text }}</option>
{% endfor %}
</optgroup>
{% else %}
<option
value="{{ option.value | dropdown_filter }}"
{% for attribute, value in option.args %}
{{ attribute }}="{{ value }}"
{% endfor %}
>{{ option.text | dropdown_filter }}</option>
{% endif %}
{% endfor %}
</select>
{% endmacro %}

View File

@@ -0,0 +1,15 @@
{% macro textarea( id, name='', value = '', attributes = [] ) %}
{% if name == '' %}
{% set id = name %}
{% endif %}
<textarea
name="{{ name }}"
id="{{ id }}"
class="ai1ec-form-control {{ attributes.class }}"
{% for attribute, value in attributes %}
{% if attribute != 'class' %}
{{ attribute }}="{{ value }}"
{% endif %}
{% endfor %}
>{{ value }}</textarea>
{% endmacro %}