normalize invocation of supporter url, fix wrong user for comment links

pull/1/head
eric 2013-03-14 15:33:00 -04:00
parent 88a241fafd
commit 6143c6a3aa
15 changed files with 21 additions and 21 deletions

View File

@ -106,7 +106,7 @@
</li> </li>
</ul> </ul>
<ul id="user_menu"> <ul id="user_menu">
<li><a href="{% url supporter supporter_username=user.username %}">Wishlist</a></li> <li><a href="{% url supporter user %}">Wishlist</a></li>
<li> <li>
<a href="/notification"><span>Messages</span> <a href="/notification"><span>Messages</span>
{% if unseen_count %} {% if unseen_count %}
@ -116,7 +116,7 @@
{% endif %} {% endif %}
</a> </a>
</li> </li>
<li><a href="{% url supporter supporter_username=user.username %}#edit" id="profile_edit"><span>Profile Settings</span></a></li> <li><a href="{% url supporter user %}#edit" id="profile_edit"><span>Profile Settings</span></a></li>
<li><a href="{% url manage_account %}"><span>Account &amp; Pledges</span></a></li> <li><a href="{% url manage_account %}"><span>Account &amp; Pledges</span></a></li>
<li><a href="{% url auth_logout %}"><span>Sign Out</span></a></li> <li><a href="{% url auth_logout %}"><span>Sign Out</span></a></li>
</ul> </ul>

View File

@ -58,18 +58,18 @@
<div class="image"> <div class="image">
<a href="{% url work id %}?tab=2"><img src="{{ comment.content_object.cover_image_thumbnail }}" alt="cover image" /></a> <a href="{% url work id %}?tab=2"><img src="{{ comment.content_object.cover_image_thumbnail }}" alt="cover image" /></a>
</div> </div>
<span><a href="{% url supporter supporter_username=user %}">{{ comment.user.username }}</a> on <a href="{% url work id %}?tab=2">{{ comment.content_object.title }}</a></span><br /> <span><a href="{% url supporter comment.user %}">{{ comment.user.username }}</a> on <a href="{% url work id %}?tab=2">{{ comment.content_object.title }}</a></span><br />
<span class="text">{{ comment.comment|linebreaksbr }}</span> <span class="text">{{ comment.comment|linebreaksbr }}</span>
</div> </div>
<div class="avatar"> <div class="avatar">
<a href="{% url supporter supporter_username=user %}">
{% if supporter.profile.pic_url %} {% if supporter.profile.pic_url %}
<img class="user-avatar" src="{{ comment.user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ comment.user }}" title="{{ comment.user }}" /> <img class="user-avatar" src="{{ comment.user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ comment.user }}" title="{{ comment.user }}" />
{% else %} {% else %}
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" /> <img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
{% endif %} {% endif %}
<a href="{% url supporter comment.user %}">
</a> </a>
</div> </div>
</div> </div>

View File

@ -2,7 +2,7 @@
{% for comment in comment_list reversed %} {% for comment in comment_list reversed %}
<div class="work_supporter {% if comment.content_object.last_campaign and comment.user in comment.content_object.last_campaign.managers.all %}official{% endif %}"> <div class="work_supporter {% if comment.content_object.last_campaign and comment.user in comment.content_object.last_campaign.managers.all %}official{% endif %}">
<a href="{% url supporter supporter_username=comment.user.username %}"> <a href="{% url supporter comment.user %}">
<div class="work_supporter_avatar"> <div class="work_supporter_avatar">
{% if comment.user.profile.pic_url %} {% if comment.user.profile.pic_url %}
<img class="user-avatar" src="{{ comment.user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ comment.user }}" title="{{ comment.user }}" /> <img class="user-avatar" src="{{ comment.user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ comment.user }}" title="{{ comment.user }}" />

View File

@ -20,7 +20,7 @@
{% else %} {% else %}
<h1>{% trans "Preview your comment" %}</h1> <h1>{% trans "Preview your comment" %}</h1>
<div class="work_supporter {% if content_object.last_campaign and user in content_object.last_campaign.managers.all %}official{% endif %}"> <div class="work_supporter {% if content_object.last_campaign and user in content_object.last_campaign.managers.all %}official{% endif %}">
<a href="{% url supporter supporter_username=user.username %}"> <a href="{% url supporter user %}">
<div class="work_supporter_avatar"> <div class="work_supporter_avatar">
{% if user.profile.pic_url %} {% if user.profile.pic_url %}
<img class="user-avatar" src="{{ user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ user }}" title="{{ user }}" /> <img class="user-avatar" src="{{ user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ user }}" title="{{ user }}" />

