Files
poky/bitbake/lib/toaster/toastergui/templates/layers.html
Alexandru DAMIAN c5a16235b8 bitbake: toaster: fix html5 compliance
This patch brings needed changes in all views so that
each view passes the HTML5 compliance test by the
W3C Markup Service.

(Bitbake rev: 6e60ed8ab71e4300ab571f42b7af5011086df697)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-14 18:04:09 +01:00

133 lines
5.5 KiB
HTML

{% extends "baseprojectpage.html" %}
{% load projecttags %}
{% load humanize %}
{% load static %}
{% block localbreadcrumb %}
<li>All compatible layers</li>
{% endblock %}
{% block projectinfomain %}
<script src="{% static 'js/layerBtn.js' %}"></script>
<script>
$(document).ready(function (){
var ctx = {
projectLayers : {{projectlayerset}},
};
try {
layerBtnsInit(ctx);
} catch (e) {
document.write("Sorry, An error has occurred loading this page");
console.warn(e);
}
});
</script>
<div class="page-header">
<h1>
{% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
{{objects.paginator.count}} layer{{objects.paginator.count|pluralize}} found
{% elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
No layers found
{%else%}
All compatible layers
{%endif%}
<i class="icon-question-sign get-help heading-help" title="This page lists all the layers compatible with the release selected for this project, which is {{project.release.description}}"></i>
</h1>
</div>
<div id="zone1alerts" style="display:none">
<div class="alert alert-info lead">
<button type="button" class="close" id="hide-alert">&times;</button>
<span id="alert-msg"></span>
</div>
</div>
{% if objects.paginator.count == 0 %}
{% if request.GET.filter or request.GET.search %}
<div class="row-fluid">
<div class="alert">
<form class="no-results input-append" id="searchform">
<input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
<button class="btn" type="submit" value="Search">Search</button>
<button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all layers</button>
</form>
</div>
</div>
{% else %}
<div class="alert alert-info lead">
<p>Toaster has no layer information. To generate layer information you can:</p>
<ul>
<li><a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">Configure a layer source</a></li>
<li><a href="{% url 'importlayer' %}">Import a layer</a></li>
</ul>
</div>
{% endif %}
{% else %}
{% include "basetable_top_layers.html" %}
{% for o in objects %}
<tr class="data">
<td class="layer"><a href="{% url 'layerdetails' project.id o.id %}">{{o.layer.name}}</a></td>
<td class="description">{% if o.layer.summary %}{{o.layer.summary}}{%endif%}</td>
<td class="git-repo"><a href="{% url 'layerdetails' project.id o.pk %}"><code>{{o.layer.vcs_url}}</code></a>
{% if o.get_vcs_link_url %}
<a target="_blank" href="{{ o.get_vcs_link_url }}"><i class="icon-share get-info"></i></a>
{% endif %}
</td>
<td class="git-subdir" style="display: table-cell;"><a href="{% url 'layerdetails' project.id o.pk %}"><code>{{o.dirpath}}</code></a>
{% if o.dirpath and o.get_vcs_dirpath_link_url %}
<a target="_blank" href="{{ o.get_vcs_dirpath_link_url }}"><i class="icon-share get-info"></i></a>
{% endif %}
</td>
<td class="branch">
{% with vcs_ref=o.get_vcs_reference %}
{% if vcs_ref|is_shaid %}
<a class="btn" data-content="<ul class='unstyled'> <li>{{vcs_ref}}</li> </ul>">
{{vcs_ref|truncatechars:10}}
</a>
{% else %}
{{vcs_ref}}
{% endif %}
{% endwith %}
</td>
<td class="dependencies">
{% with ods=o.dependencies.all%}
{% if ods.count %}
<a class="btn"
title="<a href='{% url "layerdetails" project.id o.pk %}'>{{o.layer.name}}</a> dependencies"
data-content="<ul class='unstyled'>
{% for i in ods%}
<li><a href='{% url "layerdetails" project.id i.depends_on.pk %}'>{{i.depends_on.layer.name}}</a></li>
{% endfor %}
</ul>">
{{ods.count}}
</a>
{% endif %}
{% endwith %}
</td>
{% if project %}
<td class="add-del-layers" data-value="{{o.pk}}">
<button class="btn btn-danger btn-block layer-exists-{{o.pk}} layerbtn" style="display:none;" data-layer='{ "id": {{o.pk}}, "name": "{{o.layer.name}}", "url": "{%url 'layerdetails' project.id o.pk%}"}' data-directive="remove" >
<i class="icon-trash"></i>
Delete layer
</button>
<button class="btn btn-block layer-add-{{o.pk}} layerbtn" data-layer='{ "id": {{o.pk}}, "name": "{{o.layer.name}}", "url": "{%url 'layerdetails' project.id o.pk%}"}' data-directive="add">
<i class="icon-plus"></i>
Add layer
</button>
</td>
{% endif %}
</tr>
{% endfor %}
{% include "basetable_bottom.html" %}
{%endif%}
{% endblock %}