add support for locked site
This commit is contained in:
parent
913182d31d
commit
7761922bdf
|
@ -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')
|
||||
|
|
|
@ -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
|
|||
</p>
|
||||
'''))
|
||||
|
||||
TextsDirectory.register('asec-locked-site',
|
||||
N_('Text displayed when the site is locked'),
|
||||
default=N_('''<p>
|
||||
This site has been locked.
|
||||
</p>
|
||||
'''))
|
||||
|
||||
|
||||
|
|
Reference in New Issue