summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-06-07 18:33:50 +0000
committerClement Ho <clemmakesapps@gmail.com>2017-06-07 18:33:50 +0000
commit32cac597275706930b221b19fb20b29ccebc7130 (patch)
treeeff1772526935597f6539eec340d0c29f0049fc7 /app/helpers
parent8bd232d43bb2c0c8d5b5b4e92609adcfbda9a008 (diff)
downloadgitlab-ce-32cac597275706930b221b19fb20b29ccebc7130.tar.gz
Added more actions and report as abuse to all notes
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/notes_helper.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index 3d4802290b5..c59d8dafc83 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -90,14 +90,18 @@ module NotesHelper
end
end
- def note_url(note)
+ def note_url(note, project = @project)
if note.noteable.is_a?(PersonalSnippet)
snippet_note_path(note.noteable, note)
else
- namespace_project_note_path(@project.namespace, @project, note)
+ namespace_project_note_path(project.namespace, project, note)
end
end
+ def noteable_note_url(note)
+ Gitlab::UrlBuilder.build(note)
+ end
+
def form_resources
if @snippet.is_a?(PersonalSnippet)
[@note]