liquid_feedback_frontend
view app/main/initiative/_action/update_ignore.lua @ 1454:1d5469ca60dc
Fix layout of search form in admin index view
| author | bsw | 
|---|---|
| date | Thu Oct 18 17:22:18 2018 +0200 (2018-10-18) | 
| parents | 955bd41e1559 | 
| children | 
 line source
     1 local member = app.session.member
     2 local initiative = Initiative:by_id(param.get_id())
     4 local ignore_initiative = IgnoredInitiative:by_pk(member.id, initiative.id)
     6 if param.get("delete", atom.boolean) then
     7   if ignore_initiative then
     8     ignore_initiative:destroy()
     9   end
    10   return
    11 end
    13 if not ignore_initiative then
    14   ignore_initiative = IgnoredInitiative:new()
    15   ignore_initiative.member_id = member.id
    16   ignore_initiative.initiative_id = initiative.id
    17   ignore_initiative:save()
    18 end
