projects
/
sommitrealweird.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Photo album improvements
[sommitrealweird.git]
/
sommitrealweird
/
photo
/
templates
/
photo
/
album_index.html
diff --git
a/sommitrealweird/photo/templates/photo/album_index.html
b/sommitrealweird/photo/templates/photo/album_index.html
index edfbc9ff3f58f1e92b03a616e0fe010a25034964..402deedfc0ab4d246474ec49b2b218f91a0965f1 100644
(file)
--- a/
sommitrealweird/photo/templates/photo/album_index.html
+++ b/
sommitrealweird/photo/templates/photo/album_index.html
@@
-6,7
+6,9
@@
{% if object_list %}
{% for album in object_list %}
<div class="album">
{% if object_list %}
{% for album in object_list %}
<div class="album">
+ {% if album.get_main_image %}
<a href="{{ album.slug }}/"><img src="{{ album.get_main_image.url|thumbnail:"width=250" }}" alt="{{ album.get_main_image.caption }}" /></a>
<a href="{{ album.slug }}/"><img src="{{ album.get_main_image.url|thumbnail:"width=250" }}" alt="{{ album.get_main_image.caption }}" /></a>
+ {% endif %}
<h2><a href="{{ album.slug }}/">{{ album.name }}</a></h2>
<p>{{ album.caption }}</h2>
</div>
<h2><a href="{{ album.slug }}/">{{ album.name }}</a></h2>
<p>{{ album.caption }}</h2>
</div>