Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1200] make resource data page for reuploading and make error messag…
…es better
- Loading branch information
Showing
8 changed files
with
189 additions
and
58 deletions.
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
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,45 @@ | ||
{% extends "package/new_resource.html" %} | ||
|
||
{% set pkg_dict = c.pkg_dict %} | ||
{% set res = c.resource %} | ||
|
||
{% block subtitle %}{{ h.dataset_display_name(pkg_dict) }} - {{ h.resource_display_name(res) }}{% endblock %} | ||
|
||
{% block breadcrumb_content_selected %}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
{{ super() }} | ||
<li class="active"><a href="">{{ _('Edit') }}</a></li> | ||
{% endblock %} | ||
|
||
{% block content_action %} | ||
{% link_for _('View resource'), controller='package', action='resource_read', id=pkg_dict.name, resource_id=res.id, class_='btn', icon='eye-open' %} | ||
{% endblock %} | ||
|
||
{# logged_in is defined in new_resource.html #} | ||
{% block form %} | ||
|
||
{% set action = h.url_for(controller='ckanext.datapusher.plugin:ResourceDataController', action='resource_data', id=pkg_dict.id, resource_id=res.id) %} | ||
|
||
<form class="dataset-form dataset-resource-form form-horizontal" method="post" action="{{ action }}" > | ||
<h3> {{ _('Last Upload Status:') }} {% if status.status %} {{ status.status.capitalize() }} {% else %} {{ _('Not Uploaded Yet') }} {% endif %} </h3> | ||
{% if status.error and status.error.message %} | ||
<h3> {{ _('Upload Error:') }} {{ status.error.message }} </h3> | ||
{% endif %} | ||
{% if status.status %} | ||
<h3> {{ _('Last Updated: ') }} {{ h.time_ago_from_timestamp(status.last_updated) }} </h3> | ||
{% endif %} | ||
|
||
<button class="btn" name="save" value="go-dataset" type="submit">{{ _('Upload Data') }}</button> | ||
{% if status.status and status.task_info %} | ||
<h3> {{ _('Upload Log ') }} </h3> | ||
{{ h.debug_inspect(status.task_info.logs) }} | ||
{% endif %} | ||
{{ status }} | ||
</form> | ||
|
||
{% endblock %} | ||
|
||
{% block secondary_content %} | ||
{% snippet 'package/snippets/info.html', pkg=pkg_dict, active=pkg_dict.id, action='resource_edit' %} | ||
{% endblock %} |
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
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