bsw@1254: local area_id = assert(param.get("area_id", atom.integer), "no area id given") bsw@1254: bsw@1254: bsw@1254: local ignored_area = IgnoredArea:by_pk(app.session.member_id, area_id) bsw@1254: bsw@1254: if param.get("delete", atom.boolean) then bsw@1254: if ignored_area then bsw@1254: ignored_area:destroy() bsw@1254: slot.select("notice", function() ui.tag{ content = _"You have been subscribed for update emails about this subject area" } end) bsw@1254: end bsw@1254: return bsw@1254: end bsw@1254: bsw@1254: if not ignored_area then bsw@1254: local ignored_area = IgnoredArea:new() bsw@1254: ignored_area.member_id = app.session.member_id bsw@1254: ignored_area.area_id = area_id bsw@1254: ignored_area:save() bsw@1254: slot.select("notice", function() ui.tag{ content = _"You will no longer receive update emails about this subject area" } end ) bsw@1254: bsw@1254: end