Commit 9ee6e525 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

UX review changes

parent 53aeb33f
...@@ -153,7 +153,7 @@ module ProjectsHelper ...@@ -153,7 +153,7 @@ module ProjectsHelper
return nil unless team['display_name'] && team['id'] return nil unless team['display_name'] && team['id']
[team['display_name'], team['id']] [team['display_name'], team['id']]
end.compact end.compact
teams_options.unshift(['Select a team...', '0']) unless teams_options.one? teams_options.unshift(['Select team...', '0']) unless teams_options.one?
teams_options teams_options
end end
......
...@@ -4,31 +4,38 @@ ...@@ -4,31 +4,38 @@
%h3 Install Mattermost Command %h3 Install Mattermost Command
- if @teams.empty? - if @teams.empty?
%p %p
To install this service, you must be administrator of a team in the Mattermost instance at You aren’t a member of any team on the Mattermost instance at
%strong some_path.url %strong= Gitlab.config.mattermost.host
%p Ask your Mattermost system administrator for permissions. %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.
%hr %hr
.clearfix .clearfix
= link_to 'Go back', 'some_url', class: 'btn btn-lg pull-right' = link_to 'Go back', edit_namespace_project_service_path(@project.namespace, @project, @service), class: 'btn btn-lg pull-right'
- else - else
%p %p
This service will be installed on the Mattermost instance at This service will be installed on the Mattermost instance at
%strong some_path.url %strong= Gitlab.config.mattermost.host
%hr %hr
= form_for(:create, method: :post, url: configure_namespace_project_mattermost_index_path(@project.namespace, @project, )) do |f| = form_for(:create, method: :post, url: configure_namespace_project_mattermost_index_path(@project.namespace, @project)) do |f|
%h4 Team %h4 Team
%p Select or create the team where the slash commands will be used in %p Select or create the team where the slash commands will be used in
- options = mattermost_teams_options(@teams) - options = mattermost_teams_options(@teams)
- isOneTeam = options.count === 1 - isOneTeam = options.count === 1
= f.select(:team_id, options, {}, {class: 'form-control', selected: "#{options.first[1] if isOneTeam}", disabled: isOneTeam}) = f.select(:team_id, options, {}, {class: 'form-control', selected: "#{options.first[1] if isOneTeam}", disabled: isOneTeam})
- if isOneTeam .help-block
.help-block - if isOneTeam
This is the only team where you are an administrator. This is the only team where you are an administrator.
To create a team, ask your Mattermost system administrator. - else
- else
.help-block
The list shows teams where you are administrator The list shows teams where you are administrator
To create a team, ask your Mattermost system 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 %hr
%h4 Command trigger word %h4 Command trigger word
%p Choose the word that will trigger commands %p Choose the word that will trigger commands
...@@ -43,9 +50,11 @@ ...@@ -43,9 +50,11 @@
%code= @project.path_with_namespace %code= @project.path_with_namespace
%p %p
Reserved: Reserved:
= link_to 'see list of built-in slash commands', 'some_url' = 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 %hr
.clearfix .clearfix
.pull-right .pull-right
= link_to 'Cancel', 'some_url', class: 'btn btn-lg' = 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' = f.submit 'Install', class: 'btn btn-save btn-lg'
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.col-sm-9= @service.activated? ? 'Installed' : 'Not installed' .col-sm-9= @service.activated? ? 'Installed' : 'Not installed'
.row .row
%strong.col-sm-3.text-right Mattermost %strong.col-sm-3.text-right Mattermost
= link_to 'some_path.url', 'some_path.url', class: 'col-sm-9' = link_to Gitlab.config.mattermost.host, Gitlab.config.mattermost.host, class: 'col-sm-9', target: '__blank'
- if @service.activated? - if @service.activated?
.row .row
%strong.col-sm-3.text-right Team %strong.col-sm-3.text-right Team
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment