liquid_feedback_frontend
view app/main/interest/_show_box.lua @ 552:3344717939f0
Improved interest and support filters for issues
author | bsw |
---|---|
date | Fri Jun 15 20:46:25 2012 +0200 (2012-06-15) |
parents | c1dc3b14a4f3 |
children |
line source
2 local issue = param.get("issue", "table")
3 local initiative = param.get("initiative", "table")
5 if issue.member_info.own_participation then
7 if issue.closed then
8 ui.tag{ content = _"You were interested" }
9 else
10 ui.tag{ content = _"You are interested" }
11 end
12 slot.put(" ")
14 if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then
15 slot.put("(")
16 ui.link{
17 text = _"Withdraw",
18 module = "interest",
19 action = "update",
20 params = { issue_id = issue.id, delete = true },
21 routing = {
22 default = {
23 mode = "redirect",
24 module = request.get_module(),
25 view = request.get_view(),
26 id = param.get_id_cgi(),
27 params = param.get_all_cgi()
28 }
29 }
30 }
31 slot.put(") ")
32 end
33 elseif app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
34 if not issue.closed and not issue.fully_frozen then
35 ui.link{
36 text = _"Add my interest",
37 module = "interest",
38 action = "update",
39 params = { issue_id = issue.id },
40 routing = {
41 default = {
42 mode = "redirect",
43 module = request.get_module(),
44 view = request.get_view(),
45 id = param.get_id_cgi(),
46 params = param.get_all_cgi()
47 }
48 }
49 }
50 slot.put(" ")
51 end
52 end