annotate app/main/initiative/show.lua @ 235:9345ea6af3b2
Show invalid invite code to the user
 | author | 
 Ingo Bormuth <mail@ibormuth.de> | 
 | date | 
 Sun Nov 27 13:31:05 2011 +0100 (2011-11-27) | 
 | 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
 |