liquid_feedback_frontend
view app/main/initiative/show_partial.lua @ 232:8bb9a55ec013
English example texts for terms of use in config/default.lua
author | jbe |
---|---|
date | Thu Oct 06 16:30:15 2011 +0200 (2011-10-06) |
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 }