moves edit profile link to user page
authorCaleb Forbes Davis V <caldavis@gmail.com>
Sun, 3 Jul 2011 07:37:19 +0000 (02:37 -0500)
committerCaleb Forbes Davis V <caldavis@gmail.com>
Sun, 3 Jul 2011 07:37:19 +0000 (02:37 -0500)
mediagoblin/templates/mediagoblin/root.html
mediagoblin/templates/mediagoblin/user_pages/user.html

index e29abd514707d6c2d71622af5bd09cb8fc9a05ca..5b7449994248be1c97dd3bc59a313ddef144f57d 100644 (file)
@@ -23,7 +23,6 @@
   {% if request.user %}
     <p>
       <a href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit an item</a> 
-      <a href="{{ request.urlgen('mediagoblin.edit.profile') }}">Edit profile</a>
     </p>
   {% else %}
     <p>
index 99e46a72e880518df4021c5465303b38ae0bd97a..22defcbdc9e410157883622b52c4e3633af89b04 100644 (file)
 {% block mediagoblin_content -%}
   {% if user %}
     <h1>{{ user.username }}'s profile</h1>
+    {% if request.user == user.username or request.user['is_admin'] %}
+       <a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{ 
+           user.username }}"> Edit</a>
+    {% endif %}
     
     {% include "mediagoblin/utils/profile.html" %}