% watched_klass_name = watched.class.name.underscore -%>
<% if User.current.allowed_to?(:"add_#{watched_klass_name}_watchers", watched.project) %>
<%= link_to l(:button_add),
new_watchers_path(:object_type => watched_klass_name, :object_id => watched),
:remote => true,
:method => 'get' %>
<% end %>
<% if User.current.allowed_to?(:"view_#{watched_klass_name}_watchers", watched.project) %>
<%= l(:"label_#{watched_klass_name}_watchers") %> (<%= watched.watcher_users.size %>)
<%= watchers_list(watched) %>
<% else %>
<%= l(:"label_#{watched_klass_name}_watchers") %>
<% end %>