liquid_feedback_frontend
annotate env/ui/supporter_count.lua @ 1625:0f4302e67eb6
Removed not used view
author | bsw |
---|---|
date | Mon Feb 08 00:58:05 2021 +0100 (2021-02-08) |
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 |