2016-12-16 13:13:52 -05:00
|
|
|
|
.service-installation
|
|
|
|
|
.inline.pull-right
|
|
|
|
|
= custom_icon('mattermost_logo', size: 48)
|
|
|
|
|
%h3 Install Mattermost Command
|
2016-12-19 09:21:39 -05:00
|
|
|
|
- if @teams.empty?
|
2016-12-16 13:13:52 -05:00
|
|
|
|
%p
|
2016-12-19 09:57:03 -05:00
|
|
|
|
You aren’t a member of any team on the Mattermost instance at
|
|
|
|
|
%strong= Gitlab.config.mattermost.host
|
|
|
|
|
%p
|
|
|
|
|
To install this service,
|
|
|
|
|
= link_to "#{Gitlab.config.mattermost.host}/select_team", target: '__blank' do
|
|
|
|
|
join a team
|
|
|
|
|
= icon('external-link')
|
|
|
|
|
and try again.
|
2016-12-16 13:13:52 -05:00
|
|
|
|
%hr
|
|
|
|
|
.clearfix
|
2016-12-19 09:57:03 -05:00
|
|
|
|
= link_to 'Go back', edit_namespace_project_service_path(@project.namespace, @project, @service), class: 'btn btn-lg pull-right'
|
2016-12-16 13:13:52 -05:00
|
|
|
|
- else
|
|
|
|
|
%p
|
|
|
|
|
This service will be installed on the Mattermost instance at
|
2016-12-19 09:57:03 -05:00
|
|
|
|
%strong= Gitlab.config.mattermost.host
|
2016-12-16 13:13:52 -05:00
|
|
|
|
%hr
|
2016-12-19 09:57:03 -05:00
|
|
|
|
= form_for(:create, method: :post, url: configure_namespace_project_mattermost_index_path(@project.namespace, @project)) do |f|
|
2016-12-16 13:13:52 -05:00
|
|
|
|
%h4 Team
|
|
|
|
|
%p Select or create the team where the slash commands will be used in
|
2016-12-19 09:21:39 -05:00
|
|
|
|
- options = mattermost_teams_options(@teams)
|
2016-12-19 10:56:39 -05:00
|
|
|
|
= f.select(:team_id, options, {}, {class: 'form-control', selected: "#{options.first[1] if options.count.one?}", disabled: options.count.one?})
|
2016-12-19 09:57:03 -05:00
|
|
|
|
.help-block
|
2016-12-19 10:56:39 -05:00
|
|
|
|
- if options.count.one?
|
2016-12-16 13:13:52 -05:00
|
|
|
|
This is the only team where you are an administrator.
|
2016-12-19 09:57:03 -05:00
|
|
|
|
- else
|
2016-12-16 13:13:52 -05:00
|
|
|
|
The list shows teams where you are administrator
|
2016-12-19 09:57:03 -05:00
|
|
|
|
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')
|
2016-12-16 13:13:52 -05:00
|
|
|
|
%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 cannot begin with a slash or contain any spaces. Use the word that works best for your team.
|
|
|
|
|
%p Fill in 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:
|
2016-12-19 09:57:03 -05:00
|
|
|
|
= 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')
|
2016-12-16 13:13:52 -05:00
|
|
|
|
%hr
|
|
|
|
|
.clearfix
|
|
|
|
|
.pull-right
|
2016-12-19 09:57:03 -05:00
|
|
|
|
= link_to 'Cancel', edit_namespace_project_service_path(@project.namespace, @project, @service), class: 'btn btn-lg'
|
2016-12-16 13:13:52 -05:00
|
|
|
|
= f.submit 'Install', class: 'btn btn-save btn-lg'
|