Make "needs verification" link only appear if you need verification really.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 29 Jul 2011 02:20:32 +0000 (21:20 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 29 Jul 2011 02:20:32 +0000 (21:20 -0500)
mediagoblin/templates/mediagoblin/base.html

index 22a691b5a9e481c5bdb6a8a2311948c6376c0e72..8e3b0724b6aec7bbeb54cdf6cb1c4cf4a8a6942b 100644 (file)
                 <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
                                             user= request.user['username']) }}">
                   {{ request.user['username'] }}</a>'s account 
-                <!-- the following link should only appear when verification is needed -->
-                <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
-                                            user= request.user['username']) }}" class="highlight">
-                  needs verification!</a>
+
+                {# the following link should only appear when verification is needed #}
+                {% if request.user.status == "needs_email_verification" %}
+                  <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
+                                              user=request.user['username']) }}"
+                     class="highlight">
+                    needs verification!</a>
+                {% endif %}
+
                 (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">logout</a>)
               {% else %}
                  <a href="{{ request.urlgen('mediagoblin.auth.login') }}">