aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-02-09 15:56:47 +0000
committerMichael Wood <michael.g.wood@intel.com>2015-02-09 15:59:10 +0000
commitf129efeeee54553ea6bbf932114083cbf70e21db (patch)
tree6af0d86ab6592c323b2eb3961433342c1c0b9d9a
parent5150b3516fd3edd9fd16621f580e761b9329653b (diff)
downloaderror-report-web-f129efeeee54553ea6bbf932114083cbf70e21db.tar.gz
error-report-web-f129efeeee54553ea6bbf932114083cbf70e21db.tar.bz2
error-report-web-f129efeeee54553ea6bbf932114083cbf70e21db.zip
latest-errors: Force integer comparison for page size in template
Previously this worked but now we need to explicitly force the template variable to an integer so that it evaluates correctly against the value we have saved in the session. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
-rw-r--r--templates/latest-errors.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/latest-errors.html b/templates/latest-errors.html
index 3934b9d..2acb02b 100644
--- a/templates/latest-errors.html
+++ b/templates/latest-errors.html
@@ -19,12 +19,12 @@
{% endif %}
<div class="pull-right">
- <span class="help-inline" style="padding-top:5px;">Show rows:</span>
+ <span class="help-inline" style="padding-top:5px;">Show rows: </span>
<select style="margin-top:5px;margin-bottom:0px;" class="input-mini pagesize">
{% with "10 25 50 100 150" as list%}
{% for i in list.split %}
- {% if request.session.limit == i %}
- <option value="{{i}}" selected>{{i}}</option>
+ {% if request.session.limit == i|add:0 %}
+ <option value="{{i}}" class="active" selected>{{i}}</option>
{% else %}
<option value="{{i}}">{{i}}</option>
{% endif %}
@@ -194,7 +194,7 @@
<select style="margin-top:5px;margin-bottom:0px;" class="input-mini pagesize">
{% with "10 25 50 100 150" as list%}
{% for i in list.split %}
- {% if request.session.limit == i %}
+ {% if request.session.limit == i|add:0 %}
<option value="{{i}}" selected>{{i}}</option>
{% else %}
<option value="{{i}}">{{i}}</option>