View File

@ -47,13 +47,13 @@
<span>Ungluers</span> <span>Ungluers</span>
<ul class="menu level2"> <ul class="menu level2">
{% for ungluer in ungluers %} {% for ungluer in ungluers %}
<li class="first"><a href="{% url supporter supporter_username=ungluer %}">
{% if ungluer.profile.pic_url %} {% if ungluer.profile.pic_url %}
<img src="{{ungluer.profile.pic_url}}" height="30" width="30" alt="{{ungluer}}" title="{{ungluer}}" /></a> <img src="{{ungluer.profile.pic_url}}" height="30" width="30" alt="{{ungluer}}" title="{{ungluer}}" /></a>
{% else %} {% else %}
<img src="/static/images/header/avatar.png" height="30" width="30" alt="Generic Ungluer Avatar" /></a> <img src="/static/images/header/avatar.png" height="30" width="30" alt="Generic Ungluer Avatar" /></a>
{% endif %} {% endif %}
<a href="{% url supporter supporter_username=ungluer %}"><span class="ungluer-name">{{ungluer|truncatechars:20}}</span> <li class="first"><a href="{% url supporter ungluer %}">
<a href="{% url supporter ungluer %}"><span class="ungluer-name">{{ungluer|truncatechars:20}}</span>
</a></li> </a></li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -72,7 +72,7 @@
</div> </div>
{% else %} {% else %}
<div> <div>
You are logged in as <a href="{% url supporter supporter_username=request.user.username %}">{{ request.user.username }}</a>. You are logged in as <a href="{% url supporter request.user %}">{{ request.user.username }}</a>.
</div> </div>
{% endif %} {% endif %}
@ -149,7 +149,7 @@
</div> </div>
{% else %} {% else %}
<div> <div>
You are logged in as <a href="{% url supporter supporter_username=request.user.username %}">{{ request.user.username }}</a>. You are logged in as <a href="{% url supporter request.user %}">{{ request.user.username }}</a>.
</div> </div>
{% endif %} {% endif %}

View File

