diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/issues_helper.rb | 7 | ||||
-rw-r--r-- | app/views/issues/show.html.erb | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 0df257d37..cfdb15ad1 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -176,6 +176,13 @@ module IssuesHelper end end + def issue_due_date_details(issue) + return if issue&.due_date.nil? + s = format_date(issue.due_date) + s += " (#{due_date_distance_in_words(issue.due_date)})" unless issue.closed? + s + end + # Returns a link for adding a new subtask to the given issue def link_to_new_subtask(issue) attrs = { diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index eade4da7b..6c0018f24 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -59,7 +59,7 @@ rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date' end unless @issue.disabled_core_fields.include?('due_date') - rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date' + rows.right l(:field_due_date), issue_due_date_details(@issue), :class => 'due-date' end unless @issue.disabled_core_fields.include?('done_ratio') rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :legend => "#{@issue.done_ratio}%"), :class => 'progress' |