diff --git a/web/app/query_results/views.py b/web/app/query_results/views.py index 8a2e0176..78fda741 100644 --- a/web/app/query_results/views.py +++ b/web/app/query_results/views.py @@ -127,9 +127,9 @@ def delete_query_result(query_result_id): if not (query_result.creator == current_user or current_user.is_administrator()): abort(403) - tasks.delete_result(query_result_id) + tasks.delete_query_result(query_result_id) flash('Query result deleted!', 'result') - return redirect(url_for('main.dashboard')) + return redirect(url_for('services.service', service="corpus_analysis")) @query_results.route('//download') diff --git a/web/app/static/js/nopaque.lists.js b/web/app/static/js/nopaque.lists.js index 50d1a0c3..9cb256dd 100644 --- a/web/app/static/js/nopaque.lists.js +++ b/web/app/static/js/nopaque.lists.js @@ -118,6 +118,7 @@ RessourceList.dataMapper = { // Mapping for imported result entities from corpus analysis. // Shown in imported results table QueryResult: query_result => ({corpus_name: query_result.query_metadata.corpus_name, + "delete-link": `prepareQueryResultModal(${query_result.id})`, description: query_result.description, id: query_result.id, "inspect-link": `/query_results/${query_result.id}/inspect`, @@ -255,6 +256,9 @@ RessourceList.options = { search + + delete + send @@ -265,6 +269,7 @@ RessourceList.options = { "query", "title", {data: ["id"]}, + {name: "delete-link", attr: "onclick"}, {name: "inspect-link", attr: "href"}, {name: "link", attr: "href"}]}, // User entity blueprint setting html strucuture per entity per row diff --git a/web/app/templates/services/corpus_analysis.html.j2 b/web/app/templates/services/corpus_analysis.html.j2 index ce93c8e0..6c34bf02 100644 --- a/web/app/templates/services/corpus_analysis.html.j2 +++ b/web/app/templates/services/corpus_analysis.html.j2 @@ -83,11 +83,42 @@ + + + {% endblock %}