liquid_feedback_frontend
view app/main/initiative/show_partial.lua @ 227:9245f74e08f5
Added tag beta33 for changeset 4905d7d79486
author | bsw |
---|---|
date | Tue May 17 12:12:29 2011 +0200 (2011-05-17) |
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(" ")
32 end
33 end
34 }