Redmine 3.4.4

This commit is contained in:
Manuel Cillero 2018-02-02 22:19:29 +01:00
commit 64924a6376
2112 changed files with 259028 additions and 0 deletions

View 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 %>

View 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})) %>');

View 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) %>

View 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)) %>');

View file

@ -0,0 +1 @@
<%= principals_check_box_tags 'watcher[user_ids][]', @users %>

View 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 %>

View file

@ -0,0 +1,3 @@
<% if @watchables.size == 1 %>
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watchables.first})) %>');
<% end %>

View 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');