mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00

This means the usage URL can point to a file whose contents may be different per branch (e.g. a README file). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
296 lines
12 KiB
HTML
296 lines
12 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
{% load static %}
|
|
|
|
{% comment %}
|
|
|
|
layerindex-web - layer detail page template
|
|
|
|
Copyright (C) 2013 Intel Corporation
|
|
Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
<!--
|
|
{% autoescape on %}
|
|
{% block title %}OpenEmbedded metadata index - {{ layeritem.name }}{% endblock %}
|
|
{% endautoescape %}
|
|
-->
|
|
|
|
{% block content %}
|
|
|
|
{% autoescape on %}
|
|
|
|
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<div class="page-header">
|
|
<h1>{{ layeritem.name }}
|
|
{% if layeritem.status = "N" %}
|
|
<span class="label label-warning">Unpublished</span>
|
|
{% endif %}
|
|
{% if user.is_authenticated %}
|
|
<span class="pull-right">
|
|
{% if perms.layeritem.publish_layer or useredit %}
|
|
<a href="{% url edit_layer layeritem.name %}" class="btn">Edit layer</a>
|
|
{% if layeritem.layernote_set.count = 0 %}
|
|
<a href="{% url add_layernote layeritem.name %}" class="btn">Add note</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if layeritem.status = "N" and perms.layeritem.publish_layer %}
|
|
<a href="{% url delete_layer layeritem.name %}" class="btn btn-warning">Delete layer</a>
|
|
<a href="{% url publish layeritem.name %}" class="btn btn-primary">Publish layer</a>
|
|
{% endif %}
|
|
</span>
|
|
{% endif %}
|
|
</h1>
|
|
</div>
|
|
</div> <!-- end of row-fluid -->
|
|
</div> <!-- end of container-fluid -->
|
|
|
|
<div class="container-fluid">
|
|
{% if not layerbranch %}
|
|
<div class="row-fluid">
|
|
<div class="alert alert-error">
|
|
This layer does not exist for branch {{ current_branch }}.
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="row-fluid">
|
|
{% for note in layeritem.layernote_set.all %}
|
|
<div class="alert">
|
|
<p>{{ note.text }}</p>
|
|
{% if perms.layeritem.publish_layer or useredit %}
|
|
<p>
|
|
<a href="{% url edit_layernote layeritem.name note.pk %}" class="btn">Edit note</a>
|
|
<a href="{% url delete_layernote layeritem.name note.pk %}" class='btn'>Delete note</a>
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
<div class="description span7">
|
|
<p>
|
|
{{ layeritem.description }}
|
|
</p>
|
|
<p>
|
|
{% if layeritem.usage_url %}
|
|
<span class="label label-info">
|
|
<a href="{{ layerbranch.get_usage_url }}">Setup information</a>
|
|
</span>
|
|
{% endif %}
|
|
{% if layeritem.mailing_list_url %}
|
|
<span class="label label-info">
|
|
<a href="{{ layeritem.mailing_list_url }}">Mailing list</a>
|
|
</span>
|
|
{% endif %}
|
|
</p>
|
|
|
|
<h3>Git repository</h3>
|
|
|
|
<p><span data-toggle="tooltip" title="Select URL"><i class="icon-circle-arrow-right selectallicon" for="vcs_url" id="vcs_url_select"></i></span><span id="vcs_url" class="copyable">{{ layeritem.vcs_url }}</span>
|
|
{% if layeritem.vcs_web_url %}
|
|
<span class="label label-info">
|
|
<a href="{{ layeritem.vcs_web_url }}">web repo</a>
|
|
</span>
|
|
{% endif %}
|
|
</p>
|
|
|
|
{% if layeritem.vcs_subdir %}
|
|
<h4>Subdirectory</h4>
|
|
<p><span data-toggle="tooltip" title="Select subdirectory"><i class="icon-circle-arrow-right selectallicon" for="vcs_subdir" id="vcs_subdir_select"></i></span><span id="vcs_subdir" class="copyable">{{ layeritem.vcs_subdir }}</span>
|
|
{% if layerbranch.tree_url %}
|
|
<span class="label label-info">
|
|
<a href="{{ layerbranch.tree_url }}">web subdirectory</a>
|
|
</span>
|
|
{% endif %}
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if layerbranch.vcs_last_commit %}
|
|
<p>
|
|
<span class="muted"><small>Last commit: {{ layerbranch.vcs_last_commit|timesince }} ago</small></span>
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if layerbranch.active_maintainers.count > 0 %}
|
|
<h3>{% if layerbranch.active_maintainers|length = 1 %}Maintainer{% else %}Maintainers{% endif %}</h3>
|
|
|
|
<ul>
|
|
{% for maintainer in layerbranch.active_maintainers %}
|
|
<li>
|
|
{{ maintainer.name }}
|
|
{% if maintainer.responsibility %}
|
|
<span>({{ maintainer.responsibility }})</span>
|
|
{% endif %}
|
|
|
|
<span class="label label-info">
|
|
<a href="mailto:{{ maintainer.email }}">email</a>
|
|
</span>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
</div> <!-- end of span7 -->
|
|
|
|
<div class="span4 pull-right description">
|
|
{% if layerbranch.dependencies_set.count > 0 %}
|
|
<div class="well dependency-well">
|
|
<h3>Dependencies </h3>
|
|
<p>The {{ layeritem.name }} layer depends upon:</p>
|
|
<ul>
|
|
{% for dep in layerbranch.dependencies_set.all %}
|
|
<li><a href="{% url layer_item dep.dependency.name %}">{{ dep.dependency.name }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div> <!-- end of well -->
|
|
{% endif %}
|
|
|
|
</div> <!-- end of span4 -->
|
|
</div> <!-- end of row-fluid -->
|
|
</div> <!-- end of container-fluid -->
|
|
|
|
{% if layeritem.status = 'N' and layerbranch %}
|
|
<div class="container-fluid" style="margin-bottom:1em;">
|
|
{% if layeritem.vcs_web_file_base_url %}
|
|
<span class="label label-important">
|
|
<a href="{{ layerbranch.test_file_url }}">test file link</a>
|
|
</span>
|
|
{% else %}
|
|
<span class="label">
|
|
No base file URL provided
|
|
</span>
|
|
{% endif %}
|
|
{% if layeritem.vcs_web_tree_base_url %}
|
|
<span class="label label-important">
|
|
<a href="{{ layerbranch.test_tree_url }}">test tree link</a>
|
|
</span>
|
|
{% else %}
|
|
<span class="label">
|
|
No base tree URL provided
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
{% if layerbranch.machine_set.count > 0 %}
|
|
<div class="container-fluid" style="margin-bottom:1em;">
|
|
<div class="row-fluid">
|
|
<div class="navbar">
|
|
<div class="navbar-inner">
|
|
<a class="brand pull-left">{{ layeritem.name }} machines</a>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="table table-bordered">
|
|
<tbody>
|
|
{% for machine in layerbranch.machine_set.all %}
|
|
<tr>
|
|
<td><a href="{{ machine.vcs_web_url }}">{{ machine.name }}</a></td>
|
|
<td>{{ machine.description }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if layerbranch.recipe_set.count > 0 %}
|
|
<div class="container-fluid" style="margin-bottom:1em;">
|
|
<div class="row-fluid">
|
|
<div class="navbar">
|
|
<div class="navbar-inner">
|
|
<a class="brand pull-left">{{ layeritem.name }} recipes</a>
|
|
|
|
<ul class="nav pull-right">
|
|
<li>
|
|
<form action="" class="navbar-search pull-right" id="filter-form">
|
|
<input type="text" placeholder="Search recipes" class="search-query" id="filter">
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<table class="table table-bordered recipestable">
|
|
<thead>
|
|
<tr>
|
|
<th>Recipe name</th>
|
|
<th>Version</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for recipe in layerbranch.sorted_recipes %}
|
|
<tr>
|
|
<td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td>
|
|
<td>{{ recipe.pv }}</td>
|
|
<td class="span8">{{ recipe.short_desc }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% endautoescape %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block scripts %}
|
|
<script src="{% static "js/uitablefilter.js" %}"></script>
|
|
|
|
<script>
|
|
// selectText plugin Borrowed from http://jsfiddle.net/edelman/KcX6A/1506/
|
|
jQuery.fn.selectText = function() {
|
|
var doc = document
|
|
, element = this[0]
|
|
, range, selection
|
|
;
|
|
if (doc.body.createTextRange) {
|
|
range = document.body.createTextRange();
|
|
range.moveToElementText(element);
|
|
range.select();
|
|
} else if (window.getSelection) {
|
|
selection = window.getSelection();
|
|
range = document.createRange();
|
|
range.selectNodeContents(element);
|
|
selection.removeAllRanges();
|
|
selection.addRange(range);
|
|
}
|
|
};
|
|
|
|
$(document).ready(function() {
|
|
|
|
$(function() {
|
|
var theTable = $('table.recipestable');
|
|
|
|
$("#filter").keyup(function() {
|
|
$.uiTableFilter( theTable, this.value );
|
|
})
|
|
|
|
$('#filter-form').submit(function(){
|
|
theTable.find("tbody > tr:visible > td:eq(1)").mousedown();
|
|
return false;
|
|
}).focus(); //Give focus to input field
|
|
|
|
$('.selectallicon').mouseup(function() {
|
|
$('#' + $(this).attr('for')).selectText();
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|