[extensions-web: 12/75] Linkify the user's name in a lot of places it appears.



commit f4858ffd7f77c427809cfcd78559ef0de3987985
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Sep 13 14:16:28 2011 -0400

    Linkify the user's name in a lot of places it appears.

 .../extensions/templates/extensions/detail.html    |    2 +-
 .../extensions/templates/extensions/list.html      |    2 +-
 .../review/templates/review/review_table.html      |    2 +-
 sweettooth/static/js/extensions.js                 |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/sweettooth/extensions/templates/extensions/detail.html b/sweettooth/extensions/templates/extensions/detail.html
index fea83e8..2889c55 100644
--- a/sweettooth/extensions/templates/extensions/detail.html
+++ b/sweettooth/extensions/templates/extensions/detail.html
@@ -32,7 +32,7 @@
       {% endif %}
 
       <h3 id="extension_name">{{ extension.name }}</h3>
-      <span class="author">by {{ extension.creator }}</span>
+      <span class="author">by <a href="{% url auth-profile user=extension.creator.username %}">{{ extension.creator }}</a></span>
       <p class="description" id="extension_description">
         {{ extension.description }}
       </p>
diff --git a/sweettooth/extensions/templates/extensions/list.html b/sweettooth/extensions/templates/extensions/list.html
index c9243f8..cb39921 100644
--- a/sweettooth/extensions/templates/extensions/list.html
+++ b/sweettooth/extensions/templates/extensions/list.html
@@ -9,7 +9,7 @@
       {% endif %}
 
       <h3><a href="{% url extensions-detail pk=extension.pk %}" class="title-link">{{ extension.name }}</a></h3>
-      <span class="author">by {{ extension.creator }}</span>
+      <span class="author">by <a href="{% url auth-profile user=extension.creator.username %}">{{ extension.creator }}</a></span>
       <p class="description">
         {{ extension.description }}
       </p>
diff --git a/sweettooth/review/templates/review/review_table.html b/sweettooth/review/templates/review/review_table.html
index e026c02..7f193a0 100644
--- a/sweettooth/review/templates/review/review_table.html
+++ b/sweettooth/review/templates/review/review_table.html
@@ -17,7 +17,7 @@
           {{ review.version.version }}
         </a>
       </td>
-      <td>{{ review.reviewer }}</td>
+      <td><a href="{% url auth-profile user=review.reviewer.username %}">{{ review.reviewer }}</a></td>
       <td>{{ review.date }}</td>
       <td>{{ review.comments }}</td>
       <td>
diff --git a/sweettooth/static/js/extensions.js b/sweettooth/static/js/extensions.js
index 06e208d..1824533 100644
--- a/sweettooth/static/js/extensions.js
+++ b/sweettooth/static/js/extensions.js
@@ -140,7 +140,7 @@ function($, messages, dbusProxy) {
                     type: "GET",
                 }).done(function(result) {
                     $elem.
-                        find('span.author').text(" by " + result.creator).end().
+                        find('span.author').html(" by <a href=\"/accounts/profile/"+result.creator+"\">"+result.creator+"</a>").end().
                         find('h3').html($('<a>', {'href': result.link}).text(extension.name)).end().
                         find('img.icon').attr('src', result.icon);
                 });



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]