Skip to content

Commit

Permalink
Optimized imgs for territories placeholders, fix #788
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbgk committed Feb 21, 2017
1 parent e6b87a7 commit 7adb458
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@
## Current (in progress)

- Fix JavaScript locales handling [#786](https://github.com/opendatateam/udata/pull/786)
- Optimize images sizes for territory placeholders [#788](https://github.com/opendatateam/udata/issues/788)

## 1.0.2 (2017-02-20)

Expand Down
2 changes: 1 addition & 1 deletion udata/templates/dataset/display.html
Expand Up @@ -320,7 +320,7 @@ <h3>{{ _('Spatial coverage') }}</h3>
<div class="panel-body">
<h3>{{ _('Territories')}}</h3>
{% for territory in dataset.spatial.handled_zones %}
<img src="{{ territory.logo_url(external=True) or theme_static('img/placeholder_territory.png') }}" alt="{{ territory.name }}" class="float-left" width="13px" /> <a href="{{ territory.url }}" title="{{ territory.name }}">{{ territory.name }}</a>{% if not loop.last %}, {% endif %}
<img src="{{ territory.logo_url(external=True) or theme_static('img/placeholder_territory_mini.png') }}" alt="{{ territory.name }}" class="float-left" width="13px" /> <a href="{{ territory.url }}" title="{{ territory.name }}">{{ territory.name }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion udata/templates/territories/county.html
Expand Up @@ -40,7 +40,7 @@ <h3><small>{{ _('Main towns:') }}</small></h3>
<ul class="list-unstyled territories-list">
{% for town in territory.children[:8] %}
<li>
<img src="{{ town.logo_url(external=True) or theme_static('img/placeholder_territory.png', external=True) }}" alt="{{ town.name }}" class="float-left" width="13px" />
<img src="{{ town.logo_url(external=True) or theme_static('img/placeholder_territory_mini.png', external=True) }}" alt="{{ town.name }}" class="float-left" width="13px" />
<a href="{{ town.url }}"> {{ town.name }}</a>
</li>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion udata/templates/territories/region.html
Expand Up @@ -53,7 +53,7 @@ <h3><small>{{ _('Main counties:') }}</small></h3>
<ul class="list-unstyled territories-list">
{% for county in territory.children[:8] %}
<li>
<img src="{{ county.logo_url(external=True) or theme_static('img/placeholder_territory.png', external=True) }}" alt="{{ county.name }}" class="float-left" width="13px" />
<img src="{{ county.logo_url(external=True) or theme_static('img/placeholder_territory_mini.png', external=True) }}" alt="{{ county.name }}" class="float-left" width="13px" />
<a href="{{ county.url }}"> {{ county.name }}</a>
</li>
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions udata/templates/territories/search-result.html
@@ -1,11 +1,11 @@
{% cache cache_duration, 'territory-search-result', territory.id, g.lang_code %}
{% set logo=territory.logo_url() or theme_static('img/placeholder_territory.png') %}
{% set logo=territory.logo_url() or theme_static('img/placeholder_territory_medium.png') %}
<li class="search-result territory-result">
<a href="{{ territory.url }}" title="{{ territory.name }}">
<div class="result-logo pull-left">
<img alt="{{ territory.name }}"
src="{{ logo }}"
width="70" height="70">
width="64" height="70">
</div>
<div class="result-body ellipsis-dot">
<h4 class="result-title">{{ territory.html_title|safe }}</h4>
Expand Down

0 comments on commit 7adb458

Please sign in to comment.