Bulk watch/unwatch issues from the context menu (#7159).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11339 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-02-10 10:31:12 +00:00
parent 7303cc416c
commit 856ef810b4
7 changed files with 164 additions and 40 deletions
+4 -3
View File
@@ -117,10 +117,11 @@
</li>
<% end %>
<% if User.current.logged? %>
<li><%= watcher_link(@issues, User.current) %></li>
<% end %>
<% if @issue.present? %>
<% if User.current.logged? %>
<li><%= watcher_link(@issue, User.current) %></li>
<% end %>
<% if @can[:log_time] -%>
<li><%= context_menu_link l(:button_log_time), new_issue_time_entry_path(@issue),
:class => 'icon-time-add' %></li>
+6 -4
View File
@@ -2,8 +2,9 @@
<%= form_tag({:controller => 'watchers',
:action => (watched ? 'create' : 'append'),
:object_type => watched.class.name.underscore,
:object_id => watched},
:object_type => (watched && watched.class.name.underscore),
:object_id => watched,
:project_id => @project},
:remote => true,
:method => :post,
:id => 'new-watcher-form') do %>
@@ -11,8 +12,9 @@
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers',
:action => 'autocomplete_for_user',
:object_type => watched.class.name.underscore,
:object_id => watched) }')" %>
:object_type => (watched && watched.class.name.underscore),
:object_id => watched,
:project_id => @project) }')" %>
<div id="users_for_watcher">
<%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %>