liquid_feedback_frontend
view app/main/interest/_action/update.lua @ 3:768faea1096d
Version alpha4
Members interested in an issue or supporting an initiative have a weight information attached. Browsing the members causing that weight is possible.
Initiatives may provide a link to an external discussion platform
Direct link on every initiative page to create an alternative initiative
Bugfix: No error when clicking "neutral", when "neutral" is currently selected
Members interested in an issue or supporting an initiative have a weight information attached. Browsing the members causing that weight is possible.
Initiatives may provide a link to an external discussion platform
Direct link on every initiative page to create an alternative initiative
Bugfix: No error when clicking "neutral", when "neutral" is currently selected
| author | bsw |
|---|---|
| date | Mon Nov 30 12:00:00 2009 +0100 (2009-11-30) |
| parents | 3bfb2fcf7ab9 |
| children | afd9f769c7ae |
line source
1 local issue_id = assert(param.get("issue_id", atom.integer), "no issue id given")
2 local interest = Interest:by_pk(issue_id, app.session.member.id)
4 if param.get("delete", atom.boolean) then
5 if interest then
6 interest:destroy()
7 slot.put_into("notice", _"Interest removed")
8 else
9 slot.put_into("notice", _"Interest not existant")
10 end
11 return
12 end
14 if not interest then
15 interest = Interest:new()
16 interest.issue_id = issue_id
17 interest.member_id = app.session.member_id
18 interest.autoreject = false
19 end
21 local autoreject = param.get("autoreject", atom.boolean)
22 if autoreject ~= nil then
23 interest.autoreject = autoreject
24 end
26 interest:save()
28 slot.put_into("notice", _"Interest updated")
