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

#25 Changes "Refresh" to "Reharvest" and adds confirmation dialog #26

Merged
merged 3 commits into from
Mar 21, 2013
Merged
Changes from 2 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
10 changes: 8 additions & 2 deletions ckanext/harvest/templates_new/source/admin_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@

{% block actions_content %}
{% if source.status.last_job and (source.status.last_job.status == 'New' or source.status.last_job.status == 'Running') %}
<li><a class="btn disabled" rel="tooltip" title="There already is an unrun job for this source"><i class="icon-refresh icon-large"></i> Refresh</a></li>
<li><a class="btn disabled" rel="tooltip" title="There already is an unrun job for this source"><i class="icon-refresh icon-large"></i> Reharvest</a></li>
{% else %}
<li>{{ h.nav_named_link(_('Refresh'), '{0}_refresh'.format(c.dataset_type), id=source.id, class_='btn', icon='refresh')}}</li>
{% set locale = h.dump_json({'content': _('This will re-run the harvesting for this source. Any updates at the source will overwrite the local datasets. Large collections may take a couple of days to finish harvesting. Please confirm you would like us to start reharvesting.')}) %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large collections may take a couple of days to finish harvesting.

This is not relevant to a default ckanext-harvest install and will create a lot of confusion, can we drop it here and add a custom admin_base.html file in ckanext-geodatagov with the message you prefer there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amercader Sure. So we have the message like: (for ckanext-harvest)

This will re-run the harvesting for this source. Any updates at the source will overwrite the local datasets. Please confirm you would like to start reharvesting.

And then on ckanext-geodatagov:

This will re-run the harvesting for this source. Any updates at the source will overwrite the local datasets. Large collections may take a couple of days to finish harvesting. Please confirm you would like to start reharvesting.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please

<li>
<a href="{{ h.url_for('harvest_refresh', id=source.id) }}" class="btn" data-module="confirm-action" data-module-i18n="{{ locale }}">
<i class="icon-refresh"></i>
{{ _('Reharvest') }}
</a>
</li>
{% endif %}
<li>{{ h.nav_named_link(_('View harvest source'), '{0}_read'.format(c.dataset_type), id=source.name, class_='btn', icon='eye-open')}}</li>
{% endblock %}
Expand Down