hobo: generate backoffice_extra_head if there's a combo for agents (#7499)

This commit is contained in:
Frédéric Péters 2015-06-08 16:25:29 +02:00
parent fd74f3b068
commit b8d47f9f66
1 changed files with 12 additions and 0 deletions

View File

@ -274,6 +274,18 @@ class CmdCheckHobos(Command):
# Use the first fargo found and stop
break
try:
portal_agent_url = config.get('variables', 'portal_agent_url')
except ConfigParser.NoOptionError:
pass
else:
if portal_agent_url.endswith('/'):
portal_agent_url = portal_agent_url.rstrip('/')
extra_head = '''<script src="%s/__services.js"></script>'''\
'''<script src="%s/static/js/publik.js"></script>''' % (
portal_agent_url, portal_agent_url)
config.set('options', 'backoffice_extra_head', extra_head)
with open(site_options_filepath, 'wb') as site_options:
config.write(site_options)