Mercurial > public > sg101
changeset 125:903ae6168071
Bio: added odd/even styling to profiles. Make member's list viewable to logged in users only.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 14 Nov 2009 20:09:17 +0000 |
parents | 9c18250972d5 |
children | b0d62247c3e4 |
files | gpp/bio/views.py gpp/templates/bio/view_profile.html |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gpp/bio/views.py Sat Nov 14 04:32:32 2009 +0000 +++ b/gpp/bio/views.py Sat Nov 14 20:09:17 2009 +0000 @@ -23,6 +23,7 @@ ####################################################################### +@login_required def member_list(request, type='user', page=1): if type == 'user': users = auth.models.User.objects.all().order_by('username')
--- a/gpp/templates/bio/view_profile.html Sat Nov 14 04:32:32 2009 +0000 +++ b/gpp/templates/bio/view_profile.html Sat Nov 14 20:09:17 2009 +0000 @@ -2,15 +2,23 @@ {% load avatar_tags %} {% load elsewhere_tags %} {% load core_tags %} +{% load forum_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> +{% endblock %} {% block content %} <div class="user_profile"> <h2>User Profile for {{ subject.username }}</h2> <p>{% avatar subject %}</p> -<table> +<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>{{ subject.last_login|date:"F d, Y @ H:i" }}</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 %}</td></tr> <tr><th>Staff Member</th><td>{% bool_icon subject.is_staff %}</td></tr> {% if profile.location %}