liquid_feedback_frontend
annotate app/main/supporter/_show_box.lua @ 9:0ee1e0c42d4c
Version beta5
Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.
Changing of name and login is possible while a history of these changes is written and accessible by all users.
Statistics shown in area list
Trimming of user input also converts multiple whitespaces to single space character.
Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.
Changing of name and login is possible while a history of these changes is written and accessible by all users.
Statistics shown in area list
Trimming of user input also converts multiple whitespaces to single space character.
author | bsw |
---|---|
date | Mon Jan 04 12:00:00 2010 +0100 (2010-01-04) |
parents | afd9f769c7ae |
children | 72c5e0ee7c98 |
rev | line source |
---|---|
bsw/jbe@0 | 1 |
bsw/jbe@0 | 2 slot.select("support", function() |
bsw/jbe@0 | 3 local initiative = param.get("initiative", "table") |
bsw/jbe@5 | 4 local supporter = Supporter:by_pk(initiative.id, app.session.member.id) |
bsw/jbe@0 | 5 |
bsw/jbe@4 | 6 ui.container{ |
bsw/jbe@4 | 7 attr = { class = "actions" }, |
bsw/jbe@4 | 8 content = function() |
bsw/jbe@5 | 9 if not initiative.issue.fully_frozen and not initiative.issue.closed then |
bsw/jbe@5 | 10 if supporter then |
bsw/jbe@5 | 11 if not supporter:has_critical_opinion() then |
bsw/jbe@5 | 12 ui.container{ |
bsw/jbe@5 | 13 attr = { |
bsw/jbe@5 | 14 class = "head head_supporter", |
bsw/jbe@5 | 15 style = "cursor: pointer;", |
bsw/jbe@5 | 16 onclick = "document.getElementById('support_content').style.display = 'block';" |
bsw/jbe@5 | 17 }, |
bsw/jbe@5 | 18 content = function() |
bsw/jbe@5 | 19 ui.image{ |
bsw/jbe@5 | 20 static = "icons/16/thumb_up_green.png" |
bsw/jbe@5 | 21 } |
bsw/jbe@5 | 22 slot.put(_"Your are supporter") |
bsw/jbe@5 | 23 ui.image{ |
bsw/jbe@5 | 24 static = "icons/16/dropdown.png" |
bsw/jbe@5 | 25 } |
bsw/jbe@5 | 26 end |
bsw/jbe@5 | 27 } |
bsw/jbe@5 | 28 else |
bsw/jbe@5 | 29 ui.container{ |
bsw/jbe@5 | 30 attr = { |
bsw/jbe@5 | 31 class = "head head_potential_supporter", |
bsw/jbe@5 | 32 style = "cursor: pointer;", |
bsw/jbe@5 | 33 onclick = "document.getElementById('support_content').style.display = 'block';" |
bsw/jbe@5 | 34 }, |
bsw/jbe@5 | 35 content = function() |
bsw/jbe@5 | 36 ui.image{ |
bsw/jbe@5 | 37 static = "icons/16/thumb_up.png" |
bsw/jbe@5 | 38 } |
bsw/jbe@5 | 39 slot.put(_"Your are potential supporter") |
bsw/jbe@5 | 40 ui.image{ |
bsw/jbe@5 | 41 static = "icons/16/dropdown.png" |
bsw/jbe@5 | 42 } |
bsw/jbe@5 | 43 end |
bsw/jbe@5 | 44 } |
bsw/jbe@5 | 45 end |
bsw/jbe@4 | 46 ui.container{ |
bsw/jbe@4 | 47 attr = { class = "content", id = "support_content" }, |
bsw/jbe@0 | 48 content = function() |
bsw/jbe@4 | 49 ui.container{ |
bsw/jbe@4 | 50 attr = { |
bsw/jbe@4 | 51 class = "close", |
bsw/jbe@4 | 52 style = "cursor: pointer;", |
bsw/jbe@4 | 53 onclick = "document.getElementById('support_content').style.display = 'none';" |
bsw/jbe@4 | 54 }, |
bsw/jbe@4 | 55 content = function() |
bsw/jbe@4 | 56 ui.image{ static = "icons/16/cross.png" } |
bsw/jbe@4 | 57 end |
bsw/jbe@4 | 58 } |
bsw/jbe@5 | 59 if supporter then |
bsw/jbe@4 | 60 ui.link{ |
bsw/jbe@4 | 61 content = function() |
bsw/jbe@4 | 62 ui.image{ static = "icons/16/thumb_down_red.png" } |
bsw/jbe@4 | 63 slot.put(_"Remove my support from this initiative") |
bsw/jbe@4 | 64 end, |
bsw/jbe@4 | 65 module = "initiative", |
bsw/jbe@4 | 66 action = "remove_support", |
bsw/jbe@4 | 67 id = initiative.id, |
bsw/jbe@4 | 68 routing = { |
bsw/jbe@4 | 69 default = { |
bsw/jbe@4 | 70 mode = "redirect", |
bsw/jbe@4 | 71 module = request.get_module(), |
bsw/jbe@4 | 72 view = request.get_view(), |
bsw/jbe@4 | 73 id = param.get_id_cgi(), |
bsw/jbe@4 | 74 params = param.get_all_cgi() |
bsw/jbe@4 | 75 } |
bsw/jbe@4 | 76 } |
bsw/jbe@4 | 77 } |
bsw/jbe@4 | 78 else |
bsw/jbe@4 | 79 end |
bsw/jbe@4 | 80 end |
bsw/jbe@0 | 81 } |
bsw/jbe@0 | 82 else |
bsw/jbe@0 | 83 ui.link{ |
bsw/jbe@0 | 84 content = function() |
bsw/jbe@0 | 85 ui.image{ static = "icons/16/thumb_up_green.png" } |
bsw/jbe@0 | 86 slot.put(_"Support this initiative") |
bsw/jbe@0 | 87 end, |
bsw/jbe@0 | 88 module = "initiative", |
bsw/jbe@0 | 89 action = "add_support", |
bsw/jbe@4 | 90 id = initiative.id, |
bsw/jbe@4 | 91 routing = { |
bsw/jbe@4 | 92 default = { |
bsw/jbe@4 | 93 mode = "redirect", |
bsw/jbe@4 | 94 module = request.get_module(), |
bsw/jbe@4 | 95 view = request.get_view(), |
bsw/jbe@4 | 96 id = param.get_id_cgi(), |
bsw/jbe@4 | 97 params = param.get_all_cgi() |
bsw/jbe@4 | 98 } |
bsw/jbe@4 | 99 } |
bsw/jbe@0 | 100 } |
bsw/jbe@0 | 101 end |
bsw/jbe@0 | 102 end |
bsw/jbe@4 | 103 end |
bsw/jbe@4 | 104 } |
bsw/jbe@0 | 105 end) |