liquid_feedback_frontend

diff app/main/issue/_sidebar_issue.lua @ 1045:701a5cf6b067

Imported LiquidFeedback Frontend 3.0 branch
author bsw
date Thu Jul 10 01:19:48 2014 +0200 (2014-07-10)
parents
children 32cc544d5a5b
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/issue/_sidebar_issue.lua	Thu Jul 10 01:19:48 2014 +0200
     1.3 @@ -0,0 +1,39 @@
     1.4 +local issue = param.get("issue", "table")
     1.5 +local hide_initiatives = param.get("hide_initiatives", atom.boolean)
     1.6 +local highlight_initiative_id = param.get ( "highlight_initiative_id", "number" )
     1.7 +
     1.8 +ui.sidebar ( "tab-whatcanido", function ()
     1.9 +
    1.10 +  ui.sidebarHead( function()
    1.11 +    ui.heading {
    1.12 +      level = 2,
    1.13 +      content = _"Competing initiatives"
    1.14 +    }
    1.15 +  end )
    1.16 +  
    1.17 +  execute.view {
    1.18 +    module = "initiative", view = "_list",
    1.19 +    params = {
    1.20 +      issue = issue,
    1.21 +      initiatives = issue.initiatives,
    1.22 +      highlight_initiative_id = highlight_initiative_id
    1.23 +    }
    1.24 +  }
    1.25 +  if #issue.initiatives == 1 then
    1.26 +    ui.sidebarSection( function ()
    1.27 +    
    1.28 +      if not issue.closed and not (issue.state == "voting") then
    1.29 +        ui.container { content = function()
    1.30 +        ui.tag { content = _"Currently this is the only initiative in this issue, because nobody started a competing initiative (yet)." }
    1.31 +          if app.session.member and app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
    1.32 +            slot.put(" ")
    1.33 +            ui.tag { content = _"To create a competing initiative see below." }
    1.34 +          end
    1.35 +        end }
    1.36 +      else
    1.37 +        ui.container { content = _"This is the only initiative in this issue, because nobody started a competing initiative." }
    1.38 +      end
    1.39 +    end )
    1.40 +  end
    1.41 +
    1.42 +end ) -- ui.sidebar

Impressum / About Us