aboutsummaryrefslogtreecommitdiffstats
path: root/templates/layerindex
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@WindRiver.com>2016-10-04 14:00:20 -0400
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-10-18 16:42:15 +1300
commit31c85196d05392726afaed622b46b13210e5912b (patch)
tree5cc4f950ff2f41f535f7eceef913765c1221c12c /templates/layerindex
parent4f0be8a7d03124aa834431e301a2f54abf05cd61 (diff)
downloadopenembedded-core-contrib-31c85196d05392726afaed622b46b13210e5912b.tar.gz
layerindex: Add distro to web interface and model
Add the distros to the index. This looks a lot like the machines and allows users to search for a particular distro. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com> Added associated migration. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'templates/layerindex')
-rw-r--r--templates/layerindex/detail.html23
-rw-r--r--templates/layerindex/distros.html76
-rw-r--r--templates/layerindex/layers.html1
-rw-r--r--templates/layerindex/machines.html1
-rw-r--r--templates/layerindex/recipes.html1
5 files changed, 102 insertions, 0 deletions
diff --git a/templates/layerindex/detail.html b/templates/layerindex/detail.html
index d0d11c05b0..4bd7ecf657 100644
--- a/templates/layerindex/detail.html
+++ b/templates/layerindex/detail.html
@@ -168,6 +168,9 @@
{% if classes.count > 0 %}
<li><a href="#classes" data-toggle="tab">Classes</a></li>
{% endif %}
+ {% if distros.count > 0 %}
+ <li><a href="#distros" data-toggle="tab">Distros</a></li>
+ {% endif %}
</ul>
<div class="tab-content">
@@ -265,6 +268,26 @@
</table>
</div>
{% endif %}
+ {% if distros.count > 0 %}
+ <div class="tab-pane" id="distros">
+ <div class="navbar">
+ <div class="navbar-inner">
+ <a class="brand pull-left">{{ layeritem.name }} distros</a>
+ </div>
+ </div>
+
+ <table class="table table-bordered">
+ <tbody>
+ {% for distro in distros %}
+ <tr>
+ <td><a href="{{ distro.vcs_web_url }}">{{ distro.name }}</a></td>
+ <td>{{ distro.description }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ {% endif %}
</div>
diff --git a/templates/layerindex/distros.html b/templates/layerindex/distros.html
new file mode 100644
index 0000000000..70855848e6
--- /dev/null
+++ b/templates/layerindex/distros.html
@@ -0,0 +1,76 @@
+{% extends "base_toplevel.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - distro index page template
+
+ Copyright (C) 2013 Intel Corporation
+ Copyright (C) 2016 Wind River Systems
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title_append %} - distros{% endblock %}
+-->
+
+{% block navs %}
+{% autoescape on %}
+ <li><a href="{% url 'layer_list' url_branch %}">Layers</a></li>
+ <li><a href="{% url 'recipe_search' url_branch %}">Recipes</a></li>
+ <li><a href="{% url 'machine_search' url_branch %}">Machines</a></li>
+ <li class="active"><a href="{% url 'distro_search' url_branch %}">Distros</a></li>
+{% endautoescape %}
+{% endblock %}
+
+
+{% block content_inner %}
+{% autoescape on %}
+
+
+ <div class="row-fluid">
+ <div class="input-append">
+ <form id="filter-form" action="{% url 'distro_search' url_branch %}" method="get">
+ <input type="text" class="input-xxlarge" id="appendedInputButtons" placeholder="Search distros" name="q" value="{{ search_keyword }}" />
+ <button class="btn" type="submit">search</button>
+ </form>
+ </div>
+ </div>
+
+{% if distro_list %}
+ <table class="table table-striped table-bordered distrostable">
+ <thead>
+ <tr>
+ <th>Distro name</th>
+ <th class="span9">Description</th>
+ <th>Layer</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {% for distro in distro_list %}
+ <tr>
+ <td><a href="{{ distro.vcs_web_url }}">{{ distro.name }}</a></td>
+ <td>{{ distro.description }}</td>
+ <td><a href="{% url 'layer_item' url_branch distro.layerbranch.layer.name %}">{{ distro.layerbranch.layer.name }}</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ {% if is_paginated %}
+ {% load pagination %}
+ {% pagination page_obj %}
+ {% endif %}
+{% else %}
+ {% if search_keyword %}
+ <p>No matching distros in database.</p>
+ {% endif %}
+{% endif %}
+
+
+{% endautoescape %}
+
+{% endblock %}
diff --git a/templates/layerindex/layers.html b/templates/layerindex/layers.html
index cfc4ebd078..b11ff2f1c0 100644
--- a/templates/layerindex/layers.html
+++ b/templates/layerindex/layers.html
@@ -21,6 +21,7 @@
<li class="active"><a href="{% url 'layer_list' url_branch %}">Layers</a></li>
<li><a href="{% url 'recipe_search' url_branch %}">Recipes</a></li>
<li><a href="{% url 'machine_search' url_branch %}">Machines</a></li>
+ <li><a href="{% url 'distro_search' url_branch %}">Distros</a></li>
{% endautoescape %}
{% endblock %}
diff --git a/templates/layerindex/machines.html b/templates/layerindex/machines.html
index e31433c0a6..2a9f947321 100644
--- a/templates/layerindex/machines.html
+++ b/templates/layerindex/machines.html
@@ -20,6 +20,7 @@
<li><a href="{% url 'layer_list' url_branch %}">Layers</a></li>
<li><a href="{% url 'recipe_search' url_branch %}">Recipes</a></li>
<li class="active"><a href="{% url 'machine_search' url_branch %}">Machines</a></li>
+ <li><a href="{% url 'distro_search' url_branch %}">Distros</a></li>
{% endautoescape %}
{% endblock %}
diff --git a/templates/layerindex/recipes.html b/templates/layerindex/recipes.html
index 74f3bb431e..60a266756f 100644
--- a/templates/layerindex/recipes.html
+++ b/templates/layerindex/recipes.html
@@ -20,6 +20,7 @@
<li><a href="{% url 'layer_list' url_branch %}">Layers</a></li>
<li class="active"><a href="{% url 'recipe_search' url_branch %}">Recipes</a></li>
<li><a href="{% url 'machine_search' url_branch %}">Machines</a></li>
+ <li><a href="{% url 'distro_search' url_branch %}">Distros</a></li>
{% endautoescape %}
{% endblock %}