diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-09-27 02:00:55 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-09-27 02:00:55 +0300 |
commit | ab496d82ecd1cc675d10fc30a3af279ad4ab1edf (patch) | |
tree | 7493ab449c52ea121e24008f128b72abd336a4be /app/views/projects/notes | |
parent | 045836c48d3558a1ff67fc6399d77b708e0084fb (diff) | |
parent | a83262fffa526350fee32d7197309e5f095bd7ba (diff) |
Merge branch 'resolve-buttons-path' into 'master'
Pass the full project path for resolve buttons
## What does this MR do?
The full project path is passed from the HTML into the JS rather than the resolve button JS generating the URL based on the the namespaces.
@smcgivern @stanhu Do we have anyway of adding tests for installs with relative URLs?
## What are the relevant issue numbers?
Closes #21704
See merge request !6129
Diffstat (limited to 'app/views/projects/notes')
-rw-r--r-- | app/views/projects/notes/_note.html.haml | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index 9ec17cf6e76..788be4a0047 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -24,14 +24,12 @@ - if note.resolvable? - can_resolve = can?(current_user, :resolve_note, note) - - %resolve-btn{ ":namespace-path" => "'#{note.project.namespace.path}'", - ":project-path" => "'#{note.project.path}'", - ":discussion-id" => "'#{note.discussion_id}'", + %resolve-btn{ "project-path" => "#{project_path(note.project)}", + "discussion-id" => "#{note.discussion_id}", ":note-id" => note.id, ":resolved" => note.resolved?, ":can-resolve" => can_resolve, - ":resolved-by" => "'#{note.resolved_by.try(:name)}'", + "resolved-by" => "#{note.resolved_by.try(:name)}", "v-show" => "#{can_resolve || note.resolved?}", "inline-template" => true, "v-ref:note_#{note.id}" => true } |