修正了路线图已完成项目的显示问题

This commit is contained in:
zhangyang 2013-08-07 09:21:05 +08:00
parent 4835cab6e4
commit 1ed9089212
2 changed files with 7 additions and 6 deletions

View File

@ -38,19 +38,20 @@ class VersionsController < ApplicationController
project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id]
@versions = @project.shared_versions || []
@versions += @project.rolled_up_versions.visible if @with_subprojects
@versions += @project.rolled_up_versions.visible if @with_subprojects
#added by young
@versions = @versions.uniq.reverse#Modified by young
unless params[:completed]
@completed_versions = @versions.select {|version| version.closed? || version.completed? }
@versions -= @completed_versions
end
@offset, @limit = api_offset_and_limit({:limit => 4})
@versions_count = @versions.count
@versions_pages = Paginator.new @versions_count, @limit, params['page']
@offset ||= @versions_pages.offset
@versions = @versions.slice(@offset, @limit)
#end by young
unless params[:completed]
@completed_versions = @versions.select {|version| version.closed? || version.completed? }
@versions -= @completed_versions
end
@issues_by_version = {}
if @selected_tracker_ids.any? && @versions.any?

View File

@ -30,7 +30,7 @@
'$("#toggle-completed-versions").toggleClass("collapsed"); $("#completed-versions").toggle()',
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %><br />
<span id="completed-versions" style="display:none;">
<%= @completed_versions.map {|version| link_to format_version_name(version), version_path(version)}.join("<br />\n").html_safe %>
<%= @completed_versions.map {|version| link_to format_version_name(version), version_path(version)}.join("&nbsp\n").html_safe %><!--Modified by young-->
</span>
</p>
<% end %>