Mercurial > public > sg101
view 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 |
line wrap: on
line source
{% extends 'bio/base.html' %} {% load static from staticfiles %} {% load bio_tags %} {% load elsewhere_tags %} {% load core_tags %} {% load forum_tags %} {% load messages_tags %} {% block title %}User Profile for {{ subject.username }}{% endblock %} {% block custom_js %} <script type="text/javascript"> $(document).ready(function() { $('#bio_profile tr:even').addClass('even'); }); </script> <script type="text/javascript" src="{% static "js/bio.js" %}"></script> {% endblock %} {% block content %} <div class="user_profile"> <h2>User Profile for {{ subject.username }}</h2> {% if messages %} <ul class="user-messages"> {% for message in messages %} <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li> {% endfor %} </ul> {% endif %} {% if this_is_me %} <p>{% avatar subject 0 %} <ul> <li><a href="{% url 'forums-my_posts' %}">My forum posts</a></li> <li><a href="{% url 'user_photos-gallery' username=subject.username %}">My uploaded photos</a></li> <li><a href="{% url 'forums-manage_favorites' %}">My favorite forum topics</a></li> <li><a href="{% url 'forums-manage_subscriptions' %}">My forum topic subscriptions</a></li> </ul> </p> {% else %} <p>{% avatar subject 0 %}</p> {% endif %} <table id="bio_profile"> <tr><th>Full Name</th><td>{{ subject.get_full_name }}</td></tr> <tr><th>Date Joined</th><td>{{ subject.date_joined|date:"F d, Y" }}</td></tr> <tr><th>Last Login</th><td>{% forum_date subject.last_login user %}</td></tr> <tr><th>Active Member</th><td>{% bool_icon subject.is_active %} {% profile_status profile %}</td></tr> <tr><th>Staff Member</th><td>{% bool_icon subject.is_staff %}</td></tr> {% if profile.location %} <tr><th>Location</th><td>{{ profile.location }}</td></tr> {% endif %} {% if profile.country %} <tr><th>Country</th><td>{% flag_icon profile.country 'large' %}</td></tr> {% endif %} {% if profile.occupation %} <tr><th>Occupation</th><td>{{ profile.occupation }}</td></tr> {% endif %} {% if profile.birthday %} <tr><th>Birthday</th><td>{{ profile.birthday|date:"F d" }}</td></tr> {% endif %} {% if profile.interests %} <tr><th>Interests</th><td>{{ profile.interests }}</td></tr> {% endif %} {% if not profile.hide_email %} <tr><th>Email</th><td>{{ subject.email }}</td></tr> {% endif %} {% if profile.profile_html %} <tr><th>Profile</th><td>{{ profile.profile_html|safe }}</td></tr> {% endif %} {% if profile.signature_html %} <tr><th>Signature</th><td>{{ profile.signature_html|safe }}</td></tr> {% endif %} <tr><th>Elsewhere</th><td>{% elsewhere_links subject %}</td></tr> <tr><th>Time Zone</th><td>{{ profile.time_zone }}</td></tr> <tr><th>Badges</th><td> {% if badge_collection %} <table id="badge_summary"> <tr><th>Badge</th><th>Qty.</th><th>Name</th><th>Description</th></tr> {% for bo in badge_collection %} <tr><td>{{ bo.badge.html|safe }}</td><td>{{ bo.count }}</td><td>{{ bo.badge.name }}</td><td>{{ bo.badge.description }}</td></tr> {% endfor %} </table> {% endif %} </td></tr> </table> </div> {% if this_is_me %} <ul class="icon-list"> <li><a href="{% url 'bio-edit_profile' %}"><img src="{% static "icons/application_edit.png" %}" alt="Edit Profile" /></a> <a href="{% url 'bio-edit_profile' %}">Edit Profile</a></li> <li><a href="{% url 'bio-change_avatar' %}"><img src="{% static "icons/image_edit.png" %}" alt="Change Avatar" /></a> <a href="{% url 'bio-change_avatar' %}">Change Avatar</a></li> <li><a href="{% url 'user_photos-upload' %}"><img src="{% static "icons/picture_add.png" %}" alt="Upload Photo" /></a> <a href="{% url 'user_photos-upload' %}">Upload Photo</a></li> <li><a href="{% url 'bio-edit_elsewhere' %}"><img src="{% static "icons/link_edit.png" %}" alt="Edit Links" /></a> <a href="{% url 'bio-edit_elsewhere' %}">Edit Elsewhere Links</a></li> <li><a href="{% url 'accounts-password_change' %}"><img src="{% static "icons/key.png" %}" alt="Change Password" /></a> <a href="{% url 'accounts-password_change' %}">Change Password</a></li> </ul> {% else %} {% if user.is_authenticated %} <ul class="icon-list"> <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> <li><a href="{% url 'forums-posts_for_user' username=subject.username %}"><img src="{% static "icons/comments.png" %}" 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> <li><a href="{% url 'user_photos-gallery' username=subject.username %}"><img src="{% static "icons/pictures.png" %}" 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> <li><img src="{% static "icons/flag_red.png" %}" alt="Flag" /> <a href="#" class="profile-flag" id="fp-{{ profile.id }}">Report this profile</a></li> </ul> {% endif %} {% endif %} {% endblock %}