diff options
author | Alex Franco <alejandro.franco@linux.intel.com> | 2015-08-31 22:02:46 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-10-07 11:34:28 +0100 |
commit | fd63761d2a2f5b8e630cb34885249622cc4d9ce1 (patch) | |
tree | ced5c6769c930318ecc1f39d4304c006e589794d /templates | |
parent | 8966d2ea4e04a50f46a2816939733290f2124b66 (diff) | |
download | openembedded-core-contrib-fd63761d2a2f5b8e630cb34885249622cc4d9ce1.tar.gz |
Support for recipe inherits field
To identify image recipes and provide inheritance data for recipes, an
inherits field was added to the recipe model, and then populated using
refactored data from __inherit_cache. Finally the field was also added
to page templates, along with style changes proposed in attachment, and
an additional style change to display the inherits field as a list in
detailed view. The field skips globally inherited data as proposed.
[YOCTO #7575]
Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/layerindex/detail.html | 4 | ||||
-rw-r--r-- | templates/layerindex/recipedetail.html | 12 | ||||
-rw-r--r-- | templates/layerindex/recipes.html | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/templates/layerindex/detail.html b/templates/layerindex/detail.html index e013e4ce2d..8a734ffa32 100644 --- a/templates/layerindex/detail.html +++ b/templates/layerindex/detail.html @@ -198,7 +198,7 @@ <tbody> {% for recipe in layerbranch.sorted_recipes %} <tr> - <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td> + <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a>{% if 'image' in recipe.inherits.split %}<i class="icon-hdd"></i>{% endif %}</td> <td>{{ recipe.pv }}</td> <td class="span8">{{ recipe.short_desc }}</td> </tr> @@ -321,6 +321,8 @@ e.preventDefault(); $(this).tab('show'); }) + + $('.icon-hdd').tooltip({title:"Inherits image"}); }); }); </script> diff --git a/templates/layerindex/recipedetail.html b/templates/layerindex/recipedetail.html index 658694e8db..3b8c79b539 100644 --- a/templates/layerindex/recipedetail.html +++ b/templates/layerindex/recipedetail.html @@ -83,6 +83,18 @@ <th>Layer</th> <td><a href="{% url layer_item recipe.layerbranch.branch.name recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> ({{ recipe.layerbranch.branch.name}} branch)</td> </tr> + <tr> + <th>Inherits</th> + <td> + {% if recipe.inherits %} + <ul class="unstyled"> + {% for recipe in recipe.inherits.split %} + <li>{{ recipe }}</li> + {% endfor %} + </ul> + {% endif %} + </td> + </tr> </tbody> </table> diff --git a/templates/layerindex/recipes.html b/templates/layerindex/recipes.html index 6777ed2558..322d7c6fdd 100644 --- a/templates/layerindex/recipes.html +++ b/templates/layerindex/recipes.html @@ -52,7 +52,7 @@ <tbody> {% for recipe in recipe_list %} <tr {% if recipe.preferred_count > 0 %}class="muted"{% endif %}> - <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td> + <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a>{% if 'image' in recipe.inherits.split %}<i class="icon-hdd"></i>{% endif %}</td> <td>{{ recipe.pv }}</td> <td>{{ recipe.short_desc }}</td> <td><a href="{% url layer_item url_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td> @@ -82,6 +82,8 @@ firstfield = $("#filter-form input:text").first() if( ! firstfield.val() ) firstfield.focus() + + $('.icon-hdd').tooltip({title:"Inherits image"}); }); </script> {% endblock %} |