Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
4c14cecd
Verified
Commit
4c14cecd
authored
Jan 12, 2019
by
Sébastiaan Versteeg
Browse files
Add language to frontend form for exams/summaries + fixed unknown language state in course overview
parent
81642569
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/education/forms.py
View file @
4c14cecd
...
...
@@ -27,7 +27,7 @@ class AddExamForm(ModelForm):
class
Meta
:
model
=
Exam
fields
=
(
'file'
,
'course'
,
'type'
,
'exam_date'
)
fields
=
(
'file'
,
'course'
,
'type'
,
'language'
,
'exam_date'
)
class
AddSummaryForm
(
ModelForm
):
...
...
@@ -47,4 +47,4 @@ class AddSummaryForm(ModelForm):
class
Meta
:
model
=
Summary
fields
=
(
'name'
,
'year'
,
'file'
,
'course'
,
'author'
)
fields
=
(
'name'
,
'year'
,
'language'
,
'file'
,
'course'
,
'author'
)
website/education/templates/education/course.html
View file @
4c14cecd
...
...
@@ -63,7 +63,7 @@
<a
href=
"{% url 'education:exam' item.id %}"
target=
"_blank"
>
{{ item.name }}
{% if item.language
!= ''
%}
{% if item.language %}
<img
class=
"lang-flag"
src=
"{% static 'img/flags/'|add:item.language|add:'.svg' %}"
/>
{% endif %}
</a>
...
...
@@ -80,7 +80,7 @@
<a
href=
"{% url 'education:summary' item.id %}"
target=
"_blank"
>
{{ item.name }}
{% if item.language
!= ''
%}
{% if item.language %}
<img
class=
"lang-flag"
src=
"{% static 'img/flags/'|add:item.language|add:'.svg' %}"
/>
{% endif %}
</a>
...
...
Luko van der Maas
@lukomaas
mentioned in commit
752fe864
·
Jan 16, 2019
mentioned in commit
752fe864
mentioned in commit 752fe864fac855308bc6d817d9faf040f74b39b7
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment