Improve event page look

This commit is contained in:
Michael Hall 2018-07-30 23:05:03 -04:00
parent 470ddff522
commit 8e5d8c9a7e

View file

@ -96,7 +96,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="fluid-container"> <div class="fluid-container container-primary">
<div class="row"> <div class="row">
<div class="col-md-9"> <div class="col-md-9">
{% if team.banner_img %} {% if team.banner_img %}
@ -156,28 +156,32 @@
</p> </p>
{% endif %} {% endif %}
{% if event.summary %}
<div class="container container-secondary mt-3">
<p>{{ event.summary|markdown }}</p> <p>{{ event.summary|markdown }}</p>
</div>
{% endif %}
<table class="table"> <div class="container container-secondary mt-3">
{% if event.parent %} {% if event.parent %}
<tr> <div class="row mb-2">
<td width="120px"><b>Part of:</b></td><td><a href="{{ event.parent.get_absolute_url }}" target="_blank">{{ event.parent.name }}</a></td> <div class="col-3" width="120px"><b>Part of:</b></div><div class="col-9"><a href="{{ event.parent.get_absolute_url }}" target="_blank">{{ event.parent.name }}</a></div>
</tr> </div>
{% endif %} {% endif %}
{% if event.series %} {% if event.series %}
<tr> <div class="row mb-2">
<td width="120px"><b>Repeats:</b></td><td><a href="{{ event.series.get_absolute_url }}"> <div class="col-3" width="120px"><b>Repeats:</b></div><div class="col-9"><a href="{{ event.series.get_absolute_url }}">
{% for rule in event.series.recurrences.rrules %} {% for rule in event.series.recurrences.rrules %}
{{rule.to_text|capfirst}} {{rule.to_text|capfirst}}
{% endfor %}</a> {% endfor %}</a>
</td> </div>
</tr> </div>
{% endif %} {% endif %}
<tr> <div class="row mb-2">
<td width="120px"><b>Time:</b></td><td>{{ event.local_start_time }} - {{ event.local_end_time }}</td> <div class="col-3" width="120px"><b>Time:</b></div><div class="col-9">{{ event.local_start_time }} - {{ event.local_end_time }}</div>
</tr> </div>
<tr> <div class="row mb-2">
<td width="120px"><b>Place:</b></td><td> <div class="col-3" width="120px"><b>Place:</b></div><div class="col-9">
{% if event.place %} {% if event.place %}
<a class="" href="{% url 'show-place' event.place.id %}">{{ event.place.name }}</a> <a class="" href="{% url 'show-place' event.place.id %}">{{ event.place.name }}</a>
{% if can_edit_event %}<a href="{% url 'add-place' event.id %}" class="btn btn-secondary btn-sm">Change</a>{% endif %} {% if can_edit_event %}<a href="{% url 'add-place' event.id %}" class="btn btn-secondary btn-sm">Change</a>{% endif %}
@ -186,18 +190,18 @@
{% else %} {% else %}
No place selected yet. No place selected yet.
{% endif %} {% endif %}
</td> </div>
</tr> </div>
{% if event.web_url %} {% if event.web_url %}
<tr> <div class="row mb-2">
<td width="120px"><b>Website:</b></td><td><a href="{{ event.web_url }}" target="_blank">{{ event.web_url }}</a></td> <div class="col-3" width="120px"><b>Website:</b></div><div class="col-9"><a href="{{ event.web_url }}" target="_blank">{{ event.web_url }}</a></div>
</tr> </div>
{% endif %} {% endif %}
{% if event.team.is_premium %} {% if event.team.is_premium %}
<tr> <div class="row mb-2">
<td width="120px"><b>Presentations:</b></td> <div class="col-3" width="120px"><b>Presentations:</b></div>
<td> <div class="col-9">
{% for presentation in presentation_list %} {% for presentation in presentation_list %}
<div><a href="{% url 'show-talk' presentation.talk.id %}">{{presentation.talk.title}}</a> by <a href="{% url 'show-speaker' presentation.talk.speaker.id %}">{{presentation.talk.speaker.user}}, {{presentation.talk.speaker.title}}</a></div> <div><a href="{% url 'show-talk' presentation.talk.id %}">{{presentation.talk.title}}</a> by <a href="{% url 'show-speaker' presentation.talk.speaker.id %}">{{presentation.talk.speaker.user}}, {{presentation.talk.speaker.title}}</a></div>
{% endfor %} {% endfor %}
@ -207,14 +211,14 @@
{% if pending_presentations and can_edit_event %} {% if pending_presentations and can_edit_event %}
<a class="btn btn-success btn-sm" href="{% url 'schedule-event-talks' event.id %}">{{pending_presentations}} proposed talks</a> <a class="btn btn-success btn-sm" href="{% url 'schedule-event-talks' event.id %}">{{pending_presentations}} proposed talks</a>
{% endif %} {% endif %}
</td> </div>
</tr> </div>
{% endif %} {% endif %}
</table> </div>
<div class="container mt-3"> <div class="container container-secondary mt-3">
<div class="row"> <div class="row">
<div class="col"><hr/><h4>Comments</h4></div> <div class="col"><h4>Comments</h4></div>
</div> </div>
<div class="row"> <div class="row">
{% load mptt_tags %} {% load mptt_tags %}
@ -244,11 +248,11 @@
</div> </div>
{% endrecursetree %} {% endrecursetree %}
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<div class="list-group-item pl-5"> <div class="pl-5">
<form action="{% url 'comment-event' event.id %}" method="POST"> <form action="{% url 'comment-event' event.id %}" method="POST">
{% csrf_token %} {% csrf_token %}
{{ comment_form.body }} {{ comment_form.body }}
<br/><button type="submit" class="btn btn-primary">Comment</button> <br/><button type="submit" class="btn btn-primary"><i class="pr-2 fa fa-comment"></i>Comment</button>
</form> </form>
</div> </div>
{% endif %} {% endif %}
@ -258,7 +262,7 @@
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="container"> <div class="container container-secondary mb-3">
{% if sponsor_count > 0 %} {% if sponsor_count > 0 %}
<div class="row"> <div class="row">
<div class="col"><h4>Sponsors</h4><hr/></div> <div class="col"><h4>Sponsors</h4><hr/></div>
@ -270,10 +274,11 @@
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
<div class="row mb-3"></div> </div>
<div class="container container-secondary mb-3">
{% endif %} {% endif %}
<div class="row"> <div class="row">
<div class="col"><h4>Attendees ({{attendee_count}})</h4><hr/></div> <div class="col"><h4>Attendees ({{attendee_count}})</h4></div>
</div> </div>
{% for attendee in attendee_list %} {% for attendee in attendee_list %}
<div class="row mb-3"> <div class="row mb-3">
@ -318,8 +323,10 @@
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
</div>
<div class="container container-secondary mb-3">
<div class="row"> <div class="row">
<div class="col"><hr/><h4>Photos</h4></div> <div class="col"><h4>Photos</h4></div>
</div> </div>
<div class="row"> <div class="row">
{% for photo in event.photos.all %} {% for photo in event.photos.all %}
@ -340,7 +347,7 @@
</div> </div>
{% if can_edit_event %} {% if can_edit_event %}
<div class="row"> <div class="row">
<div class="col"><a class="btn btn-primary" href="{% url 'add-event-photo' event.id %}">Upload</a></div> <div class="col"><a class="btn btn-primary btn-sm" href="{% url 'add-event-photo' event.id %}"><i class="fa fa-upload"></i> Upload</a></div>
</div> </div>
{% endif %} {% endif %}
</div> </div>