liquid_feedback_frontend

diff app/main/initiative/_sidebar_state.lua @ 1309:32cc544d5a5b

Cumulative patch for upcoming frontend version 4
author bsw/jbe
date Sun Jul 15 14:07:29 2018 +0200 (2018-07-15)
parents 7e48d429389f
children 7cdc537f991f
line diff
     1.1 --- a/app/main/initiative/_sidebar_state.lua	Thu Jun 23 03:30:57 2016 +0200
     1.2 +++ b/app/main/initiative/_sidebar_state.lua	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -15,6 +15,9 @@
     1.4                negative_votes - 
     1.5                positive_votes
     1.6        local head_text
     1.7 +
     1.8 +      util.initiative_pie( initiative )
     1.9 +      
    1.10        if initiative.winner then
    1.11          head_text = _"Approved"
    1.12        elseif initiative.rank then
    1.13 @@ -23,8 +26,6 @@
    1.14          head_text = _"Rejected"
    1.15        end
    1.16  
    1.17 -      util.initiative_pie( initiative )
    1.18 -      
    1.19        ui.heading { level = 1, content = head_text }
    1.20        
    1.21        ui.tag { tag = "table", content = function ()
    1.22 @@ -38,6 +39,16 @@
    1.23            }
    1.24            ui.tag { tag = "th", content = _"Yes" }
    1.25          end }
    1.26 +        ui.tag { tag = "tr", attr = { class = "no" }, content = function ()
    1.27 +          ui.tag { tag = "td", content = 
    1.28 +            tostring(negative_votes)
    1.29 +          }
    1.30 +          ui.tag { tag = "th", content = _"No" }
    1.31 +          ui.tag { tag = "td", content =
    1.32 +            format.percent_floor(negative_votes, max_value) 
    1.33 +          }
    1.34 +          ui.tag { tag = "th", content = _"No" }
    1.35 +        end }
    1.36          ui.tag { tag = "tr", attr = { class = "abstention" }, content = function ()
    1.37            ui.tag { tag = "td", content = 
    1.38              tostring(abstention_votes)
    1.39 @@ -48,16 +59,6 @@
    1.40            }
    1.41            ui.tag { tag = "th", content = _"Abstention" }
    1.42          end }
    1.43 -        ui.tag { tag = "tr", attr = { class = "no" }, content = function ()
    1.44 -          ui.tag { tag = "td", content = 
    1.45 -            tostring(negative_votes)
    1.46 -          }
    1.47 -          ui.tag { tag = "th", content = _"No" }
    1.48 -          ui.tag { tag = "td", content =
    1.49 -            format.percent_floor(negative_votes, max_value) 
    1.50 -          }
    1.51 -          ui.tag { tag = "th", content = _"No" }
    1.52 -        end }
    1.53        end }
    1.54      end
    1.55    }
    1.56 @@ -108,4 +109,4 @@
    1.57      end
    1.58    }
    1.59  end
    1.60 - 
    1.61 \ No newline at end of file
    1.62 + 

Impressum / About Us