Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-02-08 22:43:34 +0300
committerGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-02-11 17:02:41 +0300
commiteed03143b1256d05d5a70e4de61c4ff8db89d77f (patch)
tree8854442f7e2f17f7d995fb76d5f1e3a7c090901d /app
parent150c1cb0044971781654a81e10a570e7c8a98b63 (diff)
Merge branch '57428-actionview-template-error-undefined-method-for-nil-nilclass' into 'master'
Resolve "ActionView::Template::Error: undefined method `>' for nil:NilClass" Closes #57428 See merge request gitlab-org/gitlab-ce!25028 (cherry picked from commit 5b23f2b016f4e5d33387d7474148d2a59b213ee6) b177d523 Checking MR status date for related MR status tooltip 81b875f0 Added tests for merge_request_status partial 20ce370f Improved readability of issues related MR status spec
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/issues/_merge_requests_status.html.haml7
1 files changed, 5 insertions, 2 deletions
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 = "<div><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>"
+- if mr_status_date
+ - mr_status_tooltip = "<div><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>"
+- else
+ - mr_status_tooltip = "<div><span class=\"bold\">#{mr_status_title}</span></div>"
%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}")