]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/photo/templates/photo/photo_index.html
573d6fe98e5e34e10f0cf7d159a2abd7aea53f03
[sommitrealweird.git] / sommitrealweird / photo / templates / photo / photo_index.html
1 {% extends "base.html" %}
2 {% load thumbnail %}
3
4 {% block content %}
5     {% if object_list %}
6         <h1>{{ object_list.0.album.name }}</h1>
7         <div class="album_caption">{{ object_list.0.album.caption }}</div>
8         {% for photo in object_list %}
9             <div class="photo">
10                 <a href="{{ photo.id }}/"><img src='{{ photo.image.url|thumbnail:"width=250" }}' alt="{{ photo.caption }}" /></a>
11                 <p>{{ photo.caption }}</h2>
12             </div>
13         {% endfor %}
14         <div style="clear: both;">&nbsp;</div>
15         {% if is_paginated %}
16             <p class="paginator">Pages: 
17             {% if page_obj.has_previous %}
18                 <a href="?page={{ page_obj.previous_page_number }}">Previous</a> |
19             {% endif %}
20             {% for paginator_page in paginator.page_range %}
21                 {% if forloop.first %}
22                 {% else %}
23                     |
24                 {% endif %}
25                 {% ifequal paginator_page page %}
26                     {{ page }}
27                 {% else %}
28                     <a href="?page={{ paginator_page }}">{{ paginator_page }}</a>
29                 {% endifequal %}
30             {% endfor %}
31             {% if page_obj.has_next %}
32                 | <a href="?page={{ page_obj.next_page_number }}">Next</a>
33             {% endif %}
34             </p>
35         {% endif %}
36     {% else %}
37         <p>There are no photos available.</p>
38     {% endif %}
39 {% endblock %}