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>
</ul>
<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>
<a href="/notification"><span>Messages</span>
{% if unseen_count %}
@ -116,7 +116,7 @@
{% endif %}
</a>
</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 auth_logout %}"><span>Sign Out</span></a></li>
</ul>

View File

@ -58,18 +58,18 @@
<div class="image">
<a href="{% url work id %}?tab=2"><img src="{{ comment.content_object.cover_image_thumbnail }}" alt="cover image" /></a>
</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>
</div>
<div class="avatar">
<a href="{% url supporter supporter_username=user %}">
{% 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 }}" />
{% else %}
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
{% endif %}
<a href="{% url supporter comment.user %}">
</a>
</div>
</div>

View File

@ -2,7 +2,7 @@
{% 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 %}">
<a href="{% url supporter supporter_username=comment.user.username %}">
<a href="{% url supporter comment.user %}">
<div class="work_supporter_avatar">
{% 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 }}" />

View File

@ -20,7 +20,7 @@
{% else %}
<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 %}">
<a href="{% url supporter supporter_username=user.username %}">
<a href="{% url supporter user %}">
<div class="work_supporter_avatar">
{% if user.profile.pic_url %}
<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>
<ul class="menu level2">
{% for ungluer in ungluers %}
<li class="first"><a href="{% url supporter supporter_username=ungluer %}">
{% if ungluer.profile.pic_url %}
<img src="{{ungluer.profile.pic_url}}" height="30" width="30" alt="{{ungluer}}" title="{{ungluer}}" /></a>
{% else %}
<img src="/static/images/header/avatar.png" height="30" width="30" alt="Generic Ungluer Avatar" /></a>
{% 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>
{% endfor %}
</ul>

View File

@ -72,7 +72,7 @@
</div>
{% else %}
<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>
{% endif %}
@ -149,7 +149,7 @@
</div>
{% else %}
<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>
{% 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.
Brief text, graphics-oriented info like user avatars and campaign status icons.
e.g.:
<a href="{% url supporter supporter %}">
{% 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 }}" />
{% else %}
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
{% endif %}
<a href="{% url supporter comment.user %}">
</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 />
</span>
<hr />

View File

@ -8,6 +8,6 @@
<p><b>Tagline:</b> {{ profile.tagline }}</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>
{% endblock content %}

View File

@ -9,7 +9,7 @@ Oops &ndash; it seems that your activation key is invalid. Please check the url
{% endif %}
{% else %}
<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>
{% endif %}
{% endblock %}

View File

@ -14,7 +14,7 @@
</div>
{% else %}
<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>
{% endif %}
{% endblock %}

View File

@ -22,7 +22,7 @@ Make sure the username box has your <b>username, not your email</b> -- some brow
</div>
{% else %}
<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>
{% endif %}
</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.
{% else %}
<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>
{% endif %}

View File

@ -19,7 +19,7 @@
</div>
{% else %}
<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>
{% endif %}

View File

@ -25,7 +25,7 @@
<dt>{{ rights_holder.rights_holder_name }}</dt>
<dd>PSA #: {{ rights_holder.id }}
<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 %}
<p>No rights holders have been accepted yet</p>
{% endfor %}

View File

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