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

<% if User.current.allowed_to?(:"view_#{watched_klass_name}_watchers", watched.project) %>
<h3><%= l(:"label_#{watched_klass_name}_watchers") %> (<%= watched.watcher_users.size %>)</h3>

<%= watchers_list(watched) %>
<% else %>
<h3><%= l(:"label_#{watched_klass_name}_watchers") %></h3>
<% end %>
