From fd600fb716ce46a0f73ca0017f1923fba6cb53ef Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 19 Feb 2013 11:41:51 +0000 Subject: [PATCH] Initial version of recipe detail page Signed-off-by: Paul Eggleton --- layerindex/detail.html | 2 +- layerindex/recipedetail.html | 84 ++++++++++++++++++++++++++++++++++++ layerindex/recipes.html | 2 +- layerindex/urls.py | 5 +++ 4 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 layerindex/recipedetail.html diff --git a/layerindex/detail.html b/layerindex/detail.html index 3b70229..2ddea1a 100644 --- a/layerindex/detail.html +++ b/layerindex/detail.html @@ -173,7 +173,7 @@ {% for recipe in layeritem.sorted_recipes %} - {{ recipe.name }} + {{ recipe.name }} {{ recipe.pv }} {{ recipe.short_desc }} diff --git a/layerindex/recipedetail.html b/layerindex/recipedetail.html new file mode 100644 index 0000000..c634bfe --- /dev/null +++ b/layerindex/recipedetail.html @@ -0,0 +1,84 @@ +{% extends "base.html" %} +{% load i18n %} + +{% comment %} + + layerindex-web - recipe detail page template + + Copyright (C) 2013 Intel Corporation + Licensed under the MIT license, see COPYING.MIT for details + +{% endcomment %} + + + + +{% block content %} +{% autoescape on %} + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name{{ recipe.name }}
Version{{ recipe.pv }}
Summary{{ recipe.summary }}
Description{{ recipe.description }}
Section{{ recipe.section }}
License{{ recipe.license }}
Homepage{% if recipe.homepage %}{{ recipe.homepage }}{% endif %}
Recipe file + {% if recipe.vcs_web_url %} + {{ recipe.full_path }} + {% else %} + {{ recipe.full_path }} + {% endif %} +
Layer{{ recipe.layer.name }}
+
+
+ +{% endautoescape %} + +{% endblock %} diff --git a/layerindex/recipes.html b/layerindex/recipes.html index 589d550..a51831d 100644 --- a/layerindex/recipes.html +++ b/layerindex/recipes.html @@ -53,7 +53,7 @@ {% for recipe in recipe_list %} - {{ recipe.name }} + {{ recipe.name }} {{ recipe.pv }} {{ recipe.short_desc }} {{ recipe.layer.name }} diff --git a/layerindex/urls.py b/layerindex/urls.py index 21bc64d..e05e23b 100644 --- a/layerindex/urls.py +++ b/layerindex/urls.py @@ -32,6 +32,11 @@ urlpatterns = patterns('', slug_field = 'name', template_name='layerindex/detail.html'), name='layer_item'), + url(r'^recipe/(?P[-\w]+)/$', + DetailView.as_view( + model=Recipe, + template_name='layerindex/recipedetail.html'), + name='recipe'), url(r'^layer/(?P[-\w]+)/publish/$', 'layerindex.views.publish', name="publish"), url(r'^raw/recipes.txt$', PlainTextListView.as_view(