Add separate 'Sign Out' link to navigation, link user profile.

Fixes #4288
This commit is contained in:
Christopher Grebs 2017-01-13 18:02:20 +01:00
Родитель 236199be29
Коммит 74e5e1d272
2 изменённых файлов: 16 добавлений и 4 удалений

Просмотреть файл

@ -29,13 +29,15 @@
</a></li> </a></li>
{% if user_authenticated %} {% if user_authenticated %}
{# TODO: Not so sure this should be the logout link but where else to put it? <li class="DevHub-Navigation-LogOut"><a href="{{ url('users.logout') }}">
Should probably be user.get_url_path() to point to the user profile #} {{ _('Sign Out') }}
<li class="avatar"><a href="{{ url('users.logout') }}"> </a></li>
<li class="avatar"><a href="{{ user.get_url_path() }}">
<img src="{{ request.user.picture_url }}" alt="{% if not request.user.picture_type %}{{ _('No Photo') }}{% else %}{{ _('User Photo') }}{% endif %}" /> <img src="{{ request.user.picture_url }}" alt="{% if not request.user.picture_type %}{{ _('No Photo') }}{% else %}{{ _('User Photo') }}{% endif %}" />
</a></li> </a></li>
{% else %} {% else %}
<li class="show-on-desktop"><a href="{{ login_link() }}">{{ _('Sign In') }}</a></li> <li class="show-on-desktop DevHub-Navigation-LogIn"><a href="{{ login_link() }}">{{ _('Sign In') }}</a></li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>

Просмотреть файл

@ -35,6 +35,16 @@
} }
} }
&.DevHub-Navigation-LogIn,
&.DevHub-Navigation-LogOut {
margin-left: 40px;
html[dir=rtl] & {
margin-right: 40px;
margin-left: 10px;
}
}
a { a {
color: @color-text; color: @color-text;
text-decoration: none; text-decoration: none;