Skip to content
Snippets Groups Projects
Verified Commit 5df0b2b4 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Apply material design to table generator

parent cc317135
No related branches found
No related tags found
1 merge request!31Biscuit merge. Closes #53.
......@@ -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")
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment