liquid_feedback_frontend

annotate env/ui/supporter_count.lua @ 1349:14a75a6c02c3

Fixed field name part 2
author bsw
date Mon Aug 06 13:15:16 2018 +0200 (2018-08-06)
parents 32cc544d5a5b
children accb808d5b4a
rev   line source
bsw/jbe@1309 1 function ui.supporter_count(initiative)
bsw/jbe@1309 2 if initiative.supporter_count == nil then
bsw/jbe@1309 3 ui.tag {
bsw/jbe@1309 4 attr = { class = "supporterCount" },
bsw/jbe@1309 5 content = _"[calculating]"
bsw/jbe@1309 6 }
bsw/jbe@1309 7 elseif initiative.issue.closed == nil then
bsw/jbe@1309 8 ui.tag {
bsw/jbe@1309 9 attr = { class = "satisfiedSupporterCount" },
bsw/jbe@1309 10 content = _("#{count} supporter", { count = initiative.satisfied_supporter_count })
bsw/jbe@1309 11 }
bsw/jbe@1309 12 if initiative.potential_supporter_count and
bsw/jbe@1309 13 initiative.potential_supporter_count > 0
bsw/jbe@1309 14 then
bsw/jbe@1309 15 slot.put ( " " )
bsw/jbe@1309 16 ui.tag {
bsw/jbe@1309 17 attr = { class = "potentialSupporterCount" },
bsw/jbe@1309 18 content = _("(+ #{count} potential)", { count = initiative.potential_supporter_count })
bsw/jbe@1309 19 }
bsw/jbe@1309 20 end
bsw/jbe@1309 21 end
bsw/jbe@1309 22 end

Impressum / About Us