diff options
| author | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-07-05 11:53:09 -0400 |
|---|---|---|
| committer | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-07-05 11:53:09 -0400 |
| commit | 3db8dd7d9328e38fbc8eacf0f7553778bc31d94f (patch) | |
| tree | ace66373e47453b92f8c7b7e51aae9c3c7e9c836 /templates | |
| parent | e39e81586dd268ce0cc5009f1c4b32a6985f8274 (diff) | |
Display message snippet on user profile page
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 2 | ||||
| -rw-r--r-- | templates/user_profile.html | 30 |
2 files changed, 29 insertions, 3 deletions
diff --git a/templates/base.html b/templates/base.html index ee1f66e..0ae6d4c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,7 +3,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="ROBOTS" content="INDEX, FOLLOW" /> - <title>{% block title %}{{ app_name }}{% endblock %}</title> + <title>{% block title %}{{ app_name|title }}{% endblock %}</title> <meta name="author" content="" /> <meta name="dc.language" content="en" /> <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/normalize.css" /> diff --git a/templates/user_profile.html b/templates/user_profile.html index 057ef6b..f0aa27e 100644 --- a/templates/user_profile.html +++ b/templates/user_profile.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n %} +{% load poll_extras %} {% block content %} <h1>User Profile <span>- {{ user }}</span></h1> @@ -32,12 +33,37 @@ </tr> </tbody> </table> - <h2> Votes : </h2> + <h3> Up Votes : </h3> <ul> {% for vote in user_profile.votes %} - <li><a href="/message/{{vote.list_address}}/{{vote.messageid}}">{{ vote.vote }}</a></li> + {% if vote.vote == 1 %} + <li> + {% if vote.message.content|trimString|length > 0 %} + <a href="/message/{{vote.list_address}}/{{vote.messageid}}">{{ vote.message.content|truncatechars:20 }}</a> + {% else %} + <a href="/message/{{vote.list_address}}/{{vote.messageid}}">Message is empty</a> + {% endif %} + </li> + {% endif %} {% endfor %} </ul> + <h3> Down Votes : </h3> + + <ul> + {% for vote in user_profile.votes %} + {% if vote.vote == -1 %} + <li> + {% if vote.message.content|trimString|length > 0 %} + <a href="/message/{{vote.list_address}}/{{vote.messageid}}">{{ vote.message.content|truncatechars:20 }}</a> + {% else %} + <a href="/message/{{vote.list_address}}/{{vote.messageid}}">Message is empty</a> + {% endif %} + </li> + {% endif %} + {% endfor %} + </ul> + + {% endblock %} |
