summaryrefslogtreecommitdiffstats
path: root/app/views/watchers/destroy.js.erb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-07-25 02:27:54 +0000
committerGo MAEDA <maeda@farend.jp>2021-07-25 02:27:54 +0000
commit37d3f3faa9a639288e3c056d688d0114e943d70c (patch)
treec6bd97ce245970bae425b9cf64a52667dbfe224c /app/views/watchers/destroy.js.erb
parentb50973196517d5887b938ff9152fb6647a7cc197 (diff)
downloadredmine-37d3f3faa9a639288e3c056d688d0114e943d70c.tar.gz
redmine-37d3f3faa9a639288e3c056d688d0114e943d70c.zip
Add watching users to a ticket should switch "watch" link to "unwatch" if own user was added (#15634).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@21079 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/watchers/destroy.js.erb')
-rw-r--r--app/views/watchers/destroy.js.erb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/watchers/destroy.js.erb b/app/views/watchers/destroy.js.erb
index 413797dc2..12553e8e5 100644
--- a/app/views/watchers/destroy.js.erb
+++ b/app/views/watchers/destroy.js.erb
@@ -1,3 +1,4 @@
<% if @watchables.size == 1 %>
-$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watchables.first})) %>');
+ <%= render(:partial => 'watchers/set_watcher',
+ :locals => {:watched => @watchables, :user => User.current}) %>
<% end %>