diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-15 21:06:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-15 21:06:24 +0300 |
commit | eca3cd3a9e7d9ea680086cad8150050ec8cdef3f (patch) | |
tree | c3d262e0d8e721fc138c2d617f501fb09876f1b6 /app/views/profiles | |
parent | 6e81d7f6283fae1b22f66b9d9b133243921cbd9e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/preferences/_sourcegraph.html.haml | 26 | ||||
-rw-r--r-- | app/views/profiles/preferences/show.html.haml | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/app/views/profiles/preferences/_sourcegraph.html.haml b/app/views/profiles/preferences/_sourcegraph.html.haml new file mode 100644 index 00000000000..20a904694ca --- /dev/null +++ b/app/views/profiles/preferences/_sourcegraph.html.haml @@ -0,0 +1,26 @@ +- return unless Gitlab::Sourcegraph::feature_available? && Gitlab::CurrentSettings.sourcegraph_enabled +- sourcegraph_url = Gitlab::CurrentSettings.sourcegraph_url + +.col-sm-12 + %hr + +.col-lg-4.profile-settings-sidebar + %h4.prepend-top-0 + = s_('Preferences|Integrations') + %p + = s_('Preferences|Customize integrations with third party services.') + = succeed '.' do + = link_to _('Learn more'), help_page_path('user/profile/preferences.md', anchor: 'integrations'), target: '_blank' +.col-lg-8 + %label.label-bold + = s_('Preferences|Sourcegraph') + = link_to icon('question-circle'), help_page_path('user/profile/preferences.md', anchor: 'sourcegraph'), target: '_blank', class: 'has-tooltip', title: _('More information') + .form-group.form-check + = f.check_box :sourcegraph_enabled, class: 'form-check-input' + = f.label :sourcegraph_enabled, class: 'form-check-label' do + - link_start = '<a href="%{url}">'.html_safe % { url: sourcegraph_url } + - link_end = '</a>'.html_safe + = s_('Preferences|Enable integrated code intelligence on code views').html_safe % { link_start: link_start, link_end: link_end } + .form-text.text-muted + = sourcegraph_url_message + = sourcegraph_experimental_message diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 84657592cd8..bf76b7379dd 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -111,6 +111,9 @@ = time_display_label .form-text.text-muted = s_('Preferences|For example: 30 mins ago.') + + = render 'sourcegraph', f: f + .col-lg-4.profile-settings-sidebar .col-lg-8 .form-group |