2017-02-17 16:17:21 +00:00
|
|
|
{% extends 'program_base.html' %}
|
|
|
|
{% load dateutils %}
|
2016-08-08 18:22:53 +00:00
|
|
|
|
2017-02-17 16:17:21 +00:00
|
|
|
{% block program_content %}
|
2017-01-22 11:59:57 +00:00
|
|
|
|
2017-03-17 16:58:29 +00:00
|
|
|
<div class="row">
|
2017-04-20 23:34:22 +00:00
|
|
|
<div class="schedule-days btn-group">
|
2017-04-21 12:07:39 +00:00
|
|
|
<a href="{% url 'schedule_index' camp_slug=camp.slug %}" class="btn btn-{% if request.resolver_match.url_name == 'schedule_index' %}primary{% else %}default{% endif %}">
|
2017-04-20 23:34:22 +00:00
|
|
|
<li>All days</li>
|
|
|
|
</a>
|
|
|
|
{% for day in camp.camp_days %}
|
|
|
|
{% with month_padded=day.lower.date|date:"m" day_padded=day.lower.date|date:"d" %}
|
2017-04-21 12:07:39 +00:00
|
|
|
<a href="{% url 'schedule_day' camp_slug=camp.slug year=day.lower.date.year month=month_padded day=day_padded %}" class="btn btn-{% if urlyear and urlyear|add:"0" == day.lower.date.year and urlmonth == month_padded and urlday == day_padded %}primary{% else %}default{% endif %}">
|
2017-04-20 23:34:22 +00:00
|
|
|
{{ day.lower.date|date:"l" }}
|
|
|
|
</a>
|
|
|
|
{% endwith %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-17 16:58:29 +00:00
|
|
|
|
2017-04-20 23:34:22 +00:00
|
|
|
<hr />
|
2017-03-17 16:58:29 +00:00
|
|
|
|
2017-04-20 23:34:22 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-3 col-sm-push-9 schedule-filter">
|
|
|
|
<form id="filter" class="form-inline">
|
|
|
|
<div class="form-group">
|
|
|
|
<div>
|
|
|
|
<h4>Type:</h4>
|
|
|
|
<ul>
|
|
|
|
{% for type in camp.event_types %}
|
|
|
|
<li>
|
|
|
|
<input type="checkbox"
|
|
|
|
name="event_type"
|
|
|
|
value="{{ type.slug }}"
|
2017-04-21 09:28:22 +00:00
|
|
|
class="form-control event-type-checkbox"
|
|
|
|
checked /> {{ type.name }}
|
2017-04-20 23:34:22 +00:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<h4>Location:</h4>
|
|
|
|
<ul>
|
|
|
|
{% for location in camp.event_locations %}
|
|
|
|
<li>
|
|
|
|
<input type="checkbox"
|
|
|
|
name="locations"
|
|
|
|
value="{{ location.slug }}"
|
2017-04-21 09:28:22 +00:00
|
|
|
class="form-control location-checkbox"
|
|
|
|
checked /> {{ location.name }}
|
2017-04-20 23:34:22 +00:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-04-13 11:42:14 +00:00
|
|
|
|
|
|
|
<a href="{% url 'ics_view' camp_slug=camp.slug %}{{ get_string }}" class="btn btn-default form-control filter-control">
|
2017-04-13 11:53:52 +00:00
|
|
|
<i class="fa fa-calendar"></i> ICS
|
2017-04-13 11:42:14 +00:00
|
|
|
</a>
|
2017-03-17 16:58:29 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2017-04-20 23:34:22 +00:00
|
|
|
<div class="col-sm-9 col-sm-pull-3">
|
|
|
|
{% block schedule_content %}
|
|
|
|
{% endblock schedule_content %}
|
|
|
|
</div>
|
2017-01-23 22:58:41 +00:00
|
|
|
</div>
|
2017-02-17 16:17:21 +00:00
|
|
|
|
|
|
|
<hr />
|
|
|
|
|
2016-08-08 18:22:53 +00:00
|
|
|
|
2017-02-17 16:17:21 +00:00
|
|
|
{% url 'schedule_index' camp_slug=camp.slug as baseurl %}
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$('.filter-control').on('change', function() {
|
|
|
|
var type = $('#event_type').val();
|
|
|
|
var loc = $('#location').val();
|
|
|
|
var url = "{{baseurl}}";
|
|
|
|
|
|
|
|
if(type != '' || loc != '') {
|
|
|
|
url = url + '?';
|
|
|
|
if(type != '') {
|
|
|
|
url = url + 'type=' + type;
|
|
|
|
if(loc != '') { url = url + '&'; }
|
|
|
|
}
|
|
|
|
if(loc != '') {
|
|
|
|
url = url + 'location=' + loc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
window.location.href = url;
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
{% endblock program_content %}
|