{% load i18n %}
{% load username from common_tags %}

<tr class="table-secondary table-sm">
    <td><input type="checkbox" name="select_chunk" value="{{chunk.id}}" data-book-id="{{chunk.book.id}}" /></td>
    <td class='book-settings-column'></td>
    <td><a class="btn btn-outline-secondary btn-sm" href="{% url 'documents_chunk_edit' chunk.book.slug chunk.slug %}" title="{% trans "Chunk settings" %}">&#x1f4dc;</a></td>
    <td><a class="btn btn-primary" target="_blank" href="{{ chunk.get_absolute_url }}">
      {{ chunk.number }}.
      {{ chunk.title }}</a></td>
    <td>{% if chunk.stage %}
      {{ chunk.stage }}
    {% else %}
      –
    {% endif %}</td>
    <td class='user-column'>{% if chunk.user %}
      <a href="{% url 'documents_user' chunk.user.username %}">
        {{ chunk.user|username }}
      </a>{% else %}

    {% endif %}</td>

    </td>
    <td>
      {% if chunk.changed %}
        <span class="badge badge-warning title="{% trans "changed" %}">zmiany</span>
      {% endif %}
</td>
<td></td>
</tr>
