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