-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from SmdhMdep/ui-updates
* add data API link to the resource explore links * change download button to 'Download Preview' for streaming resources
- Loading branch information
Showing
2 changed files
with
58 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
15 changes: 15 additions & 0 deletions
15
ckanext/smdh/templates/package/snippets/resource_item.html
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,15 @@ | ||
{% ckan_extends %} | ||
|
||
{% block resource_item_explore_links %} | ||
{{ super() }} | ||
{% if h.check_access('package_update', {'id':pkg.id }) and not is_activity_archive %} | ||
<li> | ||
{% set loading_text = _('Loading...') %} | ||
{% set api_info_url = h.url_for(controller='api', action='snippet', ver=1, snippet_path='api_popup.html', | ||
resource_id=res.id) %} | ||
<a href="{{ api_info_url }}" data-module="api-info" | ||
data-module-template="/api/1/util/snippet/api_popup.html?resource_id={{ res.id }}" | ||
data-loading-text="{{ loading_text }}"><i class="fa fa-flask"></i> {{ _('Data API') }}</a> | ||
</li> | ||
{% endif %} | ||
{% endblock %} |