# HG changeset patch
# User jorges
# Date 1284939799 -7200
# Node ID 4785cb961a761bb22dda2afe98cedacc2b0b426c
# Parent e0b091e2a0f399450df9e581add855138e8a698f
voting result also with percent values
diff -r e0b091e2a0f3 -r 4785cb961a76 app/main/initiative/_show.lua
--- a/app/main/initiative/_show.lua Mon Sep 20 01:18:03 2010 +0200
+++ b/app/main/initiative/_show.lua Mon Sep 20 01:43:19 2010 +0200
@@ -12,11 +12,12 @@
slot.put(" ")
local positive_votes = initiative.positive_votes
local negative_votes = initiative.negative_votes
- slot.put(_"Yes" .. ": " .. tostring(positive_votes) .. "")
+ local sum_votes = initiative.positive_votes + initiative.negative_votes
+ slot.put(_"Yes" .. ": " .. tostring(positive_votes) .. " (" .. string.format("%.f", positive_votes * 100 / sum_votes ) .. "%)" .. "")
slot.put(" · ")
slot.put(_"Abstention" .. ": " .. tostring(max_value - initiative.negative_votes - initiative.positive_votes) .. "")
slot.put(" · ")
- slot.put(_"No" .. ": " .. tostring(initiative.negative_votes) .. "")
+ slot.put(_"No" .. ": " .. tostring(initiative.negative_votes) .. " (" .. string.format( "%.f", negative_votes * 100 / sum_votes ) .. "%)" .. "")
slot.put(" · ")
slot.put("")
if initiative.rank == 1 then