diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-20 07:11:49 +1100 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-20 07:11:49 +1100 |
commit | 8323b9c98d63efe38a2db736d73bc65059db1ada (patch) | |
tree | 42fd32921c96f4b0d462c65d5e97328ceeaadeb9 /app/helpers | |
parent | 20295b3db379f4be02521cac591feca3452a2b1c (diff) | |
download | gitlab-ce-8323b9c98d63efe38a2db736d73bc65059db1ada.tar.gz |
Add tooltip for milestone due date to issue and merge request lists
Diffstat (limited to 'app/helpers')
-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') |