workspace context setup
This commit is contained in:
parent
49460768ef
commit
5cabf8b66e
@ -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"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{# TODO: set this context elsewhere #}
|
||||
{# set context='workspace' #}
|
||||
{% set context='global' %}
|
||||
{% set context=navigationContext() %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
9
templates/base_workspace.html.to
Normal file
9
templates/base_workspace.html.to
Normal file
@ -0,0 +1,9 @@
|
||||
{% extends "base.html.to" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% include 'navigation/workspace_navigation.html.to' %}
|
||||
|
||||
{% block workspace_content %}{% end %}
|
||||
|
||||
{% end %}
|
@ -6,7 +6,7 @@
|
||||
|
||||
<div class="topbar__context topbar__context--{{context}}">
|
||||
<a href="/" class="topbar__link">
|
||||
<span class="topbar__link-label">JEDI</span>
|
||||
<span class="topbar__link-label">{{ "Workspace Name" if context == 'workspace' else "JEDI" }}</span>
|
||||
{% module Icon('caret_down', classes='topbar__link-icon icon--tiny') %}
|
||||
</a>
|
||||
|
||||
|
1
templates/navigation/workspace_navigation.html.to
Normal file
1
templates/navigation/workspace_navigation.html.to
Normal file
@ -0,0 +1 @@
|
||||
nav
|
@ -1,6 +1,6 @@
|
||||
{% extends "base.html.to" %}
|
||||
{% extends "base_workspace.html.to" %}
|
||||
|
||||
{% block content %}
|
||||
{% block workspace_content %}
|
||||
|
||||
<div class="panel">
|
||||
<div class='responsive-table-wrapper'>
|
||||
|
@ -13,10 +13,10 @@
|
||||
<tbody>
|
||||
{% for w in workspaces %}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<a href="">{{ w['name'] }}</a><br>
|
||||
<td scope="row">
|
||||
<a href="/workspaces/{{w['task_order']['number']}}">{{ w['name'] }}</a><br>
|
||||
Task Order: #{{ w['task_order']['number'] }}
|
||||
</th>
|
||||
</td>
|
||||
<td>
|
||||
<span class="usa-label">{{ w['user_count'] }}</span><br>Users
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user