liquid_feedback_frontend
view app/main/interest/_action/update_voting_requested.lua @ 172:165f4bd02cf3
don't show the first draft of a new initiative as a new draft event in the timeline
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
| author | Daniel Poelzleithner <poelzi@poelzi.org> | 
|---|---|
| date | Sun Oct 10 19:40:32 2010 +0200 (2010-10-10) | 
| parents | 559c6be0e1e9 | 
| children | 
 line source
     1 local issue_id = assert(param.get("issue_id", atom.integer), "no issue id given")
     3 local interest = Interest:by_pk(issue_id, app.session.member.id)
     5 local issue = Issue:new_selector():add_where{ "id = ?", issue_id }:for_share():single_object_mode():exec()
     7 if issue.closed then
     8   slot.put_into("error", _"This issue is already closed.")
     9   return false
    10 elseif issue.half_frozen then 
    11   slot.put_into("error", _"This issue is already frozen.")
    12   return false
    13 end
    15 interest.voting_requested = param.get("voting_requested", atom.boolean)
    17 if interest.voting_requested == true then
    18   error("not implemented yet")
    19 end
    21 interest:save()
    23 slot.put_into("notice", _"Voting request updated")
