diff --git a/aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html b/aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html index d0761f8102f60e1ea899a8b1ba1d11c1e2402535..d0f4d799437aa6b512b14d4a1f3bf73d1f871d75 100644 --- a/aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html +++ b/aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html @@ -65,38 +65,41 @@ </thead> <tbody> {% for period in periods %} - <tr> - <td class="center-align"> - {% include "alsijil/partials/lesson_status_icon.html" with period=period %} - </td> - <td class="tr-link"> - <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> - {{ period.period.period }}. - </a> - </td> - {% if not group %} + {% has_perm "alsijil.view_lessondocumentation" user period as can_view_lesson_documentation %} + {% if can_view_lesson_documentation %} + <tr> + <td class="center-align"> + {% include "alsijil/partials/lesson_status_icon.html" with period=period %} + </td> + <td class="tr-link"> + <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> + {{ period.period.period }}. + </a> + </td> + {% if not group %} + <td> + <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> + {{ period.lesson.group_names }} + </a> + </td> + {% endif %} <td> <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> - {{ period.lesson.group_names }} + {{ period.get_subject.name }} </a> </td> - {% endif %} - <td> - <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> - {{ period.get_subject.name }} - </a> - </td> - <td> - <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> - {{ period.get_teacher_names }} - </a> - </td> - <td> - <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> - {{ period.get_lesson_documentation.topic }} - </a> - </td> - </tr> + <td> + <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> + {{ period.get_teacher_names }} + </a> + </td> + <td> + <a class="tr-link" href="{% url 'lesson_by_week_and_period' week.year week.week period.id %}"> + {{ period.get_lesson_documentation.topic }} + </a> + </td> + </tr> + {% endif %} {% endfor %} </tbody> </table>