summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBelen Barros Pena <belen.barros.pena@intel.com>2016-02-24 13:49:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-26 17:17:24 +0000
commit5545acf6703a25ee46776138bbbd804615add89c (patch)
treef768fd0eb28c49cdea7baae3adbe8ebdcd47b962 /lib
parent004003daf6bd0f0233ce5c2d95f1d7d64ab91bb3 (diff)
downloadopenembedded-core-contrib-5545acf6703a25ee46776138bbbd804615add89c.tar.gz
toaster: custom breadcrumb for the default project
The default "Command line builds" project does not have a Configuration page. It therefore needs a custom breadcrumb where the project name goes to the project builds page, instead of the project configuration page. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/toaster/toastergui/templates/basebuilddetailpage.html7
-rw-r--r--lib/toaster/toastergui/templates/basebuildpage.html7
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/toaster/toastergui/templates/basebuilddetailpage.html b/lib/toaster/toastergui/templates/basebuilddetailpage.html
index e350c1a859..a62e0b1cb8 100644
--- a/lib/toaster/toastergui/templates/basebuilddetailpage.html
+++ b/lib/toaster/toastergui/templates/basebuilddetailpage.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+{% load project_url_tag %}
{% load humanize %}
{% block pagecontent %}
@@ -6,8 +7,10 @@
<!-- Breadcrumbs -->
<div class="section">
<ul class="breadcrumb" id="breadcrumb">
- <li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li>
- <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
+ <li><a href="{% project_url build.project %}">{{build.project.name}}</a></li>
+ {% if not build.project.is_default %}
+ <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
+ {% endif %}
<li><a href="{%url 'builddashboard' build.pk%}">{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
{% block localbreadcrumb %}{% endblock %}
</ul>
diff --git a/lib/toaster/toastergui/templates/basebuildpage.html b/lib/toaster/toastergui/templates/basebuildpage.html
index 35718694ea..0dc71f5e5e 100644
--- a/lib/toaster/toastergui/templates/basebuildpage.html
+++ b/lib/toaster/toastergui/templates/basebuildpage.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load projecttags %}
+{% load project_url_tag %}
{% load humanize %}
{% block pagecontent %}
@@ -8,8 +9,10 @@
<!-- Breadcrumbs -->
<div class="section">
<ul class="breadcrumb" id="breadcrumb">
- <li><a href="{% url 'project' build.project.id %}">{{build.project.name}}</a></li>
- <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
+ <li><a href="{% project_url build.project %}">{{build.project.name}}</a></li>
+ {% if not build.project.is_default %}
+ <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
+ {% endif %}
<li>
{% block parentbreadcrumb %}
<a href="{%url 'builddashboard' build.pk%}">