agenda/templates/agenda/event_list_page.html
{% load static %}
{% load i18n %}
{% load el_pagination_tags %}
{% load comment_field %}
{% load participation_field %}
{% load agenda_extra %}
{% url 'agenda:list' as event_url %}
{% lazy_paginate event_list with event_url %}
{% for event in event_list %}
<div class="event list-group" role="tablist" aria-multiselectable="true">
<div class="list-group-item" role="tab" id="headingOne">
<div class="list-group-item-heading">
<a class="no_blue" data-toggle="collapse" data-parent="#event_list" href="#{{event.id}}" aria-expanded="false" aria-controls="collapseOne">
<h4><span class="label label-{% if event.date_end|hours_ago:1 %}default{% else %}primary{% endif %}">{{ event.date_begin|date }}</span> <i class="fa fa-caret-right"></i> <strong>{{ event.title }}</strong></h4>
</a>
</div>
<div id="{{event.id}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="row">
<div class="col-md-9">
<div>
<strong>{% trans 'From' %}
<p class="text-danger">{{ event.date_begin|date }} {% trans 'At' %} {{ event.date_begin|time }}</p>
{% trans 'To' %}
<p class="text-danger">{{ event.date_end|date }} {% trans 'At' %} {{ event.date_end|time }}</p></strong>
<strong>{% trans 'Address' %}
<p class="text-info">{{event.address}}</p>
</strong>
<br />
<blockquote>
<p class="pre-line"> {{ event.description }} </p>
</blockquote>
</div>
<hr />
{% with ''|addstr:event.id|addstr:'_comment' as eventId %}
{% comment_form prefix=eventId %}
{% endwith %}
<hr/>
<div id="comment-list-{{ event.id }}" class="list-group-item-text">
{% include 'agenda/comment_list_page.html' with comment_list=event.comment_set.all %}
</div>
</div>
<div class="col-md-3">
{% if user.is_authenticated and user.profile.enabled and event.author == user %}
<div class="panel panel-default">
<a href="{% url 'agenda:update_event' event_id=event.id %}" class="btn btn-primary btn-lg btn-block panel-body">{% trans 'Edit event' %}</a>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading text-left">
<h3 class="panel-title"><strong>{% trans 'Will you participate?' %}</strong></h3>
</div>
<div class="panel-body text-center">
{% with ''|addstr:event.id|addstr:'_participation' as eventId %}
{% participation_form prefix=eventId %}
{% endwith %}
</div>
</div>
{% include 'agenda/participation_list_page.html' with participation_list=event.participation_set.all %}
<div class="panel panel-default">
<div class="panel-heading text-left">
<h3 class="panel-title"><strong>{% trans 'Organizer' %}</strong></h3>
</div>
<div class="panel-body text-center">
<img class="img-rounded thumbnail img-responsive" width="222px" src="{% if event.author.profile.avatar.big %}
{{ event.author.profile.avatar.avatar.url }}
{% else %}
{% static 'ressources/logo/icon_bronycub.png' %}
{% endif %}">
<h3>{{ event.author.username }}</h3>
<br />
<h4><strong><i class="fa fa-comments"></i> {% trans 'CONTACT' %}</strong></h4>
{% ifequal event.event_enabled "1" %}
<p>{{ event.author.profile.phone }}</p>
<p>{{ event.author.email }}</p>
{% endifequal %}
{% ifequal event.event_enabled "2" %}
<p>{{ event.author.email }}</p>
{% endifequal %}
{% ifequal event.event_enabled "3" %}
<p>{{ event.author.profile.phone }}</p>
{% endifequal %}
</div>
</div>
</div>
</div>
<hr />
</div>
</div>
</div>
{% endfor %}
{% show_more 'more events' %}