summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorConstance Okoghenun <constanceokoghenun@gmail.com>2019-01-15 13:31:30 +0100
committerConstance Okoghenun <constanceokoghenun@gmail.com>2019-01-15 13:31:30 +0100
commit7a5a7985b367ace7a8c7c1089edd372454111200 (patch)
tree29d5bbdd891000ae46ecb22ec45d4283e70febab /app
parent0b911b39b0b130faae5cfb32c3608a1b6c3d1cbe (diff)
downloadgitlab-ce-7a5a7985b367ace7a8c7c1089edd372454111200.tar.gz
Update tooltip for issues related merge request status
- Added relative time to the status - Changed date format for status date
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/issues/_merge_requests_status.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/projects/issues/_merge_requests_status.html.haml b/app/views/projects/issues/_merge_requests_status.html.haml
index d2f47b383f7..0f2cd8c43f3 100644
--- a/app/views/projects/issues/_merge_requests_status.html.haml
+++ b/app/views/projects/issues/_merge_requests_status.html.haml
@@ -1,3 +1,4 @@
+- time_format = '%b %e, %Y %l:%M%P %Z%z'
- if merge_request.merged?
- mr_status_date = merge_request.merged_at
@@ -15,7 +16,7 @@
- mr_status_icon = 'issue-open-m'
- mr_status_class = 'open'
-- mr_status_tooltip = "<div class=\"bold mb-1\">#{mr_status_title}</div><span class=\"text-tertiary\">#{l(mr_status_date.to_time, format: :timeago_tooltip)}</span>"
+- mr_status_tooltip = "<div class=\"mb-1\"><span class=\"bold\">#{mr_status_title}</span> #{time_ago_in_words(mr_status_date)} ago</div><span class=\"text-tertiary\">#{l(mr_status_date.to_time, format: time_format)}</span>"
%span.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } }
= sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}")