liquid_feedback_frontend
view app/main/issue/_sidebar_issue.lua @ 1199:6b1f01c31092
Updated host config for Moonbridge 1.0
| author | bsw | 
|---|---|
| date | Tue Jun 23 19:48:56 2015 +0200 (2015-06-23) | 
| parents | 701a5cf6b067 | 
| children | 32cc544d5a5b | 
 line source
     1 local issue = param.get("issue", "table")
     2 local hide_initiatives = param.get("hide_initiatives", atom.boolean)
     3 local highlight_initiative_id = param.get ( "highlight_initiative_id", "number" )
     5 ui.sidebar ( "tab-whatcanido", function ()
     7   ui.sidebarHead( function()
     8     ui.heading {
     9       level = 2,
    10       content = _"Competing initiatives"
    11     }
    12   end )
    14   execute.view {
    15     module = "initiative", view = "_list",
    16     params = {
    17       issue = issue,
    18       initiatives = issue.initiatives,
    19       highlight_initiative_id = highlight_initiative_id
    20     }
    21   }
    22   if #issue.initiatives == 1 then
    23     ui.sidebarSection( function ()
    25       if not issue.closed and not (issue.state == "voting") then
    26         ui.container { content = function()
    27         ui.tag { content = _"Currently this is the only initiative in this issue, because nobody started a competing initiative (yet)." }
    28           if app.session.member and app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
    29             slot.put(" ")
    30             ui.tag { content = _"To create a competing initiative see below." }
    31           end
    32         end }
    33       else
    34         ui.container { content = _"This is the only initiative in this issue, because nobody started a competing initiative." }
    35       end
    36     end )
    37   end
    39 end ) -- ui.sidebar
