layerindex-web/layerindex/detail.html
Belen Barros 18bbce1de9 Layer details style changes
Changed to full screen layout to improve the table display
and get rid of the accordion for the layer information.

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
2013-02-22 17:11:20 +00:00

188 lines
6.6 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% comment %}
layerindex-web - layer detail page template
Copyright (C) 2013 Intel Corporation
Licensed under the MIT license, see COPYING.MIT for details
{% endcomment %}
<!--
{% block title %}OpenEmbedded metadata index - {{ layeritem.name }}{% endblock %}
-->
{% block content %}
{% autoescape on %}
<div class="container-fluid">
<div class="row-fluid">
<div class="page-header">
<h1>{{ layeritem.name }}
{% if user.is_authenticated %}
{% if layeritem.status = "N" %}
<a href="{% url publish layeritem.name %}" class="btn btn-primary pull-right">Publish layer</a>
{% endif %}
{% endif %}
</h1>
</div>
</div> <!-- end of row-fluid -->
</div> <!-- end of container-fluid -->
<div class="container-fluid">
<div class="row-fluid">
<div class="description span7">
<p>
{{ layeritem.description }}
</p>
<p>
{% if layeritem.usage_url %}
<span class="label label-info">
<a href="{{ layeritem.usage_url }}">Setup information</a>
</span>
{% endif %}
</p>
<h3>Git repository</h3>
<p> {{ layeritem.vcs_url }}
{% 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>{{ layeritem.vcs_subdir }}
{% if layeritem.tree_url %}
<span class="label label-info">
<a href="{{ layeritem.tree_url }}">web subdirectory</a>
</span>
{% endif %}
</p>
{% endif %}
<h3>{% if layeritem.active_maintainers|length = 1 %}Maintainer{% else %}Maintainers{% endif %}</h3>
<ul>
{% for maintainer in layeritem.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>
</div> <!-- end of span7 -->
<div class="span4 pull-right description">
{% if layeritem.dependencies_set.all %}
<div class="well dependency-well">
<h3>Dependencies </h3>
<p>The {{ layeritem.name }} layer depends upon:</p>
<ul>
{% for dep in layeritem.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 -->
<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 layeritem.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 class="row-fluid">
{% if user.is_authenticated %}
{% if layeritem.status = "N" %}
<a href="{% url publish layeritem.name %}" class="btn btn-primary pull-right">Publish layer</a>
{% endif %}
{% endif %}
</div>
</div>
{% endautoescape %}
{% endblock %}
{% block scripts %}
<script src="/static/js/uitablefilter.js" ></script>
<script>
$(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
});
});
</script>
{% endblock %}