summaryrefslogtreecommitdiffstats
path: root/app/views/projects/settings/_members.html.erb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-15 11:20:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-15 11:20:47 +0000
commit36fc7beb2fe21beaf56b640b97e3079c7399a48f (patch)
tree9e4f6d8ffbf71ca58541a10639afe0eb4d0dde50 /app/views/projects/settings/_members.html.erb
parentf21a005fea463a579512f2e4888693255187dd45 (diff)
downloadredmine-36fc7beb2fe21beaf56b640b97e3079c7399a48f.tar.gz
redmine-36fc7beb2fe21beaf56b640b97e3079c7399a48f.zip
Moved new project member to its own action MemberController#new.
git-svn-id: http://svn.redmine.org/redmine/trunk@13600 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects/settings/_members.html.erb')
-rw-r--r--app/views/projects/settings/_members.html.erb32
1 files changed, 2 insertions, 30 deletions
diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb
index 392d1d4b5..569684a58 100644
--- a/app/views/projects/settings/_members.html.erb
+++ b/app/views/projects/settings/_members.html.erb
@@ -1,8 +1,8 @@
-<%= error_messages_for 'member' %>
<% roles = Role.find_all_givable
members = @project.member_principals.includes(:member_roles, :roles, :principal).to_a.sort %>
-<div class="splitcontentleft">
+<p><%= link_to l(:label_member_new), new_project_membership_path(@project), :remote => true, :class => "icon icon-add" %></p>
+
<% if members.any? %>
<table class="list members">
<thead>
@@ -62,31 +62,3 @@
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
-</div>
-
-<div class="splitcontentright">
-<% if roles.any? %>
- <%= form_for(@member,
- {:as => :membership, :url => project_memberships_path(@project),
- :remote => true, :method => :post}) do |f| %>
- <fieldset>
- <legend><%=l(:label_member_new)%></legend>
- <p>
- <%= label_tag("principal_search", l(:label_principal_search)) %>
- <%= text_field_tag('principal_search', nil) %>
- </p>
- <%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
- <div id="principals_for_new_member">
- <%= render_principals_for_new_members(@project) %>
- </div>
- <p>
- <%= l(:label_role_plural) %>:
- <% roles.each do |role| %>
- <label><%= check_box_tag 'membership[role_ids][]', role.id, false, :id => nil %> <%= role %></label>
- <% end %>
- </p>
- <p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
- </fieldset>
- <% end %>
-<% end %>
-</div>