liquid_feedback_frontend

view app/main/initiative/show_partial.lua @ 118:93f4e465b50d

add initiator support in delegation

if a delegation is issued from the initiative view, the initiators
from that one are added to the delegation target list. this makes it easier to delegate to the author without the need to add him to the contact list.
author Daniel Poelzleithner <poelzi@poelzi.org>
date Mon Sep 20 20:32:04 2010 +0200 (2010-09-20)
parents 0849be391140
children
line source
1 local initiative = param.get("initiative", "table")
2 local expanded = param.get("expanded", atom.boolean)
4 if not initiative then
5 initiative = Initiative:by_id(param.get_id())
6 expanded = true
7 end
9 -- TODO performance
10 local initiator
11 if app.session.member_id then
12 initiator = Initiator:by_pk(initiative.id, app.session.member.id)
13 end
15 ui.partial{
16 module = "initiative",
17 view = "show",
18 id = initiative.id,
19 target = "initiative_content_" .. tostring(initiative.id) .. "_content",
20 content = function()
21 if expanded then
22 execute.view{
23 module = "initiative",
24 view = "_show",
25 params = {
26 initiative = initiative,
27 initiator = initiator
28 }
29 }
30 else
31 slot.put("&nbsp;")
32 end
33 end
34 }

Impressum / About Us