annotate sg101/templates/bio/view_profile.html @ 1032:e932f2ecd4a7

Django 1.8 warnings / tech debt cleanup.
author Brian Neal <bgneal@gmail.com>
date Sat, 26 Dec 2015 15:10:55 -0600
parents 02ae9a4a846a
children 36fa9e9e010b
rev   line source
gremmie@1 1 {% extends 'bio/base.html' %}
bgneal@1018 2 {% load static from staticfiles %}
bgneal@492 3 {% load bio_tags %}
bgneal@29 4 {% load elsewhere_tags %}
bgneal@71 5 {% load core_tags %}
bgneal@125 6 {% load forum_tags %}
bgneal@809 7 {% load messages_tags %}
gremmie@1 8 {% block title %}User Profile for {{ subject.username }}{% endblock %}
bgneal@125 9 {% block custom_js %}
bgneal@125 10 <script type="text/javascript">
bgneal@125 11 $(document).ready(function() {
bgneal@125 12 $('#bio_profile tr:even').addClass('even');
bgneal@125 13 });
bgneal@125 14 </script>
bgneal@1018 15 <script type="text/javascript" src="{% static "js/bio.js" %}"></script>
bgneal@125 16 {% endblock %}
gremmie@1 17 {% block content %}
gremmie@1 18 <div class="user_profile">
gremmie@1 19 <h2>User Profile for {{ subject.username }}</h2>
bgneal@178 20 {% if messages %}
bgneal@178 21 <ul class="user-messages">
bgneal@178 22 {% for message in messages %}
bgneal@178 23 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
bgneal@178 24 {% endfor %}
bgneal@178 25 </ul>
bgneal@178 26 {% endif %}
bgneal@232 27 {% if this_is_me %}
bgneal@492 28 <p>{% avatar subject 0 %}
bgneal@232 29 <ul>
bgneal@482 30 <li><a href="{% url 'forums-my_posts' %}">My forum posts</a></li>
bgneal@704 31 <li><a href="{% url 'user_photos-gallery' username=subject.username %}">My uploaded photos</a></li>
bgneal@310 32 <li><a href="{% url 'forums-manage_favorites' %}">My favorite forum topics</a></li>
bgneal@310 33 <li><a href="{% url 'forums-manage_subscriptions' %}">My forum topic subscriptions</a></li>
bgneal@232 34 </ul>
bgneal@232 35 </p>
bgneal@232 36 {% else %}
bgneal@492 37 <p>{% avatar subject 0 %}</p>
bgneal@232 38 {% endif %}
bgneal@125 39 <table id="bio_profile">
gremmie@1 40 <tr><th>Full Name</th><td>{{ subject.get_full_name }}</td></tr>
gremmie@1 41 <tr><th>Date Joined</th><td>{{ subject.date_joined|date:"F d, Y" }}</td></tr>
bgneal@125 42 <tr><th>Last Login</th><td>{% forum_date subject.last_login user %}</td></tr>
bgneal@604 43 <tr><th>Active Member</th><td>{% bool_icon subject.is_active %} {% profile_status profile %}</td></tr>
bgneal@71 44 <tr><th>Staff Member</th><td>{% bool_icon subject.is_staff %}</td></tr>
gremmie@1 45 {% if profile.location %}
gremmie@1 46 <tr><th>Location</th><td>{{ profile.location }}</td></tr>
gremmie@1 47 {% endif %}
bgneal@609 48 {% if profile.country %}
bgneal@609 49 <tr><th>Country</th><td>{% flag_icon profile.country 'large' %}</td></tr>
bgneal@609 50 {% endif %}
gremmie@1 51 {% if profile.occupation %}
gremmie@1 52 <tr><th>Occupation</th><td>{{ profile.occupation }}</td></tr>
gremmie@1 53 {% endif %}
gremmie@1 54 {% if profile.birthday %}
gremmie@1 55 <tr><th>Birthday</th><td>{{ profile.birthday|date:"F d" }}</td></tr>
gremmie@1 56 {% endif %}
gremmie@1 57 {% if profile.interests %}
gremmie@1 58 <tr><th>Interests</th><td>{{ profile.interests }}</td></tr>
gremmie@1 59 {% endif %}
gremmie@1 60 {% if not profile.hide_email %}
gremmie@1 61 <tr><th>Email</th><td>{{ subject.email }}</td></tr>
gremmie@1 62 {% endif %}
gremmie@1 63 {% if profile.profile_html %}
gremmie@1 64 <tr><th>Profile</th><td>{{ profile.profile_html|safe }}</td></tr>
gremmie@1 65 {% endif %}
gremmie@1 66 {% if profile.signature_html %}
gremmie@1 67 <tr><th>Signature</th><td>{{ profile.signature_html|safe }}</td></tr>
gremmie@1 68 {% endif %}
bgneal@29 69 <tr><th>Elsewhere</th><td>{% elsewhere_links subject %}</td></tr>
bgneal@70 70 <tr><th>Time Zone</th><td>{{ profile.time_zone }}</td></tr>
bgneal@204 71 <tr><th>Badges</th><td>
bgneal@204 72 {% if badge_collection %}
bgneal@204 73 <table id="badge_summary">
bgneal@204 74 <tr><th>Badge</th><th>Qty.</th><th>Name</th><th>Description</th></tr>
bgneal@204 75 {% for bo in badge_collection %}
bgneal@204 76 <tr><td>{{ bo.badge.html|safe }}</td><td>{{ bo.count }}</td><td>{{ bo.badge.name }}</td><td>{{ bo.badge.description }}</td></tr>
bgneal@204 77 {% endfor %}
bgneal@204 78 </table>
bgneal@204 79 {% endif %}
bgneal@204 80 </td></tr>
gremmie@1 81 </table>
gremmie@1 82 </div>
gremmie@1 83 {% if this_is_me %}
bgneal@29 84 <ul class="icon-list">
bgneal@1018 85 <li><a href="{% url 'bio-edit_profile' %}"><img src="{% static "icons/application_edit.png" %}" alt="Edit Profile" /></a>
bgneal@310 86 <a href="{% url 'bio-edit_profile' %}">Edit Profile</a></li>
bgneal@1018 87 <li><a href="{% url 'bio-change_avatar' %}"><img src="{% static "icons/image_edit.png" %}" alt="Change Avatar" /></a>
bgneal@310 88 <a href="{% url 'bio-change_avatar' %}">Change Avatar</a></li>
bgneal@1018 89 <li><a href="{% url 'user_photos-upload' %}"><img src="{% static "icons/picture_add.png" %}" alt="Upload Photo" /></a>
bgneal@704 90 <a href="{% url 'user_photos-upload' %}">Upload Photo</a></li>
bgneal@1018 91 <li><a href="{% url 'bio-edit_elsewhere' %}"><img src="{% static "icons/link_edit.png" %}" alt="Edit Links" /></a>
bgneal@310 92 <a href="{% url 'bio-edit_elsewhere' %}">Edit Elsewhere Links</a></li>
bgneal@1032 93 <li><a href="{% url 'accounts-password_change' %}"><img src="{% static "icons/key.png" %}" alt="Change Password" /></a>
bgneal@1032 94 <a href="{% url 'accounts-password_change' %}">Change Password</a></li>
gremmie@1 95 </ul>
gremmie@1 96 {% else %}
gremmie@1 97 {% if user.is_authenticated %}
bgneal@138 98 <ul class="icon-list">
bgneal@1018 99 <li><a href="{% send_pm_url subject.username %}"><img src="{% static "icons/note.png" %}" alt="PM" title="Send Private Message" /></a> <a href="{% send_pm_url subject.username %}">Send a private message to {{ subject.username }}</a></li>
bgneal@1018 100 <li><a href="{% url 'forums-posts_for_user' username=subject.username %}"><img src="{% static "icons/comments.png" %}"
bgneal@310 101 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@1018 102 <li><a href="{% url 'user_photos-gallery' username=subject.username %}"><img src="{% static "icons/pictures.png" %}"
bgneal@704 103 alt="View photos" title="View photos uploaded by {{ subject.username }}" /></a> <a href="{% url 'user_photos-gallery' username=subject.username %}">View photos uploaded by {{ subject.username }}</a></li>
bgneal@1018 104 <li><img src="{% static "icons/flag_red.png" %}" alt="Flag" />
bgneal@138 105 <a href="#" class="profile-flag" id="fp-{{ profile.id }}">Report this profile</a></li>
bgneal@138 106 </ul>
gremmie@1 107 {% endif %}
gremmie@1 108 {% endif %}
gremmie@1 109 {% endblock %}