diff --git a/atst/ui_methods.py b/atst/ui_methods.py index 0d652fbb..7347a412 100644 --- a/atst/ui_methods.py +++ b/atst/ui_methods.py @@ -1,4 +1,8 @@ import os +import re + +def navigationContext(self): + return 'workspace' if re.match('\/workspaces\/[A-Za-z0-9]*', self.request.uri) else 'global' def dev(self): return os.getenv("TORNADO_ENV", "dev") == "dev" diff --git a/templates/base.html.to b/templates/base.html.to index fd4fa3a8..8ee8ceff 100644 --- a/templates/base.html.to +++ b/templates/base.html.to @@ -1,6 +1,6 @@ {# TODO: set this context elsewhere #} {# set context='workspace' #} -{% set context='global' %} +{% set context=navigationContext() %} diff --git a/templates/base_workspace.html.to b/templates/base_workspace.html.to new file mode 100644 index 00000000..9622032f --- /dev/null +++ b/templates/base_workspace.html.to @@ -0,0 +1,9 @@ +{% extends "base.html.to" %} + +{% block content %} + + {% include 'navigation/workspace_navigation.html.to' %} + + {% block workspace_content %}{% end %} + +{% end %} diff --git a/templates/navigation/topbar.html.to b/templates/navigation/topbar.html.to index 856075ec..eb7a6499 100644 --- a/templates/navigation/topbar.html.to +++ b/templates/navigation/topbar.html.to @@ -6,7 +6,7 @@