diff --git a/web/app/results/views.py b/web/app/results/views.py index 3e2099f2966ed5d3d93725976cef40b2e1adc9c8..6cc66641fd81161bbbd2c3b924213dbc42e4c6af 100644 --- a/web/app/results/views.py +++ b/web/app/results/views.py @@ -14,9 +14,9 @@ from .. import logger from jsonschema import validate -@results.route('/import_results', methods=['GET', 'POST']) +@results.route('/import', methods=['GET', 'POST']) @login_required -def import_results(): +def result_import(): ''' View to import one json result file. Uses the ImportReultFileForm. ''' @@ -77,9 +77,9 @@ def import_results(): # deletes before created Result and ResultFile db entries tasks.delete_result(result.id) return make_response( - {'redirect_url': url_for('results.import_results')}, + {'redirect_url': url_for('results.result_import')}, 201) - return render_template('results/import_results.html.j2', + return render_template('results/result_import.html.j2', import_results_form=import_results_form, title='Add corpus file') @@ -132,7 +132,7 @@ def result_details(result_id): @login_required def result_inspect(result_id): ''' - View to inspect one importe result file in a corpus analysis like interface + View to inspect one imported result file in a corpus analysis like interface ''' display_options_form = DisplayOptionsForm( prefix='display-options-form', diff --git a/web/app/templates/main/dashboard.html.j2 b/web/app/templates/main/dashboard.html.j2 index 479f5b6593369498b4413292dde130bebd2e1d27..2a36f7acd248054886a3d3d5587b33c9dbb08f3e 100644 --- a/web/app/templates/main/dashboard.html.j2 +++ b/web/app/templates/main/dashboard.html.j2 @@ -28,7 +28,7 @@ <ul class="pagination"></ul> </div> <div class="card-action right-align"> - <a class="waves-effect waves-light btn" href="{{ url_for('results.import_results') }}">Import Results<i class="material-icons right">file_upload</i></a> + <a class="waves-effect waves-light btn" href="{{ url_for('results.result_import') }}">Import Results<i class="material-icons right">file_upload</i></a> <a class="waves-effect waves-light btn" href="{{ url_for('results.results_overview') }}">Show Imported Results<i class="material-icons right">folder</i></a> <a class="waves-effect waves-light btn" href="{{ url_for('corpora.add_corpus') }}">New corpus<i class="material-icons right">add</i></a> </div> diff --git a/web/app/templates/results/import_results.html.j2 b/web/app/templates/results/result_import.html.j2 similarity index 100% rename from web/app/templates/results/import_results.html.j2 rename to web/app/templates/results/result_import.html.j2 diff --git a/web/app/templates/results/results.html.j2 b/web/app/templates/results/results.html.j2 index 0577a1c8f0d86f291db34d893629c54646283812..ecf8095aae34b08707086e95119fa5578537305b 100644 --- a/web/app/templates/results/results.html.j2 +++ b/web/app/templates/results/results.html.j2 @@ -41,7 +41,7 @@ <ul class="pagination paginationBottom"></ul> </div> <div class="card-action right-align"> - <a class="waves-effect waves-light btn" href="{{ url_for('results.import_results') }}">Import Results<i class="material-icons right">file_upload</i></a> + <a class="waves-effect waves-light btn" href="{{ url_for('results.result_import') }}">Import Results<i class="material-icons right">file_upload</i></a> </div> </div> </div> diff --git a/web/app/templates/services/corpus_analysis.html.j2 b/web/app/templates/services/corpus_analysis.html.j2 index b5123a055ef7e10ac55f475a9ee4186f4e79e1b8..7e90399953d63e6aecaa572e2f40237ce1e8f184 100644 --- a/web/app/templates/services/corpus_analysis.html.j2 +++ b/web/app/templates/services/corpus_analysis.html.j2 @@ -37,6 +37,11 @@ <ul class="pagination"></ul> </div> <div class="card-action right-align"> +<<<<<<< HEAD +======= + <a class="waves-effect waves-light btn" href="{{ url_for('results.result_import') }}">Import Results<i class="material-icons right">file_upload</i></a> + <a class="waves-effect waves-light btn" href="{{ url_for('results.results_overview') }}">Show Imported Results<i class="material-icons right">folder</i></a> +>>>>>>> cdd421e48a28fc8353db4d61fb3c88ef8ff3b2a9 <a class="waves-effect waves-light btn" href="{{ url_for('corpora.add_corpus') }}">New corpus<i class="material-icons right">add</i></a> </div> </div>