Merge branch 'fix-jinja-status-exception' of git://github.com/metaodi/ckanext-harvest into metaodi-fix-jinja-status-exception
This commit is contained in:
commit
05e6362c38
|
@ -38,7 +38,9 @@ Example:
|
|||
{% endif %}
|
||||
|
||||
<p class="muted">
|
||||
{% if source.status %}
|
||||
{{ _('Datasets') }}: {{ source.status.total_datasets }}
|
||||
{% endif %}
|
||||
{% if not within_organization and source.organization %}
|
||||
— {{ _('Organization') }}: {{ h.link_to(source.organization.title or source.organization.name, h.url_for('organization_read', id=source.organization.name)) }}</a>
|
||||
{% endif %}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% block primary_content_inner %}
|
||||
<section class="module-content">
|
||||
<h1>Last Harvest Job</h1>
|
||||
{% if source.status.last_job %}
|
||||
{% if source.status and source.status.last_job %}
|
||||
{% snippet "snippets/job_details.html", job=source.status.last_job %}
|
||||
<div class="form-actions">
|
||||
<a href="{{ h.url_for(controller='ckanext.harvest.controllers.view:ViewController', action='show_last_job', source=source.name) }}" class="btn pull-right">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block actions_content %}
|
||||
{% if source.status.last_job and (source.status.last_job.status == 'New' or source.status.last_job.status == 'Running') %}
|
||||
{% if source.status and 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> Reharvest</a></li>
|
||||
{% else %}
|
||||
{% 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. Sources with a large number of datasets may take a significant amount of time to finish harvesting. Please confirm you would like us to start reharvesting.')}) %}
|
||||
|
|
|
@ -21,8 +21,10 @@
|
|||
{% endif %}
|
||||
<div class="nums">
|
||||
<dl>
|
||||
{% if c.harvest_source.status %}
|
||||
<dt>{{ _('Datasets') }}</dt>
|
||||
<dd>{{ c.harvest_source.status.total_datasets }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue