annotate app/main/interest/_show_box.lua @ 528:305329da1c75
Wording and css changes
author |
bsw |
date |
Fri May 18 21:03:10 2012 +0200 (2012-05-18) |
parents |
63d6549cc00b |
children |
5ca9de94cb13 |
rev |
line source |
bsw/jbe@0
|
1
|
bsw/jbe@0
|
2 local issue = param.get("issue", "table")
|
bsw@339
|
3 local initiative = param.get("initiative", "table")
|
bsw/jbe@0
|
4
|
bsw/jbe@4
|
5 local interest = Interest:by_pk(issue.id, app.session.member.id)
|
bsw@173
|
6 local membership = Membership:by_pk(issue.area_id, app.session.member_id)
|
bsw/jbe@0
|
7
|
bsw@525
|
8 if interest then
|
bsw/jbe@0
|
9
|
bsw@525
|
10 ui.tag{ content = _"Your are interested" }
|
bsw@525
|
11 slot.put(" ")
|
bsw@277
|
12
|
bsw@525
|
13 if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then
|
bsw@525
|
14 slot.put("(")
|
bsw@525
|
15 ui.link{
|
bsw@525
|
16 text = _"Withdraw",
|
bsw@525
|
17 module = "interest",
|
bsw@525
|
18 action = "update",
|
bsw@525
|
19 params = { issue_id = issue.id, delete = true },
|
bsw@528
|
20 routing = {
|
bsw@528
|
21 default = {
|
bsw@528
|
22 mode = "redirect",
|
bsw@528
|
23 module = request.get_module(),
|
bsw@528
|
24 view = request.get_view(),
|
bsw@528
|
25 id = param.get_id_cgi(),
|
bsw@528
|
26 params = param.get_all_cgi()
|
bsw@528
|
27 }
|
bsw@528
|
28 }
|
bsw/jbe@4
|
29 }
|
bsw@525
|
30 slot.put(") ")
|
bsw@16
|
31 end
|
bsw@525
|
32 elseif app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
|
bsw@525
|
33 if not issue.closed and not issue.fully_frozen then
|
bsw@525
|
34 ui.link{
|
bsw@525
|
35 text = _"Add my interest",
|
bsw@525
|
36 module = "interest",
|
bsw@525
|
37 action = "update",
|
bsw@525
|
38 params = { issue_id = issue.id },
|
bsw@528
|
39 routing = {
|
bsw@528
|
40 default = {
|
bsw@528
|
41 mode = "redirect",
|
bsw@528
|
42 module = request.get_module(),
|
bsw@528
|
43 view = request.get_view(),
|
bsw@528
|
44 id = param.get_id_cgi(),
|
bsw@528
|
45 params = param.get_all_cgi()
|
bsw@528
|
46 }
|
bsw@528
|
47 }
|
bsw@525
|
48 }
|
bsw@525
|
49 slot.put(" ")
|
bsw@525
|
50 end
|
bsw@525
|
51 end
|