liquid_feedback_frontend
view app/main/initiative/show_partial.lua @ 252:eb6d04201f81
Show evil browser notice as inlined warning instead of opening an evil popup
| author | Ingo Bormuth <mail@ibormuth.de> | 
|---|---|
| date | Fri Dec 30 04:02:37 2011 +0100 (2011-12-30) | 
| 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 }
