liquid_feedback_frontend

view env/ui/field/rank.lua @ 1800:b87997219042

Updated spanish translation
author bsw
date Thu Oct 21 15:22:29 2021 +0200 (2021-10-21)
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

Impressum / About Us