Skip to content
Snippets Groups Projects
Commit 869ec34f authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Scheduler: Use default background color for unscheduled slots

Previously, the names of unscheduled slots were shown white on white background when no color for the corresponding category was set. Now, a black background color is used instead.
This fixes #217
parent 052b3a05
Branches
No related tags found
No related merge requests found
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
<h5 class="mt-2">{{ track_slots.grouper }}</h5> <h5 class="mt-2">{{ track_slots.grouper }}</h5>
{% endif %} {% endif %}
{% for slot in track_slots.list %} {% for slot in track_slots.list %}
<div class="unscheduled-slot badge" style='background-color: {{ slot.ak.category.color }}' <div class="unscheduled-slot badge" style='background-color: {% with slot.ak.category.color as color %} {% if color %}{{ color }}{% else %}#000000;{% endif %}{% endwith %}'
{% with slot.ak.details as details %} {% with slot.ak.details as details %}
data-event='{ "title": "{{ slot.ak.short_name }}", "duration": {"hours": "{{ slot.duration|unlocalize }}"}, "constraint": "roomAvailable", "description": "{{ details | escapejs }}", "slotID": "{{ slot.pk }}", "backgroundColor": "{{ slot.ak.category.color }}", "url": "{% url "admin:AKModel_akslot_change" slot.pk %}"}' data-details="{{ details }}">{{ slot.ak.short_name }} data-event='{ "title": "{{ slot.ak.short_name }}", "duration": {"hours": "{{ slot.duration|unlocalize }}"}, "constraint": "roomAvailable", "description": "{{ details | escapejs }}", "slotID": "{{ slot.pk }}", "backgroundColor": "{{ slot.ak.category.color }}", "url": "{% url "admin:AKModel_akslot_change" slot.pk %}"}' data-details="{{ details }}">{{ slot.ak.short_name }}
({{ slot.duration }} h)<br>{{ slot.ak.owners_list }} ({{ slot.duration }} h)<br>{{ slot.ak.owners_list }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment