summaryrefslogtreecommitdiffstats
path: root/app/views/projects
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-27 16:42:50 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-27 16:42:50 +0000
commit000ff80320702247dfe9016f98fab70f5ab9ea2a (patch)
tree3f1b9870a11bf910b18cd56e81c1a814d80628d4 /app/views/projects
parent09148ba665d60a7ee1554f7764eade8e63c69db0 (diff)
downloadredmine-000ff80320702247dfe9016f98fab70f5ab9ea2a.tar.gz
redmine-000ff80320702247dfe9016f98fab70f5ab9ea2a.zip
Project settings: Move issue tracking settings to their own tab (#26488).
git-svn-id: http://svn.redmine.org/redmine/trunk@16896 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_form.html.erb48
-rw-r--r--app/views/projects/copy.html.erb8
-rw-r--r--app/views/projects/settings/_issues.html.erb41
3 files changed, 49 insertions, 48 deletions
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb
index 1e8f40948..864bfb305 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -20,14 +20,6 @@
<p><%= f.check_box :inherit_members %></p>
<% end %>
-<% if @project.safe_attribute?('default_version_id') && (default_version_options = project_default_version_options(@project)).present? %>
- <p><%= f.select :default_version_id, project_default_version_options(@project), :include_blank => true %></p>
-<% end %>
-
-<% if @project.safe_attribute?('default_assigned_to_id') && (default_assigned_to_options = project_default_assigned_to_options(@project)).present? %>
- <p><%= f.select :default_assigned_to_id, default_assigned_to_options, include_blank: true %></p>
-<% end %>
-
<%= wikitoolbar_for 'project_description' %>
<% @project.custom_field_values.each do |value| %>
@@ -47,34 +39,6 @@
<%= hidden_field_tag 'project[enabled_module_names][]', '' %>
</fieldset>
<% end %>
-
-<% if @project.new_record? || @project.module_enabled?('issue_tracking') %>
-<% unless @trackers.empty? %>
-<fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend>
-<% @trackers.each do |tracker| %>
- <label class="floating">
- <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %>
- <%= tracker %>
- </label>
-<% end %>
-<%= hidden_field_tag 'project[tracker_ids][]', '' %>
-</fieldset>
-<% end %>
-
-<% unless @issue_custom_fields.empty? %>
-<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend>
-<% @issue_custom_fields.each do |custom_field| %>
- <label class="floating">
- <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
- :disabled => (custom_field.is_for_all? ? "disabled" : nil),
- :id => nil %>
- <%= custom_field_name_tag(custom_field) %>
- </label>
-<% end %>
-<%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
-</fieldset>
-<% end %>
-<% end %>
<!--[eoform:project]-->
<% unless @project.identifier_frozen? %>
@@ -96,15 +60,3 @@
});
<% end %>
<% end %>
-
-<%= javascript_tag do %>
-$(document).ready(function() {
- $('#project_enabled_module_names_issue_tracking').on('change', function(){
- if ($(this).prop('checked')){
- $('#project_trackers, #project_issue_custom_fields').show();
- } else {
- $('#project_trackers, #project_issue_custom_fields').hide();
- }
- }).trigger('change');
-});
-<% end %>
diff --git a/app/views/projects/copy.html.erb b/app/views/projects/copy.html.erb
index 505ef331b..021288e7f 100644
--- a/app/views/projects/copy.html.erb
+++ b/app/views/projects/copy.html.erb
@@ -16,5 +16,13 @@
<label class="block"><%= check_box_tag 'notifications', 1, params[:notifications] %> <%= l(:label_project_copy_notifications) %></label>
</fieldset>
+<% @project.tracker_ids.each do |tracker_id| %>
+ <%= hidden_field_tag 'project[tracker_ids][]', tracker_id %>
+<% end %>
+
+<% @project.issue_custom_field_ids.each do |issue_custom_field_id| %>
+ <%= hidden_field_tag 'project[issue_custom_field_ids][]', issue_custom_field_id %>
+<% end %>
+
<%= submit_tag l(:button_copy) %>
<% end %>
diff --git a/app/views/projects/settings/_issues.html.erb b/app/views/projects/settings/_issues.html.erb
new file mode 100644
index 000000000..7f99c80be
--- /dev/null
+++ b/app/views/projects/settings/_issues.html.erb
@@ -0,0 +1,41 @@
+<%= labelled_form_for @project do |f| %>
+ <%= hidden_field_tag 'tab', 'issues' %>
+
+ <% unless @trackers.empty? %>
+ <fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend>
+ <% @trackers.each do |tracker| %>
+ <label class="floating">
+ <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %>
+ <%= tracker %>
+ </label>
+ <% end %>
+ <%= hidden_field_tag 'project[tracker_ids][]', '' %>
+ </fieldset>
+ <% end %>
+
+ <% unless @issue_custom_fields.empty? %>
+ <fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend>
+ <% @issue_custom_fields.each do |custom_field| %>
+ <label class="floating">
+ <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field),
+ :disabled => (custom_field.is_for_all? ? "disabled" : nil),
+ :id => nil %>
+ <%= custom_field_name_tag(custom_field) %>
+ </label>
+ <% end %>
+ <%= hidden_field_tag 'project[issue_custom_field_ids][]', '' %>
+ </fieldset>
+ <% end %>
+
+ <div class="box tabular">
+ <% if @project.safe_attribute?('default_version_id') %>
+ <p><%= f.select :default_version_id, project_default_version_options(@project), include_blank: l(:label_none) %></p>
+ <% end %>
+
+ <% if @project.safe_attribute?('default_assigned_to_id') %>
+ <p><%= f.select :default_assigned_to_id, project_default_assigned_to_options(@project), include_blank: l(:label_none) %></p>
+ <% end %>
+ </div>
+
+ <p><%= submit_tag l(:button_save) %></p>
+<% end %>