From d4fa2de2b569cc2b8eff1cd279420299cf6686f2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 26 Dec 2018 12:10:53 +0100 Subject: Table gallery: pagination fix --- ishtar_common/static/js/ishtar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ishtar_common/static/js') diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 03b9efb78..04957d7a2 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -1042,8 +1042,11 @@ var render_gallery = function(data_table, table_name, nb_select){ } idx_page += 1; } - if (page_total > 6){ + if (page_total > 5){ html += render_paginate_button('...'); + html += render_paginate_button(page_total, page_current); + } else if (idx_page == page_total) { + html += render_paginate_button(idx_page, page_current); } } else { html += render_paginate_button('...'); -- cgit v1.2.3