summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates/blocks')
-rw-r--r--ishtar_common/templates/blocks/JQueryJqGrid.html8
-rw-r--r--ishtar_common/templates/blocks/action_list.html12
-rw-r--r--ishtar_common/templates/blocks/bs_form_snippet.html54
-rw-r--r--ishtar_common/templates/blocks/table_form_snippet.html (renamed from ishtar_common/templates/blocks/form_snippet.html)0
4 files changed, 72 insertions, 2 deletions
diff --git a/ishtar_common/templates/blocks/JQueryJqGrid.html b/ishtar_common/templates/blocks/JQueryJqGrid.html
index 1768ab427..f9548a743 100644
--- a/ishtar_common/templates/blocks/JQueryJqGrid.html
+++ b/ishtar_common/templates/blocks/JQueryJqGrid.html
@@ -1,18 +1,22 @@
{% load i18n %}
-<button id='search_{{name}}' class='submit ui-widget-header'>{% trans "Search" %}</button>
+<p class="text-center">
+
+<button id='search_{{name}}' class='btn btn-primary btn-block'>
+ {% trans "Search" %}</button>
{% if url_new %}
<p><a href="#" onclick="open_window('{{url_new}}');">{{new_message}}</a></p>
{% endif %}
-<h4>{% trans "Search and select an item" %}</h4>
+<h4 class="text-center">{% trans "Search and select an item" %}</h4>
<h5 id="pinned_search_{{name}}">
<i class="fa fa-thumb-tack"></i> &nbsp;
<strong>{% trans "Pinned search:" %}</strong>
<em><span id="pinned_search_content_{{name}}"></span></em>
</h5>
+</p>
<table id='grid_{{name}}' class='jqgrid'></table>
<div id='pager_{{name}}'></div>
diff --git a/ishtar_common/templates/blocks/action_list.html b/ishtar_common/templates/blocks/action_list.html
new file mode 100644
index 000000000..50a6554c4
--- /dev/null
+++ b/ishtar_common/templates/blocks/action_list.html
@@ -0,0 +1,12 @@
+<li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle"
+ data-toggle="dropdown" href="#" role="button" aria-haspopup="true"
+ aria-expanded="false">{{section_label}}</a>
+
+ <div class="dropdown-menu">
+ {% for label, url, has_children in sections %}
+ <a class="dropdown-item{% if has_children%} font-weight-bold{%endif%}" href="{{url}}">
+ {{ label }}
+ </a>{% endfor %}
+ </div>
+</li>
diff --git a/ishtar_common/templates/blocks/bs_form_snippet.html b/ishtar_common/templates/blocks/bs_form_snippet.html
new file mode 100644
index 000000000..f413fd860
--- /dev/null
+++ b/ishtar_common/templates/blocks/bs_form_snippet.html
@@ -0,0 +1,54 @@
+{% load i18n %}
+{% if form.non_field_errors %}
+<div class="alert alert-danger" role="alert">
+ {{form.non_field_errors}}
+</div>
+{%endif%}
+{% for hidden in form.hidden_fields %}
+{{field}}{% if field.errors %}<div class="invalid-feedback">
+ {{ field.errors }}
+</div>{% endif %}
+{% endfor %}
+{% for field in form.visible_fields %}
+{% if search and forloop.counter0 == 10 %}
+</div>
+<p class="text-center">
+ <a class="btn btn-secondary btn-sm" data-toggle="collapse" href="#tail-form"
+ aria-expanded="false" aria-controls="tail-form">
+ {% trans "Show / hide advanced search" %}</a>
+</p>
+<div class="collapse" id="tail-form">
+ <div class="card card-body">
+ <div class="form-row">
+{% endif %}
+
+{% if forloop.counter0|divisibleby:2 %}
+{% if forloop.counter0 %}
+ </div>{% endif %}
+ <div class="form-row">
+{% endif %}
+ <div class="form-group col-lg-6">
+ {{ field.label_tag }}
+ {{field|safe}}
+ {% if field.errors %}<div class="invalid-feedback">
+ {{ field.errors }}
+ </div>{% endif %}
+ {% if field.help_text %}
+ <small><a data-toggle="collapse" href="#{{field.auto_id}}_help"
+ aria-expanded="false" aria-controls="{{field.auto_id}}_help">
+ {% trans 'help'%}</a></small>
+ <div class="collapse" id="{{field.auto_id}}_help">
+ <div class="card card-body">
+ {{field.help_text}}
+ </div>
+ </div>
+ {% endif %}
+ </div>
+{% if forloop.last %}
+{% if search and forloop.counter0 >= 10 %}
+ </div>
+ </div>
+{% endif %}
+</div>
+{% endif %}
+{% endfor %}
diff --git a/ishtar_common/templates/blocks/form_snippet.html b/ishtar_common/templates/blocks/table_form_snippet.html
index 5ee88e25f..5ee88e25f 100644
--- a/ishtar_common/templates/blocks/form_snippet.html
+++ b/ishtar_common/templates/blocks/table_form_snippet.html