Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
31
app/views/watchers/_new.html.erb
Normal file
31
app/views/watchers/_new.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
|||
<h3 class="title"><%= l(:permission_add_issue_watchers) %></h3>
|
||||
|
||||
<%= form_tag(watchables.present? ? watchers_path : watchers_append_path,
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-watcher-form') do %>
|
||||
|
||||
<% if watchables.present? %>
|
||||
<%= hidden_field_tag 'object_type', watchables.first.class.name.underscore %>
|
||||
<% watchables.each do |watchable| %>
|
||||
<%= hidden_field_tag 'object_id[]', watchable.id %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'project_id', @project.id if @project %>
|
||||
|
||||
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
|
||||
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers',
|
||||
:action => 'autocomplete_for_user',
|
||||
:object_type => (watchables.present? ? watchables.first.class.name.underscore : nil),
|
||||
:object_id => (watchables.present? && watchables.size == 1 ? watchables.first.id : nil),
|
||||
:project_id => @project) }')" %>
|
||||
|
||||
<div id="users_for_watcher">
|
||||
<%= principals_check_box_tags('watcher[user_ids][]', users) %>
|
||||
</div>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_add), :name => nil, :onclick => "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
</p>
|
||||
<% end %>
|
3
app/views/watchers/_set_watcher.js.erb
Normal file
3
app/views/watchers/_set_watcher.js.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<% selector = ".#{watcher_css(watched)}" %>
|
||||
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")});
|
||||
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => watched.first})) %>');
|
12
app/views/watchers/_watchers.html.erb
Normal file
12
app/views/watchers/_watchers.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<% 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 %>
|
||||
|
||||
<h3><%= l(:label_issue_watchers) %> (<%= watched.watcher_users.size %>)</h3>
|
||||
|
||||
<%= watchers_list(watched) %>
|
4
app/views/watchers/append.js.erb
Normal file
4
app/views/watchers/append.js.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
<% @users.each do |user| %>
|
||||
$("#issue_watcher_user_ids_<%= user.id %>").remove();
|
||||
<% end %>
|
||||
$('#watchers_inputs').append('<%= escape_javascript(watchers_checkboxes(nil, @users, true)) %>');
|
1
app/views/watchers/autocomplete_for_user.html.erb
Normal file
1
app/views/watchers/autocomplete_for_user.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= principals_check_box_tags 'watcher[user_ids][]', @users %>
|
5
app/views/watchers/create.js.erb
Normal file
5
app/views/watchers/create.js.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render(:partial => 'watchers/new', :locals => {:watchables => @watchables, :users => @users})) %>');
|
||||
|
||||
<% if @watchables.size == 1 %>
|
||||
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watchables.first})) %>');
|
||||
<% end %>
|
3
app/views/watchers/destroy.js.erb
Normal file
3
app/views/watchers/destroy.js.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<% if @watchables.size == 1 %>
|
||||
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watchables.first})) %>');
|
||||
<% end %>
|
3
app/views/watchers/new.js.erb
Normal file
3
app/views/watchers/new.js.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'watchers/new', :locals => {:watchables => @watchables, :users => @users}) %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
Loading…
Add table
Add a link
Reference in a new issue