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

@@ -1,5 +1,10 @@
{% extends "base_workspace.html.to" %}
{% set project_id = "789" %}
{% block template_vars %}
{% set is_new_project = False %}
{% set project_name = "Code.mil" %}
{% set project_id = "789" %}
{% end %}
{% block workspace_content %}
@@ -12,7 +17,14 @@
<form action=''>
<div class='panel'>
<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 class='panel__content'>
@@ -80,7 +92,9 @@
</section>
<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'>
{% module Icon('x') %}
<span>Cancel</span>