$def with (page) $ bodyclass = ctx.get('bodyclass', []) $ show_ol_shell = ctx.get('show_ol_shell', True) $ bodyattrs = ctx.get('bodyattrs', []) $if ctx.path.startswith('/works/OL') or ctx.path.startswith('/authors/OL') or ctx.path.startswith('/books/OL') or ctx.path.startswith('/search'): $if ctx.user and ((ctx.user.is_librarian() or ctx.user.is_admin())): $bodyclass.append('show-librarian-tools') $bodyattrs.append('data-username="%s"' % ctx.user.key.split('/')[-1]) $if ctx.user.is_usergroup_member('/usergroup/super-librarians'): $bodyattrs.append('data-can-merge="%s"' % 'true')