diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-26 15:47:19 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-26 15:47:19 +0100 |
commit | a678fef83611ea873d252941586c18171cd6ba07 (patch) | |
tree | d329b902a7784b4a6be14980f8a94647a8fb9a00 /app/views/projects/notes | |
parent | 5e8606562df861e22d80e888457300f862aeb89b (diff) | |
download | gitlab-ce-a678fef83611ea873d252941586c18171cd6ba07.tar.gz |
Added resolved by users name into tooltip
Diffstat (limited to 'app/views/projects/notes')
-rw-r--r-- | app/views/projects/notes/_note.html.haml | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index c90be872ff4..d939a17f0b8 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -23,28 +23,29 @@ %span.note-role.hidden-xs= access - if note.resolvable? - - if can?(current_user, :resolve_note, note) - %resolve-btn{ ":namespace-path" => "'#{note.project.namespace.path}'", - ":project-path" => "'#{note.project.path}'", - ":discussion-id" => "'#{note.discussion_id}'", - ":note-id" => note.id, - ":resolved" => note.resolved?, - "inline-template" => true, - "v-ref:note_#{note.id}" => true } + %resolve-btn{ ":namespace-path" => "'#{note.project.namespace.path}'", + ":project-path" => "'#{note.project.path}'", + ":discussion-id" => "'#{note.discussion_id}'", + ":note-id" => note.id, + ":resolved" => note.resolved?, + ":can-resolve" => can?(current_user, :resolve_note, note), + ":resolved-by" => "'#{note.resolved_by.try(:name)}'", + "inline-template" => true, + "v-ref:note_#{note.id}" => true } - .note-action-button - = icon("spin spinner", "v-show" => "loading") - %button.line-resolve-btn{ type: "button", - ":class" => "{ 'is-active': isResolved }", - ":aria-label" => "buttonText", - "@click" => "resolve", - ":title" => "buttonText", - "v-show" => "!loading", - "v-el:button" => true } + .note-action-button + = icon("spin spinner", "v-show" => "loading") + %button.line-resolve-btn{ type: "button", + class: ("is-disabled" if !can?(current_user, :resolve_note, note)), + ":class" => "{ 'is-active': isResolved }", + ":aria-label" => "buttonText", + ":disabled" => !can?(current_user, :resolve_note, note), + "@click" => "resolve", + ":title" => "buttonText", + "v-show" => "!loading", + "v-el:button" => true } - = icon("check") - - else - -# TODO: Just render status + = icon("check") - if current_user - if note.emoji_awardable? |