summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswluizf@gmail.com>2016-11-02 21:49:13 -0200
committerOswaldo Ferreira <oswluizf@gmail.com>2016-12-02 19:18:17 -0200
commitf272ee6eba37548cbd8919139d583a71ffdac8dc (patch)
tree78d1e9a5e7bcf4935e8efbe4e5e6e4b976dfc9e8 /app/helpers
parent3ebb815a38ba86e4133557f77b94c292c8fc2e7e (diff)
downloadgitlab-ce-f272ee6eba37548cbd8919139d583a71ffdac8dc.tar.gz
Add shorthand support to gitlab markdown references
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/gitlab_markdown_helper.rb2
-rw-r--r--app/helpers/labels_helper.rb9
2 files changed, 2 insertions, 9 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index 0772d848289..eb435cc1783 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -174,7 +174,7 @@ module GitlabMarkdownHelper
# Returns a String
def cross_project_reference(project, entity)
if entity.respond_to?(:to_reference)
- "#{project.to_reference}#{entity.to_reference}"
+ entity.to_reference(project)
else
''
end
diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb
index 4f180456b16..e5b1e6e8bc7 100644
--- a/app/helpers/labels_helper.rb
+++ b/app/helpers/labels_helper.rb
@@ -82,12 +82,6 @@ module LabelsHelper
span.html_safe
end
- def render_colored_cross_project_label(label, source_project = nil, tooltip: true)
- label_suffix = source_project ? source_project.name_with_namespace : label.project.name_with_namespace
- label_suffix = " <i>in #{escape_once(label_suffix)}</i>"
- render_colored_label(label, label_suffix, tooltip: tooltip)
- end
-
def suggested_colors
[
'#0033CC',
@@ -166,6 +160,5 @@ module LabelsHelper
end
# Required for Banzai::Filter::LabelReferenceFilter
- module_function :render_colored_label, :render_colored_cross_project_label,
- :text_color_for_bg, :escape_once
+ module_function :render_colored_label, :text_color_for_bg, :escape_once
end