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 @ 1298:4f746d8966dd
History | View | Annotate | Download (1.23 KB)
| 1 | 0:513646585e45 | Chris | <div class="splitcontentleft"> |
|---|---|---|---|
| 2 | <% if @group.users.any? %>
|
||
| 3 | 909:cbb26bc654de | Chris | <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="user"><%= link_to_user user %></td> |
||
| 12 | <td class="buttons"> |
||
| 13 | 1115:433d4f72a19b | Chris | <%= delete_link group_user_path(@group, :user_id => user), :remote => true %>
|
| 14 | 909:cbb26bc654de | Chris | </td>
|
| 15 | </tr>
|
||
| 16 | <% end %>
|
||
| 17 | </tbody>
|
||
| 18 | </table>
|
||
| 19 | 0:513646585e45 | Chris | <% else %>
|
| 20 | 909:cbb26bc654de | Chris | <p class="nodata"><%= l(:label_no_data) %></p> |
| 21 | 0:513646585e45 | Chris | <% end %>
|
| 22 | </div>
|
||
| 23 | |||
| 24 | <div class="splitcontentright"> |
||
| 25 | 1115:433d4f72a19b | Chris | <%= form_for(@group, :remote => true, :url => group_users_path(@group),
|
| 26 | :html => {:method => :post}) do |f| %>
|
||
| 27 | 0:513646585e45 | Chris | <fieldset><legend><%=l(:label_user_new)%></legend> |
| 28 | 909:cbb26bc654de | Chris | |
| 29 | <p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
||
| 30 | 1295:622f24f53b42 | Chris | <%= javascript_tag "observeSearchfield('user_search', null, '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %>
|
| 31 | 909:cbb26bc654de | Chris | |
| 32 | <div id="users"> |
||
| 33 | 1295:622f24f53b42 | Chris | <%= render_principals_for_new_group_users(@group) %>
|
| 34 | 909:cbb26bc654de | Chris | </div>
|
| 35 | |||
| 36 | 0:513646585e45 | Chris | <p><%= submit_tag l(:button_add) %></p> |
| 37 | 909:cbb26bc654de | Chris | </fieldset>
|
| 38 | 0:513646585e45 | Chris | <% end %>
|
| 39 | </div> |