Browse files

[fix bug 809243] Display logout link while user registers.

  • Loading branch information...
1 parent 543ade2 commit bc90ea234dbcac1ebdc69f5e7346ad81cb979f99 @glogiotatidis glogiotatidis committed Nov 15, 2012
Showing with 45 additions and 33 deletions.
  1. +45 −33 templates/base.html
View
78 templates/base.html
@@ -56,40 +56,49 @@
{% endblock %}
{% endif %}
<ul class="nav pull-right">
- {% if user.is_authenticated() and user.userprofile.is_complete() %}
- <li class="{{ nav_about}}"><a href="{{ url('about') }}">About</a></li>
- <li class="dropdown" id="profile_menu">
- <a class="dropdown-toggle" data-toggle="dropdown" href="#profile_menu">
- {{ user.username }}
- <b class="caret"></b>
- </a>
- <ul class="dropdown-menu">
- <li>
- <a id="profile" href="{{ url('profile', user.username) }}">
- {{ _('View Profile') }}
- </a>
- </li>
- {% if user.get_profile().is_vouched %}
- <li class="{{nav_invite}}">
- <a id="invite" href="{{ url('invite') }}">
- {{ _('Invite') }}
+ {% if user.is_authenticated() %}
+ {% if user.userprofile.is_complete() %}
+ <li class="{{ nav_about}}"><a href="{{ url('about') }}">About</a></li>
+ <li class="dropdown" id="profile_menu">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#profile_menu">
+ {{ user.username }}
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li>
+ <a id="profile" href="{{ url('profile', user.username) }}">
+ {{ _('View Profile') }}
</a>
</li>
- {% endif %}
- <li class="divider"></li>
- <li>
- <a id="edit_profile" href="{{ url('profile.edit') }}">
- {{ _('Settings') }}
- </a>
- </li>
- <li>
- <a id="logout" href="{{ url('logout') }}"
- class="browserid-logout">
- {{ _('Log Out') }}
- </a>
- </li>
- </ul>
- </li>
+ {% if user.get_profile().is_vouched %}
+ <li class="{{nav_invite}}">
+ <a id="invite" href="{{ url('invite') }}">
+ {{ _('Invite') }}
+ </a>
+ </li>
+ {% endif %}
+ <li class="divider"></li>
+ <li>
+ <a id="edit_profile" href="{{ url('profile.edit') }}">
+ {{ _('Settings') }}
+ </a>
+ </li>
+ <li>
+ <a id="logout" href="{{ url('logout') }}"
+ class="browserid-logout">
+ {{ _('Log Out') }}
+ </a>
+ </li>
+ </ul>
+ </li>
+ {% else %}
+ <li class="{{ nav_about}}">
+ <a id="logout" href="{{ url('logout') }}"
+ class="browserid-logout">
+ {{ _('Log Out') }}
+ </a>
+ </li>
+ {% endif %}
{% else %}
<li class="pull-right">
<a class="browserid-login" href="#join_us">
@@ -113,7 +122,10 @@
{% for message in messages %}
{% with %}
{% set label = message.tags in ['error', 'success', 'info'] %}
- <div class="alert{% if label %} alert-{{ message.tags }}{% endif %} offset1 span8" id="pending-approval">{{ message }}</div>
+ <div class="alert{% if label %} alert-{{ message.tags }}{% endif %} offset1 span8"
+ id="pending-approval">
+ {{ message }}
+ </div>
{% endwith %}
{% endfor %}
{% endif %}

0 comments on commit bc90ea2

Please sign in to comment.