diff --git a/auquotidien/modules/root.py b/auquotidien/modules/root.py index da39a6d..3af7f45 100644 --- a/auquotidien/modules/root.py +++ b/auquotidien/modules/root.py @@ -808,8 +808,10 @@ class AlternateRootDirectory(OldRootDirectory): response.filter = {} response.filter['auquotidien'] = True - response.filter['gauche'] = self.box_side(path) - response.filter['keywords'] = template.get_current_theme().get('keywords') + if not path or path[0] not in ('api', 'backoffice'): + # api & backoffice have no use for a side box + response.filter['gauche'] = self.box_side(path) + response.filter['keywords'] = template.get_current_theme().get('keywords') get_publisher().substitutions.feed(self) response.breadcrumb = [ ('', _('Home')) ] @@ -1103,7 +1105,8 @@ class AlternateRootDirectory(OldRootDirectory): r += htmltext('') % _('Load') r += htmltext('') - r += self.links() + if get_cfg('aq-permissions', {}).get('links'): + r += self.links() cats = Category.select(order_by = 'name') cats = [x for x in cats if x.url_name != 'consultations' and x.get_homepage_position() == 'side'] @@ -1117,7 +1120,8 @@ class AlternateRootDirectory(OldRootDirectory): r += htmltext('') r += htmltext('') - if Event.keys(): # if there are events, add a link to the agenda + if get_cfg('aq-permissions', {}).get('events') and Event.keys(): + # if there are events, add a link to the agenda tags = get_cfg('misc', {}).get('event_tags') if not tags: tags = get_default_event_tags()