Skip to content
Snippets Groups Projects
Commit c332090e authored by Luca's avatar Luca
Browse files

subset detail page now loads correctly

parent 8ba5ab21
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ def show_view_record(database_id, view_id):
return render_template('view_records/detail.html', database=database, metadata=view,
data=view_data, table_id=0)
data=view_data, type="view")
@records_bp.route('/subset/<database_id>/<subset_id>')
def show_subset_record(database_id, subset_id):
......@@ -40,7 +40,7 @@ def show_subset_record(database_id, subset_id):
return render_template('view_records/detail.html', database=database, metadata=subset,
data=subset_data, table_id=0)
data=subset_data, type="subset")
@records_bp.route('/get-data', methods=['GET'])
......
......@@ -105,7 +105,7 @@ p {
}
#type {
width:10%;
width:13%;
border-radius: 5px;
background-color: #767676;
text-align: center;
......
......@@ -51,7 +51,7 @@
<a role="button" class="ui compact mini button right floated">
<i class="download icon" aria-hidden="true"></i>Download
</a>
<a role="button" class="ui compact mini button preview-link right floated" href="/view/{{ subset.database_id }}/{{ subset.id }}">
<a role="button" class="ui compact mini button preview-link right floated" href="/subset/{{ subset.database_id }}/{{ subset.id }}">
<i class="info icon" aria-hidden="true"></i>Details
</a>
<a role="button" class="ui compact mini button preview-link right floated subset_preview_button" data-value="{{ subset.id }}" data-database_id="{{ subset.database_id }}" data-name="{{ subset.identifiers[0].titles[0].title }}">
......
......@@ -13,17 +13,28 @@
<div id="view-header">
{# Created {{ view.created }}#}
<div class="view-header-child" id="type">View</div>
{% if type == "view" %}
<div class="view-header-child" id="type">Data Source</div>
{% else %}
<div class="view-header-child" id="type">Data Set</div>
{% endif %}
<div class="view-header-child" id="access"><i class="lock open icon"></i>Open</div>
</div>
{% if type == "view" %}
<h1>{{ metadata.name }}</h1>
<a id="creator">{{ metadata.owner.username }}</a>
{% else %}
<h1>{{ metadata.identifiers[0].titles[0].title }}</h1>
{% endif %}
<a id="creator">{{ creators_list(database.identifiers[0].creators)}}</a>
<p style="white-space: pre-line;">{{ metadata.description }}</p>
<h2>Data</h2>
{{ preview_info_box(data) }}
{% if type == "view" %}
{{ view_schema_box(metadata) }}
{% endif %}
</div>
<div class="right-section">
{%- include "/view_records/details/side_bar.html" %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment