summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/blocks/DataTables.html37
-rw-r--r--ishtar_common/templates/ishtar/qa_form.html25
2 files changed, 53 insertions, 9 deletions
diff --git a/ishtar_common/templates/blocks/DataTables.html b/ishtar_common/templates/blocks/DataTables.html
index 70d47cb8d..7fad1f121 100644
--- a/ishtar_common/templates/blocks/DataTables.html
+++ b/ishtar_common/templates/blocks/DataTables.html
@@ -162,16 +162,35 @@ jQuery(document).ready(function(){
"select": {
"style": {% if multiple_select %}'multi'{% else %}'single'{% endif %}
},
- {% if multiple_select %}"buttons": [
- 'selectAll',
- 'selectNone'
- ],
- "language": {
- buttons: {
- selectAll: "{% trans 'Select all items' %}",
- selectNone: "{% trans 'Select none' %}"
+ {% if multiple_select or quick_actions %}"buttons": [
+ {% for url, title, icon, target in quick_actions %}
+ {
+ {% if target == 'one' %}extend: 'selectedSingle',
+ {% elif target == 'many' %}extend: 'selected',
+ {% endif %}
+ className: "btn btn-success",
+ text: "{{icon}}",
+ titleAttr: "{{title}}",
+ action: function (e, dt, node, config) {
+ var url = dt_generate_qa_url(dt, "{{url}}");
+ dt_qa_open(url);
+ return false;
+ }
+ },
+ {% if not forloop.last %},{% endif %}
+ {% endfor %}{% if multiple_select %}{% if quick_actions%},{% endif %}
+ {
+ extend: 'selectAll',
+ text: '<i class="fa fa-check-circle-o"></i>',
+ titleAttr: "{% trans 'Select all items' %}"
+ },
+ {
+ extend: 'selectNone',
+ text: '<i class="fa fa-times"></i>',
+ titleAttr: "{% trans 'Deselect' %}"
}
- },
+ {% endif %}
+ ],
"dom": 'lBtip',
{% else %}
"dom": 'ltip',
diff --git a/ishtar_common/templates/ishtar/qa_form.html b/ishtar_common/templates/ishtar/qa_form.html
new file mode 100644
index 000000000..95f8887a8
--- /dev/null
+++ b/ishtar_common/templates/ishtar/qa_form.html
@@ -0,0 +1,25 @@
+{% load i18n inline_formset table_form %}
+
+<div class="modal-dialog modal-lg modal-dialog-centered">
+ <div class="modal-content" id='progress-content'>
+ <div class="modal-header">
+ <h2>{{page_name}}</h2>
+ </div>
+ <form enctype="multipart/form-data" action="." method="post">{% csrf_token %}
+ <div class="modal-body">
+ <div class='form'>
+ {% for error in form.non_field_errors %}
+ <p>{{ error }}</p>
+ {% endfor %}
+ {% bs_form form %}
+ </div>
+ <button type="submit" id="submit_form" name='validate'
+ value="validate" class="btn btn-success">
+ {% trans "Modify" %}
+ </button>
+ </div>
+ </form>
+ </div>
+</div>
+
+