liquid_feedback_frontend

annotate 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
rev   line source
bsw/jbe@19 1 local initiative = param.get("initiative", "table")
bsw/jbe@4 2
bsw/jbe@19 3 if not initiative then
bsw/jbe@19 4 initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
bsw@10 5 end
bsw/jbe@0 6
jorges@103 7 app.html_title.title = initiative.name
jorges@103 8 app.html_title.subtitle = _("Initiative ##{id}", { id = initiative.id })
jorges@103 9
jorges@103 10
bsw@526 11 slot.select("head", function()
bsw@278 12
bsw@526 13 execute.view{
bsw@526 14 module = "issue",
bsw@526 15 view = "_head",
bsw@526 16 params = { issue = initiative.issue,
bsw@526 17 initiative = initiative }
bsw@526 18 }
bsw@526 19
bsw@526 20 end)
bsw@526 21
bsw@278 22 if not initiative then
bsw@278 23 initiative = Initiative:by_id(param.get_id())
bsw@278 24 expanded = true
bsw@278 25 end
bsw@278 26
bsw@278 27 -- TODO performance
bsw@278 28 local initiator
bsw@278 29 if app.session.member_id then
bsw@278 30 initiator = Initiator:by_pk(initiative.id, app.session.member.id)
bsw@278 31 end
bsw@278 32
bsw@278 33 execute.view{
bsw@278 34 module = "initiative",
bsw@278 35 view = "_show",
bsw@278 36 params = {
bsw@278 37 initiative = initiative,
bsw@278 38 initiator = initiator
bsw/jbe@19 39 }
bsw@278 40 }

Impressum / About Us