Add context processor to put allow accessing workspace in template

This commit is contained in:
Patrick Smith
2018-08-21 14:52:06 -04:00
parent f8c3ac824a
commit 34d652f33a
3 changed files with 13 additions and 12 deletions

View File

@@ -6,9 +6,9 @@
{{ Icon('shield', classes='topbar__link-icon') }}
</a>
<div class="topbar__context topbar__context--{{context}}">
<div class="topbar__context {% if workspace %}topbar__context--workspace{% endif %}">
<a href="/" class="topbar__link">
<span class="topbar__link-label">{{ "Workspace 123456" if context == 'workspace' else "JEDI" }}</span>
<span class="topbar__link-label">{{ ("Workspace " + workspace.name) if workspace else "JEDI" }}</span>
{{ Icon('caret_down', classes='topbar__link-icon icon--tiny') }}
</a>