Skip to content

Commit

Permalink
[#1183] Clean up template code
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Aug 13, 2013
1 parent f367fd2 commit afb1059
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ckan/templates/snippets/datapusher_status.html
Expand Up @@ -7,13 +7,11 @@
{% set datapusher_enabled = h.get_action('datapusher_enabled') %}
{% if datapusher_enabled %}
{% set job = h.get_action('datapusher_status', data_dict={'resource_id': resource.id}) %}
{% set status = job.status %}
{% set datapusher_job_url = job.job_url %}
{% set title = _('Datapusher status: {status}').format(status=status) %}
{% if status == 'unknown' %}
<i title="{{ _(title) }}" class="datapusher-status status-{{ status }} icon-circle icon-large"></i>
{% set title = _('Datapusher status: {status}.').format(status=job.status) %}
{% if job.status == 'unknown' %}
<i title="{{ _(title) }}" class="datapusher-status status-{{ job.status }} icon-circle icon-large"></i>
{% else %}
<a href="{{ datapusher_job_url }}" class="datapusher-status-link" title="{{ _(title) }}"><i class="datapusher-status status-{{ status }} icon-circle icon-large"></i></a>
<a href="{{ job.job_url }}" class="datapusher-status-link" title="{{ _(title) }}"><i class="datapusher-status status-{{ job.status }} icon-circle icon-large"></i></a>
{% endif %}
{% endif %}
{% endif %}

0 comments on commit afb1059

Please sign in to comment.