Skip to content

Commit

Permalink
[#1951] Use url_for_static everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 5, 2014
1 parent 5c0e4a4 commit 56e0e08
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ckan/templates/development/snippets/markup.html
Expand Up @@ -119,7 +119,7 @@ <h3>Figures</h3>
<p>Figures are usually used to refer to images:</p>
<div class="example">
<figure>
<img src="/base/images/placeholder-680x400.png" alt="Example image"/>
<img src="{{ h.url_for_static('/base/images/placeholder-680x400.png') }}" alt="Example image"/>
<figcaption>
<p>This is a placeholder image, with supporting caption.</p>
</figcaption>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/footer.html
Expand Up @@ -14,7 +14,7 @@
{% set api_url = 'http://docs.ckan.org/en/{0}/api/'.format(g.ckan_doc_version) %}
<li><a href="{{ api_url }}">{{ _('CKAN API') }}</a></li>
<li><a href="http://www.okfn.org/">{{ _('Open Knowledge Foundation') }}</a></li>
<li><a href="http://www.opendefinition.org/okd/"><img src="/base/images/od_80x15_blue.png"></a></li>
<li><a href="http://www.opendefinition.org/okd/"><img src="{{ h.url_for_static('/base/images/od_80x15_blue.png') }}"></a></li>
{% endblock %}
</ul>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/snippets/license.html
Expand Up @@ -26,7 +26,7 @@ <h2 class="module-heading"><i class="icon-medium icon-lock"></i> {{ _('License')
{{ license_string(pkg_dict) }}
{% if pkg_dict.isopen %}
<a href="http://opendefinition.org/okd/" title="{{ _('This dataset satisfies the Open Definition.') }}">
<img class="open-data" src="/base/images/od_80x15_blue.png" alt="[Open Data]" />
<img class="open-data" src="{{ h.url_for_static('/base/images/od_80x15_blue.png') }}" alt="[Open Data]" />
</a>
{% endif %}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/snippets/related.html
Expand Up @@ -4,7 +4,7 @@ <h2 class="module-heading"><i class="icon-medium icon-picture"></i> {{ _('Relate
{% if item %}
{% with url = h.url_for(controller='related', action='list', id=pkg_name) %}
<a class="image logo" href="{{ url }}">
<img src="{{ item.image_url or "/base/images/placeholder-200x125.png" }}" width="200" height="125" alt="{{ item.title }}" />
<img src="{{ item.image_url or h.url_for_static('/base/images/placeholder-200x125.png') }}" width="200" height="125" alt="{{ item.title }}" />
</a>
<div class="media-content">
<h3 class="media-heading"><a href="{{ url }}">{{ item.title }}</a></h3>
Expand Down

0 comments on commit 56e0e08

Please sign in to comment.