# HG changeset patch
# User jorges
# Date 1284939799 -7200
# Node ID a9ea02807b9498d8fd613603f49f811fe36c31f3
# Parent 7d0f4721d2f309f53fcefd2e2863f6e591d30486
voting result also with percent values
diff -r 7d0f4721d2f3 -r a9ea02807b94 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