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 / .svn / text-base / _users.html.erb.svn-base @ 442:753f1380d6bc
History | View | Annotate | Download (1.59 KB)
| 1 | 0:513646585e45 | Chris | <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="user"><%= link_to_user user %></td> |
||
| 12 | <td class="buttons"> |
||
| 13 | <%= link_to_remote l(:button_delete), { :url => { :controller => 'groups', :action => 'remove_user', :id => @group, :user_id => user },
|
||
| 14 | :method => :post }, |
||
| 15 | :class => 'icon icon-del' %> |
||
| 16 | </td> |
||
| 17 | </tr> |
||
| 18 | <% end %> |
||
| 19 | </tbody> |
||
| 20 | </table> |
||
| 21 | <% else %> |
||
| 22 | <p class="nodata"><%= l(:label_no_data) %></p> |
||
| 23 | <% end %> |
||
| 24 | </div> |
||
| 25 | |||
| 26 | <div class="splitcontentright"> |
||
| 27 | 441:cbce1fd3b1b7 | Chris | <% users = User.active.not_in_group(@group).all(:limit => 100) %> |
| 28 | 0:513646585e45 | Chris | <% if users.any? %> |
| 29 | <% remote_form_for(:group, @group, :url => {:controller => 'groups', :action => 'add_users', :id => @group}, :method => :post) do |f| %>
|
||
| 30 | <fieldset><legend><%=l(:label_user_new)%></legend> |
||
| 31 | |||
| 32 | 37:94944d00e43c | chris | <p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
| 33 | 0:513646585e45 | Chris | <%= observe_field(:user_search, |
| 34 | :frequency => 0.5, |
||
| 35 | :update => :users, |
||
| 36 | :url => { :controller => 'groups', :action => 'autocomplete_for_user', :id => @group },
|
||
| 37 | :with => 'q') |
||
| 38 | %> |
||
| 39 | |||
| 40 | <div id="users"> |
||
| 41 | <%= principals_check_box_tags 'user_ids[]', users %> |
||
| 42 | </div> |
||
| 43 | |||
| 44 | <p><%= submit_tag l(:button_add) %></p> |
||
| 45 | </fieldset> |
||
| 46 | <% end %> |
||
| 47 | <% end %> |
||
| 48 | |||
| 49 | </div> |