bornhack-website/src/program/templates/schedule_base.html

115 lines
3.8 KiB
HTML
Raw Normal View History

{% extends 'program_base.html' %}
{% load dateutils %}
{% block program_content %}
2017-03-17 16:58:29 +00:00
<div class="row">
2017-04-29 12:58:21 +00:00
<div id="schedule-days" class="btn-group hidden-xs">
</div>
<div id="schedule-days-mobile" class="btn-group-vertical visible-xs">
2017-04-26 22:23:03 +00:00
</div>
2017-04-20 23:34:22 +00:00
</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">
2017-04-21 17:13:44 +00:00
<h4>Filter</h4>
2017-04-20 23:34:22 +00:00
<form id="filter" class="form-inline">
<div class="form-group">
<div>
2017-04-21 17:13:44 +00:00
<h5>Type:</h5>
2017-04-20 23:34:22 +00:00
<ul>
{% for type in camp.event_types %}
<li>
<input type="checkbox"
2017-04-21 13:02:20 +00:00
name="event-type-{{ type.slug }}"
id="event-type-{{ type.slug }}"
2017-04-20 23:34:22 +00:00
value="{{ type.slug }}"
class="form-control event-type-checkbox schedule-checkbox" />
2017-04-21 13:02:20 +00:00
<div class="btn-group">
<label for="event-type-{{ type.slug }}" class="btn btn-default" style="min-width: 200px; text-align: left;">
2017-04-29 11:21:06 +00:00
<span>
<i class="fa fa-minus"></i>
<i class="fa fa-plus"></i>
&nbsp;&nbsp;
{{ type.name }}
</span>
2017-04-21 13:02:20 +00:00
</label>
</div>
2017-04-20 23:34:22 +00:00
</li>
{% endfor %}
</ul>
</div>
<div>
2017-04-21 17:13:44 +00:00
<h5>Location:</h5>
2017-04-20 23:34:22 +00:00
<ul>
{% for location in camp.event_locations %}
<li>
<input type="checkbox"
2017-04-21 13:02:20 +00:00
name="location-{{ location.slug }}"
id="location-{{ location.slug }}"
2017-04-20 23:34:22 +00:00
name="locations"
value="{{ location.slug }}"
class="form-control location-checkbox schedule-checkbox" />
2017-04-21 13:02:20 +00:00
<div class="btn-group">
<label for="location-{{ location.slug }}" class="btn btn-default" style="min-width: 200px; text-align: left;">
2017-04-29 10:23:01 +00:00
<span class="pull-left">
<i class="fa fa-minus"></i>
<i class="fa fa-plus"></i>
&nbsp;&nbsp;
{{ location.name }}
</span>
<i class="pull-right fa fa-{{ location.icon }}"></i>
2017-04-21 13:02:20 +00:00
</label>
</div>
2017-04-20 23:34:22 +00:00
</li>
{% endfor %}
</ul>
</div>
2017-07-08 21:00:54 +00:00
<a id="ics-button" class="btn btn-default form-control filter-control">
2017-04-13 11:53:52 +00:00
<i class="fa fa-calendar"></i> ICS
</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>
<hr />
{% 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 %}