Remove permanent logout button and move to the secondary menu of the user details menu
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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'}
|
||||
|
||||
@@ -221,9 +221,6 @@
|
||||
<a href="{% url 'common:current_user_details' %}" title="{% trans 'User details' %}">{{ user.get_full_name|default:user }} <span class="famfam active famfam-vcard"></span></a>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
{% get_setting "LOGIN_URL" as login_url %}
|
||||
<li><a class="logout" href="{% if not user.is_authenticated %}{% url 'common:login_view' %}?next=/{% else %}{% url 'common:logout_view' %}{% endif %}">{% if not user.is_authenticated %}{% trans 'Login' %}{% else %}{% trans 'Logout' %}{% endif %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user