@@ -1,102 +1,102 | |||||
1 | <%= error_messages_for 'project' %> |
|
1 | <%= error_messages_for 'project' %> | |
2 |
|
2 | |||
3 | <div class="box tabular"> |
|
3 | <div class="box tabular"> | |
4 | <!--[form:project]--> |
|
4 | <!--[form:project]--> | |
5 | <p><%= f.text_field :name, :required => true, :size => 60 %></p> |
|
5 | <p><%= f.text_field :name, :required => true, :size => 60 %></p> | |
6 |
|
6 | |||
7 | <p><%= f.text_area :description, :rows => 8, :class => 'wiki-edit' %></p> |
|
7 | <p><%= f.text_area :description, :rows => 8, :class => 'wiki-edit' %></p> | |
8 | <p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %> |
|
8 | <p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %> | |
9 | <% unless @project.identifier_frozen? %> |
|
9 | <% unless @project.identifier_frozen? %> | |
10 | <em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em> |
|
10 | <em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em> | |
11 | <% end %></p> |
|
11 | <% end %></p> | |
12 | <p><%= f.text_field :homepage, :size => 60 %></p> |
|
12 | <p><%= f.text_field :homepage, :size => 60 %></p> | |
13 | <p><%= f.check_box :is_public %></p> |
|
13 | <p><%= f.check_box :is_public %></p> | |
14 |
|
14 | |||
15 | <% unless @project.allowed_parents.compact.empty? %> |
|
15 | <% unless @project.allowed_parents.compact.empty? %> | |
16 | <p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p> |
|
16 | <p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p> | |
17 | <% end %> |
|
17 | <% end %> | |
18 |
|
18 | |||
19 | <% if @project.safe_attribute? 'inherit_members' %> |
|
19 | <% if @project.safe_attribute? 'inherit_members' %> | |
20 | <p><%= f.check_box :inherit_members %></p> |
|
20 | <p><%= f.check_box :inherit_members %></p> | |
21 | <% end %> |
|
21 | <% end %> | |
22 |
|
22 | |||
23 | <%= wikitoolbar_for 'project_description' %> |
|
23 | <%= wikitoolbar_for 'project_description' %> | |
24 |
|
24 | |||
25 | <% @project.custom_field_values.each do |value| %> |
|
25 | <% @project.custom_field_values.each do |value| %> | |
26 | <p><%= custom_field_tag_with_label :project, value %></p> |
|
26 | <p><%= custom_field_tag_with_label :project, value %></p> | |
27 | <% end %> |
|
27 | <% end %> | |
28 | <%= call_hook(:view_projects_form, :project => @project, :form => f) %> |
|
28 | <%= call_hook(:view_projects_form, :project => @project, :form => f) %> | |
29 | </div> |
|
29 | </div> | |
30 |
|
30 | |||
31 | <% if @project.new_record? %> |
|
31 | <% if @project.new_record? %> | |
32 | <fieldset class="box tabular"><legend><%= l(:label_module_plural) %></legend> |
|
32 | <fieldset class="box tabular"><legend><%= l(:label_module_plural) %></legend> | |
33 | <% Redmine::AccessControl.available_project_modules.each do |m| %> |
|
33 | <% Redmine::AccessControl.available_project_modules.each do |m| %> | |
34 | <label class="floating"> |
|
34 | <label class="floating"> | |
35 | <%= check_box_tag 'project[enabled_module_names][]', m, @project.module_enabled?(m), :id => "project_enabled_module_names_#{m}" %> |
|
35 | <%= check_box_tag 'project[enabled_module_names][]', m, @project.module_enabled?(m), :id => "project_enabled_module_names_#{m}" %> | |
36 | <%= l_or_humanize(m, :prefix => "project_module_") %> |
|
36 | <%= l_or_humanize(m, :prefix => "project_module_") %> | |
37 | </label> |
|
37 | </label> | |
38 | <% end %> |
|
38 | <% end %> | |
39 | <%= hidden_field_tag 'project[enabled_module_names][]', '' %> |
|
39 | <%= hidden_field_tag 'project[enabled_module_names][]', '' %> | |
40 | </fieldset> |
|
40 | </fieldset> | |
41 | <% end %> |
|
41 | <% end %> | |
42 |
|
42 | |||
43 | <% if @project.new_record? || @project.module_enabled?('issue_tracking') %> |
|
43 | <% if @project.new_record? || @project.module_enabled?('issue_tracking') %> | |
44 | <% unless @trackers.empty? %> |
|
44 | <% unless @trackers.empty? %> | |
45 | <fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend> |
|
45 | <fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend> | |
46 | <% @trackers.each do |tracker| %> |
|
46 | <% @trackers.each do |tracker| %> | |
47 | <label class="floating"> |
|
47 | <label class="floating"> | |
48 | <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.include?(tracker), :id => nil %> |
|
48 | <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %> | |
49 | <%=h tracker %> |
|
49 | <%=h tracker %> | |
50 | </label> |
|
50 | </label> | |
51 | <% end %> |
|
51 | <% end %> | |
52 | <%= hidden_field_tag 'project[tracker_ids][]', '' %> |
|
52 | <%= hidden_field_tag 'project[tracker_ids][]', '' %> | |
53 | </fieldset> |
|
53 | </fieldset> | |
54 | <% end %> |
|
54 | <% end %> | |
55 |
|
55 | |||
56 | <% unless @issue_custom_fields.empty? %> |
|
56 | <% unless @issue_custom_fields.empty? %> | |
57 | <fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend> |
|
57 | <fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend> | |
58 | <% @issue_custom_fields.each do |custom_field| %> |
|
58 | <% @issue_custom_fields.each do |custom_field| %> | |
59 | <label class="floating"> |
|
59 | <label class="floating"> | |
60 | <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field), |
|
60 | <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field), | |
61 | :disabled => (custom_field.is_for_all? ? "disabled" : nil), |
|
61 | :disabled => (custom_field.is_for_all? ? "disabled" : nil), | |
62 | :id => nil %> |
|
62 | :id => nil %> | |
63 | <%=h custom_field.name %> |
|
63 | <%=h custom_field.name %> | |
64 | </label> |
|
64 | </label> | |
65 | <% end %> |
|
65 | <% end %> | |
66 | <%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %> |
|
66 | <%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %> | |
67 | </fieldset> |
|
67 | </fieldset> | |
68 | <% end %> |
|
68 | <% end %> | |
69 | <% end %> |
|
69 | <% end %> | |
70 | <!--[eoform:project]--> |
|
70 | <!--[eoform:project]--> | |
71 |
|
71 | |||
72 | <% unless @project.identifier_frozen? %> |
|
72 | <% unless @project.identifier_frozen? %> | |
73 | <% content_for :header_tags do %> |
|
73 | <% content_for :header_tags do %> | |
74 | <%= javascript_include_tag 'project_identifier' %> |
|
74 | <%= javascript_include_tag 'project_identifier' %> | |
75 | <% end %> |
|
75 | <% end %> | |
76 | <% end %> |
|
76 | <% end %> | |
77 |
|
77 | |||
78 | <% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %> |
|
78 | <% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %> | |
79 | <%= javascript_tag do %> |
|
79 | <%= javascript_tag do %> | |
80 | $(document).ready(function() { |
|
80 | $(document).ready(function() { | |
81 | $("#project_inherit_members").change(function(){ |
|
81 | $("#project_inherit_members").change(function(){ | |
82 | if (!$(this).is(':checked')) { |
|
82 | if (!$(this).is(':checked')) { | |
83 | if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) { |
|
83 | if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) { | |
84 | $("#project_inherit_members").attr("checked", true); |
|
84 | $("#project_inherit_members").attr("checked", true); | |
85 | } |
|
85 | } | |
86 | } |
|
86 | } | |
87 | }); |
|
87 | }); | |
88 | }); |
|
88 | }); | |
89 | <% end %> |
|
89 | <% end %> | |
90 | <% end %> |
|
90 | <% end %> | |
91 |
|
91 | |||
92 | <%= javascript_tag do %> |
|
92 | <%= javascript_tag do %> | |
93 | $(document).ready(function() { |
|
93 | $(document).ready(function() { | |
94 | $('#project_enabled_module_names_issue_tracking').on('change', function(){ |
|
94 | $('#project_enabled_module_names_issue_tracking').on('change', function(){ | |
95 | if ($(this).prop('checked')){ |
|
95 | if ($(this).prop('checked')){ | |
96 | $('#project_trackers, #project_issue_custom_fields').show(); |
|
96 | $('#project_trackers, #project_issue_custom_fields').show(); | |
97 | } else { |
|
97 | } else { | |
98 | $('#project_trackers, #project_issue_custom_fields').hide(); |
|
98 | $('#project_trackers, #project_issue_custom_fields').hide(); | |
99 | } |
|
99 | } | |
100 | }).trigger('change'); |
|
100 | }).trigger('change'); | |
101 | }); |
|
101 | }); | |
102 | <% end %> |
|
102 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now