diff --git a/aleksis/apps/chronos/templates/chronos/partials/group.html b/aleksis/apps/chronos/templates/chronos/partials/group.html index d2e345d53df2bec9020b9de38139726744d1effe..3105150c7630d7d6fd550536366900d3ba3a3fa1 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/group.html +++ b/aleksis/apps/chronos/templates/chronos/partials/group.html @@ -1,3 +1 @@ -<a href="{% url "timetable" "group" item.pk %}"> - {{ item.short_name }}{% if not forloop.last %},{% endif %} -</a> +{{ item.short_name }}{% if not forloop.last %},{% endif %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/groups.html b/aleksis/apps/chronos/templates/chronos/partials/groups.html index fb85c6d4dce53da5aea4ecef805fb52ddab4eed9..61bf6927b350f89cb2f191acc593dcb2758fb055 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/groups.html +++ b/aleksis/apps/chronos/templates/chronos/partials/groups.html @@ -1,5 +1,5 @@ {% if groups.count == 1 and groups.0.parent_groups.all and request.site.preferences.chronos__use_parent_groups %} - {% include "chronos/partials/groups_part.html" with groups=groups.0.parent_groups.all no_collapsible=no_collapsible %} + {% include "chronos/partials/groups_part.html" with groups=groups.0.parent_groups.all %} {% else %} {% include "chronos/partials/groups_part.html" with groups=groups no_collapsible=no_collapsible %} {% endif %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/groups_part.html b/aleksis/apps/chronos/templates/chronos/partials/groups_part.html index edafcb1977d04a18fb2a53651cf4ad6def3f0b19..d4c8f9f2a71c066f61b4c0a1c71d44674b190f0a 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/groups_part.html +++ b/aleksis/apps/chronos/templates/chronos/partials/groups_part.html @@ -1,7 +1,3 @@ -{% if groups.count > request.site.preferences.chronos__shorten_groups_limit and request.user.person.preferences.chronos__shorten_groups and not no_collapsible %} - {% include "components/text_collapsible.html" with template="chronos/partials/group.html" qs=groups %} -{% else %} - {% for group in groups %} - {% include "chronos/partials/group.html" with item=group %} - {% endfor %} -{% endif %} +{% for group in groups %} + {% include "chronos/partials/group.html" with item=group %} +{% endfor %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/headerbox.html b/aleksis/apps/chronos/templates/chronos/partials/headerbox.html index 1ed1e7de07cdcf64b2afea35f93f40b74aca9bd2..c3862168a7f71127935987b99767fbed20d9ab79 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/headerbox.html +++ b/aleksis/apps/chronos/templates/chronos/partials/headerbox.html @@ -1,53 +1,53 @@ {% load i18n %} {% if affected_teachers or affected_groups or absent_teachers or absent_groups %} - <div class="{% if not print %}card{% endif %}"> - <div class="{% if not print %}card-content{% endif %}"> + <div> + <div> {% if absent_teachers %} <div class="row no-margin"> - <div class="col {% if not print %}s12 m3{% else %}s3{% endif %}"> + <div class="col"> <strong class="truncate"> {% trans "Absent teachers" %} </strong> </div> - <div class="col {% if not print %}s12 m9{% else %}s9{% endif %} black-text-a"> + <div class="col"> {% include "chronos/partials/teachers.html" with teachers=absent_teachers %} </div> </div> {% endif %} {% if absent_groups %} <div class="row no-margin"> - <div class="col {% if not print %}s12 m3{% else %}s3{% endif %}"> + <div class="col"> <strong class="truncate"> {% trans "Absent groups" %} </strong> </div> - <div class="col {% if not print %}s12 m9{% else %}s9{% endif %} black-text-a"> + <div class="col"> {% include "chronos/partials/groups.html" with groups=absent_groups no_collapsible=True %} </div> </div> {% endif %} {% if affected_teachers %} <div class="row no-margin"> - <div class="col {% if not print %}s12 m3{% else %}s3{% endif %}"> + <div class="col"> <strong class="truncate"> {% trans "Affected teachers" %} </strong> </div> - <div class="col {% if not print %}s12 m9{% else %}s9{% endif %} black-text-a"> + <div class="col"> {% include "chronos/partials/teachers.html" with teachers=affected_teachers %} </div> </div> {% endif %} {% if affected_groups %} <div class="row no-margin"> - <div class="col {% if not print %}s12 m3{% else %}s3{% endif %}"> + <div class="col"> <strong class="truncate"> {% trans "Affected groups" %} </strong> </div> - <div class="col {% if not print %}s12 m9{% else %}s9{% endif %} black-text-a"> - {% include "chronos/partials/groups.html" with groups=affected_groups no_collapsible=True %} + <div class="col"> + {% include "chronos/partials/groups.html" with groups=affected_groups %} </div> </div> {% endif %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/rooms.html b/aleksis/apps/chronos/templates/chronos/partials/rooms.html index 1e4298811435d38d9a4568578c1ffacff7ceda2d..e1f895c7d4aea8c03e02f71f0752e2a495e85c4a 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/rooms.html +++ b/aleksis/apps/chronos/templates/chronos/partials/rooms.html @@ -1,8 +1,3 @@ {% for room in rooms %} - <span data-position="bottom" class="tooltipped" - data-tooltip="{{ room }}"> - <a href="{% url "timetable" "room" room.pk %}"> - {{ room.short_name }}{% if not forloop.last %},{% endif %} - </a> - </span> + {{ room.short_name|default:room.name }}{% if not forloop.last %},{% endif %} {% endfor %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/subject.html b/aleksis/apps/chronos/templates/chronos/partials/subject.html index e326c75a2419b28880578a32a1ffea4002194847..c6f305ab0ed98a144e7a514b356dd42b447fad50 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/subject.html +++ b/aleksis/apps/chronos/templates/chronos/partials/subject.html @@ -1,3 +1,3 @@ <strong> - <span data-position="bottom" class="tooltipped" data-tooltip="{{ subject.name }}">{{ subject.short_name }}</span> + {{ subject.short_name|default:subject.name }} </strong> diff --git a/aleksis/apps/chronos/templates/chronos/partials/subs/badge.html b/aleksis/apps/chronos/templates/chronos/partials/subs/badge.html index c8072442352ca282af2e54ff62a7066464d5e3a0..f0210546a37921a76c78a2e2d100f6b01092f1a9 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/subs/badge.html +++ b/aleksis/apps/chronos/templates/chronos/partials/subs/badge.html @@ -1,5 +1,5 @@ {% load i18n %} -{% if sub.cancelled %} +{% if el.cancelled %} <span class="badge new green">{% trans "Cancelled" %}</span> {% endif %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/subs/colour.html b/aleksis/apps/chronos/templates/chronos/partials/subs/colour.html index e59b37fe7996303f352a7d23eececee91617e594..06ccab2698661fd484ce14c9a06adb57551f225c 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/subs/colour.html +++ b/aleksis/apps/chronos/templates/chronos/partials/subs/colour.html @@ -1,4 +1,4 @@ -{% if item.el.cancelled %} +{% if el.cancelled %} green-text {% else %} black-text diff --git a/aleksis/apps/chronos/templates/chronos/partials/subs/period.html b/aleksis/apps/chronos/templates/chronos/partials/subs/period.html index 4ba770635ca12406bf7b95830539d8a8f18af45f..874631a72c99a7f128b07bc2fed71265d8349a56 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/subs/period.html +++ b/aleksis/apps/chronos/templates/chronos/partials/subs/period.html @@ -1,7 +1,14 @@ +{% load i18n %} <strong> - {% if el.datetime_start %} - {{ el.datetime_start.time }} - {{ el.datetime_end.time }} - {% elif el.date_start %} - {{ el.date_start }} - {{ el.date_end }} + {% if el.REFERENCE_OBJECT.slot_number_start and el.REFERENCE_OBJECT.slot_number_end %} + {% if el.REFERENCE_OBJECT.slot_number_start == el.REFERENCE_OBJECT.slot_number_end %} + {{ el.REFERENCE_OBJECT.slot_number_start }}. + {% else %} + {{ el.REFERENCE_OBJECT.slot_number_start }}.–{{ el.REFERENCE_OBJECT.slot_number_end }}. + {% endif %} + {% elif el.DTSTART.dt.time %} + {{ el.DTSTART.dt.time }} - {{ el.DTSTART.dt.time }} + {% else %} + {% trans "all day" %} {% endif %} </strong> diff --git a/aleksis/apps/chronos/templates/chronos/partials/subs/subject.html b/aleksis/apps/chronos/templates/chronos/partials/subs/subject.html index dcbfa4be1a63211d159da184318d04fa268072fd..3e907e1f082aefb0a3795ea230ba63e0210ab4d3 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/subs/subject.html +++ b/aleksis/apps/chronos/templates/chronos/partials/subs/subject.html @@ -2,25 +2,17 @@ {% if not el.amends.subject and not el.subject %} {% if el.amends.title %} - <span data-position="bottom" class="tooltipped" data-tooltip="{{ el.amends.title }}"> <s>{{ el.amends.title }}</s> {% endif %} {% if el.title %} - <span data-position="bottom" class="tooltipped" data-tooltip="{{ el.title }}"> <s>{{ el.title }}</s> {% endif %} {% elif el.cancelled %} - <span data-position="bottom" class="tooltipped" data-tooltip="{{ el.subject.short_name }}"> - <s>{{ el.subject.short_name }}</s> -</span> + <s>{% include "chronos/partials/subject.html" with subject=el.amends.subject %}</s> {% elif el.subject and el.amends.subject %} - <span data-position="bottom" class="tooltipped" data-tooltip="{{ el.amends.subject.name }}"> - <s>{{ el.amends.subject.short_name }}</s> -</span> + <s>{% include "chronos/partials/subject.html" with subject=el.amends.subject %}</s> → - <span data-position="bottom" class="tooltipped" data-tooltip="{{ el.subject.name }}"> - <strong>{{ el.subject.short_name }}</strong> -</span> + <strong>{% include "chronos/partials/subject.html" with subject=el.subject %}</strong> {% elif el.subject and not el.amends.subject %} {% include "chronos/partials/subject.html" with subject=el.subject %} {% else %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/teachers.html b/aleksis/apps/chronos/templates/chronos/partials/teachers.html index d7ec97197f1309c651d0a8c07b0d1e387ecaade8..f506b4b14287cb35d8f4127cd21aafdd223f3287 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/teachers.html +++ b/aleksis/apps/chronos/templates/chronos/partials/teachers.html @@ -1,8 +1,3 @@ {% for teacher in teachers %} - <span data-position="bottom" class="tooltipped" - data-tooltip="{{ teacher }}"> - <a href="{% url "timetable" "teacher" teacher.pk %}"> - {{ teacher.short_name }}{% if not forloop.last %},{% endif %} - </a> - </span> + {{ teacher.short_name|default:teacher.full_name }}{% if not forloop.last %},{% endif %} {% endfor %} diff --git a/aleksis/apps/chronos/templates/chronos/substitutions_print.html b/aleksis/apps/chronos/templates/chronos/substitutions_print.html index 10243a1a0c1cf351ec9f62354edc4a2d89bd007b..04dc4cf24a5a171fa0638a9074693d025b1ccd02 100644 --- a/aleksis/apps/chronos/templates/chronos/substitutions_print.html +++ b/aleksis/apps/chronos/templates/chronos/substitutions_print.html @@ -18,7 +18,7 @@ {% include "core/partials/announcements.html" with announcements=c.announcements show_recipients=1 %} - {% include "chronos/partials/headerbox.html" with absent_teachers=c.absent_teachers absent_groups=c.absent_groups print=1 %} + {% include "chronos/partials/headerbox.html" with absent_teachers=c.absent_teachers absent_groups=c.absent_groups affected_teachers=c.affected_teachers affected_groups=c.affected_groups %} <table class="substitutions"> <thead> @@ -47,30 +47,30 @@ <tbody> {% for item in c.substitutions %} - {% ifchanged item.el.group_names %} + {% ifchanged item.el.REFERENCE_OBJECT.group_names %} </tbody> <tbody class="{% cycle "striped" "not-striped" %}"> {% endifchanged %} - <tr class="{% include "chronos/partials/subs/colour.html" with item=item %}"> + <tr class="{% include "chronos/partials/subs/colour.html" with el=item.el.REFERENCE_OBJECT %}"> <td> - {% include "chronos/partials/subs/groups.html" with type=item.type el=item.el %} + {% include "chronos/partials/subs/groups.html" with el=item.el.REFERENCE_OBJECT %} </td> <td> - {% include "chronos/partials/subs/period.html" with type=item.type el=item.el item=item %} + {% include "chronos/partials/subs/period.html" with el=item.el %} </td> <td> - {% include "chronos/partials/subs/teachers.html" with type=item.type el=item.el %} + {% include "chronos/partials/subs/teachers.html" with el=item.el.REFERENCE_OBJECT %} </td> <td> - {% include "chronos/partials/subs/subject.html" with type=item.type el=item.el %} + {% include "chronos/partials/subs/subject.html" with el=item.el.REFERENCE_OBJECT %} </td> <td> - {% include "chronos/partials/subs/rooms.html" with type=item.type el=item.el %} + {% include "chronos/partials/subs/rooms.html" with el=item.el.REFERENCE_OBJECT %} </td> <td> - {% include "chronos/partials/subs/badge.html" with sub=item.el %} - {% include "chronos/partials/subs/comment.html" with el=item.el %} + {% include "chronos/partials/subs/badge.html" with el=item.el.REFERENCE_OBJECT %} + {% include "chronos/partials/subs/comment.html" with el=item.el.REFERENCE_OBJECT %} </td> </tr> {% endfor %}