Rename some result views and templates

This commit is contained in:
Stephan Porada 2020-07-10 13:27:06 +02:00
parent 2b3d08b277
commit cdd421e48a
5 changed files with 8 additions and 8 deletions

View File

@ -14,9 +14,9 @@ from .. import logger
from jsonschema import validate from jsonschema import validate
@results.route('/import_results', methods=['GET', 'POST']) @results.route('/import', methods=['GET', 'POST'])
@login_required @login_required
def import_results(): def result_import():
''' '''
View to import one json result file. Uses the ImportReultFileForm. 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 # deletes before created Result and ResultFile db entries
tasks.delete_result(result.id) tasks.delete_result(result.id)
return make_response( return make_response(
{'redirect_url': url_for('results.import_results')}, {'redirect_url': url_for('results.result_import')},
201) 201)
return render_template('results/import_results.html.j2', return render_template('results/result_import.html.j2',
import_results_form=import_results_form, import_results_form=import_results_form,
title='Add corpus file') title='Add corpus file')
@ -132,7 +132,7 @@ def result_details(result_id):
@login_required @login_required
def result_inspect(result_id): 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( display_options_form = DisplayOptionsForm(
prefix='display-options-form', prefix='display-options-form',

View File

@ -28,7 +28,7 @@
<ul class="pagination"></ul> <ul class="pagination"></ul>
</div> </div>
<div class="card-action right-align"> <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('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> <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>

View File

@ -41,7 +41,7 @@
<ul class="pagination paginationBottom"></ul> <ul class="pagination paginationBottom"></ul>
</div> </div>
<div class="card-action right-align"> <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> </div>
</div> </div>

View File

@ -36,7 +36,7 @@
<ul class="pagination"></ul> <ul class="pagination"></ul>
</div> </div>
<div class="card-action right-align"> <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('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> <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>