Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-11 18:07:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-11 18:07:38 +0300
commit4eea104c69e59f6fa53c7bc15b986c69f29b60c8 (patch)
tree2eff1ce7ac4a58de15b1f5980acfdb22c7b92ac0 /app/helpers/snippets_helper.rb
parentb86f474bf51e20d2db4cf0895d0a8e0894e31c08 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/snippets_helper.rb')
-rw-r--r--app/helpers/snippets_helper.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/snippets_helper.rb b/app/helpers/snippets_helper.rb
index 7b93d44190e..1c7690f30d2 100644
--- a/app/helpers/snippets_helper.rb
+++ b/app/helpers/snippets_helper.rb
@@ -112,6 +112,17 @@ module SnippetsHelper
content_tag(:script, nil, src: gitlab_snippet_url(snippet, format: :js))
end
+ def snippet_embed_input(snippet)
+ content_tag(:input,
+ nil,
+ type: :text,
+ readonly: true,
+ class: 'js-snippet-url-area snippet-embed-input form-control',
+ data: { url: gitlab_snippet_url(snippet) },
+ value: snippet_embed_tag(snippet),
+ autocomplete: 'off')
+ end
+
def snippet_badge(snippet)
return unless attrs = snippet_badge_attributes(snippet)