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

{% block table-headings %}
	{{ block.super }}
	<th>{% trans "Short title" %}</th>
{% endblock %}

{% block table-columns %}
	{{ block.super }}
	<td>{{ obj.short_title|default:"-" }}</td>
{% endblock %}

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

{% block row-buttons-extra %}
	{% if obj.matches.exists %}
		<a class="btn btn-default btn-sm" role="button" href="{{ obj.urls.undo }}" data-toggle="modal" data-target="#undoModal_stage" data-action="{{ obj.urls.undo }}" data-title="{{ obj }}">
			<i class="fa fa-eject"></i>
			&nbsp;{% trans "Undo" %} <span class="badge">{{ obj.matches.count }}</span>
		</a>
	{% else %}
		<a class="btn btn-default btn-sm" href="{{ obj.urls.build }}" role="button">
			<i class="fa fa-play"></i>
			&nbsp;{% trans "Build" %}
		</a>
	{% endif %}
	<a class="btn btn-default btn-sm" href="{% url 'admin:fixja:reorder' 'stage:division' obj.pk "up" %}" role="button">
		<i class="fa fa-chevron-up"></i>
		<span class="hidden-xs hidden-sm">&nbsp;{% trans "Up" %}</span>
	</a>
	<a class="btn btn-default btn-sm" href="{% url 'admin:fixja:reorder' 'stage:division' obj.pk "down" %}" role="button">
		<i class="fa fa-chevron-down"></i>
		<span class="hidden-xs hidden-sm">&nbsp;{% trans "Down" %}</span>
	</a>
{% endblock %}
