summaryrefslogtreecommitdiff
path: root/app/helpers/notes_helper.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-06-13 18:01:25 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-06-13 18:01:25 +0800
commitedc46ce3e44147d5fe1b3071ba1e020846b60b13 (patch)
treef31f887566921b6ad432dd65eec86da713cab66a /app/helpers/notes_helper.rb
parentc81db2442029417cf2836c62093b6772e35d2164 (diff)
parente69299b7090f9790ce158a99b5ab63093223d75a (diff)
downloadgitlab-ce-edc46ce3e44147d5fe1b3071ba1e020846b60b13.tar.gz
Merge remote-tracking branch 'upstream/master' into 33149-rename-more-builds33149-rename-more-builds
* upstream/master: (460 commits) Center dropdown for pipeline's mini graph Documentation bugfix of invalid JSON payload example of Create a commit with multiple files and actions Fix filename method of GitlabUploader to return always real filename Ignore CVE-2017-5029 in Nokogiri Refactor atom builder by using xml.atom layout Let PhantomJS load local images Add a changelog entry Only add a description change note when no tasks are updated Doc: Add the need to upgrade to Go 1.8.3 in the 9.1->9.2 documentation as the upgrade fails with Go 1.5 (installed with Gitlab 8.1) Use gitaly 0.11.2 Add the ability to perform background migrations Always render warnings icon in orange Fix a few translation for zh_TW Improve Job detail view to make it refreshed in real-time instead of reloading Attempts to run RSpec tests twice (1 retry) ignore name validation on importing Only show hover state on links and buttons Use vue files for navigation tabs and buttons doc: add example of scheduler when Add test for u2f helper and changelog entry ...
Diffstat (limited to 'app/helpers/notes_helper.rb')
-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]