{% extends "site_base.html" %}

{% load account_tags %}
{% load i18n %}
{% load bootstrap3 %}

{% block body %}
<!-- Jumbotron -->
	<div class="container content">
		<h1>Challenges</h1>

		{% for obj in object_list %}
		<h2>{{ obj.name }}</h2>
		<div class="row">
			{% for chal in obj.challenge_set.all %}
				{% if chal.id not in completed %}
				<a href="{% url 'chal-detail' chal.id %}">
					<div class="col-sm-3 well" style="border: 1px solid grey; margin-left: 3em; margin-right: 3em;">
						<h4>{{ chal.name }}</h4>
						<p style="width:250px;white-space: nowrap;overflow:hidden;text-overflow:ellipsis;">{{ chal.description }}</p>
					</div><!-- /.col-lg-4 -->
				</a>
				{% else %}
				<div class="col-sm-3 well" style="border: 1px solid grey; margin-left: 3em; margin-right: 3em;background: #222222">
					<h4>{{ chal.name }}</h4>
					<p style="width:250px;white-space: nowrap;overflow:hidden;text-overflow:ellipsis;">{{ chal.description }}</p>
				</div><!-- /.col-lg-4 -->
				{% endif %}
			{% endfor %}
		</div>
		{% empty %}
			<h2 class"text-center">No challenges currently available</h2>
		{% endfor %}
	</div>
{% endblock %}

{% extends "site_base.html" %}

{% load account_tags %}
{% load i18n %}
{% load bootstrap3 %}

{% block body %}
<!-- Jumbotron -->
	<div class="container content">
		<h1>Challenges</h1>

		{% for obj in object_list %}
		<h2>{{ obj.name }}</h2>
		<div class="row">
			{% for chal in obj.challenge_set.all %}
				<a href="{% url 'chal-detail' chal.id %}">
					<div class="col-sm-3 well" style="border: 1px solid grey; margin-left: 3em; margin-right: 3em;{% if chal.id in completed %}background: #222222{% endif %}">
						<h4>{{ chal.name }}</h4>
						<p style="width:250px;white-space: nowrap;overflow:hidden;text-overflow:ellipsis;">{{ chal.description }}</p>
					</div>
				</a>
			{% endfor %}
		</div>
		{% empty %}
			<h2 class"text-center">No challenges currently available</h2>
		{% endfor %}
	</div>
{% endblock %}

Allow going back to old chals
Allow going back to old chals
