debian-mirror-gitlab/app/views/projects/services/slack_slash_commands/_help.html.haml

95 lines
4.8 KiB
Text
Raw Normal View History

2020-10-24 23:57:45 +05:30
- pretty_name = @project&.full_name || _('<project name>')
- run_actions_text = html_escape_once(s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: pretty_name })
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.info-well
.well-segment
%p
2019-12-04 20:38:33 +05:30
= s_("SlackService|This service allows users to perform common operations on this project by entering slash commands in Slack.")
2018-11-08 19:23:39 +05:30
= link_to help_page_path('user/project/integrations/slack_slash_commands.md'), target: '_blank' do
2019-12-04 20:38:33 +05:30
= _("View documentation")
2020-10-24 23:57:45 +05:30
= sprite_icon('external-link')
2018-11-08 19:23:39 +05:30
%p.inline
2019-12-04 20:38:33 +05:30
= s_("SlackService|See list of available commands in Slack after setting up this service, by entering")
2018-11-08 19:23:39 +05:30
%kbd.inline /<command> help
- unless @service.template?
2019-12-04 20:38:33 +05:30
%p= _("To set up this service:")
2018-11-08 19:23:39 +05:30
%ul.list-unstyled.indent-list
%li
1.
= link_to 'https://my.slack.com/services/new/slash-commands', target: '_blank', rel: 'noreferrer noopener nofollow' do
Add a slash command
2020-10-24 23:57:45 +05:30
= sprite_icon('external-link')
2018-11-08 19:23:39 +05:30
in your Slack team with these options:
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
%hr
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.help-form
.form-group
2019-12-04 20:38:33 +05:30
= label_tag nil, _('Command'), class: 'col-12 col-form-label label-bold'
2019-09-04 21:01:54 +05:30
.col-12
2019-12-04 20:38:33 +05:30
%p= s_('SlackService|Fill in the word that works best for your team.')
2018-11-08 19:23:39 +05:30
%p
2019-12-04 20:38:33 +05:30
= _("Suggestions:")
2018-11-08 19:23:39 +05:30
%code= 'gitlab'
2020-04-22 19:07:51 +05:30
%code= 'project'
- if @project
%code= @project.path # Path contains no spaces, but dashes
%code= @project.full_path
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group
2019-09-04 21:01:54 +05:30
= label_tag :url, 'URL', class: 'col-12 col-form-label label-bold'
.col-12.input-group
2018-11-08 19:23:39 +05:30
= text_field_tag :url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append
= clipboard_button(target: '#url', class: 'input-group-text')
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group
2019-12-04 20:38:33 +05:30
= label_tag nil, _('Method'), class: 'col-12 col-form-label label-bold'
2019-09-04 21:01:54 +05:30
.col-12 POST
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group
2019-12-04 20:38:33 +05:30
= label_tag :customize_name, _('Customize name'), class: 'col-12 col-form-label label-bold'
2019-09-04 21:01:54 +05:30
.col-12.input-group
2018-11-08 19:23:39 +05:30
= text_field_tag :customize_name, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append
= clipboard_button(target: '#customize_name', class: 'input-group-text')
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group
2019-12-04 20:38:33 +05:30
= label_tag nil, _('Customize icon'), class: 'col-12 col-form-label label-bold'
2019-09-04 21:01:54 +05:30
.col-12
2020-05-24 23:13:21 +05:30
= image_tag(asset_url('slash-command-logo.png', skip_pipeline: true), width: 36, height: 36, class: 'mr-3')
2019-12-04 20:38:33 +05:30
= link_to(_('Download image'), asset_url('gitlab_logo.png'), class: 'btn btn-sm', target: '_blank', rel: 'noopener noreferrer')
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group
2019-12-04 20:38:33 +05:30
= label_tag nil, _('Autocomplete'), class: 'col-12 col-form-label label-bold'
2019-09-04 21:01:54 +05:30
.col-12 Show this command in the autocomplete list
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group
2019-12-04 20:38:33 +05:30
= label_tag :autocomplete_description, _('Autocomplete description'), class: 'col-12 col-form-label label-bold'
2019-09-04 21:01:54 +05:30
.col-12.input-group
2020-10-24 23:57:45 +05:30
= text_field_tag :autocomplete_description, run_actions_text.html_safe, class: 'form-control form-control-sm', readonly: 'readonly'
2018-11-08 19:23:39 +05:30
.input-group-append
= clipboard_button(target: '#autocomplete_description', class: 'input-group-text')
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group
2019-12-04 20:38:33 +05:30
= label_tag :autocomplete_usage_hint, _('Autocomplete usage hint'), class: 'col-12 col-form-label label-bold'
2019-09-04 21:01:54 +05:30
.col-12.input-group
2018-11-08 19:23:39 +05:30
= text_field_tag :autocomplete_usage_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly'
.input-group-append
= clipboard_button(target: '#autocomplete_usage_hint', class: 'input-group-text')
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.form-group
2019-12-04 20:38:33 +05:30
= label_tag :descriptive_label, _('Descriptive label'), class: 'col-12 col-form-label label-bold'
2019-09-04 21:01:54 +05:30
.col-12.input-group
2019-12-04 20:38:33 +05:30
= text_field_tag :descriptive_label, _('Perform common operations on GitLab project'), class: 'form-control form-control-sm', readonly: 'readonly'
2018-11-08 19:23:39 +05:30
.input-group-append
= clipboard_button(target: '#descriptive_label', class: 'input-group-text')
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
%hr
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
%ul.list-unstyled.indent-list
%li
2020-10-24 23:57:45 +05:30
= html_escape(s_("SlackService|2. Paste the %{strong_open}Token%{strong_close} into the field below")) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
2018-11-08 19:23:39 +05:30
%li
2020-10-24 23:57:45 +05:30
= html_escape(s_("SlackService|3. Select the %{strong_open}Active%{strong_close} checkbox, press %{strong_open}Save changes%{strong_close} and start using GitLab inside Slack!")) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }