Unverified Commit dbc061ae authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

Make year selection for General Meetings work

parent a6699a15
$(function() {
function select_meeting(year) {
$("#alvcontainer > div").hide();
$("#meeting-"+year).show();
}
$(".meeting-btn").on('click', function(e) {
select_meeting($(this).data('year'));
})
$("#alvselect").on('change', function(e) {
select_meeting($("#alvselect").val());
})
});
......@@ -55,7 +55,7 @@
<div class="tcenter" style='margin-bottom:20px;'>
{% for year, meetings in meeting_years|slice:"5" %}
<button class="btn-large btn-style2">{{ year }}-{{ year|add:1 }}</button>
<button class="meeting-btn btn-large btn-style2" data-year="{{ year }}">{{ year }}-{{ year|add:1 }}</button>
{% endfor %}
<select id='alvselect' name='alvselect' class="btn-large btn-style2" style='outline-width:0px !important;width:140px;padding:0px 15px;'>
{% for year, meetings in meeting_years|slice:"5:" %}
......@@ -64,11 +64,11 @@
</select>
</div>
<h2>{% trans "General Meetings of" %} <span id='alvyearheader'>2015-2016:</span></h2>{% comment %}TODO{% endcomment %}
<div id='alvcontainer' style='margin-top:-20px'>
<div id='alvcontainer'>
{% for year, meetings in meeting_years %}
<div id='meeting-{{ year }}'>
{% include 'documents/meetingyear.html' with meetings=meetings year=year %}
</div>
{% endfor %}
</div>
......@@ -77,4 +77,5 @@
{% block js_body %}
{{ block.super }}
<script type="text/javascript" src="{% static "documents/js/policydocuments.js" %}"></script>
<script type="text/javascript" src="{% static "documents/js/generalmeetings.js" %}"></script>
{% endblock %}
\ No newline at end of file
{% load i18n %}
{% load filename %}
<h2 style="margin-bottom: 0px;">{% trans "General Meetings of" %} {{ year }}-{{ year|add:1 }}:</span></h2>
{% for meeting in meetings %}
<div class="gw-go gw-go-clearfix gw-go-{% if meetings|length < 3 %}3{% else %}{{ meetings | length }}{% endif %}cols">
<div class="gw-go-col-wrap">
......@@ -47,5 +50,5 @@
</div>
</div>
{% empty %}
<div style="text-align:center">There are no General Meetings available for {{ year }}-{{ year | add:1 }}</div>
<div style="text-align:center;margin-top:10px;">There are no General Meetings available for {{ year }}-{{ year | add:1 }}</div>
{% endfor %}
\ No newline at end of file
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