Source

cciw-website2 / templates / cciw / forums / photoindex.html

Full commit
{% extends "cciw/standard.html" %}
{% load standardpage %}
{% load view_extras %}
{% block content %}
  <p>Click on the photo thumbnail to see the full image and comments.</p>
  {% if object_list %}
    <div class="paging">{% paging_control %}</div>
    <table class="topheaders">
      <tr>
        <th scope="col" class="photoDateAddedCol">Date added {% sorting_control "aca" "dca" "Click to sort by date added, oldest first" "Click to sort by date added, newest first" %}</th>
        <th scope="col">Thumbnail</th>
        <th scope="col">Description/Tags</th>
        <th scope="col">Posts {% sorting_control "apc" "dpc" "Sort by number of posts ascending" "Sort by number of posts descending"%}</th>
        <th scope="col" class="photoLastPostCol">Last comment {% sorting_control "alp" "dlp" "Click to sort by date of last post, oldest first" "Click to sort by date of last post, newest first" %}</th>
      </tr>
    {% for photo in object_list %}
      <tr>
        <td>{% if photo.created_at %}{{ photo.created_at|date:"d M Y H:i" }}{% endif %}</td>
        <td class="photoCol"><a href="{{ photo.get_absolute_url }}"><img class="photoThumbnail" src="{{ MEDIA_URL }}photos/thumbnails/{{ photo.filename }}" alt="Photo {{ photo.filename }}" /></a>
        </td>
        <td>{{ photo.description }}
        </td>
        <td>{{ photo.post_count }}</td>
        <td>{% if photo.last_post_at %}{{ photo.last_post_at|date:"d M Y H:i" }}<br/>{% endif %}
            {% if photo.last_post_by_id %}{{ photo.last_post_by.get_link }}{% endif %}</td>
      </tr>
    {% endfor %}
    </table>
    <div class="paging">{% paging_control %}</div>
  {% else %}
    <p>There are no photos yet in this gallery.</p>
  {% endif %}

{% endblock %}