diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 4d0ea7595..fa6aaea5e 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -170,7 +170,7 @@ class IssuesController < ApplicationController return unless update_issue_from_params respond_to do |format| - format.html { } + format.html {render :layout => 'base_projects' }#added by young format.xml { } end end diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 1eeecf568..1f6349934 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -38,8 +38,15 @@ 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.sort + @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 @@ -54,7 +61,7 @@ class VersionsController < ApplicationController ) @issues_by_version = issues.group_by(&:fixed_version) end - @versions.reject! {|version| !project_ids.include?(version.project_id) && @issues_by_version[version].blank?} + @versions.reject! {|version| !project_ids.include?(version.project_id) && @issues_by_version[version].blank?} } format.api { @versions = @project.shared_versions.all diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 2cc7eb173..6f0b6883c 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -103,7 +103,6 @@
<%= format_date(version.effective_date) %>
-<% elsif version.effective_date %> -<%= due_date_distance_in_words(version.effective_date) %> (<%= format_date(version.effective_date) %>)
-<% end %> - -<%=h version.description %>
-<% if version.custom_field_values.any? %> -»<%= l(:label_versions_progress)%>
<%= progress_bar([version.closed_percent, version.completed_percent], :width => '40em', :legend => ('%0.0f%' % version.completed_percent)) %><%= link_to(l(:label_x_issues, :count => version.issues_count), diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index 50a7a8411..bc0c11902 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -1,56 +1,29 @@ +
<%= l(:label_no_data) %>
-<% else %> -<%= link_to_version version, :name => version_anchor(version) %>
- <%= render :partial => 'versions/overview', :locals => {:version => version} %> - <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> - - <% if (issues = @issues_by_version[version]) && issues.size > 0 %> - <%= form_tag({}) do -%> -<%= check_box_tag 'ids[]', issue.id, false, :id => nil %> | -<%= link_to_issue(issue, :project => (@project != issue.project)) %> | -
<%= l(:label_no_data) %>
+<% else %> ++ <%= link_to_version version, :name => version_anchor(version) %> + <% if version.completed? %> + <%= format_date(version.effective_date) %> + <% elsif version.effective_date %> + <%= due_date_distance_in_words(version.effective_date) %> (<%= format_date(version.effective_date) %>) + <% end %> +
+ + <%= render :partial => 'versions/overview', :locals => {:version => version} %> + <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> + <% if (issues = @issues_by_version[version]) && issues.size > 0 %> + <%= form_tag({}) do -%> +<%= check_box_tag 'ids[]', issue.id, false, :id => nil %> | +<%= link_to_issue(issue, :project => (@project != issue.project)) %> | +
<%=h version.description %>
+ <% if version.custom_field_values.any? %> +