Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 'Cite' for datasets #2351

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scholia/app/templates/dataset-export.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "work-export.html" %}
4 changes: 4 additions & 0 deletions scholia/app/templates/dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

{% endblock %}

{% block page_actions %}
<a href="/dataset/{{ q }}/export" role="button" class="btn btn-outline-secondary">Cite</a>
{{ super() }}
{% endblock %}
egonw marked this conversation as resolved.
Show resolved Hide resolved

{% block page_content %}
<h1 id="h1">Taxon</h1>
Expand Down
18 changes: 18 additions & 0 deletions scholia/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,24 @@ def show_dataset_index():
return render_template('dataset-index.html')


@main.route('/dataset/' + q_pattern + '/export')
def show_dataset_export(q):
"""Return HTML rendering for export formats for this dataset.

Parameters
----------
q : str
Wikidata item identifier.

Returns
-------
html : str
Rendered HTML.

"""
return render_template('dataset-export.html', q=q)


@main.route('/clinical-trial/')
def show_clinical_trial_index():
"""Return clinical trial index page.
Expand Down