bornhack-website/src/camps/templates/camp_list.html
Thomas Steen Rasmussen 0ff37bbca5 move code to src/ folder
2017-01-30 12:06:49 +01:00

44 lines
1.4 KiB
HTML

{% extends 'base.html' %}
{% load commonmark %}
{% load static from staticfiles %}
{% load imageutils %}
{% block content %}
<div class="row">
<div class="col-md-12">
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Tagline</th>
<th>Buildup</th>
<th>Camp</th>
<th>Teardown</th>
</tr>
</thead>
<tbody>
{% for listcamp in camps %}
<tr>
<td><a href="{% url 'camp_detail' camp_slug=listcamp.slug %}">{{ listcamp.title }}</a></td>
<td>{{ listcamp.tagline }}</td>
<td>{{ listcamp.buildup.lower }} to {{ listcamp.buildup.upper }}</td>
<td>{{ listcamp.camp.lower }} to {{ listcamp.camp.upper }}</td>
<td>{{ listcamp.teardown.lower }} to {{ listcamp.teardown.upper }}</td>
</tr>
</a>
{% empty %}
<h3>No camps found, what gives?!</h3>
{% endfor %}
</tbody>
</table>
</div>
</div>
<script>
$("table").on("click", "tr", function(e) {
if ($(e.target).is("a,input")) // anything else you don't want to trigger the click
return;
location.href = $(this).find("a").attr("href");
});
</script>
{% endblock content %}