{% set edition = '' %}
{% set text = '' %}
<div class="apiary">
{% for c in corrections %}
{% if c.edition.title != edition %}
<h4 id="{{ c.edition.title|replace({' ': '_', '.': ''}) }}" class="edition">
{{ c.edition.title }} <span><a href="#top" title="zurück zum Anfang" class="backtotop">⇧</a></span>
{% set edition = c.edition.title %}
{% set text = '' %}
</h4>
{% for d in c.edition.docketEntries %}
<div class="docket">
{% if d.position or d.text %}
<div class="text">{{ d.text }}</div>
<div class="position">{{ c.position }}</div>
<div class="info">{{ d.info }}</div>
{% else %}
<p class="info">{{ d.info }}</p>
{% endif %}
</div>
{% endfor %}
{% endif %}
<div class="correction">
<div class="text">
{% if c.text != text %}
{% if c.registerEntries|length and c.registerEntries|first and c.registerEntries|first.hgv %}
<a href="{{ path('PapyrillioBeehive_ApiaryHoney', {'type': 'hgv', 'id': c.registerEntries|first.hgv }) }}" title="Alle Einträge für {{ c.registerEntries|first }}">{{ c.text }}</a>
{% else %}
{{ c.text }}
{% endif %}
{% set text = c.text %}
{% endif %}
</div>
<div class="position">{{ c.position }}</div>
<div class="description">{{ c.description }}</div>
<div class="bl">
{% if c.compilation.collection == 'BOEP' %}
<a href="{{ path('PapyrillioBeehive_ApiaryCorrectionInfo', {'id': c.id}) }}" title="{{ c.compilation.short }}{% if c.compilationIndex %} {{ c.compilationIndex }}{% endif %}">{{ c.compilation.short|replace({' ' : ' '})|raw }}{% if c.compilationIndex %} {{ c.compilationIndex }}{% endif %}</a>
{% else %}
<a href="{{ path('PapyrillioBeehive_ApiaryCorrectionInfo', {'id': c.id}) }}" title="BL {{ c.compilation.title }}{% if c.compilationPage %} S. {{ c.compilationPage }}{% endif %}{% if c.compilationIndex %} # {{ c.compilationIndex }}{% endif %}">BL {{ c.compilation.title }}{% if c.compilationPage %} S. {{ c.compilationPage }}{% endif %}{% if c.compilationIndex %} # {{ c.compilationIndex }}{% endif %}</a>
{% endif %}
{% if c.source %}
<br />
<a href="http://papyri.info/biblio/{{ c.source }}">Biblio</a>
{% endif %}
</div>
</div>
{% endfor %}
</div>