{% extends 'core_main_app/admin/templates/versions/available.html' %}

{% block box_tools %}

{% if not data.version_manager.user %}
	<a href="{% url 'admin:core_composer_app_upload_type_version' data.version_manager.id %}"
	   class="pull-right btn btn-default">
		<i class="fa fa-upload"></i> Upload New Version
	</a>
{% endif %}

{% url data.back_url as type_list_url %}
{% include 'core_main_app/common/buttons/go_to.html' with url=type_list_url label='Back to Types' %}

{% endblock %}

<!-- TODO: This code is duplicated from core_main_app -->
{% block box_actions %}
	{% if 'core_parser_app' in INSTALLED_APPS %}
		<a class="btn btn-default modules"
			href="{% url data.module_url version.object %}">
			<i class="fa fa-cubes"></i> Modules
		</a>
	{% endif %}
	{% if version.object != data.version_manager.current %}
		<span class='icon legend long current' objectid='{{ version.object }}'>
		   <a class="btn btn-default" href="#"><i class="fa fa-bookmark"></i> Set Current</a>
		</span>
		<span class='icon legend delete' objectid='{{ version.object }}'>
		   <a class="btn btn-danger" href="#"><i class="fa fa-trash"></i> Disable</a>
		</span>
	{% endif %}
{% endblock %}