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