ajout plusieurs illustrations par évenement
This commit is contained in:
parent
6f51c60335
commit
e78ae9e05d
6 changed files with 123 additions and 21 deletions
|
@ -82,23 +82,64 @@
|
|||
<small class="text-muted"><i class="glyphicon glyphicon-map-marker"></i>{{ evenement.lieu }}</small></p>
|
||||
</div>
|
||||
<div class="timeline-body">
|
||||
<a href="#pop_timeline_{{ forloop.counter }}" data-toggle="modal">
|
||||
<img src="{{ evenement.illustration.url }}" class="img-responsive">
|
||||
</a>
|
||||
{% if evenement.illustration_set.count > 1 %}
|
||||
<div id="carousel-{{ forloop.counter }}" class="carousel slide" data-ride="carousel">
|
||||
<div class="carousel-inner" role="listbox">
|
||||
{% for illustration in evenement.illustration_set.all %}
|
||||
<div class="item{% if forloop.first %} active{% endif %}">
|
||||
<a href="#pop_timeline_{{ forloop.parentloop.counter }}_{{ forloop.counter }}" data-toggle="modal">
|
||||
<img src="{{ illustration.image.url }}" class="img-responsive">
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<a class="left carousel-control" href="#carousel-{{ forloop.counter }}" role="button" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#carousel-{{ forloop.counter }}" role="button" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>{{ evenement.description }}</p>
|
||||
|
||||
<!-- Popup -->
|
||||
<div id="pop_timeline_{{ forloop.counter }}" class="modal fade">
|
||||
{% for illustration in evenement.illustration_set.all %}
|
||||
<div id="pop_timeline_{{ forloop.parentloop.counter }}_{{ forloop.counter }}" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<img src="{{ evenement.illustration.url }}" class="img-responsive">
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<img src="{{ illustration.image.url }}" class="img-responsive">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% with evenement.illustration_set.all|first as illustration %}
|
||||
<a href="#pop_timeline_{{ forloop.counter }}" data-toggle="modal">
|
||||
<img src="{{ illustration.image.url }}" class="img-responsive">
|
||||
</a>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>{{ evenement.description }}</p>
|
||||
|
||||
<div id="pop_timeline_{{ forloop.counter }}" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<img src="{{ illustration.image.url }}" class="img-responsive">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue