diff --git a/mayan/apps/common/__init__.py b/mayan/apps/common/__init__.py index 6027795d9c..b55dce061b 100644 --- a/mayan/apps/common/__init__.py +++ b/mayan/apps/common/__init__.py @@ -20,7 +20,7 @@ from .links import (link_about, link_current_user_details, link_current_user_edit, link_current_user_locale_profile_details, link_current_user_locale_profile_edit, link_license, - link_password_change) + link_logout, link_password_change) from .models import (AnonymousUserSingleton, AutoAdminSingleton, UserLocaleProfile) from .settings import (AUTO_ADMIN_USERNAME, AUTO_ADMIN_PASSWORD, @@ -29,7 +29,7 @@ from .utils import validate_path logger = logging.getLogger(__name__) -register_links(['common:current_user_details', 'common:current_user_edit', 'common:current_user_locale_profile_details', 'common:current_user_locale_profile_edit', 'common:password_change_view'], [link_current_user_details, link_current_user_edit, link_current_user_locale_profile_details, link_current_user_locale_profile_edit, link_password_change], menu_name='secondary_menu') +register_links(['common:current_user_details', 'common:current_user_edit', 'common:current_user_locale_profile_details', 'common:current_user_locale_profile_edit', 'common:password_change_view'], [link_current_user_details, link_current_user_edit, link_current_user_locale_profile_details, link_current_user_locale_profile_edit, link_password_change, link_logout], menu_name='secondary_menu') register_links(['common:about_view', 'common:license_view', 'registration:form_view'], [link_about, link_license], menu_name='secondary_menu') register_top_menu('about', link_about, position=-1) diff --git a/mayan/apps/common/links.py b/mayan/apps/common/links.py index 69d2131a10..d67ad18e80 100644 --- a/mayan/apps/common/links.py +++ b/mayan/apps/common/links.py @@ -16,3 +16,5 @@ link_license = {'text': _(u'License'), 'view': 'common:license_view', 'famfam': link_current_user_locale_profile_details = {'text': _(u'Locale profile'), 'view': 'common:current_user_locale_profile_details', 'famfam': 'world'} link_current_user_locale_profile_edit = {'text': _(u'Edit locale profile'), 'view': 'common:current_user_locale_profile_edit', 'famfam': 'world_edit'} + +link_logout = {'text': _(u'Logout'), 'view': 'common:logout_view', 'famfam': 'door_out'} diff --git a/mayan/apps/main/templates/main/base.html b/mayan/apps/main/templates/main/base.html index 4bffb54c86..b41759d995 100644 --- a/mayan/apps/main/templates/main/base.html +++ b/mayan/apps/main/templates/main/base.html @@ -221,9 +221,6 @@ {{ user.get_full_name|default:user }} {% endif %} - - {% get_setting "LOGIN_URL" as login_url %} -
  • {% if not user.is_authenticated %}{% trans 'Login' %}{% else %}{% trans 'Logout' %}{% endif %}