# HG changeset patch # User Brian Neal # Date 1379275982 18000 # Node ID 809d27b385f265b0b6a3954448e7d15c53ceb638 # Parent d7a0aaabc06cb46525390abb9bf82dc3716e84ff For user uploaded photos (#50), add a simple gallery view. diff -r d7a0aaabc06c -r 809d27b385f2 sg101/templates/bio/view_profile.html --- a/sg101/templates/bio/view_profile.html Sat Sep 14 18:43:10 2013 -0500 +++ b/sg101/templates/bio/view_profile.html Sun Sep 15 15:13:02 2013 -0500 @@ -26,6 +26,7 @@

{% avatar subject 0 %}

@@ -83,6 +84,8 @@ Edit Profile
  • Change Avatar Change Avatar
  • +
  • Upload Photo + Upload Photo
  • Edit Links Edit Elsewhere Links
  • Change Password @@ -94,6 +97,8 @@
  • PM Send a private message to {{ subject.username }}
  • Forum Posts View forum posts by {{ subject.username }}
  • +
  • View photos View photos uploaded by {{ subject.username }}
  • Flag Report this profile
  • diff -r d7a0aaabc06c -r 809d27b385f2 sg101/templates/core/django_pagination.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sg101/templates/core/django_pagination.html Sun Sep 15 15:13:02 2013 -0500 @@ -0,0 +1,15 @@ + diff -r d7a0aaabc06c -r 809d27b385f2 sg101/templates/user_photos/gallery.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sg101/templates/user_photos/gallery.html Sun Sep 15 15:13:02 2013 -0500 @@ -0,0 +1,36 @@ +{% extends 'base.html' %} +{% load bio_tags %} +{% block title %}Photo Gallery for {{ gallery_owner.username }}{% endblock %} +{% block content %} + +

    Photo Gallery for {{ gallery_owner.username }}

    + +{% if user == gallery_owner %} +

    +You have uploaded {{ paginator.count }} photo{{ paginator.count|pluralize }}. +Would you like to upload a photo? +

    +{% else %} +

    +{% profile_link gallery_owner.username %} has uploaded {{ paginator.count }} photo{{ paginator.count|pluralize }}. +

    +{% endif %} + +{% if photos %} + {% for photo in photos %} +
    + + thumbnail +
    + {% endfor %} + + {% if page_obj %} +
    + {% include 'core/django_pagination.html' %} + {% endif %} +{% else %} +

    Looks like {{ gallery_owner.username }} has no photos at this time.

    +{% endif %} + +{% endblock %} diff -r d7a0aaabc06c -r 809d27b385f2 sg101/templates/user_photos/photo_detail.html --- a/sg101/templates/user_photos/photo_detail.html Sat Sep 14 18:43:10 2013 -0500 +++ b/sg101/templates/user_photos/photo_detail.html Sun Sep 15 15:13:02 2013 -0500 @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% load bio_tags %} {% block title %}User Photo Details{% endblock %} {% block custom_js %}