liquid_feedback_frontend
annotate app/main/initiative/_action/remove_support.lua @ 41:53a45356c107
Several bugfixes, including bugfix in timeline
- Fixed grouping of multiple new drafts in timeline
- Do not allow to add suggestions when issue is half frozen
- Do not show initiator invitations for (half-)frozen or closed issues
- Fixed problem with duplicates in display of vote-later requests
- Clarified german "member is participating" info text in delegation chain
- Hide inactive members from member listing
- Fixed grouping of multiple new drafts in timeline
- Do not allow to add suggestions when issue is half frozen
- Do not show initiator invitations for (half-)frozen or closed issues
- Fixed problem with duplicates in display of vote-later requests
- Clarified german "member is participating" info text in delegation chain
- Hide inactive members from member listing
| author | bsw | 
|---|---|
| date | Sun Mar 07 15:36:54 2010 +0100 (2010-03-07) | 
| parents | afd9f769c7ae | 
| children | bde068b37608 | 
| rev | line source | 
|---|---|
| bsw/jbe@0 | 1 local initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec() | 
| bsw/jbe@0 | 2 | 
| bsw/jbe@5 | 3 -- TODO important m1 selectors returning result _SET_! | 
| bsw/jbe@5 | 4 local issue = initiative:get_reference_selector("issue"):for_share():single_object_mode():exec() | 
| bsw/jbe@5 | 5 | 
| bsw/jbe@5 | 6 if issue.closed then | 
| bsw/jbe@5 | 7 slot.put_into("error", _"This issue is already closed.") | 
| bsw/jbe@5 | 8 return false | 
| bsw/jbe@5 | 9 elseif issue.fully_frozen then | 
| bsw/jbe@5 | 10 slot.put_into("error", _"Voting for this issue has already begun.") | 
| bsw/jbe@5 | 11 return false | 
| bsw/jbe@5 | 12 end | 
| bsw/jbe@5 | 13 | 
| bsw/jbe@0 | 14 local member = app.session.member | 
| bsw/jbe@0 | 15 | 
| bsw/jbe@0 | 16 local supporter = Supporter:by_pk(initiative.id, member.id) | 
| bsw/jbe@0 | 17 | 
| bsw/jbe@0 | 18 if supporter then | 
| bsw/jbe@0 | 19 supporter:destroy() | 
| bsw/jbe@0 | 20 slot.put_into("notice", _"Your support has been removed from this initiative") | 
| bsw/jbe@0 | 21 else | 
| bsw/jbe@0 | 22 slot.put_into("notice", _"You are already not supporting this initiative") | 
| bsw/jbe@0 | 23 end |