liquid_feedback_frontend
view app/main/initiative/_suggestions.lua @ 281:b77e6a17ca77
Check unit voting right where neccessary, hide action buttons for units without voting right
author | bsw |
---|---|
date | Thu Feb 16 15:01:49 2012 +0100 (2012-02-16) |
parents | 0849be391140 |
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 }