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