mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-26 17:17:14 +00:00
Patch by Felix Schäfer (@felix). git-svn-id: https://svn.redmine.org/redmine/trunk@22913 e93f8b46-1217-0410-a6f0-8f06a7374b81
18 lines
649 B
Plaintext
18 lines
649 B
Plaintext
<% 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 %>
|