From ae0808dc3ebef34488af91c911681ea92bad8a61 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 22 Nov 2019 03:02:43 +0000 Subject: [PATCH] code layout clean up app/views/watchers/_new.html.erb git-svn-id: http://svn.redmine.org/redmine/trunk@19144 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/watchers/_new.html.erb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/views/watchers/_new.html.erb b/app/views/watchers/_new.html.erb index 3bd7953ac..f313d04d3 100644 --- a/app/views/watchers/_new.html.erb +++ b/app/views/watchers/_new.html.erb @@ -14,12 +14,21 @@ <%= hidden_field_tag 'project_id', @project.id if @project %>

<%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %>

- <%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers', + <%= javascript_tag( + "observeSearchfield( + 'user_search', + 'users_for_watcher', + '#{escape_javascript( + url_for( + :controller => 'watchers', :action => 'autocomplete_for_user', :object_type => (watchables.present? ? watchables.first.class.name.underscore : nil), :object_id => (watchables.present? && watchables.size == 1 ? watchables.first.id : nil), - :project_id => @project) }')" %> - + :project_id => @project + ) + )}' + )" + ) %>
<%= principals_check_box_tags('watcher[user_ids][]', users) %>
-- 2.39.5