1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-15 23:00:57 +00:00

Modify org

This commit is contained in:
xiez
2012-07-26 17:08:31 +08:00
parent 0207e1e162
commit 0132e4e85d
34 changed files with 538 additions and 41 deletions

View File

@@ -0,0 +1,16 @@
def org(request):
"""
Add org info and base template that html page will extends to context.
"""
if hasattr(request.user, 'org') and request.user.org is not None:
if request.user.org['is_staff']:
base_template = 'org_admin_base.html'
else:
base_template = 'org_base.html'
return {'cur_ctx': 'org',
'org': request.user.org,
'base_template': base_template}
else:
return {'cur_ctx': '',
'base_template': 'myhome_base.html'}