This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/_includes/talks-table.html.twig
2017-07-11 07:28:37 +01:00

82 lines
2.9 KiB
Twig

<div class="table-responsive">
<table class="table table-striped talks-table">
<thead>
<tr>
<th style="width: 20%">Date</th>
{% if not talk_page %}
<th style="width: 40%">Talk</th>
{% endif %}
<th>Event</th>
{% if not upcoming %}
<th style="width: 10%">Feedback</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for row in events %}
{% set talk = false %}
{% set key = row.date.talk.id ?: row.date.talk %}
{% for item in row.talks if key == item.filename|split('.')|first %}
{% set talk = item %}
{% endfor %}
<tr>
<td class="vertical-middle">
{{ row.date.date|date(row.date.fuzzy_date ? 'F Y' : 'j F Y') }}
{% if row.date.time %}
<small class="display-block">{{ row.date.time }}</small>
{% endif %}
</td>
{% if not talk_page %}
<td>
{% if row.date.talk.title is defined %}
{{ row.date.talk.title }}
{% else %}
<a href="{{ talk.url }}">{{ talk.title }}</a>
{% endif %}
<small class="display-block">
{{ row.date.talk.type ?: talk.type }}
</small>
</td>
{% endif %}
<td class="vertical-middle">
{% if row.event.website %}
<a href="{{ row.event.website }}">
{{ row.event.name }}
</a>
{% else %}
{{ row.event.name }}
{% endif %}
<small class="display-block">
{{ row.event.location }}
</small>
</td>
{% if not upcoming %}
<td class="vertical-middle">
{% if row.date.feedback %}
<a
href="{{ row.date.feedback }}"
class="btn btn-primary"
title="Read or leave feedback for this talk"
>
<i class="fa fa-comment-o"></i> joind.in
</a>
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>