Merge pull request #194 from dod-ccpo/show-workspace-name-in-header
Show currently active workspace name in label
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
{# TODO: set this context elsewhere #}
|
||||
{# set context='workspace' #}
|
||||
{% set context=g.navigationContext %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
{# TODO: set this context elsewhere #}
|
||||
{# set context='workspace' #}
|
||||
{% set context=g.navigationContext %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% from "components/sidenav_item.html" import SidenavItem %}
|
||||
|
||||
<div class="global-navigation sidenav global-navigation__context--{{context}}">
|
||||
<div class="global-navigation sidenav">
|
||||
<ul>
|
||||
{% if g.dev %}
|
||||
{{ SidenavItem("Styleguide",
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<ul>
|
||||
{{ SidenavItem(
|
||||
"Projects",
|
||||
href=url_for("workspaces.workspace_projects", workspace_id=123456),
|
||||
active=g.matchesPath('\/workspaces\/[A-Za-z0-9]*\/projects'),
|
||||
href=url_for("workspaces.workspace_projects", workspace_id=workspace.id),
|
||||
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/projects'),
|
||||
subnav=[
|
||||
{
|
||||
"label": "Add New Project",
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
{{ SidenavItem(
|
||||
"Members",
|
||||
href=url_for("workspaces.workspace_members", workspace_id=123456),
|
||||
active=g.matchesPath('\/workspaces\/[A-Za-z0-9]*\/members'),
|
||||
href=url_for("workspaces.workspace_members", workspace_id=workspace.id),
|
||||
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/members'),
|
||||
subnav=[
|
||||
{
|
||||
"label": "Add New Member",
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
{{ SidenavItem(
|
||||
"Funding & Reports",
|
||||
href='/workspaces/123456/reports',
|
||||
active=g.matchesPath('\/workspaces\/[A-Za-z0-9]*\/reports')
|
||||
href=url_for("workspaces.workspace_reports", workspace_id=workspace.id),
|
||||
active=request.url_rule.rule.startswith('/workspaces/<workspace_id>/reports')
|
||||
) }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class='block-list project-list-item'>
|
||||
<header class='block-list__header'>
|
||||
<h2 class='block-list__title'>{{ project['name'] }} ({{ project['environments']|length }} environments)</h2>
|
||||
<a class='icon-link' href='/workspaces/123456/projects/789/edit'>
|
||||
<a class='icon-link' href=''>
|
||||
{{ Icon('edit') }}
|
||||
<span>edit</span>
|
||||
</a>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block workspace_content %}
|
||||
|
||||
{{ Alert("Funding Information & Reports for Workspace " + workspace_id,
|
||||
{{ Alert("Funding Information & Reports for Workspace " + workspace.name,
|
||||
message="<p>On this screen you'll find detailed reporting information on this workspace. This message needs to be written better and be dismissable.</p>",
|
||||
actions=[
|
||||
{"label": "Learn More", "href": "/", "icon": "info"},
|
||||
|
||||
Reference in New Issue
Block a user