Added per-project tracker selection. Trackers can be selected on project settings.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@920 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-11-20 20:29:03 +00:00
parent 987a5aa221
commit 8d91afc33e
18 changed files with 135 additions and 33 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
<% if authorize_for('projects', 'add_issue') %>
<% if authorize_for('projects', 'add_issue') && @project.trackers.any? %>
<h3><%= l(:label_issue_new) %></h3>
<%= l(:label_tracker) %>: <%= new_issue_selector %>
<% end %>
+1 -1
View File
@@ -32,7 +32,7 @@
</ul>
</li>
<li><%= context_menu_link l(:button_copy), {:controller => 'projects', :action => 'add_issue', :id => @project, :copy_from => @issue},
:class => 'icon-copy', :disabled => !@can[:add] %></li>
:class => 'icon-copy', :disabled => !@can[:copy] %></li>
<li><%= context_menu_link l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id },
:class => 'icon-move', :disabled => !@can[:move] %>
<li><%= context_menu_link l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue},
+20 -4
View File
@@ -17,16 +17,32 @@
<% for @custom_value in @custom_values %>
<p><%= custom_field_tag_with_label @custom_value %></p>
<% end %>
</div>
<% unless @trackers.empty? %>
<fieldset class="box"><legend><%=l(:label_tracker_plural)%></legend>
<% @trackers.each do |tracker| %>
<label class="floating">
<%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.include?(tracker) %>
<%= tracker %>
</label>
<% end %>
<%= hidden_field_tag 'project[tracker_ids][]', '' %>
</fieldset>
<% end %>
<% unless @custom_fields.empty? %>
<p><label><%=l(:label_custom_field_plural)%></label>
<fieldset class="box"><legend><%=l(:label_custom_field_plural)%></legend>
<% for custom_field in @custom_fields %>
<label class="floating">
<%= check_box_tag "custom_field_ids[]", custom_field.id, ((@project.custom_fields.include? custom_field) or custom_field.is_for_all?), (custom_field.is_for_all? ? {:disabled => "disabled"} : {}) %>
<%= custom_field.name %>
<% end %></p>
<%= custom_field.name %>
</label>
<% end %>
</fieldset>
<% end %>
<!--[eoform:project]-->
</div>
<% content_for :header_tags do %>
<%= javascript_include_tag 'calendar/calendar' %>
+6 -6
View File
@@ -3,13 +3,13 @@
<% labelled_tabular_form_for :project, @project, :url => { :action => "add" } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<div class="box">
<p><label><%= l(:label_module_plural) %></label>
<fieldset class="box"><legend><%= l(:label_module_plural) %></legend>
<% Redmine::AccessControl.available_project_modules.each do |m| %>
<%= check_box_tag 'enabled_modules[]', m, @project.module_enabled?(m) %> <%= m.to_s.humanize %>
<% end %></p>
</div>
<label class="floating">
<%= check_box_tag 'enabled_modules[]', m, @project.module_enabled?(m) %> <%= m.to_s.humanize %>
</label>
<% end %>
</fieldset>
<%= submit_tag l(:button_save) %>
<% end %>
+7 -2
View File
@@ -1,7 +1,7 @@
<h2><%=l(:button_move)%></h2>
<% form_tag({:action => 'move_issues', :id => @project}, :class => "tabular") do %>
<% form_tag({:action => 'move_issues', :id => @project}, :class => 'tabular', :id => 'move_form') do %>
<div class="box">
<p><label><%= l(:label_issue_plural) %> :</label>
@@ -15,7 +15,12 @@
<!--[form:issue]-->
<p><label for="new_project_id"><%=l(:field_project)%> :</label>
<%= select_tag "new_project_id", options_from_collection_for_select(@projects, "id", "name", @project.id) %></p>
<%= select_tag "new_project_id",
options_from_collection_for_select(@projects, 'id', 'name', @target_project.id),
:onchange => remote_function(:url => {:action => 'move_issues' , :id => @project},
:method => :get,
:update => 'content',
:with => "Form.serialize('move_form')") %></p>
<p><label for="new_tracker_id"><%=l(:field_tracker)%> :</label>
<%= select_tag "new_tracker_id", "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, "id", "name") %></p>
+1 -1
View File
@@ -56,7 +56,7 @@
</div>
<% content_for :sidebar do %>
<% if authorize_for('projects', 'add_issue') %>
<% if authorize_for('projects', 'add_issue') && @project.trackers.any? %>
<h3><%= l(:label_issue_new) %></h3>
<%= l(:label_tracker) %>: <%= new_issue_selector %>
<% end %>