liquid_feedback_frontend
diff env/ui/field/rank.lua @ 334:0ec49ed35954
Interpret eligible field of initiative correctly when displaying winner badges in initiative listing
author | bsw |
---|---|
date | Tue Feb 28 18:43:42 2012 +0100 (2012-02-28) |
parents | 00d1004545f1 |
children |
line diff
1.1 --- a/env/ui/field/rank.lua Tue Feb 28 18:34:09 2012 +0100 1.2 +++ b/env/ui/field/rank.lua Tue Feb 28 18:43:42 2012 +0100 1.3 @@ -1,12 +1,13 @@ 1.4 function ui.field.rank(args) 1.5 ui.form_element(args, {fetch_value = true}, function(args) 1.6 local value = args.value 1.7 + local eligible = args.eligible 1.8 ui.tag{ 1.9 attr = { class = "rank" }, 1.10 content = function() 1.11 - if value == 1 then 1.12 + if eligible and value == 1 then 1.13 ui.image{ attr = args.image_attr, static = "icons/16/award_star_gold_2.png" } 1.14 - elseif value then 1.15 + elseif eligible and value then 1.16 ui.image{ attr = args.image_attr, static = "icons/16/award_star_silver_2.png" } 1.17 else 1.18 ui.image{ attr = args.image_attr, static = "icons/16/cross.png" }