liquid_feedback_frontend

annotate app/main/initiative/show_partial.lua @ 159:5d797c6706d5

implement quorum display

show the initiative quorum as a small 1px line in bargraph
allow to update your support on the diff page
better linked title in diff page
show absolute quorum numbers in detail pages of issue and initiative
author Daniel Poelzleithner <poelzi@poelzi.org>
date Sat Oct 09 03:42:48 2010 +0200 (2010-10-09)
parents 0849be391140
children
rev   line source
bsw/jbe@19 1 local initiative = param.get("initiative", "table")
bsw/jbe@19 2 local expanded = param.get("expanded", atom.boolean)
bsw/jbe@19 3
bsw/jbe@19 4 if not initiative then
bsw/jbe@19 5 initiative = Initiative:by_id(param.get_id())
bsw/jbe@19 6 expanded = true
bsw/jbe@19 7 end
bsw/jbe@19 8
bsw/jbe@19 9 -- TODO performance
bsw@51 10 local initiator
bsw@51 11 if app.session.member_id then
bsw@51 12 initiator = Initiator:by_pk(initiative.id, app.session.member.id)
bsw@51 13 end
bsw/jbe@19 14
bsw/jbe@19 15 ui.partial{
bsw/jbe@19 16 module = "initiative",
bsw/jbe@19 17 view = "show",
bsw/jbe@19 18 id = initiative.id,
bsw/jbe@19 19 target = "initiative_content_" .. tostring(initiative.id) .. "_content",
bsw/jbe@19 20 content = function()
bsw/jbe@19 21 if expanded then
bsw/jbe@19 22 execute.view{
bsw/jbe@19 23 module = "initiative",
bsw/jbe@19 24 view = "_show",
bsw/jbe@19 25 params = {
bsw/jbe@19 26 initiative = initiative,
bsw/jbe@19 27 initiator = initiator
bsw/jbe@19 28 }
bsw/jbe@19 29 }
bsw/jbe@19 30 else
bsw/jbe@19 31 slot.put("&nbsp;")
bsw/jbe@19 32 end
bsw/jbe@19 33 end
bsw/jbe@19 34 }

Impressum / About Us