2017-08-17 22:00:37 +05:30
|
|
|
%p
|
|
|
|
This service will be installed on the Mattermost instance at
|
|
|
|
%strong= link_to Gitlab.config.mattermost.host, Gitlab.config.mattermost.host
|
|
|
|
%hr
|
2017-09-10 17:25:29 +05:30
|
|
|
= form_for(:mattermost, method: :post, url: project_mattermost_path(@project), html: { class: 'js-requires-input'} ) do |f|
|
2017-08-17 22:00:37 +05:30
|
|
|
%h4 Team
|
|
|
|
%p
|
|
|
|
= @teams.one? ? 'The team' : 'Select the team'
|
|
|
|
where the slash commands will be used in
|
|
|
|
- selected_id = @teams.one? ? @teams.first['id'] : nil
|
|
|
|
- options = options_for_select(mattermost_teams_options(@teams), selected_id)
|
|
|
|
= f.select(:team_id, options, { include_blank: 'Select team...'}, { class: 'form-control', disabled: @teams.one?, selected: selected_id, required: true })
|
|
|
|
= f.hidden_field(:team_id, value: selected_id, required: true) if @teams.one?
|
2018-11-08 19:23:39 +05:30
|
|
|
.form-text.text-muted
|
2017-08-17 22:00:37 +05:30
|
|
|
- if @teams.one?
|
2018-11-08 19:23:39 +05:30
|
|
|
This is the only available team that you are a member of.
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
2018-11-08 19:23:39 +05:30
|
|
|
The list shows all available teams that you are a member of.
|
2017-08-17 22:00:37 +05:30
|
|
|
To create a team,
|
|
|
|
= link_to "#{Gitlab.config.mattermost.host}/create_team" do
|
|
|
|
use Mattermost's interface
|
|
|
|
= icon('external-link')
|
|
|
|
or ask your Mattermost system administrator.
|
|
|
|
%hr
|
|
|
|
%h4 Command trigger word
|
|
|
|
%p Choose the word that will trigger commands
|
|
|
|
= f.text_field(:trigger, value: @project.path, class: 'form-control', required: true)
|
2018-11-08 19:23:39 +05:30
|
|
|
.form-text.text-muted
|
2017-08-17 22:00:37 +05:30
|
|
|
%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
|
2017-09-10 17:25:29 +05:30
|
|
|
%code= @project.full_path
|
2017-08-17 22:00:37 +05:30
|
|
|
%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
|
2018-11-08 19:23:39 +05:30
|
|
|
.float-right
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to 'Cancel', edit_project_service_path(@project, @service), class: 'btn btn-lg'
|
2017-08-17 22:00:37 +05:30
|
|
|
= f.submit 'Install', class: 'btn btn-save btn-lg'
|