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

<tr class="table-sm">
    <td><input type="checkbox" name="select_chunk" value="{{image.id}}"/></td>
    <td><a href="{% url 'documents_image' image.slug %}" class="btn btn-sm btn-secondary" title="{% trans "Image settings" %}">&#x1f5bc;</a></td>
    <td><a class="btn btn-primary" target="_blank"
                href="{% url 'wiki_img_editor' image.slug %}">
                {{ image.title }}</a></td>
    <td>{% if image.stage %}
        {{ image.stage }}
    {% else %}–
    {% endif %}</td>
    <td class='user-column'>{% if image.user %}<a href="{% url 'documents_user' image.user.username %}">{{ image.user|username }}</a>{% endif %}</td>
    <td>
      {% if image.published %}
        <span class="badge badge-info" title="{% trans "published" %}">opubl.</span>
      {% endif %}
      {% if image.new_publishable %}
        <span class="badge badge-primary" title="{% trans "publishable" %}">do publ.</span>
      {% endif %}
      {% if image.changed %}
        <span class="badge badge-warning title="{% trans "changed" %}">zmiany</span>
      {% endif %}
    </td>
    <td>{{ image.project.name }}</td>
</tr>
