From 95ee00c2a4064bd38d0467d28ce344a6b24b6ba7 Mon Sep 17 00:00:00 2001
From: "N. Geisler" <ngeisler@fachschaft.informatik.tu-darmstadt.de>
Date: Wed, 4 Nov 2020 23:00:21 +0100
Subject: [PATCH] add background color acc. to category to scheduling interface

---
 AKScheduling/templates/admin/AKScheduling/scheduling.html | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/AKScheduling/templates/admin/AKScheduling/scheduling.html b/AKScheduling/templates/admin/AKScheduling/scheduling.html
index 1c45be59..bf56707c 100644
--- a/AKScheduling/templates/admin/AKScheduling/scheduling.html
+++ b/AKScheduling/templates/admin/AKScheduling/scheduling.html
@@ -175,11 +175,14 @@
 
     <div class="row" style="margin-bottom: 50px;">
         <div class="col-md-10 col-lg-11">
-            <div id="planCalendar" ></div>
+            <div id="planCalendar"></div>
         </div>
         <div class="col-md-2 col-lg-1" id="unscheduled-slots">
             {% for slot in slots_unscheduled %}
-                <div class="unscheduled-slot badge badge-primary" data-event='{ "title": "{{ slot.ak.short_name }}", "duration": {"hours": "{{ slot.duration|unlocalize }}"}, "description": "{{ slot.ak.name }}", "slotID": "{{ slot.pk }}"}'>{{ slot.ak.short_name }} ({{ slot.duration }} h)</div>
+                <div class="unscheduled-slot badge badge-primary" style='background-color: {{ slot.ak.category.color }}'
+                     data-event='{ "title": "{{ slot.ak.short_name }}", "duration": {"hours": "{{ slot.duration|unlocalize }}"}, "description": "{{ slot.ak.name }}", "slotID": "{{ slot.pk }}"}'>{{ slot.ak.short_name }}
+                    ({{ slot.duration }} h)
+                </div>
             {% endfor %}
         </div>
     </div>
-- 
GitLab