{% extends "mvp/list.inc.html" %}
{% load i18n %}
{% load common %}

{% block table-headings %}
	<th>{% trans "Headline" %}</th>
	<th class="hidden-xs hidden-sm">{% trans "Published" %}</th>
{% endblock %}

{% block table-columns %}
	<td>
		{% if change_perm in object_perms %}
			<a href="{{ obj.urls.edit }}">{{ obj }}</a>&nbsp;
		{% else %}
			<span>{{ obj }}</span>
		{% endif %}

		{% for label in obj.categories.all %}
			<span class="hidden-xs label label-default">{{ label }}</span>
		{% endfor %}

		{% if obj.categories.count %}
			<span class="badge badge-default visible-xs-inline-block">{{ obj.categories.count }}</span>
		{% endif %}
	</td>
	<td class="hidden-xs hidden-sm">{{ obj.published }}</td>
{% endblock %}

{% block empty-row-colspan %}3{% endblock %}

{% block row-buttons-items %}
    <li role="presentation">
        <a role="button" href="{{ obj.get_absolute_url }}" target="_blank">
			<i class="fa fa-eye fa-fw"></i>
			{% trans "View on web" %}
        </a>
    </li>
{{ block.super }}
{% endblock row-buttons-items %}
