diff --git a/shelfzilla/apps/users/context_processors.py b/shelfzilla/apps/users/context_processors.py index 7f37edc..7a0383a 100644 --- a/shelfzilla/apps/users/context_processors.py +++ b/shelfzilla/apps/users/context_processors.py @@ -1,3 +1,6 @@ +from .models import User + + def user_is_staff(request): return { 'USER_IS_STAFF': request.user.is_staff @@ -10,3 +13,10 @@ def user_configuration(request): 'show_admin_links': False } } + +def auth(request): + result = {} + if request.user.is_authenticated: + result['user'] = User.objects.get(pk=request.user.pk) + + return result diff --git a/shelfzilla/settings/base.py b/shelfzilla/settings/base.py index 4c0a07d..9bee60b 100644 --- a/shelfzilla/settings/base.py +++ b/shelfzilla/settings/base.py @@ -79,6 +79,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'shelfzilla.apps.pjax.context_processors.pjax', 'shelfzilla.apps.manga.context_processors.user_have_volumes', 'shelfzilla.apps.manga.context_processors.user_wishlisted_volumes', + 'shelfzilla.apps.users.context_processors.auth', 'shelfzilla.apps.users.context_processors.user_is_staff', 'shelfzilla.apps.users.context_processors.user_configuration', ) diff --git a/shelfzilla/themes/bootflat/static/less/fixes.less b/shelfzilla/themes/bootflat/static/less/fixes.less index 053490b..5891a2a 100644 --- a/shelfzilla/themes/bootflat/static/less/fixes.less +++ b/shelfzilla/themes/bootflat/static/less/fixes.less @@ -72,6 +72,10 @@ color: #fff; background-color: #000; } + + .avatar { + width: 22px; + } } .alert-error { diff --git a/shelfzilla/themes/bootflat/templates/_layout.html b/shelfzilla/themes/bootflat/templates/_layout.html index dd671d1..59a9b6d 100644 --- a/shelfzilla/themes/bootflat/templates/_layout.html +++ b/shelfzilla/themes/bootflat/templates/_layout.html @@ -39,21 +39,22 @@ {% endif %}