Skip to content

Commit

Permalink
[#619] Fix broken dumps link on dataset page
Browse files Browse the repository at this point in the history
An if statement in a template was wrong, so if dumps_url was _not_ set
then ckan would try to show the dumps link and would render an empty
string. Reversing the if statements fixes it.
  • Loading branch information
Sean Hammond committed Mar 12, 2013
1 parent ea27c01 commit 9b178b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckan/templates/package/search.html
Expand Up @@ -75,15 +75,15 @@
{% set api_link = h.link_to(_('API'), h.url_for(controller='api', action='get_api', ver=3)) %}
{% set api_doc_link = h.link_to(_('API Docs'), 'http://docs.ckan.org/{0}/{1}/api.html'.format(request.environ.CKAN_LANG, g.ckan_doc_version)) %}
{% if g.dumps_url -%}
{% set dump_link = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %}
{% trans %}
You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}).
You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}.
{% endtrans %}
{% else %}
{% set dump = h.link_to(_('full {format} dump').format(format=g.dumps_format), g.dumps_url) %}
{% trans %}
You can also access this registry using the {{ api_link }} (see {{ api_doc_link }}) or download a {{ dump_link }}.
You can also access this registry using the {{ api_link }} (see {{ api_doc_link}}).
{% endtrans %}
{%- endif %}.
{%- endif %}
</small>
</div>
</section>
Expand Down

0 comments on commit 9b178b0

Please sign in to comment.