To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / groups / _users.html.erb @ 1591:63650ae64bf2
History | View | Annotate | Download (1.23 KB)
| 1 |
<div class="splitcontentleft"> |
|---|---|
| 2 |
<% if @group.users.any? %>
|
| 3 |
<table class="list users"> |
| 4 |
<thead><tr> |
| 5 |
<th><%= l(:label_user) %></th> |
| 6 |
<th style="width:15%"></th> |
| 7 |
</tr></thead> |
| 8 |
<tbody>
|
| 9 |
<% @group.users.sort.each do |user| %>
|
| 10 |
<tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>"> |
| 11 |
<td class="name"><%= link_to_user user %></td> |
| 12 |
<td class="buttons"> |
| 13 |
<%= delete_link group_user_path(@group, :user_id => user), :remote => true %>
|
| 14 |
</td>
|
| 15 |
</tr>
|
| 16 |
<% end %>
|
| 17 |
</tbody>
|
| 18 |
</table>
|
| 19 |
<% else %>
|
| 20 |
<p class="nodata"><%= l(:label_no_data) %></p> |
| 21 |
<% end %>
|
| 22 |
</div>
|
| 23 |
|
| 24 |
<div class="splitcontentright"> |
| 25 |
<%= form_for(@group, :remote => true, :url => group_users_path(@group),
|
| 26 |
:html => {:method => :post}) do |f| %>
|
| 27 |
<fieldset><legend><%=l(:label_user_new)%></legend> |
| 28 |
|
| 29 |
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
| 30 |
<%= javascript_tag "observeSearchfield('user_search', null, '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %>
|
| 31 |
|
| 32 |
<div id="users"> |
| 33 |
<%= render_principals_for_new_group_users(@group) %>
|
| 34 |
</div>
|
| 35 |
|
| 36 |
<p><%= submit_tag l(:button_add) %></p> |
| 37 |
</fieldset>
|
| 38 |
<% end %>
|
| 39 |
</div>
|