From be8d688fddd46e53db33fe2ee809538ff98a857b Mon Sep 17 00:00:00 2001
From: Stephan Porada <sporada@uni-bielefeld.de>
Date: Mon, 21 Sep 2020 10:36:04 +0200
Subject: [PATCH] Set Job colors on Job result pages.

---
 web/app/templates/jobs/job.html.j2 | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/web/app/templates/jobs/job.html.j2 b/web/app/templates/jobs/job.html.j2
index 635d78a8..70cf4736 100644
--- a/web/app/templates/jobs/job.html.j2
+++ b/web/app/templates/jobs/job.html.j2
@@ -1,10 +1,29 @@
 {% extends "nopaque.html.j2" %}
 
-{% set headline = '<i class="left material-icons service" data-service="{service}" style="font-size: inherit;"></i>Job view'.format(service=job.service) %}
+{% set headline = '<i class="left material-icons service" data-service="{service}" style="font-size: inherit;"></i>Job ({service}) - {title}'.format(service=job.service, title=job.title) %}
 
+{% if job.service == 'file-setup' %}
+  {% set main_class = 'file-setup-color lighten' %}
+{% elif job.service == 'nlp' %}
+  {% set main_class = 'nlp-color lighten' %}
+{% elif job.service == 'ocr' %}
+  {% set main_class = 'ocr-color lighten' %}
+{% endif %}
 {% block page_content %}
+
+{% if job.service == 'file-setup' %}
+  {{ Macros.insert_color_scheme(file_setup_color_darken) }}
+  {% set border_color = file_setup_color_darken %}
+{% elif job.service == 'nlp' %}
+  {{ Macros.insert_color_scheme(nlp_color_darken) }}
+  {% set border_color = nlp_color_darken %}
+{% elif job.service == 'ocr' %}
+  {{ Macros.insert_color_scheme(ocr_color_darken) }}
+  {% set border_color = ocr_color_darken %}
+{% endif %}
+
 <div class="col s12">
-  <div class="card">
+  <div class="card" style="border-top: 10px solid {{border_color}}">
     <div class="card-content">
       <div class="row">
         <div class="col s8 m9 l10">
-- 
GitLab