diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-03-06 15:58:01 +0000 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-03-06 16:55:23 +0000 |
commit | 93be8b11720c184092d1b270816ff00e6e698a8c (patch) | |
tree | b2aedaea6faef293214cf010bffdefaf7494f3e5 /templates/pagination.html | |
parent | 5308e03c9e090591ca14c66daa0d959dc9993bd8 (diff) | |
download | openembedded-core-contrib-93be8b11720c184092d1b270816ff00e6e698a8c.tar.gz |
Move all templates to a templates directory
This should allow the templates to be found and swapped out more easily.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'templates/pagination.html')
-rw-r--r-- | templates/pagination.html | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/templates/pagination.html b/templates/pagination.html new file mode 100644 index 0000000000..4e08cb7fdf --- /dev/null +++ b/templates/pagination.html @@ -0,0 +1,57 @@ +{% comment %} + + layerindex-web - pagination template + + Copyright (C) 2013 Intel Corporation + Licensed under the MIT license, see COPYING.MIT for details + +{% endcomment %} + +{% load addurlparameter %} + +<div class="pagination pagination-centered"> + <ul> + {% if page.has_previous %} + <li><a href="{% addurlparameter 'page' page.previous_page_number %}">prev</a></li> + {% else %} + <li class="disabled"><span>prev</span></li> + {% endif %} + + + {% for pnum in begin %} + {% if pnum == page.number %} + <li class="active"><a href="#">{{ page.number }}</a></li> + {% else %} + <li><a href="{% addurlparameter 'page' pnum %}">{{ pnum }}</a></li> + {% endif %} + {% endfor %} + + {% if middle %} + <li class="disabled"><span>...</span></li> + {% for pnum in middle %} + {% if pnum == page.number %} + <li class="active"><span>{{ page.number }}</span></li> + {% else %} + <li><a href="{% addurlparameter 'page' pnum %}">{{ pnum }}</a></li> + {% endif %} + {% endfor %} + {% endif %} + + {% if end %} + <li class="disabled"><span>...</span></li> + {% for pnum in end %} + {% if pnum == page.number %} + <li class="active"><span>{{ page.number }}</span></li> + {% else %} + <li><a href="{% addurlparameter 'page' pnum %}">{{ pnum }}</a></li> + {% endif %} + {% endfor %} + {% endif %} + + {% if page.has_next %} + <li><a href="{% addurlparameter 'page' page.next_page_number %}">next</a></li> + {% else %} + <li class="disabled"><span>next</span></li> + {% endif %} + </ul> +</div> |