summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates/ishtar')
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_creation_section.html22
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_json.html6
-rw-r--r--ishtar_common/templates/ishtar/blocks/shortcut_menu.html75
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_field.html7
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_field_flex.html6
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_field_flex_detail.html6
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_field_flex_full.html6
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_field_flex_multiple.html8
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_field_flex_url.html7
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_nav.html106
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html95
-rw-r--r--ishtar_common/templates/ishtar/blocks/wizard_breadcrumb.html21
-rw-r--r--ishtar_common/templates/ishtar/sheet.html136
-rw-r--r--ishtar_common/templates/ishtar/wizard/confirm_wizard.html11
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html22
-rw-r--r--ishtar_common/templates/ishtar/wizard/search.html18
-rw-r--r--ishtar_common/templates/ishtar/wizard/validation_bar.html24
17 files changed, 372 insertions, 204 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html b/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html
index e6ce31c25..78126a240 100644
--- a/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html
+++ b/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html
@@ -1,19 +1,21 @@
{% load i18n link_to_window %}
{% if item.history_creator.ishtaruser.person %}
-<li><label>{% trans "Creation" context "Sheet" %}</label>
- <span class='value'>
+<div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{% trans "Creation" context "Sheet" %}</dt>
+ <dd class="col-7">
{{item.history_creator.ishtaruser.person}}
{{item.history_creator.ishtaruser.person|link_to_window}} <br/>
- <small><em>{{item.history_creation_date|date:"DATETIME_FORMAT"}}</em></small>
- </span>
-</li>
+ <small class="text-muted">{{item.history_creation_date|date:"DATETIME_FORMAT"}}</small>
+ </dd>
+</div>
{% endif %}
{% if item.history_creation_date != item.last_edition_date %}
-<li><label>{% trans "Modification" context "Sheet" %}</label>
- <span class='value'>
+<div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{% trans "Modification" context "Sheet" %}</dt>
+ <dd class='col-7'>
{{item.history_modifier.ishtaruser.person}}
{{item.history_modifier.ishtaruser.person|link_to_window}} <br/>
- <small><em>{% firstof item.history_date|date:"DATETIME_FORMAT" item.history.all.0.history_date|date:"DATETIME_FORMAT" %}</em></small>
- </span>
-</li>
+ <small class="text-muted">{% firstof item.history_date|date:"DATETIME_FORMAT" item.history.all.0.history_date|date:"DATETIME_FORMAT" %}</small>
+ </dd>
+</div>
{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_json.html b/ishtar_common/templates/ishtar/blocks/sheet_json.html
index 31e6acb84..6aaf4bae7 100644
--- a/ishtar_common/templates/ishtar/blocks/sheet_json.html
+++ b/ishtar_common/templates/ishtar/blocks/sheet_json.html
@@ -4,8 +4,8 @@
<h3>{{json_section}}</h3>
{% endif %}
{% for label, value in json_fields %}
-{% if forloop.first %}<ul class='form-flex'>{% endif %}
- {% field_li label value %}
-{% if forloop.last %}</ul>{% endif %}
+{% if forloop.first %}<div class='row'>{% endif %}
+ {% field_flex label value %}
+{% if forloop.last %}</div>{% endif %}
{% endfor %}
{% endfor %}
diff --git a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html
index 67f91dfea..5a811ddf0 100644
--- a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html
+++ b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html
@@ -1,42 +1,45 @@
{% load i18n %}
{% if current_menu %}
-<form method="post" action="{% url 'update-current-item' %}">
-<fieldset id="shortcut-menu">
-<span class="fa-stack short-menu-close">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-times fa-stack-1x fa-inverse"></i>
-</span>
-<span class="fa-stack short-menu-open">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-plus fa-stack-1x fa-inverse"></i>
-</span>
-<div class="short-menu-buttons btn-group" role="group">
- <button type="button" class="btn btn-selected" id='short-menu-simple' title="{% trans 'Simple menu limited to your own items. Be careful only the last 100 items are displayed.' %}">{% trans "simple" %}</button>
- <button type="button" class="btn" id='short-menu-advanced' title="{% trans 'Advanced menu' %}">{% trans "advanced" %}</button>
+<div class="nav-item dropdown navbar-expand-lg navbar-collapse justify-content-end">
+ <ul class="navbar-nav">
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" data-toggle="dropdown"
+ href="#" role="button" aria-haspopup="true">
+ {% trans "Default selection" %}
+ <i class="icon fa fa-thumb-tack fa-2x" aria-hidden="true" title="{% trans 'Pin an item in order to constrain default searches with this item. By default only your items are displayed. New created and modified items are auto-pin.' %}"></i>
+ </a>
+ <div id="shortcut-menu" class="dropdown-menu dropdown-menu-right">
+ <form method="post" action="{% url 'update-current-item' %}">
+
+ <div class="short-menu-buttons btn-group" role="group">
+ <button type="button" class="btn btn-selected" id='short-menu-simple' title="{% trans 'Simple menu limited to your own items. Be careful only the last 100 items are displayed.' %}">{% trans "simple" %}</button>
+ <button type="button" class="btn" id='short-menu-advanced' title="{% trans 'Advanced menu' %}">{% trans "advanced" %}</button>
+ </div>
+ <div>
+ <table id='current_items'>
+ {% for lbl, model_name, main_cls, items in current_menu %}
+ <tr>
+ <td><label for="current_{{model_name}}">{{lbl}}</label></td>
+ <td>
+ <select class='{{main_cls}} chosen-select' id='current_{{model_name}}'>
+ <option class='normal' value=''>--</option>
+ {% for val, label, selected, cls in items %}<option{% if cls %} class='{{cls}}'{% endif %} value='{{val}}'{% if selected %} selected="selected"{% endif %}>{% ifequal cls 'basket' %}&#xf291; {% endifequal %}{% ifequal cls 'green' %}&#xf058; {% endifequal %}{% ifequal cls 'orange' %}&#xf06a; {% endifequal %}{% ifequal cls 'red' %}&#xf071; {% endifequal %}{{label}}</option>
+ {% endfor %}</select>
+ </td>{% with 'show-'|add:model_name as model_url%}
+ <td><a href='#' onclick='load_current_window("{% url model_url 0 %}", "{{model_name}}");' class='display_details'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td>
+ <td><span class='pin-action' onclick='$.get("{% url 'unpin' model_name %}", function(){load_shortcut_menu();});' title="{% trans 'Unpin' %}">
+ <i class="fa fa-times"></i>
+ </span></td>
+ {% endwith %}
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ </form>
+ </div>
+ </li>
+ </ul>
</div>
-<div>
-<i class="icon fa fa-thumb-tack fa-2x" aria-hidden="true" title="{% trans 'Pin an item in order to constrain default searches with this item. By default only your items are displayed. New created and modified items are auto-pin.' %}"></i>
-<table id='current_items'>
-{% for lbl, model_name, main_cls, items in current_menu %}
-<tr>
- <td><label for="current_{{model_name}}">{{lbl}}</label></td>
- <td>
- <select class='{{main_cls}} chosen-select' id='current_{{model_name}}'>
- <option class='normal' value=''>--</option>
- {% for val, label, selected, cls in items %}<option{% if cls %} class='{{cls}}'{% endif %} value='{{val}}'{% if selected %} selected="selected"{% endif %}>{% ifequal cls 'basket' %}&#xf291; {% endifequal %}{% ifequal cls 'green' %}&#xf058; {% endifequal %}{% ifequal cls 'orange' %}&#xf06a; {% endifequal %}{% ifequal cls 'red' %}&#xf071; {% endifequal %}{{label}}</option>
- {% endfor %}</select>
- </td>{% with 'show-'|add:model_name as model_url%}
- <td><a href='#' onclick='load_current_window("{% url model_url 0 %}", "{{model_name}}");' class='display_details'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td>
- <td><span class='pin-action' onclick='$.get("{% url 'unpin' model_name %}", function(){load_shortcut_menu();});' title="{% trans 'Unpin' %}">
- <i class="fa fa-times"></i>
- </span></td>
- {% endwith %}
-</tr>
-{% endfor %}
-</table>
-</div>
-</fieldset>
-</form>
<script type='text/javascript'>var advanced_menu = false;
{% if SHORTCUT_SHOW == 'off' %}var shortcut_menu_hide = true;
{% else %}var shortcut_menu_hide = false;{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/window_field.html b/ishtar_common/templates/ishtar/blocks/window_field.html
index b52ed78ee..097ae3fd2 100644
--- a/ishtar_common/templates/ishtar/blocks/window_field.html
+++ b/ishtar_common/templates/ishtar/blocks/window_field.html
@@ -1,3 +1,6 @@
-{% load i18n %}{% if data %}{% if li %}<li>{% else %}<p>{% endif %}<label>{% trans caption %}</label>
-<span class='value'>{{pre_data|safe}}{{data|linebreaksbr}}{{post_data|safe}}</span>{% if li %}</li>{% else %}</p>{% endif %}
+{% load i18n %}{% if data %}{% if li %}<li>{% elif flex %}
+ <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap">{% else %}<p>{% endif %}
+ <label>{% trans caption %}</label>
+ <span class='value'>{{pre_data|safe}}{{data|linebreaksbr}}{{post_data|safe }}</span>
+ {% if li %}</li>{% elif flex %}</div>{% else %}</p>{% endif %}
{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/window_field_flex.html b/ishtar_common/templates/ishtar/blocks/window_field_flex.html
new file mode 100644
index 000000000..add2a5520
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/window_field_flex.html
@@ -0,0 +1,6 @@
+{% load i18n %}{% if data %}
+ <dl class="col-12 {% if size == 2 %}col-lg-6{% else %}col-md-6 col-lg-4{% endif %} d-flex flex-wrap row">
+ <dt class="col-5">{% trans caption %}</dt>
+ <dd class="col-7">{{pre_data|safe}}{{data|linebreaksbr}}{{post_data|safe }}</dd>
+ </dl>
+{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/window_field_flex_detail.html b/ishtar_common/templates/ishtar/blocks/window_field_flex_detail.html
new file mode 100644
index 000000000..5968f9afa
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/window_field_flex_detail.html
@@ -0,0 +1,6 @@
+{% load i18n %}{% if item %}
+<dl class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{% trans caption %}</dt>
+ <dd class="col-7">{{item}}{{link}}</dd>
+</dl>
+{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/window_field_flex_full.html b/ishtar_common/templates/ishtar/blocks/window_field_flex_full.html
new file mode 100644
index 000000000..f44cdc6fd
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/window_field_flex_full.html
@@ -0,0 +1,6 @@
+{% load i18n %}{% if data %}
+ <dl class="col-12 row">
+ <dt class="col-12">{% trans caption %}</dt>
+ <dd class="col-12">{{pre_data|safe}}{{data|linebreaksbr}}{{post_data|safe }}</dd>
+ </dl>
+{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/window_field_flex_multiple.html b/ishtar_common/templates/ishtar/blocks/window_field_flex_multiple.html
new file mode 100644
index 000000000..60f6361b7
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/window_field_flex_multiple.html
@@ -0,0 +1,8 @@
+{% load i18n %}{% if data.count %}
+<dl class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{% trans caption %}</dt>
+ <dd class="col-7">{% for d in data.all %}
+ {% if forloop.counter0 %} ; {% endif %}{{ d }}
+ {% endfor %}</dd>
+</dl>
+{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/window_field_flex_url.html b/ishtar_common/templates/ishtar/blocks/window_field_flex_url.html
new file mode 100644
index 000000000..59f612bc6
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/window_field_flex_url.html
@@ -0,0 +1,7 @@
+{% load i18n %}{% if link %}
+<div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{% trans caption %}</dt>
+ <dd class="col-7">
+ <a target="_blank" href='{{link|safe}}'>{% if link_name %}{{link_name}}{% else %}{{link}}{% endif %}</a>
+ </dd>
+{% endif%}
diff --git a/ishtar_common/templates/ishtar/blocks/window_nav.html b/ishtar_common/templates/ishtar/blocks/window_nav.html
index f212ebff6..89263d0de 100644
--- a/ishtar_common/templates/ishtar/blocks/window_nav.html
+++ b/ishtar_common/templates/ishtar/blocks/window_nav.html
@@ -1,56 +1,62 @@
{% load i18n %}
-{% if previous or next %}
- <div class='tool-right'>
- {% if previous %}
- <a class='history-nav' href="#" onclick='load_window("{% url histo_url item.pk previous|date:"c"%}");$("#{{window_id}}").hide();return false;' title="{%trans 'Previous version'%}">
- <span class="fa-stack">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-step-backward fa-stack-1x fa-inverse"></i>
- </span>
- <br/>{{previous}}
- </a>
- {% else %}
- <span class='history-nav'> </span>
- {% endif %}
- {% if next %}
- <a class='history-nav' title="{% trans 'Restore this version' %}" href="#" onclick='if(confirm("{%trans 'Are you sure to restore to this version? All changes made since this version will be lost.' %}")){load_url("{% url revert_url item.pk item.history_date|date:"c"%}");closeAllWindows();load_window("{% url show_url item.pk None %}");}'>
- <span class="fa-stack fa-lg">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-history fa-stack-1x fa-inverse"></i>
- </span>
- <br/>{% trans "Restore" %}
- </a>
- <a class='history-nav' href="#" onclick='load_window("{% url histo_url item.pk next|date:"c" %}");$("#{{window_id}}").hide();return false;' title="{%trans 'Next version'%}">
- <span class="fa-stack">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-step-forward fa-stack-1x fa-inverse"></i>
- </span>
- <br/>{{next}}
- </a>
- {% else %}
- <span class='history-nav'> </span>
- <span class='history-nav'> </span>
- {% endif %}
+<div class="row toolbar">
+ {% if previous or next %}
+ <div class='col-md-2'>
+ <div class="btn-group btn-group-sm" role="group" aria-label="{% trans 'History'%}">
+ {% if previous %}
+ <button type="button" class="btn btn-secondary"
+ data-toggle="tooltip" data-placement="bottom"
+ title="{{previous}}"
+ onclick='load_window("{% url histo_url item.pk previous|date:"c"%}");$("#{{window_id}}").hide();return false;'>
+ <i class="fa fa-step-backward"></i>
+ </button>
+ {% endif %}
+ {% if next %}
+ <button type="button" class="btn btn-secondary"
+ data-toggle="tooltip" data-placement="bottom"
+ onclick='if(confirm("{%trans 'Are you sure to restore to this version? All changes made since this version will be lost.' %}")){load_url("{% url revert_url item.pk item.history_date|date:"c"%}");closeAllWindows();load_window("{% url show_url item.pk None %}");}'
+ title="{% trans 'Restore this version' %}">
+ <i class="fa fa-history"></i>
+ </button>
+ <button type="button" class="btn btn-secondary"
+ data-toggle="tooltip" data-placement="bottom"
+ onclick='load_window("{% url histo_url item.pk next|date:"c" %}");$("#{{window_id}}").hide();return false;'
+ title="{{next}}">
+ <i class="fa fa-step-forward"></i>
+ </button>
+ {% endif %}
+ </div>
</div>
-{% endif %}
-<div class='tool-left'>
+ <div class='offset-md-6 col-md-4 text-right'>
+ {% else %}
+ <div class='offset-md-8 col-md-4 text-right'>
+ {% endif %}
+ <div class="btn-group btn-group-sm" role="group" aria-label="{% trans 'Actions' %}">
{% block extra_actions %}{% endblock %}
- {% if modify_url %}<a href='{% url modify_url item.pk %}' title="{% trans 'Modify' %}">
- <span class="fa-stack fa-lg">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-pencil fa-stack-1x fa-inverse"></i>
- </span>
- </a>{% endif %}
- {% if pin_action and item.SLUG %}
- <span class='pin-action' onclick='$.get("{% url 'pin' item.SLUG item.pk %}", function(){load_shortcut_menu(); display_info("{% trans 'Item pined in your shortcut menu.' %}")});' title="{% trans 'Pin' %}">
- <span class="fa-stack fa-lg">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-thumb-tack fa-stack-1x fa-inverse"></i>
- </span>
- </span>{% endif %}
- <a class='badge' href='{% url show_url item.pk "odt" %}' title='{% trans "Export as OpenOffice.org file"%}'>ODT</a> <a class='badge' href='{% url show_url item.pk "pdf" %}' title='{% trans "Export as PDF file"%}'>PDF</a>
+ {% if modify_url %}
+ <a class="btn btn-secondary" href='{% url modify_url item.pk %}'
+ title="{% trans 'Modify' %}">
+ <i class="fa fa-pencil"></i>
+ </a>
+ {% endif %}
+ {% if pin_action and item.SLUG %}
+ <a class="btn btn-secondary" href="#" class='pin-action'
+ onclick='$.get("{% url "pin" item.SLUG item.pk %}", function(){load_shortcut_menu(); display_info("{% trans 'Item pined in your shortcut menu.' %}")});' title="{% trans 'Pin' %}">
+ <i class="fa fa-thumb-tack"></i>
+ </a>
+ {% endif %}
+ <a class="btn btn-secondary" href='{% url show_url item.pk "odt" %}'
+ title='{% trans "Export as OpenOffice.org file"%}'>
+ ODT <i class="fa fa-file-word-o" aria-hidden="true"></i>
+ <a class="btn btn-secondary" href='{% url show_url item.pk "pdf" %}'
+ title='{% trans "Export as PDF file"%}'>
+ PDF <i class="fa fa-file-pdf-o" aria-hidden="true"></i>
+ </a>
+ </div>
+ </div>
</div>
-<hr class='clear'>
{% if next %}
- <p class='info-box'><i class="fa fa-info-circle" aria-hidden="true"></i> <em>{% trans "Relation between items are not historized." %}</em></p>
+<div class="alert alert-warning" role="alert">
+ {% trans "Relation between items are not historized." %}
+</div>
{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html
index 891cd0f6f..e10390915 100644
--- a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html
+++ b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html
@@ -1,23 +1,95 @@
{% load i18n %}
<h4>{{caption}}</h4>
-<table id='grid_{{name}}' class='jqgrid'></table>
-<div id='pager_{{name}}'></div>
-
-<div id='foot_{{name}}' class='gridfooter'>
-{% if source_full %}
-<a class="badge" href='{{simple_source}}csv{{ source_attrs|safe }}' target='_blank' title="{% trans 'Export as CSV' %}">{% trans "CSV" %}</a>
-<a class="badge" href='{{source_full}}csv{{ source_attrs|safe }}' target='_blank' title="{% trans 'Export as CSV - full' %}">{% trans "CSV full" %}</a>
-{% else %}
-<a class="badge" href="{{simple_source}}csv{{ source_attrs|safe }}" target="_blank" title="{% trans 'Export as CSV' %}">CSV</a>
-{% endif %} {{encoding}}
+
+<div class="modal fade table-modal-lg" tabindex="-1" role="dialog"
+ aria-hidden="true" id="modal_grid_{{name}}">
+ <div class="modal-dialog full modal-lg">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </div>
+ <div class="modal-body">
+ <div class="current-sheets"></div>
+ <div class="current-grid"></div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div id="grid_{{name}}_meta_wrapper">
+ <table id='grid_{{name}}' class="display">
+ <thead>
+ <tr>
+ <th></th>
+ <th></th>{% for col in col_names %}
+ <th>{{col}}</th>
+ {% endfor %}</tr>
+ </thead>
+ </table>
+</div>
+
+<div id='foot_{{name}}' class="gridfooter row toolbar">
+ <div class='col-md-2'>
+ <div class="btn-group btn-group-sm" role="group">
+ <button class="btn btn-secondary" data-toggle="modal"
+ data-target=".table-modal-lg">
+ {% trans "Expand table" %} <i class="fa fa-expand" aria-hidden="true"></i>
+ </button>
+ </div>
+ </div>
+ <div class='col-md-2'>
+ <div class="btn-group btn-group-sm" role="group"
+ aria-label="{% trans 'Export'%}">
+ {% if source_full %}
+ <a class="btn btn-secondary" href='{{simple_source}}csv{{ source_attrs|safe }}' target='_blank' title="{% trans 'Export as CSV' %}">{% trans "CSV" %}</a>
+ <a class="btn btn-secondary" href='{{source_full}}csv{{ source_attrs|safe }}' target='_blank' title="{% trans 'Export as CSV - full' %}">{% trans "CSV full" %}</a>
+ {% else %}
+ <a class="btn btn-secondary" href="{{simple_source}}csv{{ source_attrs|safe }}" target="_blank" title="{% trans 'Export as CSV' %}">CSV</a>
+ {% endif %}
+ </div>
+ </div>
+</div>
+
+<div class="row toolbar justify-content-center">
</div>
<script type="text/javascript" language='javascript'>
setTimeout(
function(){
- $("#grid_{{name}}").jqGrid({
+ datatable_options = {
+ "ajax": {
+ "url": "{{source}}",
+ "dataSrc": "rows"
+ },
+ "columns": [
+ { "data": "id", "visible": false },
+ { "data": "link", "orderable": false },{% for col in extra_cols %}
+ { "data": "{{col}}", "defaultContent": "-"}{% if not forloop.last %},{% endif %}{% endfor %}
+ ]
+ };
+ $.extend(datatable_options, datatables_default);
+ if (datatables_i18n) datatable_options['language'] = datatables_i18n;
+
+ datatable_{{sname}} = jQuery("#grid_{{name}}").DataTable(datatable_options);
+
+ $('#modal_grid_{{name}}').on('show.bs.modal', function (e) {
+ $('#grid_{{name}}_wrapper').appendTo(
+ '#modal_grid_{{name}} .modal-body .current-grid');
+ $('#grid_{{name}}').DataTable().clear().draw()
+ });
+
+ $('#modal_grid_{{name}}').on('hide.bs.modal', function (e) {
+ $('#grid_{{name}}_wrapper').appendTo(
+ '#grid_{{name}}_meta_wrapper');
+ $('#grid_{{name}}').DataTable().clear().draw()
+ });
+
+ {% comment %}
+ {
url:'{{source|safe}}',
datatype: "json",
mtype: 'GET',
@@ -42,6 +114,7 @@ setTimeout(
}
});
{% if large %}jQuery("#grid_{{name}}").jqGrid('setGridHeight', 272);{% endif %}
+ {% endcomment %}
}, 200);
</script>
diff --git a/ishtar_common/templates/ishtar/blocks/wizard_breadcrumb.html b/ishtar_common/templates/ishtar/blocks/wizard_breadcrumb.html
new file mode 100644
index 000000000..79bca71f1
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/wizard_breadcrumb.html
@@ -0,0 +1,21 @@
+<form action="." method="post">{% csrf_token %}
+ <nav aria-label="breadcrumb" role="navigation">
+ <ol class="breadcrumb">
+ {% for step in previous_steps %}
+ <li class="breadcrumb-item">
+ <button class='change_step' name="form_prev_step"
+ value="{{forloop.counter0}}">{{step}}</button>
+ </li>
+ {% endfor %}
+ <li class="breadcrumb-item active">
+ <a href='#'>{{current_step_label}}</a>
+ </li>
+ {% for step in next_steps %}
+ <li class="breadcrumb-item">
+ <button class='change_step' name="form_prev_step"
+ value="{{forloop.counter|add:previous_step_counter}}">{{step}}</button>
+ </li>
+ {% endfor %}
+ </ol>
+ </nav>
+</form>
diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html
index bfefd5eb6..4f118f2f9 100644
--- a/ishtar_common/templates/ishtar/sheet.html
+++ b/ishtar_common/templates/ishtar/sheet.html
@@ -12,68 +12,86 @@
</head>
<body>
{% endblock %}
-<div class="sheet" id='{{window_id}}'>
-{% block head_sheet %}
-<script type="text/javascript">var last_window='{{window_id}}';</script>
-<div class="head">
+ <div class="card sheet" id="{{window_id}}">
+ <div class="card-header" data-sheet-id="{{sheet_id}}" role="tab" id='head-{{window_id}}'>
+ <div class="row">
+ <div class="col">
+ <h5 class="mb-0">
+ <a data-toggle="collapse" href="#collapse-{{window_id}}" aria-expanded="true"
+ aria-controls="collapse-{{window_id}}">
+ {% block head_title %}{% endblock %}
+ </a>
+ </h5>
+ </div>
+ <div class='col text-center'>
+ <a href='#' class='previous_page'>
+ <span class="fa-stack">
+ <i class="fa fa-circle fa-stack-2x"></i>
+ <i class="fa fa-arrow-left fa-stack-1x fa-inverse"></i>
+ </span>
+ </a>
+ <a href='#' class='next_page'>
+ <span class="fa-stack">
+ <i class="fa fa-circle fa-stack-2x"></i>
+ <i class="fa fa-arrow-right fa-stack-1x fa-inverse"></i>
+ </span>
+ </a>
+ </div>
+ <div class='col text-right'>
+ <a href='#' onclick='$("#{{window_id}}").hide()' title="{% trans 'Close' %}">
+ <span class="fa-stack">
+ <i class="fa fa-circle fa-stack-2x"></i>
+ <i class="fa fa-times fa-stack-1x fa-inverse"></i>
+ </span>
+ </a>
+ {% comment %}
+ <a href='#' onclick='closeAllWindows();' title="{% trans "Close all windows" %}">
+ <span class="fa-stack">
+ <i class="fa fa-files-o fa-stack-2x"></i>
+ <i class="fa fa-circle fa-stack-15x"></i>
+ <i class="fa fa-times fa-stack-1x fa-inverse"></i>
+ </span>
+ </a>
+ {% endcomment %}
+ </div>
+ </div>
+ {% block header_title %}{% endblock %}
+ </div>
-<a href='#' class='previous_page'>
-<span class="fa-stack fa-lg">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-arrow-left fa-stack-1x fa-inverse"></i>
-</span>
-</a>
-<div class='close-buttons'>
-<a href='#' onclick='$("#{{window_id}}").hide("slow")' title="{% trans 'Close' %}">
-<span class="fa-stack">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-times fa-stack-1x fa-inverse"></i>
-</span>
-</a>
-<a href='#' onclick='closeAllWindows();' title="{% trans "Close all windows" %}">
-<span class="fa-stack">
- <i class="fa fa-files-o fa-stack-2x"></i>
- <i class="fa fa-circle fa-stack-15x"></i>
- <i class="fa fa-times fa-stack-1x fa-inverse"></i>
-</span>
-</a>
-</div>
-<a href='#' class='next_page'>
-<span class="fa-stack fa-lg">
- <i class="fa fa-circle fa-stack-2x"></i>
- <i class="fa fa-arrow-right fa-stack-1x fa-inverse"></i>
-</span>
-</a>
-
-<h1>{% block head_title %}{% endblock %}</h1>
-</div>
+ <div id="collapse-{{window_id}}" class="collapse show" role="tabpanel"
+ aria-labelledby="heading-{{window_id}}" data-parent="#window">
+ {% block toolbar %}{% endblock %}
+ <div class="card-body">
+ {% block head_sheet %}
+ <script type="text/javascript">
+ var last_window='{{window_id}}';
-<script type="text/javascript" language='javascript'>
-jQuery(document).ready(function(){
- if (! get_next_table_id({{item.pk}})){
- jQuery('.next_page').hide();
- }
- if (! get_previous_table_id({{item.pk}})){
- jQuery('.previous_page').hide();
- }
- jQuery(".next_page").click(function() {
- load_window("{{current_window_url}}" + get_next_table_id({{item.pk}}) + "/",
- '', function(){$("#{{window_id}}").hide();});
- });
- jQuery(".previous_page").click(function() {
- load_window("{{current_window_url}}" + get_previous_table_id({{item.pk}}) + "/",
- '', function(){$("#{{window_id}}").hide();});
- });
-});
-</script>
-{% endblock %}
-{% block header_title %}{% endblock %}
-<div class="body">
-{% block toolbar %}{% endblock %}
-{% block content %}
-{% endblock %}
-</div>
+ jQuery(document).ready(function(){
+ if (! get_next_table_id({{item.pk}})){
+ jQuery('.next_page').hide();
+ }
+ if (! get_previous_table_id({{item.pk}})){
+ jQuery('.previous_page').hide();
+ }
+ jQuery(".next_page").click(function() {
+ load_window("{{current_window_url}}" + get_next_table_id({{item.pk}}) + "/",
+ '', function(){$("#{{window_id}}").remove();});
+ });
+ jQuery(".previous_page").click(function() {
+ load_window("{{current_window_url}}" + get_previous_table_id({{item.pk}}) + "/",
+ '', function(){$("#{{window_id}}").remove();});
+ });
+ });
+ </script>
+ {% endblock %}
+ <div class="body">
+ {% block content %}
+ {% endblock %}
+ </div>
+ </div>
+ </div>
+ </div>
</div>
{%block main_foot%}
</body>
diff --git a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html
index 7339af9a8..034d6e21a 100644
--- a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html
@@ -3,14 +3,9 @@
{% load range %}
{% block content %}
<h2>{{wizard_label}}</h2>
-<form action="." method="post">{% csrf_token %}
-<ul id='form_path'>
-{% for step in previous_steps %}
- <li><button name="form_prev_step" value="{{forloop.counter0}}">{{step}}</button></li>
-{% endfor %}
- <li class='current'><a href='#'>{{current_step_label}}</a></li>
-</ul>
-</form>
+
+{% include "ishtar/blocks/wizard_breadcrumb.html" %}
+
<form action="." method="post">{% csrf_token %}
<div class='form'>
{% block "warning_informations" %}{% endblock %}
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html
index 19076b0de..7ba87c44d 100644
--- a/ishtar_common/templates/ishtar/wizard/default_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html
@@ -5,18 +5,10 @@
{% endblock %}
{% block content %}
{% block wizard_head %}
-<h2>{{wizard_label}}</h2>
-<form action="." method="post">{% csrf_token %}
-<ul id='form_path'>
-{% for step in previous_steps %}
- <li><button class='change_step' name="form_prev_step" value="{{forloop.counter0}}">{{step}}</button></li>
-{% endfor %}
- <li class='current'><a href='#'>{{current_step_label}}</a></li>
-{% for step in next_steps %}
- <li><button class='change_step' name="form_prev_step" value="{{forloop.counter|add:previous_step_counter}}">{{step}}</button></li>
-{% endfor %}
-</ul>
-</form>
+<h3>{{wizard_label}}</h3>
+
+{% include "ishtar/blocks/wizard_breadcrumb.html" %}
+
{% endblock %}
{% block wizard_form %}
<form action="." method="post" name='wizard'{% if wizard.form.file_upload %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
@@ -31,14 +23,12 @@
<table class='formset'>
{%if wizard.form.non_form_errors%}<tr class='error'><th colspan='2'>{{wizard.form.non_form_errors}}</th></tr>{%endif%}
{% for formsetform in wizard.form.forms %}
- {% table_form formsetform %}
+ {% bs_form formsetform %}
{% endfor %}
<tr class='modify'><td colspan="2"><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></td></tr></li>
</table>
{% else %}
-{% if not is_search %}<table>{% endif %}
-{% table_form wizard.form %}
-{% if not is_search %}</table>{% endif %}
+ {% bs_form wizard.form %}
{% endif %}
{% endblock %}
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
diff --git a/ishtar_common/templates/ishtar/wizard/search.html b/ishtar_common/templates/ishtar/wizard/search.html
index e5066cf87..da7955c26 100644
--- a/ishtar_common/templates/ishtar/wizard/search.html
+++ b/ishtar_common/templates/ishtar/wizard/search.html
@@ -4,10 +4,18 @@
{{wizard.form.media}}
{% endblock %}
{% block content %}
-<h2>{{wizard_label}}</h2>
-<ul id='form_path'>
- <li class='current'><a href='#'>{{current_step.form_label}}</a></li>
-</ul>
+<h3>{{wizard_label}}</h3>
+
+{% comment %}
+<nav aria-label="breadcrumb" role="navigation">
+ <ol class="breadcrumb">
+ <li class="breadcrumb-item active">
+ <a href='#'>{{current_step.form_label}}</a>
+ </li>
+ </ol>
+</nav>
+{% endcomment %}
+
{% if wizard.form.forms %}
<div class='form'>
<div class='top_button'><input type="submit" id="submit_form" value="{% trans "Validate" %}"/></div>
@@ -20,7 +28,7 @@
<tr class='modify'><td colspan="2"><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></td></tr></li>
</table>
{% else %}
-<div class='form'>
+<div class='form search'>
{{ wizard.form.as_p }}
</div>
{% endif %}
diff --git a/ishtar_common/templates/ishtar/wizard/validation_bar.html b/ishtar_common/templates/ishtar/wizard/validation_bar.html
index b99b9e689..0a30fb7e1 100644
--- a/ishtar_common/templates/ishtar/wizard/validation_bar.html
+++ b/ishtar_common/templates/ishtar/wizard/validation_bar.html
@@ -1,8 +1,24 @@
{% load i18n %}
-<div id='validation-bar'>
- <input type="submit" id="submit_form" name='validate' value="{% trans 'Validate' %}"/>
+<div id='validation-bar' class="row text-center">
+ <div class="col-sm">
+ <button type="submit" id="submit_form" name='validate'
+ value="validate" class="btn btn-success">
+ {% trans 'Validate' %}
+ </button>
+ </div>
{% if last_step_is_available and next_steps %}
- <input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans 'Validate and end' %}"/>
+ <div class="col-sm">
+ <button type="submit" id="submit_end_form" name='validate_and_end'
+ value="validate_and_end" class="btn btn-success">
+ {% trans 'Validate and end' %}
+ </button>
+ </div>
{% endif %}
- <a href="{% url 'reset_wizards' %}" id="reset_wizards" class='button'>{% trans "Cancel" %}</a>
+ <div class="col-sm">
+ <a href="{% url 'reset_wizards' %}" id="reset_wizards">
+ <button type="button" class="btn btn-secondary">
+ {% trans "Cancel" %}
+ </button>
+ </a>
+ </div>
</div>