diff --git a/extra/modules/quota.py b/extra/modules/quota.py index 600884b..0d2286d 100644 --- a/extra/modules/quota.py +++ b/extra/modules/quota.py @@ -89,3 +89,6 @@ def can_logo(): def can_theme(): return get_boolean_quota('x-asec-can-theme') + +def is_locked(): + return get_boolean_quota('x-asec-locked') diff --git a/extra/modules/root.ptl b/extra/modules/root.ptl index c2c54b2..860e3ad 100644 --- a/extra/modules/root.ptl +++ b/extra/modules/root.ptl @@ -79,6 +79,8 @@ class RootDirectory(wcs.root.RootDirectory): if not hasattr(response, 'breadcrumb'): response.breadcrumb = [ ('', _('Home')) ] response.filter['logo_url'] = boconfig.get_logo_url() + if quota.is_locked() and (len(path) == 0 or not path[0] in ['themes', 'robots.txt']): + return TextsDirectory.get_html_text('asec-locked-site') return Directory._q_traverse(self, path) def _q_index [html] (self): @@ -139,4 +141,11 @@ Welcome on your new site. It is currently empty, you should go to the

''')) +TextsDirectory.register('asec-locked-site', + N_('Text displayed when the site is locked'), + default=N_('''

+This site has been locked. +

+''')) +