Add breadcrumbs to query_results package

This commit is contained in:
Patrick Jentsch 2020-11-03 09:53:37 +01:00
parent 2e4983a8db
commit 4d783492c0
5 changed files with 26 additions and 0 deletions

View File

@ -437,6 +437,7 @@ def inspect_query_result(query_result_id):
with open(query_result_file_path, 'r') as query_result_file: with open(query_result_file_path, 'r') as query_result_file:
query_result_file_content = json.load(query_result_file) query_result_file_content = json.load(query_result_file)
return render_template('corpora/query_results/inspect.html.j2', return render_template('corpora/query_results/inspect.html.j2',
query_result=query_result,
display_options_form=display_options_form, display_options_form=display_options_form,
inspect_display_options_form=inspect_display_options_form, # noqa inspect_display_options_form=inspect_display_options_form, # noqa
query_result_file_content=query_result_file_content, query_result_file_content=query_result_file_content,

View File

@ -0,0 +1,13 @@
<ul class="tabs tabs-transparent">
<li class="tab"><a href="{{ url_for('main.index') }}" target="_self"><i class="material-icons">home</i></a></li>
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
<li class="tab"><a href="{{ url_for('main.dashboard', _anchor='jobs') }}" target="_self">My query results</a></li>
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
{% if request.path == url_for('.add_query_result') %}
<li class="tab"><a class="active" href="{{ url_for('.add_query_result') }}" target="_self">{{ title }}</a></li>
{% elif request.path == url_for('.query_result', query_result_id=query_result.id) %}
<li class="tab"><a class="active" href="{{ url_for('.query_result', query_result_id=query_result.id) }}" target="_self">{{ query_result.title }}</a></li>
{% elif request.path == url_for('.inspect_query_result', query_result_id=query_result.id) %}
<li class="tab"><a class="active" href="{{ url_for('.inspect_query_result', query_result_id=query_result.id) }}" target="_self">{{ title }}</a></li>
{% endif %}
</ul>

View File

@ -5,6 +5,10 @@
{% set scheme_primary_color = colors.corpus_analysis_darken %} {% set scheme_primary_color = colors.corpus_analysis_darken %}
{% set scheme_secondary_color = colors.corpus_analysis %} {% set scheme_secondary_color = colors.corpus_analysis %}
{% block nav_content %}
{% include 'corpora/query_results/_breadcrumbs.html.j2' %}
{% endblock nav_content %}
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %} {% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
{% block page_content %} {% block page_content %}

View File

@ -4,6 +4,10 @@
{% set scheme_primary_color = colors.corpus_analysis_darken %} {% set scheme_primary_color = colors.corpus_analysis_darken %}
{% set scheme_secondary_color = colors.corpus_analysis %} {% set scheme_secondary_color = colors.corpus_analysis %}
{% block nav_content %}
{% include 'corpora/query_results/_breadcrumbs.html.j2' %}
{% endblock nav_content %}
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %} {% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
{% block page_content %} {% block page_content %}

View File

@ -4,6 +4,10 @@
{% set scheme_primary_color = colors.corpus_analysis_darken %} {% set scheme_primary_color = colors.corpus_analysis_darken %}
{% set scheme_secondary_color = colors.corpus_analysis %} {% set scheme_secondary_color = colors.corpus_analysis %}
{% block nav_content %}
{% include 'corpora/query_results/_breadcrumbs.html.j2' %}
{% endblock nav_content %}
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %} {% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
{% block page_content %} {% block page_content %}