From 31c85196d05392726afaed622b46b13210e5912b Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Tue, 4 Oct 2016 14:00:20 -0400 Subject: 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 Added associated migration. Signed-off-by: Mark Hatle --- templates/layerindex/detail.html | 23 ++++++++++++ templates/layerindex/distros.html | 76 ++++++++++++++++++++++++++++++++++++++ templates/layerindex/layers.html | 1 + templates/layerindex/machines.html | 1 + templates/layerindex/recipes.html | 1 + 5 files changed, 102 insertions(+) create mode 100644 templates/layerindex/distros.html (limited to 'templates/layerindex') 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 %}
  • Classes
  • {% endif %} + {% if distros.count > 0 %} +
  • Distros
  • + {% endif %}
    @@ -265,6 +268,26 @@
    {% endif %} + {% if distros.count > 0 %} +
    + + + + + {% for distro in distros %} + + + + + {% endfor %} + +
    {{ distro.name }}{{ distro.description }}
    +
    + {% endif %} 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 navs %} +{% autoescape on %} +
  • Layers
  • +
  • Recipes
  • +
  • Machines
  • +
  • Distros
  • +{% endautoescape %} +{% endblock %} + + +{% block content_inner %} +{% autoescape on %} + + +
    +
    +
    + + +
    +
    +
    + +{% if distro_list %} + + + + + + + + + + + {% for distro in distro_list %} + + + + + + {% endfor %} + +
    Distro nameDescriptionLayer
    {{ distro.name }}{{ distro.description }}{{ distro.layerbranch.layer.name }}
    + + {% if is_paginated %} + {% load pagination %} + {% pagination page_obj %} + {% endif %} +{% else %} + {% if search_keyword %} +

    No matching distros in database.

    + {% 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 @@
  • Layers
  • Recipes
  • Machines
  • +
  • Distros
  • {% 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 @@
  • Layers
  • Recipes
  • Machines
  • +
  • Distros
  • {% 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 @@
  • Layers
  • Recipes
  • Machines
  • +
  • Distros
  • {% endautoescape %} {% endblock %} -- cgit 1.2.3-korg