summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/templates/base.html
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-11 13:14:39 +0100
committerAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-25 11:08:25 +0100
commita9e889af41e1e59c3b426c78ba80e4d49c6c122b (patch)
tree6e7d5ad2a59b48fb7b7300b0ae6adbd9a94b5327 /lib/toaster/toastergui/templates/base.html
parent3928dc93188880386588fe3f440cd0aaa83d22de (diff)
downloadbitbake-a9e889af41e1e59c3b426c78ba80e4d49c6c122b.tar.gz
toaster: fixing undefined variables
This patchset fixes usage of undefined variables in the base page. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/templates/base.html')
-rw-r--r--lib/toaster/toastergui/templates/base.html11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/toaster/toastergui/templates/base.html b/lib/toaster/toastergui/templates/base.html
index 9f19c0384..3f3253d6b 100644
--- a/lib/toaster/toastergui/templates/base.html
+++ b/lib/toaster/toastergui/templates/base.html
@@ -29,17 +29,18 @@
{% endif %}
<script>
libtoaster.ctx = {
- projectId : {{project.id|default:'undefined'}},
jsUrl : "{% static 'js/' %}",
htmlUrl : "{% static 'html/' %}",
projectsUrl : "{% url 'all-projects' %}",
{% if project.id %}
+ projectId : {{project.id}},
projectPageUrl : {% url 'project' project.id as purl%}{{purl|json}},
projectName : {{project.name|json}},
projectTargetsUrl: {% url 'projectavailabletargets' project.id as paturl%}{{paturl|json}},
projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}},
projectId : {{project.id}},
{% else %}
+ projectId : undefined,
projectPageUrl : undefined,
projectName : undefined,
projectId : undefined,
@@ -101,8 +102,10 @@
<h3>New build</h3>
<h6>Project:</h6>
<span id="project">
- <a class="lead" href="{% if project.id %}{% url 'project' project.id %}{% endif %}">{{project.name}}</a>
- <i class="icon-pencil"></i>
+ {% if project.id %}
+ <a class="lead" href="{% url 'project' project.id %}">{{project.name}}</a>
+ <i class="icon-pencil"></i>
+ {% endif %}
</span>
<form id="change-project-form" style="display:none;">
<div class="input-append">
@@ -122,7 +125,7 @@
<form>
<input type="text" class="input-xlarge" id="build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/>
<div>
- <button class="btn btn-primary" id="build-button" data-project-id="{{project.id}}" disabled>Build</button>
+ <button class="btn btn-primary" id="build-button" disabled>Build</button>
</div>
</form>
</li>