bornhack-website/program/templates/program_base.html
2017-01-23 23:58:41 +01:00

54 lines
2.5 KiB
HTML

{% extends 'schedule_base.html' %}
{% block schedule_content %}
<div class="row">
<div class="btn-group btn-group-justified">
<a href="{% url 'schedule_index' camp_slug=camp.slug %}{% if eventtype %}?type={{ eventtype.slug }}{% endif %}" class="btn {% if urlyear %}btn-default{% else %}btn-primary{% endif %}">Overview</a>
{% for day in camp.camp_days %}
{% with day.lower.date|date:"m" as month_padded %}
{% with day.lower.date|date:"d" as day_padded %}
<a href="{% url 'schedule_day' camp_slug=camp.slug year=day.lower.date.year month=month_padded day=day_padded %}{% if eventtype %}?type={{ eventtype.slug }}{% endif %}" class="btn btn-sm {% if urlyear and urlyear|add:"0" == day.lower.date.year and urlmonth == month_padded and urlday == day_padded %}btn-primary{% else %}btn-default{% endif %}">
{{ day.lower.date|date:"l" }}
</a>
{% endwith %}
{% endwith %}
{% endfor %}
</div>
</div>
<p>
<div class="row">
<div class="btn-group btn-group-justified">
{% if not urlyear %}
<a href="{% url 'schedule_index' camp_slug=camp.slug %}" style="background-color: black; border: 0; color: white;" class="btn">
{% if eventtype %}All{% else %}<b>All</b>{% endif %}
</a>
{% else %}
<a href="{% url 'schedule_day' camp_slug=camp.slug year=urlyear month=urlmonth day=urlday %}" style="background-color: black; border: 0; color: white;" class="btn">
{% if eventtype %}All{% else %}<b>All</b>{% endif %}
</a>
{% endif %}
{% for event_type in camp.event_types %}
{% if not urlyear %}
<a href="{% url 'schedule_index' camp_slug=camp.slug %}?type={{ event_type.slug }}" style="background-color: {{ event_type.color }}; border: 0; color: {% if event_type.light_text %}white{% else %}black{% endif %};" class="btn">
{% if eventtype and eventtype == event_type %}<b>{{ event_type.name }}</b>{% else %}{{ event_type.name }}{% endif %}
</a>
{% else %}
<a href="{% url 'schedule_day' camp_slug=camp.slug year=urlyear month=urlmonth day=urlday %}?type={{ event_type.slug }}" style="background-color: {{ event_type.color }}; border: 0; color: {% if event_type.light_text %}white{% else %}black{% endif %};" class="btn">
{% if eventtype and eventtype == event_type %}<b>{{ event_type.name }}</b>{% else %}{{ event_type.name }}{% endif %}
</a>
{% endif %}
{% endfor %}
</div>
</div>
<hr />
{% block program_content %}
{% endblock program_content %}
{% endblock schedule_content %}