Skip to content
Snippets Groups Projects
Commit 30aea56d authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch '68-add-support-for-group-notes' into 'master'

Resolve "Add support for group notes"

Closes #68

See merge request !65
parents 4a5b813e cc53b002
No related branches found
No related tags found
1 merge request!65Resolve "Add support for group notes"
Pipeline #3102 passed
......@@ -17,7 +17,7 @@ from .models import ExcuseType, LessonDocumentation, PersonalNote, PersonalNoteF
class LessonDocumentationForm(forms.ModelForm):
class Meta:
model = LessonDocumentation
fields = ["topic", "homework"]
fields = ["topic", "homework", "group_note"]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
......
# Generated by Django 3.0.8 on 2020-07-10 16:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('alsijil', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='lessondocumentation',
name='group_note',
field=models.CharField(blank=True, max_length=200, verbose_name='Group note'),
),
]
......@@ -93,6 +93,7 @@ class LessonDocumentation(ExtensibleModel):
topic = models.CharField(verbose_name=_("Lesson topic"), max_length=200, blank=True)
homework = models.CharField(verbose_name=_("Homework"), max_length=200, blank=True)
group_note = models.CharField(verbose_name=_("Group note"), max_length=200, blank=True)
class Meta:
verbose_name = _("Lesson documentation")
......
......@@ -86,6 +86,13 @@
</tr>
{% endif %}
{% if prev_doc.group_note %}
<tr>
<th class="collection-item">{% trans "Group notes for previous lesson:" %}</th>
<td>{{ prev_doc.group_note }}</td>
</tr>
{% endif %}
{% if absences %}
<tr>
<th>{% trans "Absent persons:" %}</th>
......
......@@ -396,6 +396,7 @@
</td>
<td class="lesson-homework">{{ documentations.0.homework }}</td>
<td class="lesson-notes">
{{ documentations.0.group_note }}
{% for note in notes %}
{% if note.absent %}
<span class="lesson-note-absent">
......
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