2020-07-15 17:09:26 -04:00
|
|
|
- expanded = expanded_by_default?
|
2021-02-22 19:11:11 -05:00
|
|
|
%section.settings.js-service-desk-setting-wrapper.no-animate#js-service-desk{ class: ('expanded' if expanded), data: { qa_selector: 'service_desk_settings_content' } }
|
2020-07-15 17:09:26 -04:00
|
|
|
.settings-header
|
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Service Desk')
|
2021-03-16 17:11:53 -04:00
|
|
|
%button.btn.gl-button.btn-default.js-settings-toggle
|
2020-07-15 17:09:26 -04:00
|
|
|
= expanded ? _('Collapse') : _('Expand')
|
|
|
|
- link_start = "<a href='#{help_page_path('user/project/service_desk')}' target='_blank' rel='noopener noreferrer'>".html_safe
|
2020-12-25 10:10:00 -05:00
|
|
|
%p= _('Enable and disable Service Desk. Some additional configuration might be required. %{link_start}Learn more%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
|
2020-07-15 17:09:26 -04:00
|
|
|
.settings-content
|
|
|
|
- if ::Gitlab::ServiceDesk.supported?
|
|
|
|
.js-service-desk-setting-root{ data: { endpoint: project_service_desk_path(@project),
|
|
|
|
enabled: "#{@project.service_desk_enabled}",
|
2020-11-12 04:08:57 -05:00
|
|
|
incoming_email: (@project.service_desk_incoming_address if @project.service_desk_enabled),
|
2020-08-12 17:09:54 -04:00
|
|
|
custom_email: (@project.service_desk_custom_address if @project.service_desk_enabled),
|
2021-01-12 16:10:47 -05:00
|
|
|
custom_email_enabled: "#{Gitlab::ServiceDeskEmail.enabled?}",
|
2020-07-15 17:09:26 -04:00
|
|
|
selected_template: "#{@project.service_desk_setting&.issue_template_key}",
|
|
|
|
outgoing_name: "#{@project.service_desk_setting&.outgoing_name}",
|
|
|
|
project_key: "#{@project.service_desk_setting&.project_key}",
|
|
|
|
templates: issuable_templates_names(Issue.new) } }
|
|
|
|
- elsif show_callout?('promote_service_desk_dismissed')
|
|
|
|
= render 'shared/promotions/promote_servicedesk'
|