liquid_feedback_frontend
annotate env/ui/field/rank.lua @ 920:43384011b050
Fixed syntax errors in lines 3 and 737 of locale/translations.el.lua
author | jbe |
---|---|
date | Thu Oct 04 13:46:22 2012 +0200 (2012-10-04) |
parents | 0ec49ed35954 |
children |
rev | line source |
---|---|
bsw/jbe@0 | 1 function ui.field.rank(args) |
bsw/jbe@0 | 2 ui.form_element(args, {fetch_value = true}, function(args) |
bsw/jbe@0 | 3 local value = args.value |
bsw@334 | 4 local eligible = args.eligible |
bsw/jbe@0 | 5 ui.tag{ |
bsw/jbe@0 | 6 attr = { class = "rank" }, |
bsw/jbe@0 | 7 content = function() |
bsw@334 | 8 if eligible and value == 1 then |
bsw/jbe@19 | 9 ui.image{ attr = args.image_attr, static = "icons/16/award_star_gold_2.png" } |
bsw@334 | 10 elseif eligible and value then |
bsw/jbe@19 | 11 ui.image{ attr = args.image_attr, static = "icons/16/award_star_silver_2.png" } |
bsw/jbe@0 | 12 else |
bsw/jbe@19 | 13 ui.image{ attr = args.image_attr, static = "icons/16/cross.png" } |
bsw/jbe@0 | 14 end |
bsw/jbe@0 | 15 if value then |
bsw/jbe@0 | 16 ui.tag{ |
bsw/jbe@0 | 17 attr = { class = "value" }, |
bsw/jbe@0 | 18 content = tostring(value) |
bsw/jbe@0 | 19 } |
bsw/jbe@0 | 20 end |
bsw/jbe@0 | 21 end |
bsw/jbe@0 | 22 } |
bsw/jbe@0 | 23 end) |
bsw/jbe@0 | 24 end |