Add a template_vars block

This commit is contained in:
Andrew Croce 2018-07-30 12:09:30 -04:00
parent 81dff5a907
commit d2e979f387
2 changed files with 20 additions and 3 deletions

View File

@ -14,6 +14,9 @@
<link rel="icon" type="image/x-icon" href="/static/img/favicon.ico"> <link rel="icon" type="image/x-icon" href="/static/img/favicon.ico">
</head> </head>
<body class="{% if modalOpen() %} modalOpen{% end %}"> <body class="{% if modalOpen() %} modalOpen{% end %}">
{% block template_vars %}{% end %}
{% include 'navigation/topbar.html.to' %} {% include 'navigation/topbar.html.to' %}
<div class='global-layout'> <div class='global-layout'>

View File

@ -1,5 +1,10 @@
{% extends "base_workspace.html.to" %} {% extends "base_workspace.html.to" %}
{% block template_vars %}
{% set is_new_project = False %}
{% set project_name = "Code.mil" %}
{% set project_id = "789" %} {% set project_id = "789" %}
{% end %}
{% block workspace_content %} {% block workspace_content %}
@ -12,7 +17,14 @@
<form action=''> <form action=''>
<div class='panel'> <div class='panel'>
<div class='panel__heading'> <div class='panel__heading'>
<h1 class='h2'>Add a new project</h1> <h1 class='h2'>
{% if is_new_project %}
Add a new project
{% else %}
{{ project_name }}
<span class='subtitle'>Edit project</span>
{% end %}
</h1>
</div> </div>
<div class='panel__content'> <div class='panel__content'>
@ -80,7 +92,9 @@
</section> </section>
<div class='action-group'> <div class='action-group'>
<a href='/styleguide' class='action-group__action usa-button usa-button-big'>Save Project</a> <a href='/styleguide' class='action-group__action usa-button usa-button-big'>
{% if is_new_project %}Create{% else %}Save{% end %} Project
</a>
<a href='/styleguide' class='action-group__action icon-link'> <a href='/styleguide' class='action-group__action icon-link'>
{% module Icon('x') %} {% module Icon('x') %}
<span>Cancel</span> <span>Cancel</span>