diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-19 23:11:49 +0300 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-19 23:11:49 +0300 |
commit | 8323b9c98d63efe38a2db736d73bc65059db1ada (patch) | |
tree | 42fd32921c96f4b0d462c65d5e97328ceeaadeb9 /app/helpers/milestones_helper.rb | |
parent | 20295b3db379f4be02521cac591feca3452a2b1c (diff) |
Add tooltip for milestone due date to issue and merge request lists
Diffstat (limited to 'app/helpers/milestones_helper.rb')
-rw-r--r-- | app/helpers/milestones_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb index 446a59030a6..be8cb358de2 100644 --- a/app/helpers/milestones_helper.rb +++ b/app/helpers/milestones_helper.rb @@ -94,6 +94,12 @@ module MilestonesHelper end end + def milestone_tooltip_title(milestone) + if milestone.due_date + [milestone.due_date.to_s(:medium), "(#{milestone_remaining_days(milestone)})"].join(' ') + end + end + def milestone_remaining_days(milestone) if milestone.expired? content_tag(:strong, 'Past due') |