Commit 45504919 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Remove javascript from board pages, rename and add routes for committees and boards

parent 70b8f357
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-05 10:26+0200\n"
"PO-Revision-Date: 2016-09-05 10:26+0100\n"
"POT-Creation-Date: 2016-09-06 19:22+0200\n"
"PO-Revision-Date: 2016-09-06 19:21+0200\n"
"Last-Translator: Joost Rijneveld <joost@joostrijneveld.nl>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -16,177 +16,217 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.6.10\n"
"X-Generator: Poedit 1.8.8\n"
#: models.py:40
#: models.py:41
msgid "Committee name"
msgstr ""
msgstr "Commissienaam"
#: models.py:45
#: models.py:46
msgid "Description"
msgstr ""
msgstr "Beschrijving"
#: models.py:49
#: models.py:50
msgid "Image"
msgstr ""
msgstr "Afbeelding"
#: models.py:62
#: models.py:63
msgid "permissions"
msgstr ""
msgstr "permissies"
#: models.py:67
#: models.py:68
msgid "founded in"
msgstr ""
msgstr "opgericht in"
#: models.py:73
#: models.py:74
msgid "existed until"
msgstr ""
msgstr "bestond tot"
#: models.py:78
#: models.py:79
msgid "contact email address"
msgstr ""
msgstr "contact e-mailadres"
#: models.py:87
#: models.py:88
msgid "committee"
msgstr ""
msgstr "commissie"
#: models.py:88
#: models.py:89 templates/committees/committee_index.html:6
msgid "committees"
msgstr ""
msgstr "commissies"
#: models.py:100
#: models.py:101
msgid "Is this a board"
msgstr ""
msgstr "Is dit een bestuur"
#: models.py:122
#: models.py:123
msgid "Member"
msgstr ""
msgstr "Lid"
#: models.py:128
#: models.py:129
msgid "Committee"
msgstr ""
msgstr "Commissie"
#: models.py:132
#: models.py:133
msgid "Committee member since"
msgstr ""
msgstr "Commissielid sinds"
#: models.py:133
#: models.py:134
msgid "The date this member joined the committee in this role"
msgstr ""
msgstr "De datum waarop deze persoon lid werd deze commissie in deze rol"
#: models.py:138
#: models.py:139
msgid "Committee member until"
msgstr ""
msgstr "Commissielid tot"
#: models.py:139
#: models.py:140
msgid "A member of this committee until this time (can't be in the future)."
msgstr ""
"De datum waarop deze persoon de commissie verliet (kan niet in de toekomst "
"liggen)"
#: models.py:146
#: models.py:147
msgid "Chair of the committee"
msgstr ""
msgstr "Voorzitter van de commissie"
#: models.py:147
#: models.py:148
msgid "There can only be one chair at a time!"
msgstr ""
msgstr "Er kan maar één voorzitter tegelijkertijd zijn!"
#: models.py:152
#: models.py:153
msgid "role"
msgstr ""
msgstr "rol"
#: models.py:153
#: models.py:154
msgid "The role of this member"
msgstr ""
msgstr "De rol van dit lid binnen de commissie"
#: models.py:176
#: models.py:177
msgid "Membership expiration date can't be in the future: '{}'"
msgstr ""
msgstr "Een lidmaatschap kan niet verlopen in de toekomst: ‘{]’"
#: models.py:182
#: models.py:183
msgid "End date can't be before start date"
msgstr ""
msgstr "De einddatum kan niet voor de startdatum liggen"
#: models.py:196
#: models.py:197
msgid "This committee already has a chair"
msgstr ""
msgstr "Deze commissie heeft al een voorzitter"
#: models.py:213
msgid "This member is already in the committee"
msgstr ""
msgstr "Deze persoon is al lid van deze commissie"
#: models.py:216
msgid "This member is already in the committee for this period"
msgstr ""
msgstr "Deze persoon is al lid van deze commissie in de aangegeven periode"
#: models.py:247
msgid "committee membership"
msgstr ""
msgstr "commissielidmaatschap"
#: models.py:248
msgid "committee memberships"
msgstr ""
msgstr "commissielidmaatschappen"
#: models.py:256
#, python-brace-format
msgid "Mentor introduction {year}"
msgstr "Mentor introductie {year}"
#: templates/committees/boards.html:4 templates/committees/boards.html:8
#: templates/committees/board_detail.html:4
#: templates/committees/board_index.html:3
#: templates/committees/board_index.html:6
#: templates/committees/board_old.html:3
msgid "Boards"
msgstr ""
msgstr "Besturen"
#: templates/committees/board_detail.html:8
#: templates/committees/board_index.html:33
#: templates/committees/board_index.html:38
#: templates/committees/board_old.html:7 templates/committees/board_old.html:16
#: templates/committees/board_old.html:25
#: templates/committees/board_old.html:34
#: templates/committees/board_old.html:43
#: templates/committees/board_old.html:52
#: templates/committees/board_old.html:61
#: templates/committees/board_old.html:72
#: templates/committees/board_old.html:84
#: templates/committees/board_old.html:96
#: templates/committees/board_old.html:107
msgid "Board"
msgstr "Besturen"
#: templates/committees/board_detail.html:26
msgid "Board members"
msgstr "Bestuursleden"
#: templates/committees/boards.html:14
#: templates/committees/board_detail.html:42
#: templates/committees/committee_detail.html:44
msgid "Chair"
msgstr "Voorzitter"
#: templates/committees/board_detail.html:59
msgid "This board doesn't have any members?"
msgstr "Dit bestuur heeft geen leden?"
#: templates/committees/board_index.html:10
#, python-format
msgid ""
"Thalia's board makes sure all operations during the academic year are taken "
"care of, in front or behind the scenes. If you have any questions then you "
"can address them during the day or, if you're not always on the campus, "
"you're always welcome to <a href=\"mailto:info@thalia.nu\">send them an "
"email</a>. The boards of the years before 2001 can be found on <a href="
"\"%(old_boards_url)s\">this page</a>."
msgstr ""
"Het gehele Thaliabestuur zet zich gedurende een collegejaar in om alle "
"activiteiten van Thalia in goede banen te leiden, voor of achter de "
"schermen. Bij vragen en opmerkingen kun je ze altijd persoonlijk aanspreken "
"of <a href=\"mailto:info@thalia.nu\">mailen</a>. Besturen van langer geleden "
"(eerder dan 2001), zijn op <a href=\"/board/oud-besturen\">deze pagina</a> "
"te vinden."
msgstr ""
"(eerder dan 2001), zijn op <a href=\"%(old_boards_url)s\">deze pagina</a> te "
"vinden."
#: templates/committees/boards.html:53
msgid "Board members"
msgstr ""
#: templates/committees/board_index.html:25
#: templates/committees/committee_detail.html:18
#: templates/committees/committee_detail.html:20
#, python-format
msgid "Photo of %(name)s"
msgstr "Foto van %(name)s"
#: templates/committees/boards.html:73
msgid "Chair"
msgstr ""
#: templates/committees/board_index.html:45
msgid "There are no boards!"
msgstr "Er zijn geen besturen!"
#: templates/committees/details.html:3 templates/committees/index.html:3
#: templates/committees/index.html:6
#: templates/committees/board_old.html:6
msgid "Boards (continued)"
msgstr "Besturenoverzicht a.k.a. Besturen van weleer (vervolg)"
#: templates/committees/committee_detail.html:3
#: templates/committees/committee_index.html:3
msgid "Committees"
msgstr ""
msgstr "Commissies"
#: templates/committees/details.html:22
#: templates/committees/committee_detail.html:24
#, python-format
msgid "About the %(name)s"
msgstr ""
msgstr "Over de %(name)s"
#: templates/committees/details.html:26
#: templates/committees/committee_detail.html:28
msgid "Committee members"
msgstr ""
msgstr "Commissieleden"
#: templates/committees/details.html:34
msgid "Default avatar"
msgstr ""
#: templates/committees/details.html:42
msgid "Voorzitter"
msgstr ""
#: templates/committees/details.html:49
#: templates/committees/committee_detail.html:51
#, python-format
msgid "Committee member since: %(since)s"
msgstr ""
msgstr "Commissielid sinds: %(since)s"
#: templates/committees/details.html:59
#: templates/committees/committee_detail.html:61
msgid "This committee doesn't have any members?"
msgstr ""
msgstr "Deze commissie heeft geen leden?"
#: templates/committees/index.html:39
#: templates/committees/committee_index.html:39
msgid "There are no committees!"
msgstr ""
msgstr "Er zijn geen commissies!"
#~ msgid "Mentors {year}-{year_to}"
#~ msgstr "Mentoren {year}-{year_to}"
......@@ -32,8 +32,9 @@ class ActiveCommitteeManager(models.Manager):
class Committee(models.Model):
"""A committee"""
active_committees = ActiveCommitteeManager()
unfiltered_objects = models.Manager()
objects = CommitteeManager()
active_committees = ActiveCommitteeManager()
name = models.CharField(
max_length=40,
......@@ -81,7 +82,7 @@ class Committee(models.Model):
return self.name
def get_absolute_url(self):
return reverse('committees:details', args=[str(self.pk)])
return reverse('committees:committee', args=[str(self.pk)])
class Meta:
verbose_name = _('committee')
......@@ -102,7 +103,7 @@ class Board(Committee):
)
def get_absolute_url(self):
return '/committee/boards/{}'.format(self.name.lower())
return reverse('committees:board', args=[str(self.pk)])
class ActiveMembershipManager(models.Manager):
......
......@@ -9,7 +9,7 @@ class StaticViewSitemap(sitemaps.Sitemap):
changefreq = 'daily'
def items(self):
return ['committees:index']
return ['committees:committees', 'committees:boards']
def location(self, item):
return reverse(item)
......
var blocked= false;
$(document).ready(function(){
$("#collection-div").hide();
$(".post-slider .slides").trigger("slideTo", boardPositions.indexOf(boardNr));
$(".bestuur-list").hide();
$("#board" + boardNr).show();
$("#title").html(boardTitles[boardNr]);
window.history.pushState(boardNr, 'Title', '/association/committees/boards/' + boardNr);
});
$("#carousel-prev").click(function(){
if(blocked) {
return;
}
blocked = true;
var number = boardPositions.indexOf(boardNr) - 1;
if (number < 0){
number = parseInt(boardMax) - 1;
}
boardNr = boardPositions[number];
$(".bestuur-list").hide();
$("#board" + boardNr).show();
$("#title").html(boardTitles[boardNr]);
window.history.pushState(boardNr, 'Title', '/association/committees/boards/' + boardNr);
setTimeout(function(){blocked=false}, 500);
});
$("#carousel-next").click(function(){
if(blocked) {
return;
}
blocked = true;
var number = boardPositions.indexOf(boardNr) + 1;
var maximum = parseInt(boardMax);
if (number >= maximum){
number = 0;
}
boardNr = boardPositions[number];
$(".bestuur-list").hide();
$("#board" + boardNr).show();
$("#title").html(boardTitles[boardNr]);
window.history.pushState(boardNr, 'Title', '/association/committees/boards/' + boardNr);
setTimeout(function(){blocked=false}, 500);
});
$(document).on('click', '#collectionButton', function(event) {
if(blocked) {
return;
}
event.preventDefault();
$("#collection-div").css("display", "block");
$("#boardTitle").html("Alle bestuursjaren");
$("#bestuurCarousel").hide();
$("#ledenTitle").hide();
$(".board-directory").hide();
window.history.pushState("board", "Title", "/association/committees/boards/");
});
{% extends 'base.html' %}
{% load i18n thumbnail static %}
{% block title %}{% trans "Boards" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>
{% trans "Board" %} {{ board.since.year }}-{{ board.until.year }}
<span class="title-meta clearfix">
<span>
<a class="back" href="{% url 'committees:boards' %}" id="collectionButton"></a>
</span>
</span>
</h1>
<div class="portfolio"></div>
<div class="clearfix portfolio">
<div id="committee-div">
<div class="row">
{% if board.photo %}
<img alt="{{ board.name }}" class="span12" src="{% thumbnail board.photo '1024x683' fit=False %}">
{% else %}
<img alt="{{ board.name }}" class="span12" src="{% static 'committees/images/placeholder.png' %}">
{% endif %}
</div>
<div class="clearfix member-directory">
<h1 class="midhead">{% trans 'Board members' %}</h1>
<ul class="row" id="commissieleden">
{% for member in members %}
<li class="post member-item span3 has-overlay">
<a href="{{ member.get_absolute_url }}">
<div class="post-inner">
<div class="inner-img">
{% if not member.photo %}
<img alt="{{ member.display_name }}" src="{% static 'members/images/default-avatar.jpg' %}" height="220" width="220" />
{% else %}
<img alt="{{ member.display_name }}" src="{% thumbnail member.photo '220x220' %}" width="220" height="220" />
{% endif %}
</div>
{% if member.chair %}
<div class="ribbon-wrapper-basiskleur">
<div class="ribbon-basiskleur">
{% trans "Chair" %}
</div>
</div>
{% endif %}
<div class="post-overlay">
<div class="post-overlay-meta">
<h2>{{ member.display_name }}</h2>
<p>{{ member.role }}</p>
</div>
</div>
<div class="post-body avatar-subtitle">
{{ member.display_name }}
</div>
</div>
</a>
</li>
{% empty %}
<li>{% trans "This board doesn't have any members?" %}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
{% load i18n thumbnail static %}
{% block title %}{% trans 'Boards' %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans 'Boards' %}</h1>
<p style="text-align: center;">
{% url 'committees:board_old' as old_boards_url %}
{% blocktrans trimmed %}
Thalia's board makes sure all operations during the academic year are taken care of, in front or behind the scenes. If you have any questions then you can address them during the day or, if you're not always on the campus, you're always welcome to <a href="mailto:info@thalia.nu">send them an email</a>. The boards of the years before 2001 can be found on <a href="{{ old_boards_url }}">this page</a>.
{% endblocktrans %}
</p>
<div class="clearfix portfolio">
<div id="committees">
<ul class="row committees">
{% for board in boards %}
<li class="post member-item span3 has-overlay first-child">
<a href="{{ board.get_absolute_url }}">
<div class="post-inner">
<div class="inner-img">
{% if board.photo %}
<img src="{% thumbnail board.photo '220x220' fit=False %}" alt="{% blocktrans with name=board.name %}Photo of {{ name }}{% endblocktrans %}">
{% else %}
<img height="220" width="220" src="{% static 'committees/images/placeholder.png' %}">
{% endif %}
</div>
<div class="post-overlay">
<div class="post-overlay-meta">
<h2>{% trans "Board" %} {{ board.since.year }}-{{ board.until.year }}</h2>
</div>
</div>
<div class="post-body avatar-subtitle">
{% trans "Board" %} {{ board.since.year }}-{{ board.until.year }}
</div>
</div>
</a>
</li>
{% empty %}
{% trans 'There are no boards!' %}
{% endfor %}
</ul>
</div>
</div>
{% endblock %}
{% extends "base.html" %}
{% load i18n thumbnail static %}
{% block title %}{% trans 'Boards' %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Boards (continued)" %}</h1>
<h2>{% trans "Board" %} 2000-2001</h2>
<ul>
<li>Jelte Jansen, Voorzitter</li>
<li>Linus Wiggers, Secretaris</li>
<li>Martijn Broenland, Penningmeester</li>
<li>Michel Groenenstijn, Voorzitter Evenementencommissie</li>
<li>Matthijs Mekking, Voorzitter Kantinecommissie</li>
<li>The-Vinh Nguyen, Voorzitter Publiciteitscommissie</li>
</ul>
<h2>{% trans "Board" %} 1999-2000</h2>
<ul>
<li>Jelte Jansen, Voorzitter</li>
<li>Miek Gieben, Secretaris</li>
<li>Stephan Jager, Penningmeester</li>
<li>The-Vinh Nguyen, Voorzitter Evenementencommissie</li>
<li>Michel Groenenstijn, Voorzitter Kantinecommissie</li>
<li>Merijn Vogel, Voorzitter Publiciteitscommissie</li>
</ul>
<h2>{% trans "Board" %} 1998-1999</h2>
<ul>
<li>Martin Bruggink, Voorzitter</li>
<li>Miek Gieben, Secretaris</li>
<li>Bas Passon, Penningmeester</li>
<li>The-Vinh Nguyen, Voorzitter Evenementencommissie</li>
<li>Jelte Jansen, Voorzitter Kantinecommissie</li>
<li>Jeroen Kratz, Voorzitter Publiciteitscommissie</li>
</ul>
<h2>{% trans "Board" %} 1997-1998</h2>
<ul>
<li>Mariëlle Weers, Voorzitter</li>
<li>Martin Bruggink, Secretaris</li>
<li>Jeroen Houba, Penningmeester</li>
<li>Gert-Jan Haverkamp, Voorzitter Evenementencommissie</li>
<li>Michel Schaake, Voorzitter Kantinecommissie</li>
<li>Bram de Kruijff, Voorzitter Publiciteitscommissie</li>
</ul>
<h2>{% trans "Board" %} 1996-1997</h2>
<ul>
<li>Mariëlle Weert, Voorzitter</li>
<li>Michael van de Ven, Secretaris</li>
<li>Jeroen Houba, Penningmeester</li>
<li>Emile ter Horst, Voorzitter Evenementencommissie</li>
<li>Bram de Kruijf, Voorzitter Kantinecommissie</li>
<li>Pieter van Engelen, Voorzitter Publiciteitscommissie</li>
</ul>
<h2>{% trans "Board" %} 1995-1996</h2>
<ul>
<li>Edwin Hendriks, Voorzitter</li>
<li>Michael van de Ven, Secretaris</li>
<li>Jeroen Houba, Penningmeester</li>
<li>Jan Sloots, Voorzitter Evenementencommissie</li>
<li>Dave Walravens, Voorzitter Kantinecommissie</li>
<li>Pieter van Engelen, Voorzitter Publiciteitscommissie</li>
</ul>
<h2>{% trans "Board" %} 1994-1995</h2>
<ul>
<li>Rody Middelkoop, Voorzitter</li>
<li>Servé Herman, Secretaris</li>
<li>Jeroen Houba, Penningmeester</li>
<li>Max Verbong, Voorzitter Evenementencommissie</li>
<li>Niels Brouwers, Voorzitter Kantinecommissie</li>
<li>Paul Lemmens, Voorzitter Publiciteitscommissie</li>
<li>Peter Wouda, Commissielid BBC</li>
<li>Michael van de Ven, Voorzitter TOEC</li>
</ul>
<h2>{% trans "Board" %} 1993-1994</h2>
<ul>
<li>Mark Koenen, Voorzitter</li>
<li>Servé Herman, Secretaris</li>