liquid_feedback_frontend
view env/ui/supporter_count.lua @ 1517:4f182720a2ec
Automatically fix inconsistent session cookies
author | bsw |
---|---|
date | Thu Aug 20 14:25:34 2020 +0200 (2020-08-20) |
parents | 32cc544d5a5b |
children | accb808d5b4a |
line source
1 function ui.supporter_count(initiative)
2 if initiative.supporter_count == nil then
3 ui.tag {
4 attr = { class = "supporterCount" },
5 content = _"[calculating]"
6 }
7 elseif initiative.issue.closed == nil then
8 ui.tag {
9 attr = { class = "satisfiedSupporterCount" },
10 content = _("#{count} supporter", { count = initiative.satisfied_supporter_count })
11 }
12 if initiative.potential_supporter_count and
13 initiative.potential_supporter_count > 0
14 then
15 slot.put ( " " )
16 ui.tag {
17 attr = { class = "potentialSupporterCount" },
18 content = _("(+ #{count} potential)", { count = initiative.potential_supporter_count })
19 }
20 end
21 end
22 end