liquid_feedback_frontend
view app/main/area/_action/update_ignore.lua @ 1570:dcacc0b98d70
Fixed filter for issue list of units without privilege
| author | bsw | 
|---|---|
| date | Wed Nov 11 12:23:48 2020 +0100 (2020-11-11) | 
| parents | 55132e0324a4 | 
| children | 
 line source
     1 local area_id = assert(param.get("area_id", atom.integer), "no area id given")
     4 local ignored_area = IgnoredArea:by_pk(app.session.member_id, area_id)
     6 if param.get("delete", atom.boolean) then
     7   if ignored_area then
     8     ignored_area:destroy()
     9     slot.select("notice", function() ui.tag{ content = _"You have been subscribed for update emails about this subject area" } end)
    10   end
    11   return
    12 end
    14 if not ignored_area then
    15   local ignored_area = IgnoredArea:new()
    16   ignored_area.member_id = app.session.member_id
    17   ignored_area.area_id = area_id
    18   ignored_area:save()
    19   slot.select("notice", function() ui.tag{ content = _"You will no longer receive update emails about this subject area" }  end )
    21 end
