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 @@
- JEDI + {{ "Workspace Name" if context == 'workspace' else "JEDI" }} {% module Icon('caret_down', classes='topbar__link-icon icon--tiny') %} diff --git a/templates/navigation/workspace_navigation.html.to b/templates/navigation/workspace_navigation.html.to new file mode 100644 index 00000000..cd325bcf --- /dev/null +++ b/templates/navigation/workspace_navigation.html.to @@ -0,0 +1 @@ +nav diff --git a/templates/workspace.html.to b/templates/workspace.html.to index 838ddfde..f0e2f67f 100644 --- a/templates/workspace.html.to +++ b/templates/workspace.html.to @@ -1,6 +1,6 @@ -{% extends "base.html.to" %} +{% extends "base_workspace.html.to" %} -{% block content %} +{% block workspace_content %}
diff --git a/templates/workspaces.html.to b/templates/workspaces.html.to index 9f87a99a..efd63fa7 100644 --- a/templates/workspaces.html.to +++ b/templates/workspaces.html.to @@ -13,10 +13,10 @@ {% for w in workspaces %} - - {{ w['name'] }}
+ + {{ w['name'] }}
Task Order: #{{ w['task_order']['number'] }} - + {{ w['user_count'] }}
Users