liquid_feedback_frontend

annotate app/main/initiative/show.lua @ 148:034f96181e59

gui part for autosupport

autosupport lets you automaticly support any new draft of an initiative
author Daniel Poelzleithner <poelzi@poelzi.org>
date Fri Oct 08 02:49:53 2010 +0200 (2010-10-08)
parents 7d0f4721d2f3
children fecd4c13054a
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/jbe@19 11 if request.get_json_request_slots() then
bsw/jbe@19 12 execute.view{
bsw/jbe@19 13 module = "initiative",
bsw/jbe@19 14 view = "show_partial",
bsw/jbe@19 15 params = {
bsw/jbe@19 16 initiative = initiative
bsw/jbe@6 17 }
bsw/jbe@19 18 }
bsw/jbe@19 19 elseif
bsw/jbe@19 20 config.user_tab_mode == "accordeon" or
bsw/jbe@19 21 config.user_tab_mode == "accordeon_first_expanded" or
bsw/jbe@19 22 config.user_tab_mode == "accordeon_all_expanded"
bsw/jbe@19 23 then
bsw/jbe@19 24 execute.view{
bsw/jbe@19 25 module = "issue",
bsw/jbe@19 26 view = "show",
bsw/jbe@19 27 id = initiative.issue_id,
bsw/jbe@19 28 params = {
bsw/jbe@19 29 for_initiative_id = initiative.id
bsw/jbe@6 30 }
bsw/jbe@19 31 }
bsw/jbe@19 32 else
bsw/jbe@19 33 execute.view{
bsw/jbe@19 34 module = "initiative",
bsw/jbe@19 35 view = "show_static",
bsw/jbe@19 36 params = {
bsw/jbe@19 37 initiative = initiative
bsw/jbe@6 38 }
bsw/jbe@19 39 }
jorges@103 40 end

Impressum / About Us