@ -20,14 +20,14 @@ tweet, FB, email sharing show up. Include a {% url work your.local.work.id as w
This is where you put your headline. This is where you put your headline.
Brief text, graphics-oriented info like user avatars and campaign status icons. Brief text, graphics-oriented info like user avatars and campaign status icons.
e.g.: e.g.:
<a href="{% url supporter supporter %}">
{% if supporter.profile.pic_url %} {% if supporter.profile.pic_url %}
<img class="user-avatar" src="{{ comment.user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ comment.user }}" title="{{ comment.user }}" /> <img class="user-avatar" src="{{ comment.user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ comment.user }}" title="{{ comment.user }}" />
{% else %} {% else %}
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" /> <img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
{% endif %} {% endif %}
<a href="{% url supporter comment.user %}">
</a> </a>
<span><a href="{% url supporter supporter %}">{{ comment.user.username }}</a> on <a href="{{ work_url }}?tab=2">{{ comment.content_object.title }}</a></span>{% endcomment %}{% endblock %} <span><a href="{% url supporter comment.user %}">{{ comment.user.username }}</a> on <a href="{{ work_url }}?tab=2">{{ comment.content_object.title }}</a></span>{% endcomment %}{% endblock %}
<br /><i>{% now "M d Y, h:i A"%}</i><br /> <br /><i>{% now "M d Y, h:i A"%}</i><br />
</span> </span>
<hr /> <hr />

View File

@ -8,6 +8,6 @@
<p><b>Tagline:</b> {{ profile.tagline }}</p> <p><b>Tagline:</b> {{ profile.tagline }}</p>
<p><a href="/profiles/edit/">Edit Again</a></p> <p><a href="/profiles/edit/">Edit Again</a></p>
<p><a href="{% url supporter supporter_username=user %}/">{{user}}'s Unglue.it Page</a></p> <p><a href="{% url supporter user %}/">{{user}}'s Unglue.it Page</a></p>
</div> </div>
{% endblock content %} {% endblock content %}

View File

@ -9,7 +9,7 @@ Oops &ndash; it seems that your activation key is invalid. Please check the url
{% endif %} {% endif %}
{% else %} {% else %}
<div> <div>
You are logged in as <a href="{% url supporter supporter_username=request.user.username %}">{{ request.user.username }}</a>. You are logged in as <a href="{% url supporter request.user %}">{{ request.user.username }}</a>.
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -14,7 +14,7 @@
</div> </div>
{% else %} {% else %}
<div> <div>
You are already logged in as <a href="{% url supporter supporter_username=user.username %}">{{ user.username }}</a>. You are already logged in as <a href="{% url supporter user.username %}">{{ user.username }}</a>.
</div> </div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -22,7 +22,7 @@ Make sure the username box has your <b>username, not your email</b> -- some brow
</div> </div>
{% else %} {% else %}
<div> <div>
You are already logged in as <a href="{% url supporter supporter_username=user.username %}">{{ user.username }}</a>. You are already logged in as <a href="{% url supporter user %}">{{ user.username }}</a>.
</div> </div>
{% endif %} {% endif %}
</div> </div>

View File

@ -6,7 +6,7 @@
An account activation email has been sent. Please check your email and click on the link to activate your account. We're also sending you an invitation to our email newsletter. It comes out about twice a month. Put "gluenews@gluejar.com" in your contact list to make sure you get it. An account activation email has been sent. Please check your email and click on the link to activate your account. We're also sending you an invitation to our email newsletter. It comes out about twice a month. Put "gluenews@gluejar.com" in your contact list to make sure you get it.
{% else %} {% else %}
<div> <div>
You are logged in as <a href="{% url supporter supporter_username=request.user.username %}">{{ request.user.username }}</a>. You are logged in as <a href="{% url supporter request.user %}">{{ request.user.username }}</a>.
</div> </div>
{% endif %} {% endif %}

View File

@ -19,7 +19,7 @@
</div> </div>
{% else %} {% else %}
<div> <div>
You are already logged in as <a href="{% url supporter supporter_username=user.username %}">{{ user.username }}</a>. You are already logged in as <a href="{% url supporter user %}">{{ user.username }}</a>.
</div> </div>
{% endif %} {% endif %}

View File

@ -25,7 +25,7 @@
<dt>{{ rights_holder.rights_holder_name }}</dt> <dt>{{ rights_holder.rights_holder_name }}</dt>
<dd>PSA #: {{ rights_holder.id }} <dd>PSA #: {{ rights_holder.id }}
<br />email: {{ rights_holder.email }} <br />email: {{ rights_holder.email }}
<br />owner: <a href="{% url supporter supporter_username=rights_holder.owner %}">{{ rights_holder.owner }}</a></dd> <br />owner: <a href="{% url supporter rights_holder.owner %}">{{ rights_holder.owner }}</a></dd>
{% empty %} {% empty %}
<p>No rights holders have been accepted yet</p> <p>No rights holders have been accepted yet</p>
{% endfor %} {% endfor %}

View File

@ -255,7 +255,7 @@
{% for wish in work.wishes.all reversed %} {% for wish in work.wishes.all reversed %}
{% with wish.wishlist.user as supporter %} {% with wish.wishlist.user as supporter %}
<div class="work_supporter_wide"> <div class="work_supporter_wide">
<a href="{% url supporter supporter_username=supporter.username %}"> <a href="{% url supporter supporter %}">
<div class="work_supporter_avatar"> <div class="work_supporter_avatar">
{% if supporter.profile.pic_url %} {% if supporter.profile.pic_url %}
<img class="user-avatar" src="{{ supporter.profile.pic_url }}" height="50" width="50" alt="Picture of {{ supporter }}" title="{{ supporter }}" /> <img class="user-avatar" src="{{ supporter.profile.pic_url }}" height="50" width="50" alt="Picture of {{ supporter }}" title="{{ supporter }}" />
@ -283,7 +283,7 @@
{% for wish in work.wishes.all reversed %} {% for wish in work.wishes.all reversed %}
{% with wish.wishlist.user as supporter %} {% with wish.wishlist.user as supporter %}
<div class="work_supporter_nocomment"> <div class="work_supporter_nocomment">
<a href="{% url supporter supporter_username=supporter.username %}"> <a href="{% url supporter supporter %}">
<div class="work_supporter_avatar"> <div class="work_supporter_avatar">
{% if supporter.profile.pic_url %} {% if supporter.profile.pic_url %}
<img class="user-avatar" src="{{ supporter.profile.pic_url }}" height="50" width="50" alt="Picture of {{ supporter }}" title="{{ supporter }}" /> <img class="user-avatar" src="{{ supporter.profile.pic_url }}" height="50" width="50" alt="Picture of {{ supporter }}" title="{{ supporter }}" />