Adding a back buton on event detail if noscript.

This commit is contained in:
Vidir Valberg Gudmundsson 2017-07-23 11:52:53 +02:00
parent 084d2cee6b
commit c237d4ecc7

View file

@ -2,34 +2,46 @@
{% load commonmark %} {% load commonmark %}
{% block program_content %} {% block program_content %}
<div class="panel panel-default">
<div class="panel-heading" ><span style="font-size: x-large"><span style="background-color: {{ event.event_type.color }}; border: 0; color: {% if event.event_type.light_text %}white{% else %}black{% endif %}; display: inline-block; padding: 5px;">{{ event.event_type.name }}</span> {{ event.title }}</span></div>
<div class="panel-body">
<p>
{{ event.abstract|commonmark }}
</p>
<hr> <div class="row">
<noscript>
<a href="{% url "noscript_schedule_index" camp_slug=camp.slug %}" class="btn btn-primary">
Back to noscript schedule
</a>
<hr />
</noscript>
</div>
<h4>Instances</h4> <div class="row">
<ul class="list-group"> <div class="panel panel-default">
{% for ei in event.instances.all %} <div class="panel-heading" ><span style="font-size: x-large"><span style="background-color: {{ event.event_type.color }}; border: 0; color: {% if event.event_type.light_text %}white{% else %}black{% endif %}; display: inline-block; padding: 5px;">{{ event.event_type.name }}</span> {{ event.title }}</span></div>
<li class="list-group-item">{{ ei.when.lower|date:"l M. d H:i" }} - {{ ei.when.upper|date:"H:i" }}</li> <div class="panel-body">
{% empty %} <p>
No instances scheduled yet {{ event.abstract|commonmark }}
{% endfor %} </p>
</ul>
<hr> <hr>
{% if event.speakers.exists %} <h4>Instances</h4>
<h4>Speakers</h4> <ul class="list-group">
<div class="list-group"> {% for ei in event.instances.all %}
{% for speaker in event.speakers.all %} <li class="list-group-item">{{ ei.when.lower|date:"l M. d H:i" }} - {{ ei.when.upper|date:"H:i" }}</li>
<h4><a href="{% url 'speaker_detail' camp_slug=camp.slug slug=speaker.slug %}" class="list-group-item">{{ speaker.name }}</a></h4> {% empty %}
No instances scheduled yet
{% endfor %} {% endfor %}
</div> </ul>
{% endif %}
<hr>
{% if event.speakers.exists %}
<h4>Speakers</h4>
<div class="list-group">
{% for speaker in event.speakers.all %}
<h4><a href="{% url 'speaker_detail' camp_slug=camp.slug slug=speaker.slug %}" class="list-group-item">{{ speaker.name }}</a></h4>
{% endfor %}
</div>
{% endif %}
</div>
</div> </div>
</div> </div>
{% endblock program_content %} {% endblock program_content %}