@@ -1,115 +1,115 | |||||
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 | <%= error_messages_for 'member' %> |
|
22 | <%= error_messages_for 'member' %> | |
23 | <table class="list"> |
|
23 | <table class="list"> | |
24 | <thead><th><%= l(:label_user) %></th><th><%= l(:label_role) %></th><th></th></thead> |
|
24 | <thead><th><%= l(:label_user) %></th><th><%= l(:label_role) %></th><th></th></thead> | |
25 | <tbody> |
|
25 | <tbody> | |
26 | <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> |
|
26 | <% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %> | |
27 | <% unless member.new_record? %> |
|
27 | <% unless member.new_record? %> | |
28 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
28 | <tr class="<%= cycle 'odd', 'even' %>"> | |
29 | <td><%= member.user.display_name %></td> |
|
29 | <td><%= member.user.display_name %></td> | |
30 | <td align="center"> |
|
30 | <td align="center"> | |
31 | <% if authorize_for('members', 'edit') %> |
|
31 | <% if authorize_for('members', 'edit') %> | |
32 | <% form_tag({:controller => 'members', :action => 'edit', :id => member}) do %> |
|
32 | <% form_tag({:controller => 'members', :action => 'edit', :id => member}) do %> | |
33 | <select name="member[role_id]"> |
|
33 | <select name="member[role_id]"> | |
34 | <%= options_from_collection_for_select @roles, "id", "name", member.role_id %> |
|
34 | <%= options_from_collection_for_select @roles, "id", "name", member.role_id %> | |
35 | </select> |
|
35 | </select> | |
36 | <%= submit_tag l(:button_change), :class => "button-small" %> |
|
36 | <%= submit_tag l(:button_change), :class => "button-small" %> | |
37 | <% end %> |
|
37 | <% end %> | |
38 | <% end %> |
|
38 | <% end %> | |
39 | </td> |
|
39 | </td> | |
40 | <td align="center"> |
|
40 | <td align="center"> | |
41 | <%= link_to_if_authorized l(:button_delete), {:controller => 'members', :action => 'destroy', :id => member}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> |
|
41 | <%= link_to_if_authorized l(:button_delete), {:controller => 'members', :action => 'destroy', :id => member}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> | |
42 | </td> |
|
42 | </td> | |
43 | </tr> |
|
43 | </tr> | |
44 | <% end %> |
|
44 | <% end %> | |
45 | </tbody> |
|
45 | </tbody> | |
46 | <% end; reset_cycle %> |
|
46 | <% end; reset_cycle %> | |
47 | </table> |
|
47 | </table> | |
48 | <% if authorize_for('projects', 'add_member') %> |
|
48 | <% if authorize_for('projects', 'add_member') %> | |
49 | <label><%=l(:label_member_new)%></label><br/> |
|
49 | <label><%=l(:label_member_new)%></label><br/> | |
50 | <% form_tag({:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}) do %> |
|
50 | <% form_tag({:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}) do %> | |
51 | <select name="member[user_id]"> |
|
51 | <select name="member[user_id]"> | |
52 | <%= options_from_collection_for_select @users, "id", "display_name", @member.user_id %> |
|
52 | <%= options_from_collection_for_select @users, "id", "display_name", @member.user_id %> | |
53 | </select> |
|
53 | </select> | |
54 | <select name="member[role_id]"> |
|
54 | <select name="member[role_id]"> | |
55 | <%= options_from_collection_for_select @roles, "id", "name", @member.role_id %> |
|
55 | <%= options_from_collection_for_select @roles, "id", "name", @member.role_id %> | |
56 | </select> |
|
56 | </select> | |
57 | <%= submit_tag l(:button_add) %> |
|
57 | <%= submit_tag l(:button_add) %> | |
58 | <% end %> |
|
58 | <% end %> | |
59 | <% end %> |
|
59 | <% end %> | |
60 | </div> |
|
60 | </div> | |
61 |
|
61 | |||
62 | <div id="tab-content-versions" class="tab-content" style="display:none;"> |
|
62 | <div id="tab-content-versions" class="tab-content" style="display:none;"> | |
63 | <table class="list"> |
|
63 | <table class="list"> | |
64 | <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th></th><th></th></thead> |
|
64 | <thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th></th><th></th></thead> | |
65 | <tbody> |
|
65 | <tbody> | |
66 | <% for version in @project.versions %> |
|
66 | <% for version in @project.versions %> | |
67 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
67 | <tr class="<%= cycle 'odd', 'even' %>"> | |
68 |
<td |
|
68 | <td><%=h version.name %></td> | |
69 | <td align="center"><%= format_date(version.effective_date) %></td> |
|
69 | <td align="center"><%= format_date(version.effective_date) %></td> | |
70 | <td><%=h version.description %></td> |
|
70 | <td><%=h version.description %></td> | |
71 | <td align="center"><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></td> |
|
71 | <td align="center"><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></td> | |
72 | <td align="center"><%= 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' %></td> |
|
72 | <td align="center"><%= 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' %></td> | |
73 | </td> |
|
73 | </td> | |
74 | </tr> |
|
74 | </tr> | |
75 | <% end; reset_cycle %> |
|
75 | <% end; reset_cycle %> | |
76 | </tbody> |
|
76 | </tbody> | |
77 | </table> |
|
77 | </table> | |
78 | <%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %> |
|
78 | <%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %> | |
79 | </div> |
|
79 | </div> | |
80 |
|
80 | |||
81 | <div id="tab-content-categories" class="tab-content" style="display:none;"> |
|
81 | <div id="tab-content-categories" class="tab-content" style="display:none;"> | |
82 | <table class="list"> |
|
82 | <table class="list"> | |
83 | <thead><th><%= l(:label_issue_category) %></th><th></th></thead> |
|
83 | <thead><th><%= l(:label_issue_category) %></th><th></th></thead> | |
84 | <tbody> |
|
84 | <tbody> | |
85 | <% for @category in @project.issue_categories %> |
|
85 | <% for @category in @project.issue_categories %> | |
86 | <% unless @category.new_record? %> |
|
86 | <% unless @category.new_record? %> | |
87 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
87 | <tr class="<%= cycle 'odd', 'even' %>"> | |
88 | <td> |
|
88 | <td> | |
89 | <% form_tag({:controller => 'issue_categories', :action => 'edit', :id => @category}) do %> |
|
89 | <% form_tag({:controller => 'issue_categories', :action => 'edit', :id => @category}) do %> | |
90 | <%= text_field 'category', 'name', :size => 25 %> |
|
90 | <%= text_field 'category', 'name', :size => 25 %> | |
91 | <% if authorize_for('issue_categories', 'edit') %> |
|
91 | <% if authorize_for('issue_categories', 'edit') %> | |
92 | <%= submit_tag l(:button_save), :class => "button-small" %> |
|
92 | <%= submit_tag l(:button_save), :class => "button-small" %> | |
93 | <% end %> |
|
93 | <% end %> | |
94 | <% end %> |
|
94 | <% end %> | |
95 | </td> |
|
95 | </td> | |
96 | <td align="center"> |
|
96 | <td align="center"> | |
97 | <%= 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' %> |
|
97 | <%= 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' %> | |
98 | </td> |
|
98 | </td> | |
99 | </tr> |
|
99 | </tr> | |
100 | <% end %> |
|
100 | <% end %> | |
101 | <% end %> |
|
101 | <% end %> | |
102 | </tbody> |
|
102 | </tbody> | |
103 | </table> |
|
103 | </table> | |
104 | <% if authorize_for('projects', 'add_issue_category') %> |
|
104 | <% if authorize_for('projects', 'add_issue_category') %> | |
105 | <% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %> |
|
105 | <% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %> | |
106 | <label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/> |
|
106 | <label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/> | |
107 | <%= error_messages_for 'issue_category' %> |
|
107 | <%= error_messages_for 'issue_category' %> | |
108 | <%= text_field 'issue_category', 'name', :size => 25 %> |
|
108 | <%= text_field 'issue_category', 'name', :size => 25 %> | |
109 | <%= submit_tag l(:button_create) %> |
|
109 | <%= submit_tag l(:button_create) %> | |
110 | <% end %> |
|
110 | <% end %> | |
111 | <% end %> |
|
111 | <% end %> | |
112 | </div> |
|
112 | </div> | |
113 |
|
113 | |||
114 | <%= tab = params[:tab] ? h(params[:tab]) : 'info' |
|
114 | <%= tab = params[:tab] ? h(params[:tab]) : 'info' | |
115 | javascript_tag "showTab('#{tab}');" %> No newline at end of file |
|
115 | javascript_tag "showTab('#{tab}');" %> |
General Comments 0
You need to be logged in to leave comments.
Login now