Skip to content

Commit

Permalink
Adds none-js logout link to the header
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Nov 20, 2012
1 parent a14db47 commit ef4a3f2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
13 changes: 12 additions & 1 deletion ckan/public/base/less/masthead.less
Expand Up @@ -113,17 +113,22 @@ header.masthead {
}
}
}
.dropdown {
.wrap {
float: left;
}
.button {
float: left;
display: block;
text-decoration: none;
background-color: @mastheadBackgroundColorStart;
color: mix(@mastheadBackgroundColorStart, @mastheadLinkColor, 50%);
text-shadow: 0 1px 1px darken(@mastheadBackgroundColorStart, 10);
.border-radius(4px);
.box-shadow(inset 0 1px 0 lighten(@mastheadBackgroundColorStart, 5));
&.logout {
margin: 2px 0 2px 5px;
padding: 4px 6px 2px 6px;
}
}
.image {
margin: 2px 0;
Expand Down Expand Up @@ -202,3 +207,9 @@ header.masthead {
}

}

.js {
header.masthead .account .button.logout {
display: none;
}
}
7 changes: 5 additions & 2 deletions ckan/templates/header.html
Expand Up @@ -29,16 +29,19 @@ <h1>
</form>
{% if c.userobj %}
<div class="section account avatar authed" data-module="me" data-me="{{ c.userobj.id }}">
<div class="dropdown">
<div class="wrap">
<a href="{{ h.url_for(controller='user', action='dashboard') }}" class="button notifications{% if c.new_activities > 0 %} notifications-important{% endif %}" title="{{ c.new_activities }} {{ _('new notifications') }}">
{{ c.new_activities }}
</a>
</div>
<div class="dropdown">
<div class="wrap dropdown">
<a href="#" class="button image dropdown-toggle" data-toggle="dropdown">
{{ h.gravatar((c.userobj.email_hash if c and c.userobj else ''),size=25) }}
<i class="icon-chevron-down"></i>
</a>
<a href="{{ h.url_for('/user/_logout') }}" class="button logout" title="{{ _('Log out') }}" class="js-hide">
<i class="icon-signout"></i>
</a>
<ul class="user-dropdown-menu dropdown-menu pull-right" role="menu">
<li>
<a href="{{ h.url_for(controller='user', action='dashboard') }}">
Expand Down

0 comments on commit ef4a3f2

Please sign in to comment.