liquid_feedback_frontend

diff app/main/initiative/show.lua @ 278:fecd4c13054a

Code/css clean up and minor enhancements
author bsw
date Mon Feb 13 01:53:41 2012 +0100 (2012-02-13)
parents 7d0f4721d2f3
children 63d6549cc00b
line diff
     1.1 --- a/app/main/initiative/show.lua	Mon Feb 13 00:16:42 2012 +0100
     1.2 +++ b/app/main/initiative/show.lua	Mon Feb 13 01:53:41 2012 +0100
     1.3 @@ -8,33 +8,29 @@
     1.4  app.html_title.subtitle = _("Initiative ##{id}", { id = initiative.id })
     1.5  
     1.6  
     1.7 -if request.get_json_request_slots() then
     1.8 -  execute.view{
     1.9 -    module = "initiative",
    1.10 -    view   = "show_partial",
    1.11 -    params = {
    1.12 -      initiative = initiative
    1.13 -    }
    1.14 +execute.view{
    1.15 +  module = "issue",
    1.16 +  view = "_show_head",
    1.17 +  params = { issue = initiative.issue,
    1.18 +             initiative = initiative }
    1.19 +}
    1.20 +
    1.21 +if not initiative then
    1.22 +  initiative = Initiative:by_id(param.get_id())
    1.23 +  expanded = true
    1.24 +end
    1.25 +
    1.26 +-- TODO performance
    1.27 +local initiator
    1.28 +if app.session.member_id then
    1.29 +  initiator = Initiator:by_pk(initiative.id, app.session.member.id)
    1.30 +end
    1.31 +
    1.32 +execute.view{
    1.33 +  module = "initiative",
    1.34 +  view = "_show",
    1.35 +  params = {
    1.36 +    initiative = initiative,
    1.37 +    initiator = initiator
    1.38    }
    1.39 -elseif
    1.40 -  config.user_tab_mode == "accordeon" or
    1.41 -  config.user_tab_mode == "accordeon_first_expanded" or
    1.42 -  config.user_tab_mode == "accordeon_all_expanded"
    1.43 -then
    1.44 -  execute.view{
    1.45 -    module = "issue",
    1.46 -    view   = "show",
    1.47 -    id     = initiative.issue_id,
    1.48 -    params = {
    1.49 -      for_initiative_id = initiative.id
    1.50 -    }
    1.51 -  }
    1.52 -else
    1.53 -  execute.view{
    1.54 -    module = "initiative",
    1.55 -    view   = "show_static",
    1.56 -    params = {
    1.57 -      initiative = initiative
    1.58 -    }
    1.59 -  }
    1.60 -end
    1.61 +}

Impressum / About Us