From 4c310eaea839a25b556a1ebe348ffdc4c898e0d2 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch <pjentsch@sfb1288inf-Notebook.fritz.box>
Date: Mon, 2 Nov 2020 10:31:49 +0100
Subject: [PATCH] Add breadcrumbs to services package

---
 web/app/templates/services/_breadcrumbs.html.j2   | 15 +++++++++++++++
 .../templates/services/corpus_analysis.html.j2    |  4 ++++
 web/app/templates/services/file-setup.html.j2     |  4 ++++
 web/app/templates/services/nlp.html.j2            |  4 ++++
 web/app/templates/services/ocr.html.j2            |  4 ++++
 5 files changed, 31 insertions(+)
 create mode 100644 web/app/templates/services/_breadcrumbs.html.j2

diff --git a/web/app/templates/services/_breadcrumbs.html.j2 b/web/app/templates/services/_breadcrumbs.html.j2
new file mode 100644
index 00000000..8b84a596
--- /dev/null
+++ b/web/app/templates/services/_breadcrumbs.html.j2
@@ -0,0 +1,15 @@
+<ul class="tabs tabs-transparent">
+  <li class="tab"><a href="{{ url_for('main.index') }}" target="_self">nopaque</a></li>
+  <li class="tab disabled"><i class="material-icons">navigate_next</i></li>
+  <li class="tab"><a href="{{ url_for('main.index', _anchor='services') }}" target="_self">Processes & Services</a></li>
+  <li class="tab disabled"><i class="material-icons">navigate_next</i></li>
+  {% if request.path == url_for('.service', service='corpus_analysis') %}
+  <li class="tab"><a class="active" href="{{ url_for('.service', service='corpus_analysis') }}" target="_self">{{ title }}</a></li>
+  {% elif request.path == url_for('.service', service='file-setup') %}
+  <li class="tab"><a class="active" href="{{ url_for('.service', service='file-setup') }}" target="_self">{{ title }}</a></li>
+  {% elif request.path == url_for('.service', service='nlp') %}
+  <li class="tab"><a class="active" href="{{ url_for('.service', service='nlp') }}" target="_self">{{ title }}</a></li>
+  {% elif request.path == url_for('.service', service='ocr') %}
+  <li class="tab"><a class="active" href="{{ url_for('.service', service='ocr') }}" target="_self">{{ title }}</a></li>
+  {% endif %}
+</ul>
diff --git a/web/app/templates/services/corpus_analysis.html.j2 b/web/app/templates/services/corpus_analysis.html.j2
index b2750124..9c684786 100644
--- a/web/app/templates/services/corpus_analysis.html.j2
+++ b/web/app/templates/services/corpus_analysis.html.j2
@@ -4,6 +4,10 @@
 {% set scheme_primary_color = colors.corpus_analysis_darken %}
 {% set scheme_secondary_color = colors.corpus_analysis %}
 
+{% block nav_content %}
+{% include 'services/_breadcrumbs.html.j2' %}
+{% endblock nav_content %}
+
 {% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
 
 {% block page_content %}
diff --git a/web/app/templates/services/file-setup.html.j2 b/web/app/templates/services/file-setup.html.j2
index 48ac3817..31f5e824 100644
--- a/web/app/templates/services/file-setup.html.j2
+++ b/web/app/templates/services/file-setup.html.j2
@@ -5,6 +5,10 @@
 {% set scheme_primary_color = colors.file_setup_darken %}
 {% set scheme_secondary_color = colors.file_setup %}
 
+{% block nav_content %}
+{% include 'services/_breadcrumbs.html.j2' %}
+{% endblock nav_content %}
+
 {% block main_attribs %} class="file-setup-color lighten"{% endblock main_attribs %}
 
 {% block page_content %}
diff --git a/web/app/templates/services/nlp.html.j2 b/web/app/templates/services/nlp.html.j2
index 8cb70d28..83d83396 100644
--- a/web/app/templates/services/nlp.html.j2
+++ b/web/app/templates/services/nlp.html.j2
@@ -5,6 +5,10 @@
 {% set scheme_primary_color = colors.nlp_darken %}
 {% set scheme_secondary_color = colors.nlp %}
 
+{% block nav_content %}
+{% include 'services/_breadcrumbs.html.j2' %}
+{% endblock nav_content %}
+
 {% block main_attribs %} class="nlp-color lighten"{% endblock main_attribs %}
 
 {% block page_content %}
diff --git a/web/app/templates/services/ocr.html.j2 b/web/app/templates/services/ocr.html.j2
index 150778c3..00608e0d 100644
--- a/web/app/templates/services/ocr.html.j2
+++ b/web/app/templates/services/ocr.html.j2
@@ -5,6 +5,10 @@
 {% set scheme_primary_color = colors.ocr_darken %}
 {% set scheme_secondary_color = colors.ocr %}
 
+{% block nav_content %}
+{% include 'services/_breadcrumbs.html.j2' %}
+{% endblock nav_content %}
+
 {% block main_attribs %} class="ocr-color lighten"{% endblock main_attribs %}
 
 {% block page_content %}
-- 
GitLab