##// END OF EJS Templates
Adds missing thead tags (#5440)....
Jean-Philippe Lang -
r3620:0fa124a92ca7
parent child
Show More
@@ -1,37 +1,37
1 1 <h2><%=l(:label_enumerations)%></h2>
2 2
3 3 <% Enumeration.get_subclasses.each do |klass| %>
4 4 <h3><%= l(klass::OptionName) %></h3>
5 5
6 6 <% enumerations = klass.shared %>
7 7 <% if enumerations.any? %>
8 <table class="list">
8 <table class="list"><thead>
9 9 <tr>
10 10 <th><%= l(:field_name) %></th>
11 11 <th style="width:15%;"><%= l(:field_is_default) %></th>
12 12 <th style="width:15%;"><%= l(:field_active) %></th>
13 13 <th style="width:15%;"></th>
14 14 <th align="center" style="width:10%;"> </th>
15 </tr>
15 </tr></thead>
16 16 <% enumerations.each do |enumeration| %>
17 17 <tr class="<%= cycle('odd', 'even') %>">
18 18 <td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
19 19 <td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td>
20 20 <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
21 21 <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
22 22 <td class="buttons">
23 23 <%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
24 24 :method => :post,
25 25 :confirm => l(:text_are_you_sure),
26 26 :class => 'icon icon-del' %>
27 27 </td>
28 28 </tr>
29 29 <% end %>
30 30 </table>
31 31 <% reset_cycle %>
32 32 <% end %>
33 33
34 34 <p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p>
35 35 <% end %>
36 36
37 37 <% html_title(l(:label_enumerations)) -%>
@@ -1,56 +1,56
1 1 <% roles = Role.find_all_givable %>
2 2 <% projects = Project.active.find(:all, :order => 'lft') %>
3 3
4 4 <div class="splitcontentleft">
5 5 <% if @group.memberships.any? %>
6 6 <table class="list memberships">
7 <thead>
7 <thead><tr>
8 8 <th><%= l(:label_project) %></th>
9 9 <th><%= l(:label_role_plural) %></th>
10 10 <th style="width:15%"></th>
11 </thead>
11 </tr></thead>
12 12 <tbody>
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 16 <td class="project"><%=h 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 <% remote_form_for(:membership, :url => { :action => 'edit_membership', :id => @group, :membership_id => membership },
20 20 :html => { :id => "member-#{membership.id}-roles-form", :style => 'display:none;'}) do %>
21 21 <p><% roles.each do |role| %>
22 22 <label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role) %> <%=h role %></label><br />
23 23 <% end %></p>
24 24 <p><%= submit_tag l(:button_change) %>
25 25 <%= link_to_function l(:button_cancel), "$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;" %></p>
26 26 <% end %>
27 27 </td>
28 28 <td class="buttons">
29 29 <%= link_to_function l(:button_edit), "$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
30 30 <%= link_to_remote l(:button_delete), { :url => { :controller => 'groups', :action => 'destroy_membership', :id => @group, :membership_id => membership },
31 31 :method => :post },
32 32 :class => 'icon icon-del' %>
33 33 </td>
34 34 </tr>
35 35 </tbody>
36 36 <% end; reset_cycle %>
37 37 </table>
38 38 <% else %>
39 39 <p class="nodata"><%= l(:label_no_data) %></p>
40 40 <% end %>
41 41 </div>
42 42
43 43 <div class="splitcontentright">
44 44 <% if projects.any? %>
45 45 <fieldset><legend><%=l(:label_project_new)%></legend>
46 46 <% remote_form_for(:membership, :url => { :action => 'edit_membership', :id => @group }) do %>
47 47 <%= select_tag 'membership[project_id]', options_for_membership_project_select(@group, projects) %>
48 48 <p><%= l(:label_role_plural) %>:
49 49 <% roles.each do |role| %>
50 50 <label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
51 51 <% end %></p>
52 52 <p><%= submit_tag l(:button_add) %></p>
53 53 <% end %>
54 54 </fieldset>
55 55 <% end %>
56 56 </div>
@@ -1,49 +1,49
1 1 <div class="splitcontentleft">
2 2 <% if @group.users.any? %>
3 3 <table class="list users">
4 <thead>
4 <thead><tr>
5 5 <th><%= l(:label_user) %></th>
6 6 <th style="width:15%"></th>
7 </thead>
7 </tr></thead>
8 8 <tbody>
9 9 <% @group.users.sort.each do |user| %>
10 10 <tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
11 11 <td class="user"><%= link_to_user user %></td>
12 12 <td class="buttons">
13 13 <%= link_to_remote l(:button_delete), { :url => { :controller => 'groups', :action => 'remove_user', :id => @group, :user_id => user },
14 14 :method => :post },
15 15 :class => 'icon icon-del' %>
16 16 </td>
17 17 </tr>
18 18 <% end %>
19 19 </tbody>
20 20 </table>
21 21 <% else %>
22 22 <p class="nodata"><%= l(:label_no_data) %></p>
23 23 <% end %>
24 24 </div>
25 25
26 26 <div class="splitcontentright">
27 27 <% users = User.active.find(:all, :limit => 100) - @group.users %>
28 28 <% if users.any? %>
29 29 <% remote_form_for(:group, @group, :url => {:controller => 'groups', :action => 'add_users', :id => @group}, :method => :post) do |f| %>
30 30 <fieldset><legend><%=l(:label_user_new)%></legend>
31 31
32 32 <p><%= text_field_tag 'user_search', nil %></p>
33 33 <%= observe_field(:user_search,
34 34 :frequency => 0.5,
35 35 :update => :users,
36 36 :url => { :controller => 'groups', :action => 'autocomplete_for_user', :id => @group },
37 37 :with => 'q')
38 38 %>
39 39
40 40 <div id="users">
41 41 <%= principals_check_box_tags 'user_ids[]', users %>
42 42 </div>
43 43
44 44 <p><%= submit_tag l(:button_add) %></p>
45 45 </fieldset>
46 46 <% end %>
47 47 <% end %>
48 48
49 49 </div>
@@ -1,52 +1,52
1 1 <h3><%=l(:label_spent_time)%> (<%= l(:label_last_n_days, 7) %>)</h3>
2 2 <%
3 3 entries = TimeEntry.find(:all,
4 4 :conditions => ["#{TimeEntry.table_name}.user_id = ? AND #{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", @user.id, Date.today - 6, Date.today],
5 5 :include => [:activity, :project, {:issue => [:tracker, :status]}],
6 6 :order => "#{TimeEntry.table_name}.spent_on DESC, #{Project.table_name}.name ASC, #{Tracker.table_name}.position ASC, #{Issue.table_name}.id ASC")
7 7 entries_by_day = entries.group_by(&:spent_on)
8 8 %>
9 9
10 10 <div class="total-hours">
11 11 <p><%= l(:label_total) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p>
12 12 </div>
13 13
14 14 <% if entries.any? %>
15 15 <table class="list time-entries">
16 <thead>
16 <thead><tr>
17 17 <th><%= l(:label_activity) %></th>
18 18 <th><%= l(:label_project) %></th>
19 19 <th><%= l(:field_comments) %></th>
20 20 <th><%= l(:field_hours) %></th>
21 21 <th></th>
22 </thead>
22 </tr></thead>
23 23 <tbody>
24 24 <% entries_by_day.keys.sort.reverse.each do |day| %>
25 25 <tr class="odd">
26 26 <td><strong><%= day == Date.today ? l(:label_today).titleize : format_date(day) %></strong></td>
27 27 <td colspan="2"></td>
28 28 <td class="hours"><em><%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %></em></td>
29 29 <td></td>
30 30 </tr>
31 31 <% entries_by_day[day].each do |entry| -%>
32 32 <tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;">
33 33 <td class="activity"><%=h entry.activity %></td>
34 34 <td class="subject"><%=h entry.project %> <%= ' - ' + link_to_issue(entry.issue, :truncate => 50) if entry.issue %></td>
35 35 <td class="comments"><%=h entry.comments %></td>
36 36 <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
37 37 <td align="center">
38 38 <% if entry.editable_by?(@user) -%>
39 39 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry},
40 40 :title => l(:button_edit) %>
41 41 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry},
42 42 :confirm => l(:text_are_you_sure),
43 43 :method => :post,
44 44 :title => l(:button_delete) %>
45 45 <% end -%>
46 46 </td>
47 47 </tr>
48 48 <% end -%>
49 49 <% end -%>
50 50 </tbody>
51 51 </table>
52 52 <% end %>
@@ -1,42 +1,42
1 <% form_tag({:controller => 'projects', :action => 'save_activities', :id => @project}, :class => "tabular") do %>
2
3 <table class="list">
4 <tr>
5 <th><%= l(:field_name) %></th>
6 <th><%= l(:enumeration_system_activity) %></th>
7 <% TimeEntryActivity.new.available_custom_fields.each do |value| %>
8 <th><%= h value.name %></th>
9 <% end %>
10 <th style="width:15%;"><%= l(:field_active) %></th>
11 </tr>
12
13 <% @project.activities(true).each do |enumeration| %>
14 <% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
15 <tr class="<%= cycle('odd', 'even') %>">
16 <td>
17 <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
18 <%= h(enumeration) %>
19 </td>
20 <td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td>
21 <% enumeration.custom_field_values.each do |value| %>
22 <td align="center">
23 <%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
24 </td>
25 <% end %>
26 <td align="center" style="width:15%;">
27 <%= ff.check_box :active %>
28 </td>
29 </tr>
30 <% end %>
31 <% end %>
32 </table>
33
34 <div class="contextual">
35 <%= link_to(l(:button_reset), {:controller => 'projects', :action => 'reset_activities', :id => @project},
36 :method => :delete,
37 :confirm => l(:text_are_you_sure),
38 :class => 'icon icon-del') %>
39 </div>
40
41 <%= submit_tag l(:button_save) %>
42 <% end %>
1 <% form_tag({:controller => 'projects', :action => 'save_activities', :id => @project}, :class => "tabular") do %>
2
3 <table class="list">
4 <thead><tr>
5 <th><%= l(:field_name) %></th>
6 <th><%= l(:enumeration_system_activity) %></th>
7 <% TimeEntryActivity.new.available_custom_fields.each do |value| %>
8 <th><%= h value.name %></th>
9 <% end %>
10 <th style="width:15%;"><%= l(:field_active) %></th>
11 </tr></thead>
12
13 <% @project.activities(true).each do |enumeration| %>
14 <% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
15 <tr class="<%= cycle('odd', 'even') %>">
16 <td>
17 <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
18 <%= h(enumeration) %>
19 </td>
20 <td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td>
21 <% enumeration.custom_field_values.each do |value| %>
22 <td align="center">
23 <%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
24 </td>
25 <% end %>
26 <td align="center" style="width:15%;">
27 <%= ff.check_box :active %>
28 </td>
29 </tr>
30 <% end %>
31 <% end %>
32 </table>
33
34 <div class="contextual">
35 <%= link_to(l(:button_reset), {:controller => 'projects', :action => 'reset_activities', :id => @project},
36 :method => :delete,
37 :confirm => l(:text_are_you_sure),
38 :class => 'icon icon-del') %>
39 </div>
40
41 <%= submit_tag l(:button_save) %>
42 <% end %>
@@ -1,32 +1,32
1 1 <% if @project.boards.any? %>
2 2 <table class="list">
3 <thead>
3 <thead><tr>
4 4 <th><%= l(:label_board) %></th>
5 5 <th><%= l(:field_description) %></th>
6 6 <th></th>
7 7 <th></th>
8 </thead>
8 </tr></thead>
9 9 <tbody>
10 10 <% @project.boards.each do |board|
11 11 next if board.new_record? %>
12 12 <tr class="<%= cycle 'odd', 'even' %>">
13 13 <td><%=h board.name %></td>
14 14 <td><%=h board.description %></td>
15 15 <td align="center">
16 16 <% if authorize_for("boards", "edit") %>
17 17 <%= reorder_links('board', {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}) %>
18 18 <% end %>
19 19 </td>
20 20 <td class="buttons">
21 21 <%= link_to_if_authorized l(:button_edit), {:controller => 'boards', :action => 'edit', :project_id => @project, :id => board}, :class => 'icon icon-edit' %>
22 22 <%= link_to_if_authorized l(:button_delete), {:controller => 'boards', :action => 'destroy', :project_id => @project, :id => board}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
23 23 </td>
24 24 </tr>
25 25 <% end %>
26 26 </tbody>
27 27 </table>
28 28 <% else %>
29 29 <p class="nodata"><%= l(:label_no_data) %></p>
30 30 <% end %>
31 31
32 32 <p><%= link_to_if_authorized l(:label_board_new), {:controller => 'boards', :action => 'new', :project_id => @project} %></p>
@@ -1,27 +1,27
1 1 <% if @project.issue_categories.any? %>
2 2 <table class="list">
3 <thead>
3 <thead><tr>
4 4 <th><%= l(:label_issue_category) %></th>
5 5 <th><%= l(:field_assigned_to) %></th>
6 6 <th></th>
7 </thead>
7 </tr></thead>
8 8 <tbody>
9 9 <% for category in @project.issue_categories %>
10 10 <% unless category.new_record? %>
11 11 <tr class="<%= cycle 'odd', 'even' %>">
12 12 <td><%=h(category.name) %></td>
13 13 <td><%=h(category.assigned_to.name) if category.assigned_to %></td>
14 14 <td class="buttons">
15 15 <%= link_to_if_authorized l(:button_edit), { :controller => 'issue_categories', :action => 'edit', :id => category }, :class => 'icon icon-edit' %>
16 16 <%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => category}, :method => :post, :class => 'icon icon-del' %>
17 17 </td>
18 18 </tr>
19 19 <% end %>
20 20 <% end %>
21 21 </tbody>
22 22 </table>
23 23 <% else %>
24 24 <p class="nodata"><%= l(:label_no_data) %></p>
25 25 <% end %>
26 26
27 27 <p><%= link_to_if_authorized l(:label_issue_category_new), :controller => 'issue_categories', :action => 'new', :project_id => @project %></p>
@@ -1,82 +1,82
1 1 <%= error_messages_for 'member' %>
2 2 <% roles = Role.find_all_givable
3 3 members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %>
4 4
5 5 <div class="splitcontentleft">
6 6 <% if members.any? %>
7 7 <table class="list members">
8 <thead>
8 <thead><tr>
9 9 <th><%= l(:label_user) %> / <%= l(:label_group) %></th>
10 10 <th><%= l(:label_role_plural) %></th>
11 11 <th style="width:15%"></th>
12 12 <%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
13 </thead>
13 </tr></thead>
14 14 <tbody>
15 15 <% members.each do |member| %>
16 16 <% next if member.new_record? %>
17 17 <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
18 18 <td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
19 19 <td class="roles">
20 20 <span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
21 21 <% if authorize_for('members', 'edit') %>
22 22 <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member},
23 23 :method => :post,
24 24 :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %>
25 25 <p><% roles.each do |role| %>
26 26 <label><%= check_box_tag 'member[role_ids][]', role.id, member.roles.include?(role),
27 27 :disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
28 28 <% end %></p>
29 29 <%= hidden_field_tag 'member[role_ids][]', '' %>
30 30 <p><%= submit_tag l(:button_change), :class => "small" %>
31 31 <%= link_to_function l(:button_cancel), "$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;" %></p>
32 32 <% end %>
33 33 <% end %>
34 34 </td>
35 35 <td class="buttons">
36 36 <%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
37 37 <%= link_to_remote(l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member},
38 38 :method => :post,
39 39 :confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil)
40 40 }, :title => l(:button_delete),
41 41 :class => 'icon icon-del') if member.deletable? %>
42 42 </td>
43 43 <%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
44 44 </tr>
45 45 </tbody>
46 46 <% end; reset_cycle %>
47 47 </table>
48 48 <% else %>
49 49 <p class="nodata"><%= l(:label_no_data) %></p>
50 50 <% end %>
51 51 </div>
52 52
53 53
54 54 <% principals = Principal.active.find(:all, :limit => 100, :order => 'type, login, lastname ASC') - @project.principals %>
55 55
56 56 <div class="splitcontentright">
57 57 <% if roles.any? && principals.any? %>
58 58 <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post) do |f| %>
59 59 <fieldset><legend><%=l(:label_member_new)%></legend>
60 60
61 61 <p><%= text_field_tag 'principal_search', nil %></p>
62 62 <%= observe_field(:principal_search,
63 63 :frequency => 0.5,
64 64 :update => :principals,
65 65 :url => { :controller => 'members', :action => 'autocomplete_for_member', :id => @project },
66 66 :with => 'q')
67 67 %>
68 68
69 69 <div id="principals">
70 70 <%= principals_check_box_tags 'member[user_ids][]', principals %>
71 71 </div>
72 72
73 73 <p><%= l(:label_role_plural) %>:
74 74 <% roles.each do |role| %>
75 75 <label><%= check_box_tag 'member[role_ids][]', role.id %> <%=h role %></label>
76 76 <% end %></p>
77 77
78 78 <p><%= submit_tag l(:button_add) %></p>
79 79 </fieldset>
80 80 <% end %>
81 81 <% end %>
82 82 </div>
@@ -1,41 +1,41
1 1 <% if @project.shared_versions.any? %>
2 2 <table class="list versions">
3 <thead>
3 <thead><tr>
4 4 <th><%= l(:label_version) %></th>
5 5 <th><%= l(:field_effective_date) %></th>
6 6 <th><%= l(:field_description) %></th>
7 7 <th><%= l(:field_status) %></th>
8 8 <th><%= l(:field_sharing) %></th>
9 9 <th><%= l(:label_wiki_page) unless @project.wiki.nil? %></th>
10 10 <th style="width:15%"></th>
11 </thead>
11 </tr></thead>
12 12 <tbody>
13 13 <% for version in @project.shared_versions.sort %>
14 14 <tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
15 15 <td class="name"><%= link_to_version version %></td>
16 16 <td class="date"><%= format_date(version.effective_date) %></td>
17 17 <td class="description"><%=h version.description %></td>
18 18 <td class="status"><%= l("version_status_#{version.status}") %></td>
19 19 <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
20 20 <td><%= link_to(h(version.wiki_page_title), :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td>
21 21 <td class="buttons">
22 22 <% if version.project == @project %>
23 23 <%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
24 24 <%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
25 25 <% end %>
26 26 </td>
27 27 </tr>
28 28 <% end; reset_cycle %>
29 29 </tbody>
30 30 </table>
31 31 <% else %>
32 32 <p class="nodata"><%= l(:label_no_data) %></p>
33 33 <% end %>
34 34
35 35 <div class="contextual">
36 36 <% if @project.versions.any? %>
37 37 <%= link_to l(:label_close_versions), {:controller => 'versions', :action => 'close_completed', :project_id => @project}, :method => :post %>
38 38 <% end %>
39 39 </div>
40 40
41 41 <p><%= link_to_if_authorized l(:label_version_new), :controller => 'versions', :action => 'new', :project_id => @project %></p>
@@ -1,60 +1,60
1 1 <% roles = Role.find_all_givable %>
2 2 <% projects = Project.active.find(:all, :order => 'lft') %>
3 3
4 4 <div class="splitcontentleft">
5 5 <% if @user.memberships.any? %>
6 6 <table class="list memberships">
7 <thead>
7 <thead><tr>
8 8 <th><%= l(:label_project) %></th>
9 9 <th><%= l(:label_role_plural) %></th>
10 10 <th style="width:15%"></th>
11 11 <%= call_hook(:view_users_memberships_table_header, :user => @user )%>
12 </thead>
12 </tr></thead>
13 13 <tbody>
14 14 <% @user.memberships.each do |membership| %>
15 15 <% next if membership.new_record? %>
16 16 <tr id="member-<%= membership.id %>" class="<%= cycle 'odd', 'even' %> class">
17 17 <td class="project"><%=h membership.project %></td>
18 18 <td class="roles">
19 19 <span id="member-<%= membership.id %>-roles"><%=h membership.roles.sort.collect(&:to_s).join(', ') %></span>
20 20 <% remote_form_for(:membership, :url => { :action => 'edit_membership', :id => @user, :membership_id => membership },
21 21 :html => { :id => "member-#{membership.id}-roles-form", :style => 'display:none;'}) do %>
22 22 <p><% roles.each do |role| %>
23 23 <label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role),
24 24 :disabled => membership.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
25 25 <% end %></p>
26 26 <%= hidden_field_tag 'membership[role_ids][]', '' %>
27 27 <p><%= submit_tag l(:button_change) %>
28 28 <%= link_to_function l(:button_cancel), "$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;" %></p>
29 29 <% end %>
30 30 </td>
31 31 <td class="buttons">
32 32 <%= link_to_function l(:button_edit), "$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
33 33 <%= link_to_remote(l(:button_delete), { :url => { :controller => 'users', :action => 'destroy_membership', :id => @user, :membership_id => membership },
34 34 :method => :post },
35 35 :class => 'icon icon-del') if membership.deletable? %>
36 36 </td>
37 37 <%= call_hook(:view_users_memberships_table_row, :user => @user, :membership => membership, :roles => roles, :projects => projects )%>
38 38 </tr>
39 39 </tbody>
40 40 <% end; reset_cycle %>
41 41 </table>
42 42 <% else %>
43 43 <p class="nodata"><%= l(:label_no_data) %></p>
44 44 <% end %>
45 45 </div>
46 46
47 47 <div class="splitcontentright">
48 48 <% if projects.any? %>
49 49 <fieldset><legend><%=l(:label_project_new)%></legend>
50 50 <% remote_form_for(:membership, :url => { :action => 'edit_membership', :id => @user }) do %>
51 51 <%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects) %>
52 52 <p><%= l(:label_role_plural) %>:
53 53 <% roles.each do |role| %>
54 54 <label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
55 55 <% end %></p>
56 56 <p><%= submit_tag l(:button_add) %></p>
57 57 <% end %>
58 58 </fieldset>
59 59 <% end %>
60 60 </div>
General Comments 0
You need to be logged in to leave comments. Login now