diff options
-rw-r--r-- | app/controllers/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/models/version.rb | 2 | ||||
-rw-r--r-- | app/views/issues/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/issues/show.html.erb | 2 | ||||
-rw-r--r-- | app/views/projects/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/timelog/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/wiki/date_index.html.erb | 2 | ||||
-rw-r--r-- | app/views/wiki/index.html.erb | 8 | ||||
-rw-r--r-- | lib/redmine/helpers/gantt.rb | 2 |
9 files changed, 12 insertions, 12 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index f9a390c58..2a42c99ed 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -176,7 +176,7 @@ class ProjectsController < ApplicationController respond_to do |format| format.html do @principals_by_role = @project.principals_by_role - @subprojects = @project.children.visible.to_a + @subprojects = @project.leaf? ? [] : @project.children.visible.to_a @news = @project.news.limit(5).includes(:author, :project).reorder("#{News.table_name}.created_on DESC").to_a with_subprojects = Setting.display_subprojects_issues? @trackers = @project.rolled_up_trackers(with_subprojects).visible diff --git a/app/models/version.rb b/app/models/version.rb index 707ed59dc..3ca4f2bff 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -106,7 +106,7 @@ module FixedIssuesExtension done = self.open(open).sum do |c| estimated = c.total_estimated_hours.to_f estimated = estimated_average unless estimated > 0.0 - ratio = c.closed? ? 100 : (c.done_ratio || 0) + ratio = open ? (c.done_ratio || 0) : 100 estimated * ratio end progress = done / (estimated_average * issues_count) diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index af2510827..70f0b740a 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -35,9 +35,9 @@ <% end %> <% other_formats_links do |f| %> - <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %> <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '350px'); return false;" %> <%= f.link_to_with_query_parameters 'PDF' %> + <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %> <% end %> <div id="csv-export-options" style="display:none;"> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 8f732032a..36111efa4 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -132,8 +132,8 @@ end %> <%= render partial: 'action_menu_edit' unless User.current.wants_comments_in_reverse_order? %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %> <%= f.link_to 'PDF' %> + <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %> <% end %> <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 3a1c047c9..875e736b1 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -31,10 +31,10 @@ <% end %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %> <% if @query.display_type == 'list' %> <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '350px'); return false;" %> <% end %> + <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %> <% end %> <% html_title(l(:label_project_plural)) -%> diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb index 55e2312b3..d9985e922 100644 --- a/app/views/timelog/index.html.erb +++ b/app/views/timelog/index.html.erb @@ -29,8 +29,8 @@ <span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span> <% other_formats_links do |f| %> - <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %> <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '330px'); return false;" %> + <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %> <% end %> <div id="csv-export-options" style="display:none;"> diff --git a/app/views/wiki/date_index.html.erb b/app/views/wiki/date_index.html.erb index 7ee5b467d..c8acf933c 100644 --- a/app/views/wiki/date_index.html.erb +++ b/app/views/wiki/date_index.html.erb @@ -29,11 +29,11 @@ <% unless @pages.empty? %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.atom_key} %> <% if User.current.allowed_to?(:export_wiki_pages, @project) %> <%= f.link_to('PDF', :url => {:action => 'export', :format => 'pdf'}) %> <%= f.link_to('HTML', :url => {:action => 'export'}) %> <% end %> + <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.atom_key} %> <% end %> <% end %> diff --git a/app/views/wiki/index.html.erb b/app/views/wiki/index.html.erb index 3f6d05fc2..a4afcb28e 100644 --- a/app/views/wiki/index.html.erb +++ b/app/views/wiki/index.html.erb @@ -22,14 +22,14 @@ <% unless @pages.empty? %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', - :url => {:controller => 'activities', :action => 'index', - :id => @project, :show_wiki_edits => 1, - :key => User.current.atom_key} %> <% if User.current.allowed_to?(:export_wiki_pages, @project) %> <%= f.link_to('PDF', :url => {:action => 'export', :format => 'pdf'}) %> <%= f.link_to('HTML', :url => {:action => 'export'}) %> <% end %> + <%= f.link_to 'Atom', + :url => {:controller => 'activities', :action => 'index', + :id => @project, :show_wiki_edits => 1, + :key => User.current.atom_key} %> <% end %> <% end %> diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index 5854a15f2..b79daa397 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -748,7 +748,7 @@ module Redmine html_class << (version.behind_schedule? ? 'version-behind-schedule' : '') << " " html_class << (version.overdue? ? 'version-overdue' : '') html_class << ' version-closed' unless version.open? - if version.start_date && version.due_date && version.visible_fixed_issues.completed_percent + if version.due_date && version.start_date && version.visible_fixed_issues.completed_percent progress_date = calc_progress_date(version.start_date, version.due_date, version.visible_fixed_issues.completed_percent) html_class << ' behind-start-date' if progress_date < self.date_from |