annotate gpp/templates/bio/view_profile.html @ 197:2baadae33f2e

Got autocomplete working for the member search. Updated django and ran into a bug where url tags with comma separated kwargs starting consuming tons of CPU throughput. The work-around is to cut over to using spaces between arguments. This is now allowed to be consistent with other tags. Did some query optimization for the news app.
author Brian Neal <bgneal@gmail.com>
date Sat, 10 Apr 2010 04:32:24 +0000
parents d51743322bb2
children b4305e18d3af
rev   line source
gremmie@1 1 {% extends 'bio/base.html' %}
gremmie@1 2 {% load avatar_tags %}
bgneal@29 3 {% load elsewhere_tags %}
bgneal@71 4 {% load core_tags %}
bgneal@125 5 {% load forum_tags %}
gremmie@1 6 {% block title %}User Profile for {{ subject.username }}{% endblock %}
bgneal@125 7 {% block custom_js %}
bgneal@125 8 <script type="text/javascript">
bgneal@125 9 $(document).ready(function() {
bgneal@125 10 $('#bio_profile tr:even').addClass('even');
bgneal@125 11 });
bgneal@125 12 </script>
bgneal@138 13 <script type="text/javascript" src="{{ MEDIA_URL }}js/bio.js"></script>
bgneal@125 14 {% endblock %}
gremmie@1 15 {% block content %}
gremmie@1 16 <div class="user_profile">
gremmie@1 17 <h2>User Profile for {{ subject.username }}</h2>
bgneal@178 18 {% if messages %}
bgneal@178 19 <ul class="user-messages">
bgneal@178 20 {% for message in messages %}
bgneal@178 21 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
bgneal@178 22 {% endfor %}
bgneal@178 23 </ul>
bgneal@178 24 {% endif %}
gremmie@1 25 <p>{% avatar subject %}</p>
bgneal@125 26 <table id="bio_profile">
gremmie@1 27 <tr><th>Full Name</th><td>{{ subject.get_full_name }}</td></tr>
gremmie@1 28 <tr><th>Date Joined</th><td>{{ subject.date_joined|date:"F d, Y" }}</td></tr>
bgneal@125 29 <tr><th>Last Login</th><td>{% forum_date subject.last_login user %}</td></tr>
bgneal@71 30 <tr><th>Active Member</th><td>{% bool_icon subject.is_active %}</td></tr>
bgneal@71 31 <tr><th>Staff Member</th><td>{% bool_icon subject.is_staff %}</td></tr>
gremmie@1 32 {% if profile.location %}
gremmie@1 33 <tr><th>Location</th><td>{{ profile.location }}</td></tr>
gremmie@1 34 {% endif %}
gremmie@1 35 {% if profile.occupation %}
gremmie@1 36 <tr><th>Occupation</th><td>{{ profile.occupation }}</td></tr>
gremmie@1 37 {% endif %}
gremmie@1 38 {% if profile.birthday %}
gremmie@1 39 <tr><th>Birthday</th><td>{{ profile.birthday|date:"F d" }}</td></tr>
gremmie@1 40 {% endif %}
gremmie@1 41 {% if profile.interests %}
gremmie@1 42 <tr><th>Interests</th><td>{{ profile.interests }}</td></tr>
gremmie@1 43 {% endif %}
gremmie@1 44 {% if not profile.hide_email %}
gremmie@1 45 <tr><th>Email</th><td>{{ subject.email }}</td></tr>
gremmie@1 46 {% endif %}
gremmie@1 47 {% if profile.icq %}
gremmie@1 48 <tr><th>ICQ</th><td>{{ profile.icq }}</td></tr>
gremmie@1 49 {% endif %}
gremmie@1 50 {% if profile.profile_html %}
gremmie@1 51 <tr><th>Profile</th><td>{{ profile.profile_html|safe }}</td></tr>
gremmie@1 52 {% endif %}
gremmie@1 53 {% if profile.signature_html %}
gremmie@1 54 <tr><th>Signature</th><td>{{ profile.signature_html|safe }}</td></tr>
gremmie@1 55 {% endif %}
bgneal@29 56 <tr><th>Elsewhere</th><td>{% elsewhere_links subject %}</td></tr>
bgneal@70 57 <tr><th>Time Zone</th><td>{{ profile.time_zone }}</td></tr>
gremmie@1 58 </table>
gremmie@1 59 </div>
gremmie@1 60 {% if this_is_me %}
bgneal@29 61 <ul class="icon-list">
gremmie@1 62 <li><a href="{% url bio-edit_profile %}"><img src="{{ MEDIA_URL }}icons/application_edit.png" alt="Edit Profile" /></a>
gremmie@1 63 <a href="{% url bio-edit_profile %}">Edit Profile</a></li>
gremmie@1 64 <li><a href="{% url bio-change_avatar %}"><img src="{{ MEDIA_URL }}icons/image_edit.png" alt="Change Avatar" /></a>
gremmie@1 65 <a href="{% url bio-change_avatar %}">Change Avatar</a></li>
bgneal@31 66 <li><a href="{% url bio-edit_elsewhere %}"><img src="{{ MEDIA_URL }}icons/link_edit.png" alt="Edit Links" /></a>
bgneal@31 67 <a href="{% url bio-edit_elsewhere %}">Edit Elsewhere Links</a></li>
gremmie@1 68 <li><a href="{% url django.contrib.auth.views.password_change %}"><img src="{{ MEDIA_URL }}icons/key.png" alt="Change Password" /></a>
gremmie@1 69 <a href="{% url django.contrib.auth.views.password_change %}">Change Password</a></li>
gremmie@1 70 </ul>
gremmie@1 71 {% else %}
gremmie@1 72 {% if user.is_authenticated %}
bgneal@138 73 <ul class="icon-list">
bgneal@138 74 <li><a href="{% url messages-compose_to subject.username %}"><img src="{{ MEDIA_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@172 75 <li><a href="{% url forums-posts_for_user username=subject.username %}"><img src="{{ MEDIA_URL }}icons/comments.png"
bgneal@172 76 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@138 77 <li><img src="{{ MEDIA_URL }}icons/flag_red.png" alt="Flag" />
bgneal@138 78 <a href="#" class="profile-flag" id="fp-{{ profile.id }}">Report this profile</a></li>
bgneal@138 79 </ul>
gremmie@1 80 {% endif %}
gremmie@1 81 {% endif %}
gremmie@1 82 {% endblock %}