diff --git a/sonar/ext.py b/sonar/ext.py index 7435bcb75..93094e589 100644 --- a/sonar/ext.py +++ b/sonar/ext.py @@ -114,10 +114,11 @@ def init_views(self, app): """Initialize the main flask views.""" app.url_map.converters['org_code'] = OrganisationCodeConverter + @app.route('/') @app.route('/') def index(view): """Homepage.""" - return render_template('sonar/frontpage.html') + return render_template('sonar/frontpage.html', view=view) @app.template_filter() def nl2br(string): diff --git a/sonar/theme/templates/sonar/frontpage.html b/sonar/theme/templates/sonar/frontpage.html index c99858802..eb47e756b 100755 --- a/sonar/theme/templates/sonar/frontpage.html +++ b/sonar/theme/templates/sonar/frontpage.html @@ -16,19 +16,20 @@ . #} -{% set page = 'home' %} +{% set page = 'organisation' if g.get('organisation') and g.get('organisation')['isShared'] and not g.get('organisation')['isDedicated'] else 'home' %} {%- extends config.BASE_TEMPLATE %} {%- set body_css_classes=['homepage'] %} {% block header %} +{%- if not g.get('organisation') or (g.get('organisation') and g.organisation['isShared'] and g.organisation['isDedicated']) %}