view sg101/templates/bio/view_profile.html @ 1143:14334b2f2323

Update links on profile page.
author Brian Neal <bgneal@gmail.com>
date Wed, 09 Nov 2016 20:02:14 -0600
parents 1407af5472e4
children b84ce2d7e93d
line wrap: on
line source
{% extends 'v3/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 content %}
<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 %}
<p>
   {% avatar subject 0 %}
</p>
{% if this_is_me %}
<h3>My Stuff</h3>
<div class="stacked-for-small button-group">
   <a class="button" href="{% url 'messages-inbox' %}"
      title="See your private messages">
      <i class="fi-comment"></i> Messages</a>
   <a class="button" href="{% url 'forums-my_posts' %}"
      title="See your forum posts">
      <i class="fi-comments"></i> Forum Posts</a>
   <a class="button" href="{% url 'user_photos-gallery' username=subject.username %}"
      title="View your uploaded photos">
      <i class="fi-photo"></i> Photos</a>
   <a class="button" href="{% url 'forums-manage_favorites' %}"
      title="Manage your forum favorites">
      <i class="fi-bookmark"></i> Favorites</a>
   <a class="button" href="{% url 'forums-manage_subscriptions' %}"
      title="Manage your forum subscriptions">
      <i class="fi-mail"></i> Subscriptions</a>
   <a class="button" href="{% url 'accounts-password_change' %}"
      title="Change your password">
      <i class="fi-key"></i> Password</a>
</div>
<h3>My Profile</h3>
<div class="stacked-for-small button-group">
   <a class="button" href="{% url 'bio-edit_profile' %}">
      <i class="fi-wrench"></i> Edit Profile</a>
   <a class="button" href="{% url 'bio-change_avatar' %}">
      <i class="fi-torso"></i> Change Avatar</a>
</div>
{% else %}
<div class="stacked-for-small button-group">
   <a class="button" href="{% send_pm_url subject.username %}"
      title="Send {{ subject.username }} a private message">
      <i class="fi-comment"></i> Private Message</a>
   {% if not profile.hide_email %}
      <a class="button" href="mailto:{{ subject.email }}"
         title="Send {{ subject.username }} an email">
         <i class="fi-mail"></i> Email</a>
   {% endif %}
   <a class="button" href="{% url 'forums-posts_for_user' username=subject.username %}"
      title="See {{ subject.username }}'s forum posts">
      <i class="fi-comments"></i> Forum Posts</a>
   <a class="button" href="{% url 'user_photos-gallery' username=subject.username %}"
      title="View {{ subject.username }}'s photos">
      <i class="fi-photo"></i> Photos</a>
   <a class="alert button profile-flag" href="#" id="fp-{{ profile.id }}"
      title="Report {{ subject.username }}'s profile">
      <i class="fi-flag"></i> Report Profile</a>
</div>
{% 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><a href="mailto:{{ subject.email }}">{{ subject.email }}</a></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>
</table>
{% if badge_collection %}
<h3>Badges</h3>
<table id="badge_summary" class="sg101-stack">
   <thead>
      <tr><th>Badge</th><th>Qty.</th><th>Name</th><th>Description</th></tr>
   </thead>
   <tbody>
   {% 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 %}
   </tbody>
</table>
{% endif %}
{% endblock %}

{% block custom_js %}
<script src="{% static "js/bio.js" %}"></script>
{% endblock %}