[Toaster] [PATCH] [v2] toaster: custom breadcrumb for the default project
Smith, Elliot
elliot.smith at intel.com
Wed Feb 24 05:50:26 PST 2016
Submitted to bitbake-devel and added to toaster-next.
Elliot
On 24 February 2016 at 10:46, Belen Barros Pena <
belen.barros.pena at linux.intel.com> wrote:
> From: Belen Barros Pena <belen.barros.pena at intel.com>
>
> 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 at intel.com>
> ---
> bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html | 7
> +++++--
> bitbake/lib/toaster/toastergui/templates/basebuildpage.html | 7
> +++++--
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git
> a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
> b/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
> index e350c1a..a62e0b1 100644
> --- a/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
> +++ b/bitbake/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/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
> b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
> index 3571869..0dc71f5 100644
> --- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
> +++ b/bitbake/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%}">
> --
> 2.5.4 (Apple Git-61)
>
> --
> _______________________________________________
> toaster mailing list
> toaster at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster
>
--
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20160224/f98fc8e2/attachment-0001.html>
More information about the toaster
mailing list