From bfd7c75bb1ba67dfec726585bf8b679948c7e235 Mon Sep 17 00:00:00 2001 From: Kipchirchir Sigei Date: Mon, 6 Dec 2021 12:05:27 +0300 Subject: [PATCH 1/2] Remove data tables export buttom from report views Signed-off-by: Kipchirchir Sigei --- tally_ho/apps/tally/static/js/data_table.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tally_ho/apps/tally/static/js/data_table.js b/tally_ho/apps/tally/static/js/data_table.js index 8c8726fcd..6ef5b80d3 100644 --- a/tally_ho/apps/tally/static/js/data_table.js +++ b/tally_ho/apps/tally/static/js/data_table.js @@ -48,19 +48,10 @@ $(document).ready(function () { stateSave: true, ajax: LIST_JSON_URL, dom: - "<'row'<'col-sm-1'B><'col-sm-6'l><'col-sm-5'f>>" + + "<'row'<'col-sm-6'l><'col-sm-6'f>>" + "<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-5'i><'col-sm-7'p>>", - buttons: [ - { - extend: "csv", - filename: exportFileName, - action: exportAction, - exportOptions: { - columns: ':visible :not(.hide-from-export)', - }, - }, - ], + buttons: [], select: { style: "multi", }, From eb8eef91297ed6fdcd16294fbe4d4bc1dddda698 Mon Sep 17 00:00:00 2001 From: Kipchirchir Sigei Date: Mon, 6 Dec 2021 12:06:29 +0300 Subject: [PATCH 2/2] Display report list views and update report export links Signed-off-by: Kipchirchir Sigei --- .../reports/candidates_votes_report.html | 10 +++++++++- .../templates/reports/duplicate_results.html | 6 +++++- .../tally/templates/reports/form_results.html | 6 +++++- .../templates/super_admin/result_export.html | 16 ++++------------ 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/tally_ho/apps/tally/templates/reports/candidates_votes_report.html b/tally_ho/apps/tally/templates/reports/candidates_votes_report.html index bd622e794..8ce7481ae 100644 --- a/tally_ho/apps/tally/templates/reports/candidates_votes_report.html +++ b/tally_ho/apps/tally/templates/reports/candidates_votes_report.html @@ -18,7 +18,15 @@

{{ title }}


- +
+
+ {% if 'Active' in title %} + {% trans 'Download Active Candidate Votes' %} + {% else %} + {% trans 'Download All Candidate Votes' %} + {% endif %} +
+
diff --git a/tally_ho/apps/tally/templates/reports/duplicate_results.html b/tally_ho/apps/tally/templates/reports/duplicate_results.html index 556970e3e..f359cc4aa 100644 --- a/tally_ho/apps/tally/templates/reports/duplicate_results.html +++ b/tally_ho/apps/tally/templates/reports/duplicate_results.html @@ -18,7 +18,11 @@

{% trans 'Result Forms with Duplicate Results' %}


- +
diff --git a/tally_ho/apps/tally/templates/reports/form_results.html b/tally_ho/apps/tally/templates/reports/form_results.html index 65b7dc035..311a27f05 100644 --- a/tally_ho/apps/tally/templates/reports/form_results.html +++ b/tally_ho/apps/tally/templates/reports/form_results.html @@ -18,7 +18,11 @@

{% trans 'Form Results' %}


- +
diff --git a/tally_ho/apps/tally/templates/super_admin/result_export.html b/tally_ho/apps/tally/templates/super_admin/result_export.html index e7c12f877..4de9c07b2 100644 --- a/tally_ho/apps/tally/templates/super_admin/result_export.html +++ b/tally_ho/apps/tally/templates/super_admin/result_export.html @@ -5,19 +5,11 @@ {% block content %}

{% trans 'Downloads' %}

- - - {% endblock %}