bsw/jbe@1309: function ui.supporter_count(initiative) bsw/jbe@1309: if initiative.supporter_count == nil then bsw/jbe@1309: ui.tag { bsw/jbe@1309: attr = { class = "supporterCount" }, bsw/jbe@1309: content = _"[calculating]" bsw/jbe@1309: } bsw/jbe@1309: elseif initiative.issue.closed == nil then bsw/jbe@1309: ui.tag { bsw/jbe@1309: attr = { class = "satisfiedSupporterCount" }, bsw/jbe@1309: content = _("#{count} supporter", { count = initiative.satisfied_supporter_count }) bsw/jbe@1309: } bsw/jbe@1309: if initiative.potential_supporter_count and bsw/jbe@1309: initiative.potential_supporter_count > 0 bsw/jbe@1309: then bsw/jbe@1309: slot.put ( " " ) bsw/jbe@1309: ui.tag { bsw/jbe@1309: attr = { class = "potentialSupporterCount" }, bsw/jbe@1309: content = _("(+ #{count} potential)", { count = initiative.potential_supporter_count }) bsw/jbe@1309: } bsw/jbe@1309: end bsw/jbe@1309: end bsw/jbe@1309: end