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

[Person overview] Add links to lesson periods and mark as buttons everywhere

parent 2e859b96
No related branches found
No related tags found
1 merge request!80Resolve "Add student view with further information"
{# -*- engine:django -*- #}
{% extends "core/base.html" %}
{% load data_helpers %}
{% load week_helpers %}
{% load i18n %}
......@@ -21,8 +22,16 @@
{% for note in unexcused_absences %}
{% period_to_date note.week note.lesson_period.period as note_date %}
<li class="collection-item">
<form action="" method="post" class="right" style="margin-top: -7px;">
{% csrf_token %}
{% trans "Mark as" %}
<input type="hidden" value="{{ note.pk }}" name="personal_note">
{% include "alsijil/partials/mark_as_buttons.html" %}
</form>
<i class="material-icons left red-text">warning</i>
<p class="no-margin">{{ note_date }}, {{ note.lesson_period }}</p>
<p class="no-margin">
<a href="{% url "lesson_by_week_and_period" note.year note.week note.lesson_period.pk %}">{{ note_date }}, {{ note.lesson_period }}</a>
</p>
{% if note.remarks %}
<p class="no-margin"><em>{{ note.remarks }}</em></p>
{% endif %}
......@@ -62,14 +71,7 @@
{% csrf_token %}
{% trans "Mark all as" %}
<input type="hidden" value="{{ note_date|date:"Y-m-d" }}" name="date">
<button type="submit" class="btn-flat" name="excuse_type" value="e">
{% trans "e" %}
</button>
{% for excuse_type in excuse_types %}
<button type="submit" class="btn-flat" value="{{ excuse_type.pk }}" name="excuse_type">
{{ excuse_type.short_name }}
</button>
{% endfor %}
{% include "alsijil/partials/mark_as_buttons.html" %}
</form>
<i class="material-icons left">schedule</i>
{{ note_date }}
......@@ -86,24 +88,19 @@
<div class="col s12 m4">
<i class="material-icons left">event_note</i>
{{ note.lesson_period.get_subject.name }},
{{ note.lesson_period.get_teacher_names }}
<a href="{% url "lesson_by_week_and_period" note.year note.week note.lesson_period.pk %}">
{{ note.lesson_period.get_subject.name }}<br/>
{{ note.lesson_period.get_teacher_names }}
</a>
</div>
<div class="col s12 m7">
{% if note.absent and not note.excused %}
<form action="" method="post" class="right" style="margin-top: -7px;">
{% csrf_token %}
{% trans "Mark all as" %}
{% trans "Mark as" %}
<input type="hidden" value="{{ note.pk }}" name="personal_note">
<button type="submit" class="btn-flat" name="excuse_type" value="e">
{% trans "e" %}
</button>
{% for excuse_type in excuse_types %}
<button type="submit" class="btn-flat" value="{{ excuse_type.pk }}" name="excuse_type">
{{ excuse_type.short_name }}
</button>
{% endfor %}
{% include "alsijil/partials/mark_as_buttons.html" %}
</form>
{% endif %}
......
{% load i18n %}
<button type="submit" class="btn-flat tooltipped" name="excuse_type" value="e" title="{% trans "Excused" %}"
data-position="bottom" data-tooltip="{% trans "Excused" %}">
{% trans "e" %}
</button>
{% for excuse_type in excuse_types %}
<button type="submit" class="btn-flat tooltipped" value="{{ excuse_type.pk }}" name="excuse_type"
title="{{ excuse_type.name }}" data-position="bottom" data-tooltip="{{ excuse_type.name }}">
{{ excuse_type.short_name }}
</button>
{% endfor %}
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