Removes changelog view.
All trackers can now be displayed on the roadmap. By default, only those marked as displayed on the roadmap are displayed. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3162 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -21,7 +21,6 @@ class ProjectsController < ApplicationController
|
||||
menu_item :roadmap, :only => :roadmap
|
||||
menu_item :files, :only => [:list_files, :add_file]
|
||||
menu_item :settings, :only => :settings
|
||||
menu_item :issues, :only => [:changelog]
|
||||
|
||||
before_filter :find_project, :except => [ :index, :list, :add, :copy, :activity ]
|
||||
before_filter :find_optional_project, :only => :activity
|
||||
@@ -302,36 +301,10 @@ class ProjectsController < ApplicationController
|
||||
@containers += @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
|
||||
render :layout => !request.xhr?
|
||||
end
|
||||
|
||||
# Show changelog for @project
|
||||
def changelog
|
||||
@trackers = @project.trackers.find(:all, :conditions => ["is_in_chlog=?", true], :order => 'position')
|
||||
retrieve_selected_tracker_ids(@trackers)
|
||||
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
|
||||
project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id]
|
||||
|
||||
@versions = @project.shared_versions.sort
|
||||
|
||||
@issues_by_version = {}
|
||||
unless @selected_tracker_ids.empty?
|
||||
@versions.each do |version|
|
||||
conditions = {:tracker_id => @selected_tracker_ids, "#{IssueStatus.table_name}.is_closed" => true}
|
||||
if !@project.versions.include?(version)
|
||||
conditions.merge!(:project_id => project_ids)
|
||||
end
|
||||
issues = version.fixed_issues.visible.find(:all,
|
||||
:include => [:status, :tracker, :priority],
|
||||
:conditions => conditions,
|
||||
:order => "#{Tracker.table_name}.position, #{Issue.table_name}.id")
|
||||
@issues_by_version[version] = issues
|
||||
end
|
||||
end
|
||||
@versions.reject! {|version| !project_ids.include?(version.project_id) && @issues_by_version[version].empty?}
|
||||
end
|
||||
|
||||
def roadmap
|
||||
@trackers = @project.trackers.find(:all, :conditions => ["is_in_roadmap=?", true], :order => 'position')
|
||||
retrieve_selected_tracker_ids(@trackers)
|
||||
@trackers = @project.trackers.find(:all, :order => 'position')
|
||||
retrieve_selected_tracker_ids(@trackers, @trackers.select {|t| t.is_in_roadmap?})
|
||||
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
|
||||
project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id]
|
||||
|
||||
@@ -415,11 +388,11 @@ private
|
||||
render_404
|
||||
end
|
||||
|
||||
def retrieve_selected_tracker_ids(selectable_trackers)
|
||||
def retrieve_selected_tracker_ids(selectable_trackers, default_trackers=nil)
|
||||
if ids = params[:tracker_ids]
|
||||
@selected_tracker_ids = (ids.is_a? Array) ? ids.collect { |id| id.to_i.to_s } : ids.split('/').collect { |id| id.to_i.to_s }
|
||||
else
|
||||
@selected_tracker_ids = selectable_trackers.collect {|t| t.id.to_s }
|
||||
@selected_tracker_ids = (default_trackers || selectable_trackers).collect {|t| t.id.to_s }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<%= link_to l(:label_issue_view_all), { :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 } %><br />
|
||||
<% if @project %>
|
||||
<%= link_to l(:field_summary), :controller => 'reports', :action => 'issue_report', :id => @project %><br />
|
||||
<%= link_to l(:label_change_log), :controller => 'projects', :action => 'changelog', :id => @project %><br />
|
||||
<% end %>
|
||||
<%= call_hook(:view_issues_sidebar_issues_bottom) %>
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<h2><%=l(:label_change_log)%></h2>
|
||||
|
||||
<% if @versions.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
|
||||
<% @versions.each do |version| %>
|
||||
<%= tag 'a', :name => version.name %>
|
||||
<h3 class="icon22 icon22-package"><%= link_to_version version %></h3>
|
||||
<% if version.effective_date %>
|
||||
<p><%= format_date(version.effective_date) %></p>
|
||||
<% end %>
|
||||
<p><%=h version.description %></p>
|
||||
<% issues = version.fixed_issues.visible.find(:all,
|
||||
:include => [:status, :tracker, :priority],
|
||||
:conditions => ["#{Issue.table_name}.project_id = ? AND #{IssueStatus.table_name}.is_closed=? AND #{Issue.table_name}.tracker_id in (?)", @project.id, true, @selected_tracker_ids],
|
||||
:order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty?
|
||||
issues ||= []
|
||||
%>
|
||||
<% if !issues.empty? %>
|
||||
<ul>
|
||||
<% issues.each do |issue| %>
|
||||
<li><%= link_to_issue(issue) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<% form_tag({},:method => :get) do %>
|
||||
<h3><%= l(:label_change_log) %></h3>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
|
||||
<%= tracker.name %></label><br />
|
||||
<% end %>
|
||||
<% if @project.descendants.active.any? %>
|
||||
<%= hidden_field_tag 'with_subprojects', 0 %>
|
||||
<br /><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
|
||||
<% end %>
|
||||
<p><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
|
||||
<% end %>
|
||||
|
||||
<h3><%= l(:label_version_plural) %></h3>
|
||||
<% @versions.each do |version| %>
|
||||
<%= link_to format_version_name(version), :anchor => version.name %><br />
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -4,7 +4,6 @@
|
||||
<div class="box tabular">
|
||||
<!--[form:tracker]-->
|
||||
<p><%= f.text_field :name, :required => true %></p>
|
||||
<p><%= f.check_box :is_in_chlog %></p>
|
||||
<p><%= f.check_box :is_in_roadmap %></p>
|
||||
|
||||
<% if IssueCustomField.all.any? %>
|
||||
|
||||
Reference in New Issue
Block a user