liquid_feedback_frontend
view app/main/interest/_show_box.lua @ 547:57a261a81c5a
Added preloading to issue list
author | bsw |
---|---|
date | Tue May 29 20:43:27 2012 +0200 (2012-05-29) |
parents | 5ca9de94cb13 |
children | c1dc3b14a4f3 |
line source
2 local issue = param.get("issue", "table")
3 local initiative = param.get("initiative", "table")
5 local interest = Interest:by_pk(issue.id, app.session.member.id)
6 local membership = Membership:by_pk(issue.area_id, app.session.member_id)
8 if interest then
10 if issue.closed then
11 ui.tag{ content = _"You were interested" }
12 else
13 ui.tag{ content = _"You are interested" }
14 end
15 slot.put(" ")
17 if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then
18 slot.put("(")
19 ui.link{
20 text = _"Withdraw",
21 module = "interest",
22 action = "update",
23 params = { issue_id = issue.id, delete = true },
24 routing = {
25 default = {
26 mode = "redirect",
27 module = request.get_module(),
28 view = request.get_view(),
29 id = param.get_id_cgi(),
30 params = param.get_all_cgi()
31 }
32 }
33 }
34 slot.put(") ")
35 end
36 elseif app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
37 if not issue.closed and not issue.fully_frozen then
38 ui.link{
39 text = _"Add my interest",
40 module = "interest",
41 action = "update",
42 params = { issue_id = issue.id },
43 routing = {
44 default = {
45 mode = "redirect",
46 module = request.get_module(),
47 view = request.get_view(),
48 id = param.get_id_cgi(),
49 params = param.get_all_cgi()
50 }
51 }
52 }
53 slot.put(" ")
54 end
55 end