2006-12-26 14:28:22 +03:00
|
|
|
<div class="box" style="margin-top: 16px;">
|
|
|
|
<h3><%= l(:label_project_plural) %></h3>
|
|
|
|
|
|
|
|
<% @user.memberships.each do |membership| %>
|
2007-01-26 22:56:25 +03:00
|
|
|
<% form_tag({ :action => 'edit_membership', :id => @user, :membership_id => membership }, :class => "tabular") do %>
|
2006-12-26 14:28:22 +03:00
|
|
|
<p style="margin:0;padding-top:0;">
|
|
|
|
<label><%= membership.project.name %></label>
|
|
|
|
<select name="membership[role_id]">
|
|
|
|
<%= options_from_collection_for_select @roles, "id", "name", membership.role_id %>
|
|
|
|
</select>
|
|
|
|
<%= submit_tag l(:button_change), :class => "button-small" %>
|
2007-01-08 22:21:59 +03:00
|
|
|
<%= link_to l(:button_delete), {:action => 'destroy_membership', :id => @user, :membership_id => membership }, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
|
2006-12-26 14:28:22 +03:00
|
|
|
</p>
|
2007-01-26 22:56:25 +03:00
|
|
|
<% end %>
|
2006-12-26 14:28:22 +03:00
|
|
|
<% end %>
|
|
|
|
<hr />
|
|
|
|
<p>
|
|
|
|
<label><%=l(:label_project_new)%></label><br/>
|
2007-01-26 22:56:25 +03:00
|
|
|
<% form_tag({ :action => 'edit_membership', :id => @user }) do %>
|
2006-12-26 14:28:22 +03:00
|
|
|
<select name="membership[project_id]">
|
|
|
|
<%= options_from_collection_for_select @projects, "id", "name", @membership.project_id %>
|
|
|
|
</select>
|
|
|
|
<select name="membership[role_id]">
|
|
|
|
<%= options_from_collection_for_select @roles, "id", "name", @membership.role_id %>
|
|
|
|
</select>
|
|
|
|
<%= submit_tag l(:button_add) %>
|
2007-01-26 22:56:25 +03:00
|
|
|
<% end %>
|
2006-12-26 14:28:22 +03:00
|
|
|
</p>
|
|
|
|
</div>
|