liquid_feedback_frontend
diff app/main/issue/_show.lua @ 886:2e9d39b53b64
Added support for setting/removing of beeing a non voter
author | bsw |
---|---|
date | Mon Aug 20 02:39:13 2012 +0200 (2012-08-20) |
parents | 1e4c6baf2d87 |
children | 06e72cc93c64 |
line diff
1.1 --- a/app/main/issue/_show.lua Mon Aug 20 02:38:34 2012 +0200 1.2 +++ b/app/main/issue/_show.lua Mon Aug 20 02:39:13 2012 +0200 1.3 @@ -102,6 +102,43 @@ 1.4 params = { issue_id = issue.id } 1.5 } 1.6 end 1.7 + 1.8 + if voteable and not direct_voter then 1.9 + if not issue.member_info.non_voter then 1.10 + links[#links+1] ={ 1.11 + content = _"Do not vote directly", 1.12 + module = "vote", 1.13 + action = "non_voter", 1.14 + params = { issue_id = issue.id }, 1.15 + routing = { 1.16 + default = { 1.17 + mode = "redirect", 1.18 + module = request.get_module(), 1.19 + view = request.get_view(), 1.20 + id = param.get_id_cgi(), 1.21 + params = param.get_all_cgi() 1.22 + } 1.23 + } 1.24 + } 1.25 + else 1.26 + links[#links+1] = { attr = { class = "action" }, content = _"Do not vote directly" } 1.27 + links[#links+1] ={ 1.28 + content = _"Cancel do not vote", 1.29 + module = "vote", 1.30 + action = "non_voter", 1.31 + params = { issue_id = issue.id, delete = true }, 1.32 + routing = { 1.33 + default = { 1.34 + mode = "redirect", 1.35 + module = request.get_module(), 1.36 + view = request.get_view(), 1.37 + id = param.get_id_cgi(), 1.38 + params = param.get_all_cgi() 1.39 + } 1.40 + } 1.41 + } 1.42 + end 1.43 + end 1.44 1.45 if not for_member or for_member.id == app.session.member_id then 1.46