liquid_feedback_frontend

diff app/main/initiative/_list_element.lua @ 1666:f582e3d6434c

Fixed display of pie chart
author bsw
date Mon Feb 15 15:31:12 2021 +0100 (2021-02-15)
parents 97dfef4eb2d7
children 8d36c14128d4
line diff
     1.1 --- a/app/main/initiative/_list_element.lua	Mon Feb 15 15:24:26 2021 +0100
     1.2 +++ b/app/main/initiative/_list_element.lua	Mon Feb 15 15:31:12 2021 +0100
     1.3 @@ -4,6 +4,8 @@
     1.4  
     1.5  local issue = initiative.issue
     1.6  
     1.7 +local position = param.get("position", atom.number)
     1.8 +
     1.9  if initiative.vote_grade ~= nil then
    1.10    if initiative.vote_grade > 0 then
    1.11      local text = _"voted yes"
    1.12 @@ -30,6 +32,12 @@
    1.13  ui.container{
    1.14    attr = { class = class },
    1.15    content = function ()
    1.16 +    if position == 1 and not for_member and (
    1.17 +      initiative.issue.state == "finished_with_winner" 
    1.18 +      or initiative.issue.state == "finished_without_winner"
    1.19 +    ) then
    1.20 +      util.initiative_pie(initiative)
    1.21 +    end
    1.22      ui.container {
    1.23        attr = { class = "initiative_name" },
    1.24        content = function()

Impressum / About Us