{% load xsl_transform_tag %}
{% load i18n %}
<h1>View Data</h1>

<div class="mb-5 float-right">
    <a class="btn btn-danger mr-auto" href="{% url 'core_curate_enter_data' data.data_structure.id True %}">
        <i class="fa 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="fa fa-download"></i> Download XML</a>
    {% if data.data_structure.data.workspace.is_public %}
    <button class="btn btn-primary mr-auto save-to-repo"><i class="fa fa-save"></i> Publish</button>
    {% else %}
    <button class="btn btn-primary mr-auto save-to-repo-registry"><i  class="fa fa-save"></i> Save to Repository</button>
    {% endif %}

</div>

<div id = "data_id" class="hidden" >
</div>

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

<div id="XMLHolder">
{% xsl_transform_detail xml_content=data.xml_string as xml_representation %}
{{ xml_representation|safe}}
</div>

<div id="curate_data_structure_id" class="hidden">{{ data.data_structure.id }}</div>
