@@ -1,43 +1,43 | |||||
1 | <%= error_messages_for 'member' %> |
|
1 | <%= error_messages_for 'member' %> | |
2 | <% roles = Role.find(:all, :order => 'position') %> |
|
2 | <% roles = Role.find(:all, :order => 'position') %> | |
3 | <% users = User.find_active(:all) - @project.users %> |
|
3 | <% users = User.find_active(:all) - @project.users %> | |
4 |
|
4 | |||
5 | <table class="list"> |
|
5 | <table class="list"> | |
6 | <thead> |
|
6 | <thead> | |
7 | <th><%= l(:label_user) %></th> |
|
7 | <th><%= l(:label_user) %></th> | |
8 | <th><%= l(:label_role) %></th> |
|
8 | <th><%= l(:label_role) %></th> | |
9 | <th></th> |
|
9 | <th style="width:15%"></th> | |
10 | </thead> |
|
10 | </thead> | |
11 | <tbody> |
|
11 | <tbody> | |
12 | <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> |
|
12 | <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> | |
13 | <% next if member.new_record? %> |
|
13 | <% next if member.new_record? %> | |
14 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
14 | <tr class="<%= cycle 'odd', 'even' %>"> | |
15 | <td><%= member.user.display_name %></td> |
|
15 | <td><%= member.user.display_name %></td> | |
16 | <td align="center"> |
|
16 | <td align="center"> | |
17 | <% if authorize_for('members', 'edit') %> |
|
17 | <% if authorize_for('members', 'edit') %> | |
18 | <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %> |
|
18 | <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %> | |
19 | <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, {}, :class => "small" %> |
|
19 | <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, {}, :class => "small" %> | |
20 | <%= submit_tag l(:button_change), :class => "small" %> |
|
20 | <%= submit_tag l(:button_change), :class => "small" %> | |
21 | <% end %> |
|
21 | <% end %> | |
22 | <% end %> |
|
22 | <% end %> | |
23 | </td> |
|
23 | </td> | |
24 | <td align="center"> |
|
24 | <td align="center"> | |
25 | <small><%= link_to_remote l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member}, |
|
25 | <small><%= link_to_remote l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member}, | |
26 | :method => :post |
|
26 | :method => :post | |
27 | }, :title => l(:button_delete), |
|
27 | }, :title => l(:button_delete), | |
28 | :class => 'icon icon-del' %></small> |
|
28 | :class => 'icon icon-del' %></small> | |
29 | </td> |
|
29 | </td> | |
30 | </tr> |
|
30 | </tr> | |
31 | </tbody> |
|
31 | </tbody> | |
32 | <% end; reset_cycle %> |
|
32 | <% end; reset_cycle %> | |
33 | </table> |
|
33 | </table> | |
34 | |
|
34 | | |
35 |
|
35 | |||
36 | <% if authorize_for('projects', 'add_member') && !users.empty? %> |
|
36 | <% if authorize_for('projects', 'add_member') && !users.empty? %> | |
37 | <p><label for="member_user_id"><%=l(:label_member_new)%></label></p> |
|
|||
38 | <% remote_form_for(:member, @member, :url => {:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}, :method => :post) do |f| %> |
|
37 | <% remote_form_for(:member, @member, :url => {:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}, :method => :post) do |f| %> | |
|
38 | <p><label for="member_user_id"><%=l(:label_member_new)%></label><br /> | |||
39 | <%= f.select :user_id, users.collect{|user| [user.name, user.id]} %> |
|
39 | <%= f.select :user_id, users.collect{|user| [user.name, user.id]} %> | |
40 | <%= l(:label_role) %>: <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, :selected => nil %> |
|
40 | <%= l(:label_role) %>: <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, :selected => nil %> | |
41 | <%= submit_tag l(:button_add) %> |
|
41 | <%= submit_tag l(:button_add) %></p> | |
42 | <% end %> |
|
42 | <% end %> | |
43 | <% end %> |
|
43 | <% end %> |
@@ -1,78 +1,80 | |||||
1 | <h2><%=l(:label_settings)%></h2> |
|
1 | <h2><%=l(:label_settings)%></h2> | |
2 |
|
2 | |||
3 | <div class="tabs"> |
|
3 | <div class="tabs"> | |
4 | <ul> |
|
4 | <ul> | |
5 | <li><%= link_to l(:label_information_plural), {}, :id=> "tab-info", :onclick => "showTab('info'); this.blur(); return false;" %></li> |
|
5 | <li><%= link_to l(:label_information_plural), {}, :id=> "tab-info", :onclick => "showTab('info'); this.blur(); return false;" %></li> | |
6 | <li><%= link_to l(:label_member_plural), {}, :id=> "tab-members", :onclick => "showTab('members'); this.blur(); return false;" %></li> |
|
6 | <li><%= link_to l(:label_member_plural), {}, :id=> "tab-members", :onclick => "showTab('members'); this.blur(); return false;" %></li> | |
7 | <li><%= link_to l(:label_version_plural), {}, :id=> "tab-versions", :onclick => "showTab('versions'); this.blur(); return false;" %></li> |
|
7 | <li><%= link_to l(:label_version_plural), {}, :id=> "tab-versions", :onclick => "showTab('versions'); this.blur(); return false;" %></li> | |
8 | <li><%= link_to l(:label_issue_category_plural), {}, :id=> "tab-categories", :onclick => "showTab('categories'); this.blur(); return false;" %></li> |
|
8 | <li><%= link_to l(:label_issue_category_plural), {}, :id=> "tab-categories", :onclick => "showTab('categories'); this.blur(); return false;" %></li> | |
9 | </ul> |
|
9 | </ul> | |
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div id="tab-content-info" class="tab-content"> |
|
12 | <div id="tab-content-info" class="tab-content"> | |
13 | <% if authorize_for('projects', 'edit') %> |
|
13 | <% if authorize_for('projects', 'edit') %> | |
14 | <% labelled_tabular_form_for :project, @project, :url => { :action => "edit", :id => @project } do |f| %> |
|
14 | <% labelled_tabular_form_for :project, @project, :url => { :action => "edit", :id => @project } do |f| %> | |
15 | <%= render :partial => 'form', :locals => { :f => f } %> |
|
15 | <%= render :partial => 'form', :locals => { :f => f } %> | |
16 | <%= submit_tag l(:button_save) %> |
|
16 | <%= submit_tag l(:button_save) %> | |
17 | <% end %> |
|
17 | <% end %> | |
18 | <% end %> |
|
18 | <% end %> | |
19 | </div> |
|
19 | </div> | |
20 |
|
20 | |||
21 | <div id="tab-content-members" class="tab-content" style="display:none;"> |
|
21 | <div id="tab-content-members" class="tab-content" style="display:none;"> | |
22 | <%= render :partial => 'members' %> |
|
22 | <%= render :partial => 'members' %> | |
23 | </div> |
|
23 | </div> | |
24 |
|
24 | |||
25 | <div id="tab-content-versions" class="tab-content" style="display:none;"> |
|
25 | <div id="tab-content-versions" class="tab-content" style="display:none;"> | |
26 | <table class="list"> |
|
26 | <table class="list"> | |
27 | <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th></th><th></th></thead> |
|
27 | <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th style="width:15%"></th><th style="width:15%"></th></thead> | |
28 | <tbody> |
|
28 | <tbody> | |
29 | <% for version in @project.versions %> |
|
29 | <% for version in @project.versions %> | |
30 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
30 | <tr class="<%= cycle 'odd', 'even' %>"> | |
31 | <td><%=h version.name %></td> |
|
31 | <td><%=h version.name %></td> | |
32 | <td align="center"><%= format_date(version.effective_date) %></td> |
|
32 | <td align="center"><%= format_date(version.effective_date) %></td> | |
33 | <td><%=h version.description %></td> |
|
33 | <td><%=h version.description %></td> | |
34 | <td align="center"><small><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></small></td> |
|
34 | <td align="center"><small><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></small></td> | |
35 | <td align="center"><small><%= 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' %></small></td> |
|
35 | <td align="center"><small><%= 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' %></small></td> | |
36 | </td> |
|
36 | </td> | |
37 | </tr> |
|
37 | </tr> | |
38 | <% end; reset_cycle %> |
|
38 | <% end; reset_cycle %> | |
39 | </tbody> |
|
39 | </tbody> | |
40 | </table> |
|
40 | </table> | |
41 | <%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %> |
|
41 | | |
|
42 | <p><%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %></p> | |||
42 | </div> |
|
43 | </div> | |
43 |
|
44 | |||
44 | <div id="tab-content-categories" class="tab-content" style="display:none;"> |
|
45 | <div id="tab-content-categories" class="tab-content" style="display:none;"> | |
45 | <table class="list"> |
|
46 | <table class="list"> | |
46 | <thead><th><%= l(:label_issue_category) %></th><th></th></thead> |
|
47 | <thead><th><%= l(:label_issue_category) %></th><th style="width:15%"></th></thead> | |
47 | <tbody> |
|
48 | <tbody> | |
48 | <% for @category in @project.issue_categories %> |
|
49 | <% for @category in @project.issue_categories %> | |
49 | <% unless @category.new_record? %> |
|
50 | <% unless @category.new_record? %> | |
50 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
51 | <tr class="<%= cycle 'odd', 'even' %>"> | |
51 | <td> |
|
52 | <td> | |
52 | <% form_tag({:controller => 'issue_categories', :action => 'edit', :id => @category}) do %> |
|
53 | <% form_tag({:controller => 'issue_categories', :action => 'edit', :id => @category}) do %> | |
53 | <%= text_field 'category', 'name', :size => 25 %> |
|
54 | <%= text_field 'category', 'name', :size => 25 %> | |
54 | <% if authorize_for('issue_categories', 'edit') %> |
|
55 | <% if authorize_for('issue_categories', 'edit') %> | |
55 | <%= submit_tag l(:button_save), :class => "button-small" %> |
|
56 | <%= submit_tag l(:button_save), :class => "button-small" %> | |
56 | <% end %> |
|
57 | <% end %> | |
57 | <% end %> |
|
58 | <% end %> | |
58 | </td> |
|
59 | </td> | |
59 | <td align="center"> |
|
60 | <td align="center"> | |
60 | <small><%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => @category}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></small> |
|
61 | <small><%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => @category}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %></small> | |
61 | </td> |
|
62 | </td> | |
62 | </tr> |
|
63 | </tr> | |
63 | <% end %> |
|
64 | <% end %> | |
64 | <% end %> |
|
65 | <% end %> | |
65 | </tbody> |
|
66 | </tbody> | |
66 | </table> |
|
67 | </table> | |
|
68 | | |||
67 | <% if authorize_for('projects', 'add_issue_category') %> |
|
69 | <% if authorize_for('projects', 'add_issue_category') %> | |
68 | <% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %> |
|
70 | <% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %> | |
69 | <label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/> |
|
71 | <p><label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br /> | |
70 | <%= error_messages_for 'issue_category' %> |
|
72 | <%= error_messages_for 'issue_category' %> | |
71 | <%= text_field 'issue_category', 'name', :size => 25 %> |
|
73 | <%= text_field 'issue_category', 'name', :size => 25 %> | |
72 |
<%= submit_tag l(:button_ |
|
74 | <%= submit_tag l(:button_add) %></p> | |
73 | <% end %> |
|
75 | <% end %> | |
74 | <% end %> |
|
76 | <% end %> | |
75 | </div> |
|
77 | </div> | |
76 |
|
78 | |||
77 | <%= tab = params[:tab] ? h(params[:tab]) : 'info' |
|
79 | <%= tab = params[:tab] ? h(params[:tab]) : 'info' | |
78 | javascript_tag "showTab('#{tab}');" %> No newline at end of file |
|
80 | javascript_tag "showTab('#{tab}');" %> |
General Comments 0
You need to be logged in to leave comments.
Login now