liquid_feedback_frontend
view app/main/interest/_show_box.lua @ 527:4cee33ad5e16
Completed support for config.public_access = "full"
author | bsw |
---|---|
date | Fri May 18 19:44:41 2012 +0200 (2012-05-18) |
parents | 63d6549cc00b |
children | 305329da1c75 |
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 ui.tag{ content = _"Your are interested" }
11 slot.put(" ")
13 if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then
14 slot.put("(")
15 ui.link{
16 text = _"Withdraw",
17 module = "interest",
18 action = "update",
19 params = { issue_id = issue.id, delete = true },
20 routing = { default = { mode = "redirect", module = initiative and "initiative" or "issue", view = "show", id = initiative and initiative.id or issue.id } }
21 }
22 slot.put(") ")
23 end
24 elseif app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
25 if not issue.closed and not issue.fully_frozen then
26 ui.link{
27 text = _"Add my interest",
28 module = "interest",
29 action = "update",
30 params = { issue_id = issue.id },
31 routing = { default = { mode = "redirect", module = initiative and "initiative" or "issue", view = "show", id = initiative and initiative.id or issue.id } }
32 }
33 slot.put(" ")
34 end
35 end