liquid_feedback_frontend
view app/main/initiative/_suggestions.lua @ 512:d0e12e1b8761
Make member privileges editable in admin section
| author | bsw | 
|---|---|
| date | Wed Apr 11 19:03:50 2012 +0200 (2012-04-11) | 
| parents | b77e6a17ca77 | 
| children | 63d6549cc00b | 
 line source
     1 local initiative = param.get("initiative", "table")
     3 if app.session.member_id
     4   and not initiative.issue.half_frozen
     5   and not initiative.issue.closed
     6   and not initiative.revoked
     7   and app.session.member:has_voting_right_for_unit_id(initiative.issue.area.unit_id)
     8 then
     9   ui.link{
    10     content = function()
    11       ui.image{ static = "icons/16/comment_add.png" }
    12       slot.put(_"Add new suggestion")
    13     end,
    14     module = "suggestion",
    15     view = "new",
    16     params = {
    17       initiative_id = initiative.id
    18     }
    19   }
    20 end
    22 execute.view{
    23   module = "suggestion",
    24   view = "_list",
    25   params = {
    26     initiative = initiative,
    27     suggestions_selector = initiative:get_reference_selector("suggestions"),
    28     tab_id = param.get("tab_id")
    29   }
    30 }
