book_list.html.twig 692 Bytes
Newer Older
1
<ul class="books">
Sean Madsen's avatar
Sean Madsen committed
2
{% for book in books %}
3
  <li class="book">
Sean Madsen's avatar
Sean Madsen committed
4 5 6 7 8 9 10 11 12 13 14
    <div>
      {% set language = book.getDefaultLanguage() %}
      {% set version = language.getDefaultVersion() %}
      {% set url = "/" ~ book.slug ~ "/" ~ language.code ~ "/" ~ version.name %}
      <a href="{{ url }}">
        <span class="name">
          {{ book.name }}
        </span>
        <span class="edition">
          ({{ language.nativeName() }} / {{ version.name }})
        </span>
Sean Madsen's avatar
Sean Madsen committed
15 16 17 18
      </a>
      <span class="other-editions">
        <a href="/{{ book.slug }}">(Other editions)</a>
      </span>
Sean Madsen's avatar
Sean Madsen committed
19 20 21 22
    </div>
    <div class="description">
      {{ book.description }}
    </div>
23 24 25
  </li>
{% endfor %}
</ul>