2020-09-16 14:09:47 -04:00
- expanded = integration_expanded?('gitpod_')
%section.settings.no-animate#js-gitpod-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
= _('Gitpod')
2020-11-16 07:09:05 -05:00
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
2020-09-16 14:09:47 -04:00
= expanded ? _('Collapse') : _('Expand')
%p
2021-03-15 20:09:44 -04:00
#js-gitpod-settings-help-text{ data: {"message" => gitpod_enable_description, "message-url" => "https://gitpod.io/" } }
2020-09-16 14:09:47 -04:00
= link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information')
.settings-content
2021-04-15 05:09:03 -04:00
= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-gitpod-settings'), html: { class: 'fieldset-form', id: 'gitpod-settings' } do |f|
2020-09-16 14:09:47 -04:00
= form_errors(@application_setting)
%fieldset
.form-group
.form-check
= f.check_box :gitpod_enabled, class: 'form-check-input'
= f.label :gitpod_enabled, s_('Gitpod|Enable Gitpod integration'), class: 'form-check-label'
.form-group
= f.label :gitpod_url, s_('Gitpod|Gitpod URL'), class: 'label-bold'
2021-05-28 02:10:48 -04:00
= f.text_field :gitpod_url, class: 'form-control gl-form-input', placeholder: s_('Gitpod|https://gitpod.example.com')
2020-09-16 14:09:47 -04:00
.form-text.text-muted
2021-05-28 02:10:48 -04:00
= s_('Gitpod|The URL to your Gitpod instance configured to read your GitLab projects, such as https://gitpod.example.com.')
- link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('integration/gitpod', anchor: 'enable-gitpod-in-your-user-settings') }
= s_('Gitpod|To use the integration, each user must also enable Gitpod on their GitLab account. %{link_start}How do I enable it?%{link_end} ').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
2021-08-25 17:10:28 -04:00
= f.submit _('Save changes'), class: 'gl-button btn btn-confirm'