diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-12-10 13:46:45 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-12-10 13:46:45 +0100 |
commit | 263b6893dd69c4d377ca369a05ebb0eb2072153c (patch) | |
tree | 7f39321070ebf8c762cbd8a9b1437d511a2d3d26 | |
parent | f5cdf20fd3c33905d1b97fa93a635abc5e7d4d14 (diff) | |
download | Chimère-263b6893dd69c4d377ca369a05ebb0eb2072153c.tar.bz2 Chimère-263b6893dd69c4d377ca369a05ebb0eb2072153c.zip |
Add icon of search results
-rw-r--r-- | chimere/models.py | 2 | ||||
-rw-r--r-- | chimere/templates/search/search.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/chimere/models.py b/chimere/models.py index 09987c9..3dae073 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -656,7 +656,7 @@ class Marker(GeographicItem): def default_category(self): # Should we select only available ones ? # Should we catch if not exists ? - cats = self.categories + cats = self.categories.filter(available=True, category__available=True) if cats.count(): return cats.all()[0] diff --git a/chimere/templates/search/search.html b/chimere/templates/search/search.html index 572276f..929dade 100644 --- a/chimere/templates/search/search.html +++ b/chimere/templates/search/search.html @@ -16,7 +16,7 @@ for (idx=0 ; idx < new_ids.length ; idx++){ <ul> {% for result in page.object_list %} <li> - <a href="#" onclick="$('#main-map').chimere('showPopup', {{result.object.pk}});return false;">{{ result.object }}</a> + <img src='{{MEDIA_URL}}{{result.object.default_category.icon.image}}'/><a href="#" onclick="$('#main-map').chimere('showPopup', {{result.object.pk}});return false;">{{ result.object }}</a> </li> {% empty %} <li>{% trans "No results found." %}</li> |