liquid_feedback_frontend
annotate app/main/initiative/_action/remove_support.lua @ 4:80c215dbf076
Version alpha5
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
author | bsw/jbe |
---|---|
date | Thu Dec 10 12:00:00 2009 +0100 (2009-12-10) |
parents | 3bfb2fcf7ab9 |
children | afd9f769c7ae |
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@0 | 3 local member = app.session.member |
bsw/jbe@0 | 4 |
bsw/jbe@0 | 5 local supporter = Supporter:by_pk(initiative.id, member.id) |
bsw/jbe@0 | 6 |
bsw/jbe@0 | 7 if supporter then |
bsw/jbe@0 | 8 supporter:destroy() |
bsw/jbe@0 | 9 slot.put_into("notice", _"Your support has been removed from this initiative") |
bsw/jbe@0 | 10 else |
bsw/jbe@0 | 11 slot.put_into("notice", _"You are already not supporting this initiative") |
bsw/jbe@0 | 12 end |