annotate gpp/templates/bio/view_profile.html @ 368:b76af55aafe4

For #176; cache the output of the latest poll block template tag.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 Mar 2011 21:00:00 +0000
parents 88b2b9cb8c1f
children e0523e17ea43
rev   line source
gremmie@1 1 {% extends 'bio/base.html' %}
bgneal@310 2 {% load url from future %}
gremmie@1 3 {% load avatar_tags %}
bgneal@29 4 {% load elsewhere_tags %}
bgneal@71 5 {% load core_tags %}
bgneal@125 6 {% load forum_tags %}
gremmie@1 7 {% block title %}User Profile for {{ subject.username }}{% endblock %}
bgneal@125 8 {% block custom_js %}
bgneal@125 9 <script type="text/javascript">
bgneal@125 10 $(document).ready(function() {
bgneal@125 11 $('#bio_profile tr:even').addClass('even');
bgneal@125 12 });
bgneal@125 13 </script>
bgneal@312 14 <script type="text/javascript" src="{{ STATIC_URL }}js/bio.js"></script>
bgneal@125 15 {% endblock %}
gremmie@1 16 {% block content %}
gremmie@1 17 <div class="user_profile">
gremmie@1 18 <h2>User Profile for {{ subject.username }}</h2>
bgneal@178 19 {% if messages %}
bgneal@178 20 <ul class="user-messages">
bgneal@178 21 {% for message in messages %}
bgneal@178 22 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
bgneal@178 23 {% endfor %}
bgneal@178 24 </ul>
bgneal@178 25 {% endif %}
bgneal@232 26 {% if this_is_me %}
bgneal@232 27 <p>{% avatar subject %}
bgneal@232 28 <ul>
bgneal@310 29 <li><a href="{% url 'forums-manage_favorites' %}">My favorite forum topics</a></li>
bgneal@310 30 <li><a href="{% url 'forums-manage_subscriptions' %}">My forum topic subscriptions</a></li>
bgneal@232 31 </ul>
bgneal@232 32 </p>
bgneal@232 33 {% else %}
gremmie@1 34 <p>{% avatar subject %}</p>
bgneal@232 35 {% endif %}
bgneal@125 36 <table id="bio_profile">
gremmie@1 37 <tr><th>Full Name</th><td>{{ subject.get_full_name }}</td></tr>
gremmie@1 38 <tr><th>Date Joined</th><td>{{ subject.date_joined|date:"F d, Y" }}</td></tr>
bgneal@125 39 <tr><th>Last Login</th><td>{% forum_date subject.last_login user %}</td></tr>
bgneal@71 40 <tr><th>Active Member</th><td>{% bool_icon subject.is_active %}</td></tr>
bgneal@71 41 <tr><th>Staff Member</th><td>{% bool_icon subject.is_staff %}</td></tr>
gremmie@1 42 {% if profile.location %}
gremmie@1 43 <tr><th>Location</th><td>{{ profile.location }}</td></tr>
gremmie@1 44 {% endif %}
gremmie@1 45 {% if profile.occupation %}
gremmie@1 46 <tr><th>Occupation</th><td>{{ profile.occupation }}</td></tr>
gremmie@1 47 {% endif %}
gremmie@1 48 {% if profile.birthday %}
gremmie@1 49 <tr><th>Birthday</th><td>{{ profile.birthday|date:"F d" }}</td></tr>
gremmie@1 50 {% endif %}
gremmie@1 51 {% if profile.interests %}
gremmie@1 52 <tr><th>Interests</th><td>{{ profile.interests }}</td></tr>
gremmie@1 53 {% endif %}
gremmie@1 54 {% if not profile.hide_email %}
gremmie@1 55 <tr><th>Email</th><td>{{ subject.email }}</td></tr>
gremmie@1 56 {% endif %}
gremmie@1 57 {% if profile.icq %}
gremmie@1 58 <tr><th>ICQ</th><td>{{ profile.icq }}</td></tr>
gremmie@1 59 {% endif %}
gremmie@1 60 {% if profile.profile_html %}
gremmie@1 61 <tr><th>Profile</th><td>{{ profile.profile_html|safe }}</td></tr>
gremmie@1 62 {% endif %}
gremmie@1 63 {% if profile.signature_html %}
gremmie@1 64 <tr><th>Signature</th><td>{{ profile.signature_html|safe }}</td></tr>
gremmie@1 65 {% endif %}
bgneal@29 66 <tr><th>Elsewhere</th><td>{% elsewhere_links subject %}</td></tr>
bgneal@70 67 <tr><th>Time Zone</th><td>{{ profile.time_zone }}</td></tr>
bgneal@204 68 <tr><th>Badges</th><td>
bgneal@204 69 {% if badge_collection %}
bgneal@204 70 <table id="badge_summary">
bgneal@204 71 <tr><th>Badge</th><th>Qty.</th><th>Name</th><th>Description</th></tr>
bgneal@204 72 {% for bo in badge_collection %}
bgneal@204 73 <tr><td>{{ bo.badge.html|safe }}</td><td>{{ bo.count }}</td><td>{{ bo.badge.name }}</td><td>{{ bo.badge.description }}</td></tr>
bgneal@204 74 {% endfor %}
bgneal@204 75 </table>
bgneal@204 76 {% endif %}
bgneal@204 77 </td></tr>
gremmie@1 78 </table>
gremmie@1 79 </div>
gremmie@1 80 {% if this_is_me %}
bgneal@29 81 <ul class="icon-list">
bgneal@312 82 <li><a href="{% url 'bio-edit_profile' %}"><img src="{{ STATIC_URL }}icons/application_edit.png" alt="Edit Profile" /></a>
bgneal@310 83 <a href="{% url 'bio-edit_profile' %}">Edit Profile</a></li>
bgneal@312 84 <li><a href="{% url 'bio-change_avatar' %}"><img src="{{ STATIC_URL }}icons/image_edit.png" alt="Change Avatar" /></a>
bgneal@310 85 <a href="{% url 'bio-change_avatar' %}">Change Avatar</a></li>
bgneal@312 86 <li><a href="{% url 'bio-edit_elsewhere' %}"><img src="{{ STATIC_URL }}icons/link_edit.png" alt="Edit Links" /></a>
bgneal@310 87 <a href="{% url 'bio-edit_elsewhere' %}">Edit Elsewhere Links</a></li>
bgneal@312 88 <li><a href="{% url 'django.contrib.auth.views.password_change' %}"><img src="{{ STATIC_URL }}icons/key.png" alt="Change Password" /></a>
bgneal@310 89 <a href="{% url 'django.contrib.auth.views.password_change' %}">Change Password</a></li>
gremmie@1 90 </ul>
gremmie@1 91 {% else %}
gremmie@1 92 {% if user.is_authenticated %}
bgneal@138 93 <ul class="icon-list">
bgneal@312 94 <li><a href="{% url 'messages-compose_to' subject.username %}"><img src="{{ STATIC_URL }}icons/note.png" alt="PM" title="Send Private Message" /></a> <a href="{% url 'messages-compose_to' subject.username %}">Send a private message to {{ subject.username }}</a></li>
bgneal@312 95 <li><a href="{% url 'forums-posts_for_user' username=subject.username %}"><img src="{{ STATIC_URL }}icons/comments.png"
bgneal@310 96 alt="Forum Posts" title="View forum posts by {{ subject.username }}" /></a> <a href="{% url 'forums-posts_for_user' username=subject.username %}">View forum posts by {{ subject.username }}</a></li>
bgneal@312 97 <li><img src="{{ STATIC_URL }}icons/flag_red.png" alt="Flag" />
bgneal@138 98 <a href="#" class="profile-flag" id="fp-{{ profile.id }}">Report this profile</a></li>
bgneal@138 99 </ul>
gremmie@1 100 {% endif %}
gremmie@1 101 {% endif %}
gremmie@1 102 {% endblock %}