Unverified Commit 6a3cb714 authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Display membership type on profile page

Implements #412
parent 07202744
...@@ -7,9 +7,9 @@ msgid "" ...@@ -7,9 +7,9 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-12 19:40+0200\n" "POT-Creation-Date: 2017-04-26 18:58+0200\n"
"PO-Revision-Date: 2017-04-12 19:40+0200\n" "PO-Revision-Date: 2017-04-12 19:40+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n" "Last-Translator: Thom Wiggers <thom@thomwiggers.nl>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: nl\n" "Language: nl\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
...@@ -94,7 +94,7 @@ msgstr "Informatica" ...@@ -94,7 +94,7 @@ msgstr "Informatica"
msgid "Information Sciences" msgid "Information Sciences"
msgstr "Informatiekunde" msgstr "Informatiekunde"
#: models.py:70 templates/members/profile.html:39 #: models.py:70 templates/members/profile.html:40
msgid "Study programme" msgid "Study programme"
msgstr "Studie" msgstr "Studie"
...@@ -154,7 +154,7 @@ msgstr "Telefoonnummer noodcontact" ...@@ -154,7 +154,7 @@ msgstr "Telefoonnummer noodcontact"
msgid "The phone number for the emergency contact" msgid "The phone number for the emergency contact"
msgstr "Het telefoonummer van de noodcontact" msgstr "Het telefoonummer van de noodcontact"
#: models.py:199 templates/members/profile.html:46 #: models.py:199 templates/members/profile.html:47
msgid "Birthday" msgid "Birthday"
msgstr "Verjaardag" msgstr "Verjaardag"
...@@ -170,7 +170,7 @@ msgstr "" ...@@ -170,7 +170,7 @@ msgstr ""
"Toon je verjaardag aan andere leden op je profielpagina en in de " "Toon je verjaardag aan andere leden op je profielpagina en in de "
"verjaardagskalender" "verjaardagskalender"
#: models.py:213 templates/members/profile.html:42 #: models.py:213 templates/members/profile.html:43
msgid "Website" msgid "Website"
msgstr "Website" msgstr "Website"
...@@ -320,7 +320,7 @@ msgstr "Begunstiger" ...@@ -320,7 +320,7 @@ msgstr "Begunstiger"
msgid "Honorary Member" msgid "Honorary Member"
msgstr "Erelid" msgstr "Erelid"
#: models.py:393 #: models.py:393 templates/members/profile.html:37
msgid "Membership type" msgid "Membership type"
msgstr "Lidtype" msgstr "Lidtype"
...@@ -478,7 +478,7 @@ msgstr "Ex-leden" ...@@ -478,7 +478,7 @@ msgstr "Ex-leden"
msgid "No members found" msgid "No members found"
msgstr "Geen leden gevonden" msgstr "Geen leden gevonden"
#: templates/members/index.html:66 templates/members/profile.html:37 #: templates/members/index.html:66 templates/members/profile.html:38
msgid "Cohort" msgid "Cohort"
msgstr "Cohort" msgstr "Cohort"
...@@ -502,15 +502,15 @@ msgstr "Dit lid heeft nog geen beschrijving geschreven." ...@@ -502,15 +502,15 @@ msgstr "Dit lid heeft nog geen beschrijving geschreven."
msgid "Personal information" msgid "Personal information"
msgstr "Persoonlijke gegevens" msgstr "Persoonlijke gegevens"
#: templates/members/profile.html:52 #: templates/members/profile.html:53
msgid "Achievements for Thalia" msgid "Achievements for Thalia"
msgstr "Verdiensten voor Thalia" msgstr "Verdiensten voor Thalia"
#: templates/members/profile.html:62 #: templates/members/profile.html:63
msgid "Chair" msgid "Chair"
msgstr "Voorzitter" msgstr "Voorzitter"
#: templates/members/profile.html:64 #: templates/members/profile.html:65
msgid "today" msgid "today"
msgstr "heden" msgstr "heden"
...@@ -522,3 +522,7 @@ msgstr "Statistieken" ...@@ -522,3 +522,7 @@ msgstr "Statistieken"
#: templates/members/statistics.html:11 #: templates/members/statistics.html:11
msgid "Total amount of Thalia members" msgid "Total amount of Thalia members"
msgstr "Totaal aantal Thalialeden" msgstr "Totaal aantal Thalialeden"
#: views.py:143
msgid "Former member"
msgstr "Oud-leden"
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<hr class="separator"> <hr class="separator">
<h4>{% trans "Personal information" %}</h4> <h4>{% trans "Personal information" %}</h4>
<ul class="post-meta"> <ul class="post-meta">
<li><span>{% trans "Membership type" %}: </span> {{ member_type }}<br></li>
<li><span>{% trans "Cohort" %}: </span> {{ member.starting_year }}<br></li> <li><span>{% trans "Cohort" %}: </span> {{ member.starting_year }}<br></li>
<li><span>{% trans "Study programme" %}: </span> {{ member.get_programme_display }}<br></li> <li><span>{% trans "Study programme" %}: </span> {{ member.get_programme_display }}<br></li>
......
...@@ -7,6 +7,7 @@ from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator ...@@ -7,6 +7,7 @@ from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.db.models import Q from django.db.models import Q
from django.shortcuts import get_object_or_404, render from django.shortcuts import get_object_or_404, render
from django.utils.text import slugify from django.utils.text import slugify
from django.utils.translation import gettext as _
from sendfile import sendfile from sendfile import sendfile
from . import models from . import models
...@@ -137,8 +138,17 @@ def profile(request, pk=None): ...@@ -137,8 +138,17 @@ def profile(request, pk=None):
'earliest': earliest, 'earliest': earliest,
} }
achievements = sorted(achievements.values(), key=lambda x: x['earliest']) achievements = sorted(achievements.values(), key=lambda x: x['earliest'])
membership = member.current_membership
membership_type = _("Former member")
if membership:
membership_type = membership.get_type_display()
return render(request, 'members/profile.html', return render(request, 'members/profile.html',
{'member': member, 'achievements': achievements}) {
'achievements': achievements,
'member': member,
'membership_type': membership_type,
})
@login_required @login_required
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment