liquid_feedback_frontend
view app/main/initiative/show_partial.lua @ 36:f543b8bf57a1
single entry change for testing
| author | Dinu Gherman | 
|---|---|
| date | Thu Mar 04 22:10:14 2010 +0100 (2010-03-04) | 
| parents | 00d1004545f1 | 
| children | 0849be391140 | 
 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 = Initiator:by_pk(initiative.id, app.session.member.id)
    12 ui.partial{
    13   module = "initiative",
    14   view = "show",
    15   id = initiative.id,
    16   target = "initiative_content_" .. tostring(initiative.id) .. "_content",
    17   content = function()
    18     if expanded then
    19       execute.view{
    20         module = "initiative",
    21         view = "_show",
    22         params = {
    23           initiative = initiative,
    24           initiator = initiator
    25         }
    26       }
    27     else
    28       slot.put(" ")
    29     end
    30   end
    31 }
