summaryrefslogtreecommitdiff
path: root/app/views/projects/mattermosts/_team_selection.html.haml
blob: 24e86b8497f665474d8301903bda6d32ce8a4408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%p
  This service will be installed on the Mattermost instance at
  %strong= link_to Gitlab.config.mattermost.host, Gitlab.config.mattermost.host
%hr
= form_for(:mattermost, method: :post, url: namespace_project_mattermost_path(@project.namespace, @project)) do |f|
  %h4 Team
  %p
    = @teams.one? ? 'The team' : 'Select the team'
    where the slash commands will be used in
  - selected_id = @teams.keys.first if @teams.one?
  - options = mattermost_teams_options(@teams)
  - options = options_for_select(options, selected_id)
  = f.select(:team_id, options, {}, { class: 'form-control', selected: "#{selected_id}" })
  .help-block
    - if @teams.one?
      This is the only team where you are an administrator.
    - else
      The list shows teams where you are administrator
    To create a team, ask your Mattermost system administrator.
    To create a team,
    = link_to "#{Gitlab.config.mattermost.host}/create_team" do
      use Mattermost's interface
      = icon('external-link')
  %hr
  %h4 Command trigger word
  %p Choose the word that will trigger commands
  = f.text_field(:trigger, value: @project.path, class: 'form-control')
  .help-block
    %p
      Trigger word must be unique, and can't begin with a slash or contain any spaces.
      Use the word that works best for your team.
    %p
      Suggestions:
      %code= 'gitlab'
      %code= @project.path # Path contains no spaces, but dashes
      %code= @project.path_with_namespace
    %p
      Reserved:
      = link_to 'https://docs.mattermost.com/help/messaging/executing-commands.html#built-in-commands', target: '__blank' do
        see list of built-in slash commands
        = icon('external-link')
  %hr
  .clearfix
    .pull-right
      = link_to 'Cancel', edit_namespace_project_service_path(@project.namespace, @project, @service), class: 'btn btn-lg'
      = f.submit 'Install', class: 'btn btn-save btn-lg'