diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-03-24 12:57:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-03-24 12:57:28 +0000 |
commit | fae5250e52506356965a478518aa7960ada3ec61 (patch) | |
tree | 91db93da34e2437bd9b0e9017fb7dd38eb275b30 /app/views | |
parent | e2bb8721d9e0b41094f7a7c768951235492dc3e4 (diff) | |
download | redmine-fae5250e52506356965a478518aa7960ada3ec61.tar.gz redmine-fae5250e52506356965a478518aa7960ada3ec61.zip |
Ability to add non-member watchers on issue creation (#5159).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9254 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/attachments/_form.html.erb | 5 | ||||
-rw-r--r-- | app/views/issues/new.html.erb | 13 | ||||
-rw-r--r-- | app/views/watchers/_new.html.erb | 4 |
3 files changed, 13 insertions, 9 deletions
diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 464d3a2d7..7eea17bb7 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -14,6 +14,5 @@ <%= link_to_function(image_tag('delete.png'), 'removeFileField(this)', :title => (l(:button_delete))) %> </span> </span> -<small><%= link_to l(:label_add_another_file), '#', :onclick => 'addFileField(); return false;' %> -(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) -</small> +<span class="add_attachment"><%= link_to l(:label_add_another_file), '#', :onclick => 'addFileField(); return false;', :class => 'add_attachment' %> +(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</span> diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 11268214f..c95daa1e4 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -22,10 +22,15 @@ <% if @issue.safe_attribute? 'watcher_user_ids' -%> <p id="watchers_form"><label><%= l(:label_issue_watchers) %></label> - <% @issue.project.users.sort.each do |user| -%> - <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watched_by?(user), :id => nil %> <%=h user %></label> - <% end -%> - </p> + <span id="watchers_inputs"> + <%= watchers_checkboxes(@issue, @available_watchers) %> + </span> + <span class="search_for_watchers"> + <%= link_to_remote l(:label_search_for_watchers), + :url => {:controller => 'watchers', :action => 'new', :project_id => @issue.project}, + :method => 'get' %> + </span> + </p> <% end %> </div> diff --git a/app/views/watchers/_new.html.erb b/app/views/watchers/_new.html.erb index 9b4227ad7..c2c133ee7 100644 --- a/app/views/watchers/_new.html.erb +++ b/app/views/watchers/_new.html.erb @@ -1,7 +1,7 @@ <h3 class="title"><%= l(:permission_add_issue_watchers) %></h3> <% form_remote_tag :url => {:controller => 'watchers', - :action => 'create', + :action => (watched ? 'create' : 'append'), :object_type => watched.class.name.underscore, :object_id => watched}, :method => :post, @@ -22,7 +22,7 @@ :with => 'q') %> <div id="users_for_watcher"> - <%= principals_check_box_tags 'watcher[user_ids][]', watched.addable_watcher_users %> + <%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %> </div> <p class="buttons"> |