From 6e65c7558de49a94aaacaf30a57b6af1771a2b5d Mon Sep 17 00:00:00 2001 From: Micael Bergeron Date: Mon, 25 Sep 2017 21:35:13 +0000 Subject: Fix a dash being rendered in the note's access role --- app/views/projects/notes/_actions.html.haml | 3 ++- changelogs/unreleased/37912-fix-dash-in-note-access-role.yml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/37912-fix-dash-in-note-access-role.yml diff --git a/app/views/projects/notes/_actions.html.haml b/app/views/projects/notes/_actions.html.haml index de76832331a..ab87b5e0005 100644 --- a/app/views/projects/notes/_actions.html.haml +++ b/app/views/projects/notes/_actions.html.haml @@ -1,7 +1,8 @@ +- access = note_max_access_for_user(note) - if note.has_special_role?(Note::SpecialRole::FIRST_TIME_CONTRIBUTOR) %span.note-role.note-role-special.has-tooltip{ title: _("This is the author's first Merge Request to this project. Handle with care.") } = issuable_first_contribution_icon -- if access = note_max_access_for_user(note) +- if access.nonzero? %span.note-role.note-role-access= Gitlab::Access.human_access(access) - if note.resolvable? diff --git a/changelogs/unreleased/37912-fix-dash-in-note-access-role.yml b/changelogs/unreleased/37912-fix-dash-in-note-access-role.yml new file mode 100644 index 00000000000..f9f4120479c --- /dev/null +++ b/changelogs/unreleased/37912-fix-dash-in-note-access-role.yml @@ -0,0 +1,5 @@ +--- +title: Notes will not show an empty bubble when the author isn't a member. +merge_request: 14450 +author: +type: fixed -- cgit v1.2.1