liquid_feedback_frontend
view app/main/initiative/show.lua @ 526:18cd8595459b
Fixes for public access
| author | bsw | 
|---|---|
| date | Fri May 18 19:21:45 2012 +0200 (2012-05-18) | 
| parents | 63d6549cc00b | 
| children | 4cee33ad5e16 | 
 line source
     1 local initiative = param.get("initiative", "table")
     3 if not initiative then
     4   initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
     5 end
     7 app.html_title.title = initiative.name
     8 app.html_title.subtitle = _("Initiative ##{id}", { id = initiative.id })
    11 slot.select("head", function()
    13   execute.view{
    14     module = "issue",
    15     view = "_head",
    16     params = { issue = initiative.issue,
    17               initiative = initiative }
    18   }
    20 end)
    22 if not initiative then
    23   initiative = Initiative:by_id(param.get_id())
    24   expanded = true
    25 end
    27 -- TODO performance
    28 local initiator
    29 if app.session.member_id then
    30   initiator = Initiator:by_pk(initiative.id, app.session.member.id)
    31 end
    33 execute.view{
    34   module = "initiative",
    35   view = "_show",
    36   params = {
    37     initiative = initiative,
    38     initiator = initiator
    39   }
    40 }
