Revision 1298:4f746d8966dd app/views/groups
| app/views/groups/_form.html.erb | ||
|---|---|---|
| 1 | 1 |
<%= error_messages_for @group %> |
| 2 | 2 |
|
| 3 | 3 |
<div class="box tabular"> |
| 4 |
<p><%= f.text_field :name %></p> |
|
| 4 |
<p><%= f.text_field :name, :required => true, :size => 60 %></p>
|
|
| 5 | 5 |
<% @group.custom_field_values.each do |value| %> |
| 6 | 6 |
<p><%= custom_field_tag_with_label :group, value %></p> |
| 7 | 7 |
<% end %> |
| app/views/groups/_memberships.html.erb | ||
|---|---|---|
| 1 | 1 |
<% roles = Role.find_all_givable %> |
| 2 |
<% projects = Project.active.find(:all, :order => 'lft') %>
|
|
| 2 |
<% projects = Project.active.all %>
|
|
| 3 | 3 |
|
| 4 | 4 |
<div class="splitcontentleft"> |
| 5 | 5 |
<% if @group.memberships.any? %> |
| ... | ... | |
| 13 | 13 |
<% @group.memberships.each do |membership| %> |
| 14 | 14 |
<% next if membership.new_record? %> |
| 15 | 15 |
<tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class"> |
| 16 |
<td class="project"><%=h membership.project %></td>
|
|
| 16 |
<td class="project"><%= link_to_project membership.project %></td>
|
|
| 17 | 17 |
<td class="roles"> |
| 18 | 18 |
<span id="member-<%= membership.id %>-roles"><%=h membership.roles.sort.collect(&:to_s).join(', ') %></span>
|
| 19 | 19 |
<%= form_for(:membership, :remote => true, |
| app/views/groups/_users.html.erb | ||
|---|---|---|
| 22 | 22 |
</div> |
| 23 | 23 |
|
| 24 | 24 |
<div class="splitcontentright"> |
| 25 |
<% users = User.active.not_in_group(@group).all(:limit => 100) %> |
|
| 26 |
<% if users.any? %> |
|
| 27 | 25 |
<%= form_for(@group, :remote => true, :url => group_users_path(@group), |
| 28 | 26 |
:html => {:method => :post}) do |f| %>
|
| 29 | 27 |
<fieldset><legend><%=l(:label_user_new)%></legend> |
| 30 | 28 |
|
| 31 | 29 |
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
| 32 |
<%= javascript_tag "observeSearchfield('user_search', 'users', '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %>
|
|
| 30 |
<%= javascript_tag "observeSearchfield('user_search', null, '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %>
|
|
| 33 | 31 |
|
| 34 | 32 |
<div id="users"> |
| 35 |
<%= principals_check_box_tags 'user_ids[]', users %>
|
|
| 33 |
<%= render_principals_for_new_group_users(@group) %>
|
|
| 36 | 34 |
</div> |
| 37 | 35 |
|
| 38 | 36 |
<p><%= submit_tag l(:button_add) %></p> |
| 39 | 37 |
</fieldset> |
| 40 | 38 |
<% end %> |
| 41 |
<% end %> |
|
| 42 |
|
|
| 43 | 39 |
</div> |
| app/views/groups/autocomplete_for_user.html.erb | ||
|---|---|---|
| 1 |
<%= principals_check_box_tags 'user_ids[]', @users %> |
|
| app/views/groups/autocomplete_for_user.js.erb | ||
|---|---|---|
| 1 |
$('#users').html('<%= escape_javascript(render_principals_for_new_group_users(@group)) %>');
|
|
| app/views/groups/index.html.erb | ||
|---|---|---|
| 19 | 19 |
<td class="buttons"><%= delete_link group %></td> |
| 20 | 20 |
</tr> |
| 21 | 21 |
<% end %> |
| 22 |
</tbody> |
|
| 22 | 23 |
</table> |
| 23 | 24 |
<% else %> |
| 24 | 25 |
<p class="nodata"><%= l(:label_no_data) %></p> |
Also available in: Unified diff