Start merge of common and main apps

This commit is contained in:
Roberto Rosario
2015-04-05 03:44:24 -04:00
parent e648975aff
commit d6afddad3d
9 changed files with 43 additions and 61 deletions

View File

@@ -9,11 +9,19 @@ def has_usable_password(context):
return context['request'].user.has_usable_password
def is_superuser(context):
return context['request'].user.is_staff or context['request'].user.is_superuser
link_about = Link(icon='fa fa-question', text=_('About'), view='common:about_view')
link_admin_site = Link(condition=is_superuser, icon='fa fa-keyboard-o', text=_('Admin site'), view='admin:index')
link_current_user_details = Link(icon='fa fa-user', text=_('User details'), view='common:current_user_details')
link_current_user_edit = Link(icon='fa fa-user', text=_('Edit details'), view='common:current_user_edit')
link_current_user_locale_profile_details = Link(icon='fa fa-globe', text=_('Locale profile'), view='common:current_user_locale_profile_details')
link_current_user_locale_profile_edit = Link(icon='fa fa-globe', text=_('Edit locale profile'), view='common:current_user_locale_profile_edit')
link_license = Link(icon='fa fa-book', text=_('License'), view='common:license_view')
link_logout = Link(icon='fa fa-sign-out', text=_('Logout'), view='common:logout_view')
link_maintenance_menu = Link(icon='fa fa-wrench', text=_('Maintenance'), view='main:maintenance_menu')
link_password_change = Link(condition=has_usable_password, icon='fa fa-key', text=_('Change password'), view='common:password_change_view')
link_setup = Link(icon='fa fa-gear', text=_('Setup'), view='common:setup_list')
link_tools = Link(icon='fa fa-wrench', text=_('Tools'), view='common:tools_list')