liquid_feedback_frontend
diff app/main/lf2/initiative.lua @ 217:73dbc9e2bfd4
Cummulative patch for enhancements at next generation frontend
author | bsw |
---|---|
date | Sat Mar 12 19:22:50 2011 +0100 (2011-03-12) |
parents | 4f6e6b213fb8 |
children |
line diff
1.1 --- a/app/main/lf2/initiative.lua Mon Mar 07 12:15:22 2011 +0100 1.2 +++ b/app/main/lf2/initiative.lua Sat Mar 12 19:22:50 2011 +0100 1.3 @@ -27,7 +27,8 @@ 1.4 local support = Supporter:by_pk(initiative.id, app.session.member.id) 1.5 1.6 app.topnav_phase = issue.phase 1.7 - 1.8 +app.topnav_area_id = issue.area_id 1.9 +app.topnav_unit_id = issue.area.unit_id 1.10 1.11 slot.select("sidebar", function() 1.12 1.13 @@ -44,12 +45,12 @@ 1.14 ui.box{ 1.15 content = function() 1.16 1.17 - ui.box_row{ class = "initiative head2", content = function() ui.box_col { content = function() 1.18 + ui.box_row{ class = "initiative head", content = function() ui.box_col { content = function() 1.19 execute.view{ module = "lf2", view = "_initiative", params = { initiative = initiative } } 1.20 end } end } 1.21 1.22 - ui.box_row{ class = "head", content = function() ui.box_col{ content = function() 1.23 - if initiative.issue.closed then 1.24 + if initiative.issue.closed then 1.25 + ui.box_row{ content = function() ui.box_col{ content = function() 1.26 if initiative.issue.accepted then 1.27 if initiative.admitted then 1.28 if initiative.agreed then 1.29 @@ -65,30 +66,35 @@ 1.30 else 1.31 ui.image{ static = "lf2/icon_cross.png" } 1.32 slot.put(" ") 1.33 - ui.tag{ content = _"Initiative not approved" } 1.34 + ui.tag{ content = _"Initiative not approved (no majority)" } 1.35 end 1.36 + slot.put(" · ") 1.37 + ui.tag{ class = "yes_count", content = _("#{count} Yes", { count = initiative.positive_votes }) } 1.38 + slot.put(" · ") 1.39 + ui.tag{ class = "no_count", content = _("#{count} No", { count = initiative.negative_votes }) } 1.40 + slot.put(" · ") 1.41 + ui.tag{ class = "abstention_count", content = _("#{count} Abstention", { count = initiative.issue.voter_count - initiative.positive_votes - initiative.negative_votes }) } 1.42 + 1.43 else 1.44 ui.image{ static = "lf2/icon_cross.png" } 1.45 slot.put(" ") 1.46 - ui.tag{ content = _"Initiative not admitted" } 1.47 + ui.tag{ content = _"Initiative not admitted (quorum failed)" } 1.48 end 1.49 else 1.50 ui.image{ static = "lf2/icon_cross.png" } 1.51 slot.put(" ") 1.52 - ui.tag{ content = _"Issue not accepted" } 1.53 + ui.tag{ content = _"Issue not accepted (quorum failed)" } 1.54 end 1.55 - slot.put(" ") 1.56 - end 1.57 - 1.58 + end } end } 1.59 + end 1.60 + 1.61 + ui.box_row{ class = "", content = function() ui.box_col{ content = function() 1.62 if initiative.issue.fully_frozen and initiative.issue.closed then 1.63 if initiative.admitted and initiative.issue.ranks_available then 1.64 - slot.put(" · ") 1.65 ui.link{ external = "#votes", text = _("#{vote_count}+#{delegated_weight} votes", { vote_count = #voting_members, delegated_weight = initiative.issue.voter_count - #voting_members }) } 1.66 + slot.put(" · ") 1.67 end 1.68 end 1.69 - if initiative.issue.closed then 1.70 - slot.put(" · ") 1.71 - end 1.72 ui.link{ external = "#suggestions", text = _("#{suggestion_count} suggestions", { suggestion_count = 23 }) } 1.73 slot.put(" · ") 1.74 ui.link{ external = "#supporters", text = _("#{supporter_count}+#{delegated_weight} supporters", { supporter_count = #supporting_members, delegated_weight = initiative.supporter_count - #supporting_members }) } 1.75 @@ -99,7 +105,7 @@ 1.76 } } 1.77 1.78 ui.box_row{ class = "subhead", content = function() ui.box_col{ class = "head", content = _"Current draft" } end } 1.79 - ui.box_row{ class = "member_content", content = function() ui.box_col{ content = function() 1.80 + ui.box_row{ class = "member_content", content = function() ui.box_col{ class = "draft", content = function() 1.81 execute.view{ module = "lf2", view = "_draft", params = { draft = draft } } 1.82 end } end } 1.83