From 5df0b2b4c1021bc746214a32961ff8f38aed5eb4 Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Sun, 19 Jan 2020 16:20:04 +0100
Subject: [PATCH] Apply material design to table generator

---
 aleksis/apps/chronos/tables.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/aleksis/apps/chronos/tables.py b/aleksis/apps/chronos/tables.py
index ffbb8842..bcd6f217 100644
--- a/aleksis/apps/chronos/tables.py
+++ b/aleksis/apps/chronos/tables.py
@@ -15,9 +15,9 @@ def _css_class_from_lesson_state(
 ) -> str:
     if record.get_substitution(record._week):
         if record.get_substitution(record._week).cancelled:
-            return "table-danger"
+            return "green-text"
         else:
-            return "table-warning"
+            return "orange-text"
     else:
         return ""
 
@@ -33,5 +33,6 @@ class LessonsTable(tables.Table):
     lesson__subject = tables.Column(accessor="lesson__subject")
     room = tables.Column(accessor="room")
     edit_substitution = tables.LinkColumn(
-        "edit_substitution", args=[A("id"), A("_week")], text=_("Substitution")
+        "edit_substitution", args=[A("id"), A("_week")], text=_("Substitution"),
+        attrs={"a": {"class": "btn-flat waves-effect waves-orange"}}, verbose_name=_("Manage substitution")
     )
-- 
GitLab