~andreserl/+junk/cobbler

« back to all changes in this revision

Viewing changes to web/cobbler_web/templates/paginate.tmpl

  • Committer: Andres Rodriguez
  • Date: 2011-12-09 17:39:33 UTC
  • mfrom: (50.1.5 trunk)
  • Revision ID: andreserl@ubuntu.com-20111209173933-6mel1k0noqjd1vad
Tags: 2.1.0+git20110602-0ubuntu26.2
* SECURITY UPDATE: arbitrary code execution via PYTHON_EGG_CACHE in insecure
  location (LP: #858875)
  - debian/patches/58_fix_egg_cache.patch: move PYTHON_EGG_CACHE to
    /var/lib/cobbler/webui_cache (copied from fix to precise).
* SECURITY UPDATE: CSRF vulnerability in cobbler-web (LP: #858878)
  - debian/patches/59_add_csrf_protection.patch: use Django's built-in
    CSRF protection (taken from upstream).
* SECURITY UPDATE: arbitrary code execution via web interface (LP: #858883)
  - debian/patches/60_yaml_safe_load.patch: use yaml.safe_load instead of
    yaml.load (taken from upstream).
* SECURITY UPDATE: users.digest file is world readable (LP: #858860)
  - debian/cobbler.postinst: create /etc/cobbler/users.digest as 600
* SECURITY UPDATE: webui_sessions uses insecure permissions (LP: #863755)
  - debian/cobbler.postinst: fix permissions on webui_{sessions,cache} to
    0700

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{% if pageinfo %}
 
2
<script type="text/javascript">
 
3
// All of these functions depend on the form "action" defined in generic_list
 
4
function change_limit(value) {
 
5
    document.forms["action"].action = '/cobbler_web/{{ what }}/modifylist/limit/' + value
 
6
    document.forms["action"].submit();
 
7
}
 
8
function change_page(value) {
 
9
    document.forms["action"].action = '/cobbler_web/{{ what }}/modifylist/page/' + value
 
10
    document.forms["action"].submit();
 
11
}
 
12
</script>
 
13
 
2
14
<li class="paginate"><label for="limit">Items/page:</label>
3
 
  <select name="limit" id="limit" onchange="javascript:location='/cobbler_web/{{ what }}/modifylist/limit/'+this.value">
 
15
  <select name="limit" id="limit" onchange="javascript:change_limit(this.value)">
4
16
  {% for p in pageinfo.items_per_page_list %}
5
17
    <option value="{{ p }}"{% ifequal pageinfo.items_per_page p %} selected="selected"{% endifequal %}>{{ p }}</option>
6
18
  {% endfor %}
7
19
  </select>
8
20
  {% ifnotequal pageinfo.prev_page "~" %}
9
 
  <a href="/cobbler_web/{{ what }}/modifylist/page/{{ pageinfo.prev_page }}"><span class="lpointers">&lArr;</span></a>
 
21
  <a href="javascript:change_page('{{ pageinfo.prev_page }}')"><span class="lpointers">&lArr;</span></a>
10
22
  {% else %}
11
23
  <span class="lpointers">&lArr;</span>
12
24
  {% endifnotequal %}
13
 
  <select name="page" id="page" onchange="javascript:location='/cobbler_web/{{ what }}/modifylist/page/'+this.value">
 
25
  <select name="page" id="page" onchange="javascript:change_page(this.value)">
14
26
    {% for p in pageinfo.pages %}<option value="{{ p }}"{% ifequal pageinfo.page p %} selected="selected"{% endifequal %}>Page {{ p }}</option>{% endfor %}
15
27
  </select>
16
28
  {% ifnotequal pageinfo.next_page "~" %}
17
 
  <a href="/cobbler_web/{{ what }}/modifylist/page/{{ pageinfo.next_page }}"><span class="rpointers">&rArr;</span></a>
 
29
  <a href="javascript:change_page('{{ pageinfo.next_page }}')"><span class="rpointers">&rArr;</span></a>
18
30
  {% else %}
19
31
  <span class="rpointers">&rArr;</span>
20
32
  {% endifnotequal %}