liquid_feedback_frontend
view 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 |
line source
1 function ui.field.rank(args)
2 ui.form_element(args, {fetch_value = true}, function(args)
3 local value = args.value
4 local eligible = args.eligible
5 ui.tag{
6 attr = { class = "rank" },
7 content = function()
8 if eligible and value == 1 then
9 ui.image{ attr = args.image_attr, static = "icons/16/award_star_gold_2.png" }
10 elseif eligible and value then
11 ui.image{ attr = args.image_attr, static = "icons/16/award_star_silver_2.png" }
12 else
13 ui.image{ attr = args.image_attr, static = "icons/16/cross.png" }
14 end
15 if value then
16 ui.tag{
17 attr = { class = "value" },
18 content = tostring(value)
19 }
20 end
21 end
22 }
23 end)
24 end