summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_tables/documents.html2
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html37
2 files changed, 38 insertions, 1 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/documents.html
index 9405bc3e8..f1592cc42 100644
--- a/ishtar_common/templates/ishtar/blocks/window_tables/documents.html
+++ b/ishtar_common/templates/ishtar/blocks/window_tables/documents.html
@@ -1,5 +1,5 @@
{% load i18n %}
-<table>
+<table class='simple'>
<caption>{{caption}}</caption>
<tr>
<th>{% trans "Title" %}</th>
diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html
new file mode 100644
index 000000000..bd83983f4
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html
@@ -0,0 +1,37 @@
+{% load i18n %}
+
+<h4>{{caption}}</h4>
+<table id='grid_{{name}}' class='jqgrid'></table>
+<div id='pager_{{name}}'></div>
+
+<script type="text/javascript" language='javascript'>
+
+setTimeout(
+ function(){
+ jQuery("#grid_{{name}}").jqGrid({
+ url:'{{source}}',
+ datatype: "json",
+ mtype: 'GET',
+ colNames:['id', '', {{col_names|safe}}],
+ colModel:[
+ {name:'id', index:'id', hidden:true},
+ {name:'link', index:'link', width:30},
+ {{extra_cols|safe}}
+ ],
+ sortname: 'value',
+ viewrecords: true,
+ sortorder: "asc",
+ emptyrecords: "{{no_result}}",
+ loadtext: "{{loading}}",
+ pager: '#pager_{{name}}',
+ width:720,
+ rowNum:20,
+ jsonReader : {repeatitems: false},
+ loadError: function (jqXHR, textStatus, errorThrown) {
+ alert("{% trans "An error as occured during search. Check your query fields." %}");
+ }
+ });
+}, 200);
+
+</script>
+