# HG changeset patch # User bsw # Date 1331841373 -3600 # Node ID abebe5e9ff78061493dc5c64610789a8c1d2442e # Parent 4ef069c88daff39fdb755a1095399fd67a048002 Do not show ignore initiative for closed issues closes #1179 diff -r 4ef069c88daf -r abebe5e9ff78 app/main/supporter/_show_box.lua --- a/app/main/supporter/_show_box.lua Thu Mar 15 15:52:43 2012 +0100 +++ b/app/main/supporter/_show_box.lua Thu Mar 15 20:56:13 2012 +0100 @@ -130,47 +130,48 @@ } end - local ignored_initiative = IgnoredInitiative:by_pk(app.session.member.id, initiative.id) - if ignored_initiative then - ui.container{ - attr = { class = "interest" }, - content = _"You have ignored this initiative" - } - ui.link{ - text = _"Stop ignoring initiative", - module = "initiative", - action = "update_ignore", - id = initiative.id, - params = { delete = true }, - routing = { - default = { - mode = "redirect", - module = request.get_module(), - view = request.get_view(), - id = param.get_id_cgi(), - params = param.get_all_cgi() + if not initiative.issue.closed then + local ignored_initiative = IgnoredInitiative:by_pk(app.session.member.id, initiative.id) + if ignored_initiative then + ui.container{ + attr = { class = "interest" }, + content = _"You have ignored this initiative" + } + ui.link{ + text = _"Stop ignoring initiative", + module = "initiative", + action = "update_ignore", + id = initiative.id, + params = { delete = true }, + routing = { + default = { + mode = "redirect", + module = request.get_module(), + view = request.get_view(), + id = param.get_id_cgi(), + params = param.get_all_cgi() + } } } - } - else - ui.link{ - attr = { class = "interest" }, - text = _"Ignore initiative", - module = "initiative", - action = "update_ignore", - id = initiative.id, - routing = { - default = { - mode = "redirect", - module = request.get_module(), - view = request.get_view(), - id = param.get_id_cgi(), - params = param.get_all_cgi() + else + ui.link{ + attr = { class = "interest" }, + text = _"Ignore initiative", + module = "initiative", + action = "update_ignore", + id = initiative.id, + routing = { + default = { + mode = "redirect", + module = request.get_module(), + view = request.get_view(), + id = param.get_id_cgi(), + params = param.get_all_cgi() + } } } - } + end end - end }