{% set edition = '' %}
{% set text = '' %}
{% set collection = '' %}
<table class="apiary">
<!--thead>
<tr>
<th class="edition">Edition</th>
<th class="text">Text</th>
<th class="position">Position</th>
<th class="description">Description</th>
<th class="bl">BL</th>
</tr>
</thead-->
<tbody>
{% for c in corrections %}
{% if type == 'boep' and id != 'Bulletin of Online Emendations to Papyri' %}
{% set currentCollection = c.registerEntries|length and c.registerEntries|first.dclp|length ? 'DCLP' : 'DDB' %}
{% if currentCollection != collection %}
<tr><th colspan="5"><h3 id="{{ currentCollection }}">{{ currentCollection }} <span><a href="#top" title="zurück zum Anfang" class="backtotop">⇧</a></span></h3></th></tr>
{% set collection = currentCollection %}
{% endif %}
{% endif %}
<tr id="{{ c.id }}">
<td {{ c.edition.title != edition ? 'id=' ~ c.edition.title|replace({' ': '_', '.': ''}) : '' }} class="edition">
{% if c.edition.title != edition %}
{{ c.edition.title }}
{% set edition = c.edition.title %}
{% set text = '' %}
{% endif %}
</td>
<td class="text">
{% if c.text != text %}
{% if c.registerEntries|length and c.registerEntries|first and (c.registerEntries|first.hgv or c.registerEntries|first.tm) %}
<a href="{{ path('PapyrillioBeehive_ApiaryHoney', {'type': (c.registerEntries|first.hgv ? 'hgv' : 'tm'), 'id': (c.registerEntries|first.hgv ? c.registerEntries|first.hgv : c.registerEntries|first.tm) }) }}" title="Alle Einträge für {{ c.registerEntries|first }}">{{ c.text }}</a>
{% else %}
{{ c.text }}
{% endif %}
{% set text = c.text %}
{% endif %}
</td>
<td class="position">{{ c.position }}</td>
<td class="description">{{ c.description }}</td>
<td class="bl">
<a href="{{ path('PapyrillioBeehive_ApiaryCorrectionInfo', {'id': c.id}) }}" title="{{ c.compilation.title }}{% if c.compilationIndex %} {{ c.compilationIndex }}{% endif %}">{{ c.compilation.short }}{% if c.compilationIndex %} {{ c.compilationIndex }}{% endif %}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>