diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-07-18 09:28:25 +0100 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-09-05 00:31:23 +0100 |
commit | 1643aef67d828ff7ca47f63409f23852f8e75e83 (patch) | |
tree | 94383faa89834c8c90042fcc2718733bcb991991 /templates | |
parent | 97361ae37ec6bc0491a419d6cd67435511a036be (diff) | |
download | openembedded-core-contrib-1643aef67d828ff7ca47f63409f23852f8e75e83.tar.gz |
Navigation improvements
* Drop the front page - this just gets in the way. Redirect to the
layers list instead. This has meant adding a touch more text to the
about page and adding the FAQ link to the footer.
* Use a separate navbar to hold the branch selector and the main
top-level pages (Layers, Recipes, Machines) instead of tabs
* All pages depending on a branch selection are now under
branch/<branchname>/ so we don't need to have the branch selection on
every page.
* Use breadcrumbs on recipe detail and layer detail pages instead of
tabs
* Add title to recipe detail page
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 28 | ||||
-rw-r--r-- | templates/base_toplevel.html | 59 | ||||
-rw-r--r-- | templates/layerindex/about.html | 2 | ||||
-rw-r--r-- | templates/layerindex/bulkchangesearch.html | 2 | ||||
-rw-r--r-- | templates/layerindex/detail.html | 11 | ||||
-rw-r--r-- | templates/layerindex/duplicates.html | 35 | ||||
-rw-r--r-- | templates/layerindex/editlayernote.html | 2 | ||||
-rw-r--r-- | templates/layerindex/frontpage.html | 59 | ||||
-rw-r--r-- | templates/layerindex/layers.html | 27 | ||||
-rw-r--r-- | templates/layerindex/machines.html | 25 | ||||
-rw-r--r-- | templates/layerindex/recipedetail.html | 29 | ||||
-rw-r--r-- | templates/layerindex/recipes.html | 27 | ||||
-rw-r--r-- | templates/layerindex/reviewdetail.html | 11 |
13 files changed, 149 insertions, 168 deletions
diff --git a/templates/base.html b/templates/base.html index 525327c2aa..c6ba512a48 100644 --- a/templates/base.html +++ b/templates/base.html @@ -30,31 +30,6 @@ <div class="container-fluid"> <a class="brand" href="{% url frontpage %}">OpenEmbedded metadata index</a> - <ul class="nav"> - {% block branch_selector %} - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - Branch: <b>{{ current_branch }}</b> - <b class="caret"></b> - </a> - <ul class="dropdown-menu"> - {% for branch in all_branches %} - <li><a href="{% url switch_branch branch.name %}"> - {% if branch.name = current_branch %}<b>{% endif %} - {{ branch.name }} - {% if branch.short_description %} - ({{ branch.short_description }}) - {% endif %} - {% if branch.name = current_branch %}</b>{% endif %} - </a></li> - {% endfor %} - {% if oe_classic %} - <li><a href="{% url classic %}">OE-Classic</a></li> - {% endif %} - </ul> - </li> - {% endblock %} - </ul> {% if user.is_authenticated %} <div class="btn-group pull-right"> {% if perms.layerindex.publish_layer %} @@ -90,7 +65,7 @@ </a> <ul class="dropdown-menu"> <li><a href="{% url bulk_change %}">Bulk Change</a></li> - <li><a href="{% url duplicates %}">Duplicates</a></li> + <li><a href="{% url duplicates 'master' %}">Duplicates</a></li> </ul> </li> <li class="divider-vertical"></li> @@ -117,6 +92,7 @@ <div class="footer"> <a href="{% url history_list %}">change history</a> • <a href="{% url about %}">about this site</a> + • <a href="http://www.openembedded.org/Layers_FAQ">FAQ</a> </div> {% endblock %} diff --git a/templates/base_toplevel.html b/templates/base_toplevel.html new file mode 100644 index 0000000000..aad44cb676 --- /dev/null +++ b/templates/base_toplevel.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} +{% load i18n %} + +{% load url from future %} +{% comment %} + + layerindex-web - top level page template + + Copyright (C) 2013 Intel Corporation + Licensed under the MIT license, see COPYING.MIT for details + +{% endcomment %} + +{% block content %} + + <div class="container-fluid"> + <div class="row-fluid"> + + <div class="navbar"> + <div class="navbar-inner"> + <ul class="nav"> + {% block branch_selector %} + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown"> + Branch: <b>{{ url_branch }}</b> + <b class="caret"></b> + </a> + <ul class="dropdown-menu"> + {% for branch in all_branches %} + <li><a href="{% url this_url_name branch.name %}"> + {% if branch.name = url_branch %}<b>{% endif %} + {{ branch.name }} + {% if branch.short_description %} + ({{ branch.short_description }}) + {% endif %} + {% if branch.name = url_branch %}</b>{% endif %} + </a></li> + {% endfor %} + {% if oe_classic %} + <li class="divider"></li> + <li><a href="{% url 'classic' %}">OE-Classic</a></li> + {% endif %} + </ul> + </li> + {% endblock %} + </ul> + + <ul class="nav"> + {% block navs %}{% endblock %} + </ul> + </div> + </div> + + {% block content_inner %}{% endblock %} + + </div> + </div> + +{% endblock %}
\ No newline at end of file diff --git a/templates/layerindex/about.html b/templates/layerindex/about.html index aed689d387..67c646a748 100644 --- a/templates/layerindex/about.html +++ b/templates/layerindex/about.html @@ -9,7 +9,7 @@ {% autoescape on %} <h2>About</h2> -<p>This website indexes layers for the <a href="http://www.openembedded.org">OpenEmbedded</a> build system, suitable for use on top of OpenEmbedded-Core and distributions based upon it, providing additional recipes, machine support and/or distro policy configuration.</p> +<p>This website indexes layers for the <a href="http://www.openembedded.org">OpenEmbedded</a> build system provided by members of the OpenEmbedded / Yocto Project community, suitable for use on top of OpenEmbedded-Core and compatible systems, providing additional recipes, machine support and/or distro policy configuration.</p> <p>If you have a layer for use with OpenEmbedded that you wish to share with others, please <a href="{% url submit_layer %}">submit it</a>!</p> diff --git a/templates/layerindex/bulkchangesearch.html b/templates/layerindex/bulkchangesearch.html index 662c37d2a8..134f9a3cd1 100644 --- a/templates/layerindex/bulkchangesearch.html +++ b/templates/layerindex/bulkchangesearch.html @@ -81,7 +81,7 @@ <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td> <td>{{ recipe.pv }}</td> <td>{{ recipe.short_desc }}</td> - <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td> + <td><a href="{% url layer_item current_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td> </tr> {% endfor %} </tbody> diff --git a/templates/layerindex/detail.html b/templates/layerindex/detail.html index c68bfec91e..6d8904ad43 100644 --- a/templates/layerindex/detail.html +++ b/templates/layerindex/detail.html @@ -21,7 +21,10 @@ {% block content %} {% autoescape on %} - + <ul class="breadcrumb"> + <li><a href="{% url layer_list url_branch %}">Layers</a> <span class="divider">→</span></li> + <li class="active">{{ layeritem.name }}</li> + </ul> <div class="container-fluid"> <div class="row-fluid"> @@ -33,7 +36,7 @@ {% if user.is_authenticated %} <span class="pull-right"> {% if perms.layerindex.publish_layer or useredit %} - <a href="{% url edit_layer layeritem.name %}" class="btn">Edit layer</a> + <a href="{% url edit_layer url_branch layeritem.name %}" class="btn">Edit layer</a> {% if layeritem.layernote_set.count = 0 %} <a href="{% url add_layernote layeritem.name %}" class="btn">Add note</a> {% endif %} @@ -49,7 +52,7 @@ {% if not layerbranch %} <div class="row-fluid"> <div class="alert alert-error"> - This layer does not exist for branch {{ current_branch }}. + This layer does not exist for branch {{ url_branch }}. </div> </div> {% endif %} @@ -141,7 +144,7 @@ <p>The {{ layeritem.name }} layer depends upon:</p> <ul> {% for dep in layerbranch.dependencies_set.all %} - <li><a href="{% url layer_item dep.dependency.name %}">{{ dep.dependency.name }}</a></li> + <li><a href="{% url layer_item url_branch dep.dependency.name %}">{{ dep.dependency.name }}</a></li> {% endfor %} </ul> </div> <!-- end of well --> diff --git a/templates/layerindex/duplicates.html b/templates/layerindex/duplicates.html index c6d06b2195..23472537e2 100644 --- a/templates/layerindex/duplicates.html +++ b/templates/layerindex/duplicates.html @@ -1,5 +1,6 @@ -{% extends "base.html" %} +{% extends "base_toplevel.html" %} {% load i18n %} +{% load url from future %} {% comment %} @@ -19,7 +20,27 @@ {% autoescape on %} <div class="row-fluid"> - <div class="span9 offset1"> + <div class="span12"> + + <div class="btn-group pull-right"> + <a href="#" class="btn dropdown-toggle" data-toggle="dropdown"> + Branch: <b>{{ url_branch }}</b> + <b class="caret"></b> + </a> + <ul class="dropdown-menu"> + {% for branch in all_branches %} + <li><a href="{% url this_url_name branch.name %}"> + {% if branch.name = url_branch %}<b>{% endif %} + {{ branch.name }} + {% if branch.short_description %} + ({{ branch.short_description }}) + {% endif %} + {% if branch.name = url_branch %}</b>{% endif %} + </a></li> + {% endfor %} + </ul> + </div> + <h2>Duplicate recipes</h2> {% if recipes %} <p>Recipes with the same name in different layers:</p> @@ -36,10 +57,10 @@ <tbody> {% for recipe in recipes %} <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></td> <td>{{ recipe.pv }}</td> <td>{{ recipe.short_desc }}</td> - <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td> + <td><a href="{% url 'layer_item' url_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td> </tr> {% endfor %} </tbody> @@ -52,7 +73,7 @@ <div class="row-fluid"> - <div class="span9 offset1"> + <div class="span12"> <h2>Duplicate classes</h2> {% if classes %} <p>Classes with the same name in different layers:</p> @@ -67,8 +88,8 @@ <tbody> {% for class in classes %} <tr> - <td><a href="{% url class.vcs_web_url %}">{{ class.name }}</a></td> - <td><a href="{% url layer_item class.layerbranch.layer.name %}">{{ class.layerbranch.layer.name }}</a></td> + <td><a href="{{ class.vcs_web_url }}">{{ class.name }}</a></td> + <td><a href="{% url 'layer_item' 'master' class.layerbranch.layer.name %}">{{ class.layerbranch.layer.name }}</a></td> </tr> {% endfor %} </tbody> diff --git a/templates/layerindex/editlayernote.html b/templates/layerindex/editlayernote.html index 12957f3d43..1c7693c6bb 100644 --- a/templates/layerindex/editlayernote.html +++ b/templates/layerindex/editlayernote.html @@ -25,7 +25,7 @@ {% csrf_token %} {{ form.as_p }} <input type="submit" value="Save" class='btn' /> -<a href="{% url layer_item form.instance.layer.name %}" class='btn'>Cancel</a> +<a href="{% url layer_item 'master' form.instance.layer.name %}" class='btn'>Cancel</a> </form> {% endautoescape %} diff --git a/templates/layerindex/frontpage.html b/templates/layerindex/frontpage.html deleted file mode 100644 index 2911abcbc3..0000000000 --- a/templates/layerindex/frontpage.html +++ /dev/null @@ -1,59 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load static %} - -{% comment %} - - layerindex-web - front page template - - Copyright (C) 2013 Intel Corporation - Licensed under the MIT license, see COPYING.MIT for details - -{% endcomment %} - - -<!-- -{% block title_append %}{% endblock %} ---> - -{% block content %} -{% autoescape on %} - -<div class="hero-unit hero-evenlyspaced"> - <h1>Welcome!</h1> - <p>Welcome to the OpenEmbedded metadata index. Here you can find metadata (layers, recipes and machines) - provided by members of the OpenEmbedded / Yocto Project community for use on top of OpenEmbedded-Core - and compatible systems.</p> -</div> -<div class="row"> - <div class="span8"> - <div class="well well-frontpage"> - <h2>Finding what you need</h2> - <p>You can browse or search by layer, by recipe or by machine.</p> - <div class="frontpage-button-group"> - <a href="{% url layer_list %}" class="btn btn-large btn-primary">Layers</a> - <a href="{% url recipe_search %}" class="btn btn-large btn-primary">Recipes</a> - <a href="{% url machine_search %}" class="btn btn-large btn-primary">Machines</a> - </div> - <p><small>Note that you are currently viewing - {% if current_branch = 'master' %} - the <span class="branch">master</span> branch - the latest development version of the code. - {% else %} - the <span class="branch">{{ current_branch }}</span> branch. - {% endif %} - You can change between master and release branches at any time using the branch selector on the bar at the top of the page.</small></p> - </div> - </div> - <div class="span4"> - <div class="well well-frontpage"> - <h2>Questions?</h2> - <p>Got some questions about layers or this website? See the <a href="http://www.openembedded.org/Layers_FAQ">FAQ</a>.</p> - </div> - </div> -</div> - -{% endautoescape %} - -{% endblock %} - - diff --git a/templates/layerindex/layers.html b/templates/layerindex/layers.html index f612cb0bfd..4ca43fc836 100644 --- a/templates/layerindex/layers.html +++ b/templates/layerindex/layers.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base_toplevel.html" %} {% load i18n %} {% load static %} @@ -16,23 +16,24 @@ {% block title_append %} - layers{% endblock %} --> -{% block content %} +{% block navs %} {% autoescape on %} + <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> +{% endautoescape %} +{% endblock %} -{% if layerbranch_list %} - <div class="row-fluid"> - <div class="span9 offset1"> - <ul class="nav nav-tabs"> - <li class="active"><a href="{% url layer_list %}">Layers</a></li> - <li><a href="{% url recipe_search %}">Recipes</a></li> - <li><a href="{% url machine_search %}">Machines</a></li> - </ul> +{% block content_inner %} +{% autoescape on %} + +{% if layerbranch_list %} <div class="row-fluid"> <div class="span5"> <form id="filter-form"> - <input type="text" class="input-xxlarge" id="filter" placeholder="Search layers"> + <input type="text" class="input-xxlarge search-query" id="filter" placeholder="Search layers"> </form> </div> @@ -70,7 +71,7 @@ <tbody> {% for layerbranch in layerbranch_list %} <tr class="layertype_{{ layerbranch.layer.layer_type }}"> - <td><a href="{% url layer_item layerbranch.layer.name %}">{{ layerbranch.layer.name }}</a></td> + <td><a href="{% url layer_item url_branch layerbranch.layer.name %}">{{ layerbranch.layer.name }}</a></td> <td>{{ layerbranch.layer.summary }}</td> <td>{{ layerbranch.layer.get_layer_type_display }}</td> <td class="showRollie"> @@ -95,8 +96,6 @@ </tbody> </table> - </div> - </div> {% if is_paginated %} {% load pagination %} diff --git a/templates/layerindex/machines.html b/templates/layerindex/machines.html index f006cc3a5b..1851937d17 100644 --- a/templates/layerindex/machines.html +++ b/templates/layerindex/machines.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base_toplevel.html" %} {% load i18n %} {% comment %} @@ -15,22 +15,22 @@ {% block title_append %} - machines{% endblock %} --> -{% block content %} +{% 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 class="active"><a href="{% url machine_search url_branch %}">Machines</a></li> +{% endautoescape %} +{% endblock %} - <div class="row-fluid"> - <div class="span9 offset1"> +{% block content_inner %} +{% autoescape on %} - <ul class="nav nav-tabs"> - <li><a href="{% url layer_list %}">Layers</a></li> - <li><a href="{% url recipe_search %}">Recipes</a></li> - <li class="active"><a href="{% url machine_search %}">Machines</a></li> - </ul> <div class="row-fluid"> <div class="input-append"> - <form id="filter-form" action="{% url machine_search %}" method="get"> + <form id="filter-form" action="{% url machine_search url_branch %}" method="get"> <input type="text" class="input-xxlarge" id="appendedInputButtons" placeholder="Search machines" name="q" value="{{ search_keyword }}" /> <button class="btn" type="submit">search</button> </form> @@ -52,7 +52,7 @@ <tr> <td><a href="{{ machine.vcs_web_url }}">{{ machine.name }}</a></td> <td>{{ machine.description }}</td> - <td><a href="{% url layer_item machine.layerbranch.layer.name %}">{{ machine.layerbranch.layer.name }}</a></td> + <td><a href="{% url layer_item url_branch machine.layerbranch.layer.name %}">{{ machine.layerbranch.layer.name }}</a></td> </tr> {% endfor %} </tbody> @@ -68,9 +68,6 @@ {% endif %} {% endif %} - </div> - - </div> {% endautoescape %} diff --git a/templates/layerindex/recipedetail.html b/templates/layerindex/recipedetail.html index 17b992c05f..b6f3c5d8bf 100644 --- a/templates/layerindex/recipedetail.html +++ b/templates/layerindex/recipedetail.html @@ -20,23 +20,18 @@ {% block content %} {% autoescape on %} - <div class="row-fluid"> - - <div class="span9 offset1"> + <ul class="breadcrumb"> + <li><a href="{% url layer_list recipe.layerbranch.branch.name %}">Layers</a> <span class="divider">→</span></li> + <li><a href="{% url layer_item recipe.layerbranch.branch.name recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> <span class="divider">→</span></li> + <li class="active">{{ recipe.name }}</li> + </ul> - <ul class="nav nav-tabs"> - <li> - <a href="{% url layer_list %}">Layer index</a> - </li> - <li><a href="{% url recipe_search %}">Recipe index</a></li> - <li class="active"><a href="#">Recipe</a></li> - </ul> + <div class="container-fluid"> + <div class="row-fluid"> - {% if recipe.layerbranch.branch.name != current_branch %} - <div class="alert alert-error"> - This recipe record is for a different branch than the one you have selected. To search for the equivalent recipe on the {{ current_branch }} branch, click <a href="{% url recipe_search %}?q={{ recipe.name }}">here</a>. - </div> - {% endif %} + <div class="page-header"> + <h1>{{ recipe.name }} {{ recipe.pv }}</h1> + </div> <table class="table table-striped table-bordered"> <tbody> @@ -86,7 +81,7 @@ </tr> <tr> <th>Layer</th> - <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> ({{ recipe.layerbranch.branch.name}} branch)</td> + <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> </tbody> </table> @@ -98,7 +93,7 @@ {% for append in appends %} <tr> <td> - <a href="{% url layer_item append.layerbranch.layer.name %}">{{ append.layerbranch.layer.name }}</a> + <a href="{% url layer_item append.layerbranch.branch.name append.layerbranch.layer.name %}">{{ append.layerbranch.layer.name }}</a> </td> <td> <a href="{{ append.vcs_web_url }}">{{ append.filename }}</a> diff --git a/templates/layerindex/recipes.html b/templates/layerindex/recipes.html index bf1c9fc90a..6777ed2558 100644 --- a/templates/layerindex/recipes.html +++ b/templates/layerindex/recipes.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base_toplevel.html" %} {% load i18n %} {% comment %} @@ -15,22 +15,23 @@ {% block title_append %} - recipes{% endblock %} --> -{% block content %} +{% block navs %} {% autoescape on %} + <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> +{% endautoescape %} +{% endblock %} + - <div class="row-fluid"> +{% block content_inner %} +{% autoescape on %} - <div class="span9 offset1"> - <ul class="nav nav-tabs"> - <li><a href="{% url layer_list %}">Layers</a></li> - <li class="active"><a href="{% url recipe_search %}">Recipes</a></li> - <li><a href="{% url machine_search %}">Machines</a></li> - </ul> <div class="row-fluid"> <div class="input-append"> - <form id="filter-form" action="{% url recipe_search %}" method="get"> + <form id="filter-form" action="{% url recipe_search url_branch %}" method="get"> <input type="text" class="input-xxlarge" id="appendedInputButtons" placeholder="Search recipes" name="q" value="{{ search_keyword }}" /> <button class="btn" type="submit">search</button> </form> @@ -54,7 +55,7 @@ <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td> <td>{{ recipe.pv }}</td> <td>{{ recipe.short_desc }}</td> - <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td> + <td><a href="{% url layer_item url_branch recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td> </tr> {% endfor %} </tbody> @@ -70,10 +71,6 @@ {% endif %} {% endif %} - </div> - - </div> - {% endautoescape %} {% endblock %} diff --git a/templates/layerindex/reviewdetail.html b/templates/layerindex/reviewdetail.html index a48513407d..5840e25f4c 100644 --- a/templates/layerindex/reviewdetail.html +++ b/templates/layerindex/reviewdetail.html @@ -35,7 +35,7 @@ {% if user.is_authenticated %} <span class="pull-right"> {% if perms.layerindex.publish_layer or useredit %} - <a href="{% url edit_layer layeritem.name %}?returnto=layer_review" class="btn">Edit layer</a> + <a href="{% url edit_layer 'master' layeritem.name %}?returnto=layer_review" class="btn">Edit layer</a> {% if layeritem.layernote_set.count = 0 %} <a href="{% url add_layernote layeritem.name %}" class="btn">Add note</a> {% endif %} @@ -52,13 +52,6 @@ </div> <!-- end of container-fluid --> <div class="container-fluid"> - {% if not layerbranch %} - <div class="row-fluid"> - <div class="alert alert-error"> - This layer does not exist for branch {{ current_branch }}. - </div> - </div> - {% endif %} <div class="row-fluid"> {% for note in layeritem.layernote_set.all %} <div class="alert"> @@ -170,7 +163,7 @@ <td> <ul class="unstyled"> {% for dep in layerbranch.dependencies_set.all %} - <li><a href="{% url layer_item dep.dependency.name %}">{{ dep.dependency.name }}</a></li> + <li><a href="{% url layer_item 'master' dep.dependency.name %}">{{ dep.dependency.name }}</a></li> {% endfor %} </ul> </td> |