{% macro render_attachment_info(obj) -%}
    <td class="i-table material-column" data-text="{{ obj.attachment_count }}">
        <span class="vertical-aligner">
            <a href="#" class="icon-attachment js-manage-attachments js-hide-balloon"
               title="{% trans %}Manage materials{% endtrans %}"
               data-title="{% trans title=obj.title %}Manage materials for '{{ title }}'{% endtrans %}"
               data-locator="{{ obj.locator|tojson|forceescape }}"
               data-attachment-editor>
                {% if not obj.attachment_count %}
                    {# i18n: No attachments #}
                    <em>{% trans 'Attachments' %}None{% endtrans %}</em>
                {% else %}
                    <span class="label">
                        {% trans count=obj.attachment_count -%}
                            {{ count }} file
                        {%- pluralize -%}
                            {{ count }} files
                        {%- endtrans %}
                    </span>
                {% endif %}
            </a>
        </span>
    </td>
{%- endmacro %}
