Chris@0:
Chris@0: <%= link_to_remote l(:button_add), Chris@0: :url => {:controller => 'watchers', Chris@0: :action => 'new', Chris@0: :object_type => watched.class.name.underscore, Chris@0: :object_id => watched} if User.current.allowed_to?(:add_issue_watchers, @project) %> Chris@0:
Chris@0: Chris@0:

<%= l(:label_issue_watchers) %> (<%= watched.watcher_users.size %>)

Chris@0: Chris@0: <% unless @watcher.nil? %> Chris@0: <% remote_form_for(:watcher, @watcher, Chris@0: :url => {:controller => 'watchers', Chris@0: :action => 'new', Chris@0: :object_type => watched.class.name.underscore, Chris@0: :object_id => watched}, Chris@0: :method => :post, Chris@0: :html => {:id => 'new-watcher-form'}) do |f| %> Chris@0:

<%= f.select :user_id, (watched.addable_watcher_users.collect {|m| [m.name, m.id]}), :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" %> Chris@0: Chris@0: <%= submit_tag l(:button_add) %> Chris@0: <%= toggle_link l(:button_cancel), 'new-watcher-form'%>

Chris@0: <% end %> Chris@0: <% end %> Chris@0: Chris@0: <%= watchers_list(watched) %>