{% load xsl_transform_tag %}
{% load blob_tags %}
{% load i18n %}

<h1>View Data</h1>

<div class="float-right">
    <a class="btn btn-danger mr-auto" href="{% url 'core_curate_enter_data' data.data_structure.id True %}">
        <i class="fas fa-arrow-left"></i> Back to {% trans "form_label"|title %}</a>
	<a class="btn btn-secondary mr-auto" href="{% url 'core_curate_download_xml' data.data_structure.id %}">
        <i class="fas fa-download"></i> Download XML</a>
	<button class="btn btn-primary mr-auto save-to-repo"><i class="fas fa-save"></i> Save to Repository</button>
</div>

<span>Title: {{data.data_structure.name}}</span>

<div id="XMLHolder">
{% xsl_transform_detail xml_content=data.xml_string request=request as xml_representation %}
{% if 'core_file_preview_app' in INSTALLED_APPS %}
    {% render_blob_links_in_span xml_string=xml_representation as xml_representation %}
{% endif %}
{{ xml_representation|safe}}
</div>

<div id="curate_data_structure_id" style="display: none;">{{ data.data_structure.id }}</div>
