-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get a report from CKAN about publisher usage.
CSV and JSON report on the publisher page.
- Loading branch information
Showing
3 changed files
with
193 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% ckan_extends %} | ||
|
||
{% block description %} | ||
{{ super() }} | ||
{% block report %} | ||
{% set org = request.path.replace('/organization/', '') %} | ||
{% if 'organization' in request.path and h.is_admin(c.user, org) and h.verify_datasets_exist(org) %} | ||
{% set csv, json = h.prepare_reports(org) %} | ||
<dl> | ||
<h1 class="heading">{{ _('Publisher Report') }}</h1> | ||
<a class="btn btn-primary" href="{{ '/publisher-reports/' + csv }}" download="{{ csv }}">CSV</a> | ||
<a class="btn btn-primary" href="{{ '/publisher-reports/' + json }}" download="{{ json }}">JSON</a> | ||
</dl> | ||
{% endif %} | ||
{% endblock %} | ||
{% endblock %} |