aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/photos/templates/photos/gallery_list.html
blob: bb4e7971f1bda19ffa0f035856c63f86fa146b7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{% extends "photos/base.html" %}
{# {% load markup %} #}

{% block title %}Photo Galleries{% endblock %}

{% block content %}
{% if object_list %}
    <table width="100%">
    {% for item in object_list %}
      <tr>
      <td class="photo_thumb">
      <a href="{{ item.id }}/">
        {% if item.first %}
        <img src="{{ item.first.thumburl }}"
             alt="{{ item.first.title }}" />
        {% else %}
        (No photo available)
        {% endif %}
      </a>
      </td><td class="gallery_title">
      <h3><a href="{{ item.id }}/">{{ item.title }}</a></h3>
      <br />
      {{ item.photo_set.count }} photo{{ item.photo_set.count|pluralize}}
      {% if item.first.date %}
        starting in {{ item.first.date }}{% endif %}
      </td></tr>
    {% endfor %}
    </table>
{% else %}
    <p>No galleries have been set up yet.</p>
{% endif %}


{% if is_paginated %}

{% if has_previous %}
<a href="./?page={{ previous }}">&laquo; previous</a> |
{% endif %}
{% if has_next %}
<a href="./?page={{ next }}">next &raquo;</a>
{% endif %}
{% endif %}

<!--
{% if not user.is_anonymous %}
<p>
  <a href="{{admin_url}}/photos/gallery/add/">Create a new gallery.</a>
</p>
{% else %}
<p>
  <a href="/accounts/login/?next={{ request.path }}">
    Login</a> to create a new gallery.
</p>
{% endif %}
-->

{% endblock %}