<%#
  This file is a part of RedmineX UX Upgrade plugin
  for Redmine

  Copyright 2020-2022 RedmineX. All Rights Reserved.
  https://www.redmine-x.com

  Licensed under GPL v2 (http://www.gnu.org/licenses/gpl-2.0.html)
  Created by Ondřej Svejkovský
%>

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

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

<%= watchers_list(watched) %>
