Chris@909:
Chris@909: <%= link_to_remote l(:button_add),
Chris@909: :url => {:controller => 'watchers',
Chris@909: :action => 'new',
Chris@909: :object_type => watched.class.name.underscore,
Chris@909: :object_id => watched} if User.current.allowed_to?(:add_issue_watchers, @project) %>
Chris@909:
Chris@909:
Chris@909: <%= l(:label_issue_watchers) %> (<%= watched.watcher_users.size %>)
Chris@909:
Chris@909: <% unless @watcher.nil? %>
Chris@909: <% remote_form_for(:watcher, @watcher,
Chris@909: :url => {:controller => 'watchers',
Chris@909: :action => 'new',
Chris@909: :object_type => watched.class.name.underscore,
Chris@909: :object_id => watched},
Chris@909: :method => :post,
Chris@909: :html => {:id => 'new-watcher-form'}) do |f| %>
Chris@909: <%= f.select :user_id, (watched.addable_watcher_users.collect {|m| [m.name, m.id]}), :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" %>
Chris@909:
Chris@909: <%= submit_tag l(:button_add) %>
Chris@909: <%= toggle_link l(:button_cancel), 'new-watcher-form'%>
Chris@909: <% end %>
Chris@909: <% end %>
Chris@909:
Chris@909: <%= watchers_list(watched) %>