From b177d5233b63177a2c52289183f3693f19561ec1 Mon Sep 17 00:00:00 2001 From: Constance Okoghenun Date: Fri, 8 Feb 2019 08:37:07 +0100 Subject: Checking MR status date for related MR status tooltip Changed related MR status tooltip content when MR status date is not available. --- app/views/projects/issues/_merge_requests_status.html.haml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/issues/_merge_requests_status.html.haml b/app/views/projects/issues/_merge_requests_status.html.haml index 43e4c8db93f..90838a75214 100644 --- a/app/views/projects/issues/_merge_requests_status.html.haml +++ b/app/views/projects/issues/_merge_requests_status.html.haml @@ -12,11 +12,14 @@ - mr_status_class = 'closed' - else - mr_status_date = merge_request.created_at - - mr_status_title = _('Opened') + - mr_status_title = mr_status_date ? _('Opened') : _('Open') - mr_status_icon = 'issue-open-m' - mr_status_class = 'open' -- mr_status_tooltip = "
#{mr_status_title} #{time_ago_in_words(mr_status_date)} ago
#{l(mr_status_date.to_time, format: time_format)}" +- if mr_status_date + - mr_status_tooltip = "
#{mr_status_title} #{time_ago_in_words(mr_status_date)} ago
#{l(mr_status_date.to_time, format: time_format)}" +- else + - mr_status_tooltip = "
#{mr_status_title}
" %span.mr-status-wrapper.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}") -- cgit v1.2.3