Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
05d04d04
Commit
05d04d04
authored
Dec 19, 2016
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kamil frontend review changes
parent
b67ad2db
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
54 deletions
+60
-54
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/views/projects/mattermost/_no_teams.html.haml
app/views/projects/mattermost/_no_teams.html.haml
+12
-0
app/views/projects/mattermost/_team_selection.html.haml
app/views/projects/mattermost/_team_selection.html.haml
+41
-0
app/views/projects/mattermost/new.html.haml
app/views/projects/mattermost/new.html.haml
+2
-53
app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml
...es/mattermost_slash_commands/_installation_info.html.haml
+1
-1
No files found.
app/helpers/application_helper.rb
View file @
05d04d04
...
...
@@ -294,4 +294,8 @@ module ApplicationHelper
def
page_class
"issue-boards-page"
if
current_controller?
(
:boards
)
end
def
pretty_url
(
url
)
url
.
gsub
(
/\A.*?:\/\//
,
''
)
end
end
app/views/projects/mattermost/_no_teams.html.haml
0 → 100644
View file @
05d04d04
%p
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.
%hr
.clearfix
=
link_to
'Go back'
,
edit_namespace_project_service_path
(
@project
.
namespace
,
@project
,
@service
),
class:
'btn btn-lg pull-right'
app/views/projects/mattermost/_team_selection.html.haml
0 → 100644
View file @
05d04d04
%p
This service will be installed on the Mattermost instance at
%strong
=
Gitlab
.
config
.
mattermost
.
host
%hr
=
form_for
(
:create
,
method: :post
,
url:
configure_namespace_project_mattermost_index_path
(
@project
.
namespace
,
@project
))
do
|
f
|
%h4
Team
%p
Select or create the team where the slash commands will be used in
-
options
=
mattermost_teams_options
(
@teams
)
=
f
.
select
(
:team_id
,
options
,
{},
{
class:
'form-control'
,
selected:
"
#{
options
.
first
[
1
]
if
options
.
count
.
one?
}
"
,
disabled:
options
.
count
.
one?
})
.help-block
-
if
options
.
count
.
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 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:
=
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'
app/views/projects/mattermost/new.html.haml
View file @
05d04d04
...
...
@@ -3,57 +3,6 @@
=
custom_icon
(
'mattermost_logo'
,
size:
48
)
%h3
Install Mattermost Command
-
if
@teams
.
empty?
%p
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.
%hr
.clearfix
=
link_to
'Go back'
,
edit_namespace_project_service_path
(
@project
.
namespace
,
@project
,
@service
),
class:
'btn btn-lg pull-right'
=
render
'no_teams'
-
else
%p
This service will be installed on the Mattermost instance at
%strong
=
Gitlab
.
config
.
mattermost
.
host
%hr
=
form_for
(
:create
,
method: :post
,
url:
configure_namespace_project_mattermost_index_path
(
@project
.
namespace
,
@project
))
do
|
f
|
%h4
Team
%p
Select or create the team where the slash commands will be used in
-
options
=
mattermost_teams_options
(
@teams
)
=
f
.
select
(
:team_id
,
options
,
{},
{
class:
'form-control'
,
selected:
"
#{
options
.
first
[
1
]
if
options
.
count
.
one?
}
"
,
disabled:
options
.
count
.
one?
})
.help-block
-
if
options
.
count
.
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 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:
=
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'
=
render
'team_selection'
app/views/projects/services/mattermost_slash_commands/_installation_info.html.haml
View file @
05d04d04
...
...
@@ -4,7 +4,7 @@
.col-sm-9
=
@service
.
activated?
?
'Installed'
:
'Not installed'
.row
%strong
.col-sm-3.text-right
Mattermost
=
link_to
Gitlab
.
config
.
mattermost
.
host
.
gsub
(
/\A.*?:\/\//
,
''
),
Gitlab
.
config
.
mattermost
.
host
,
class:
'col-sm-9'
,
target:
'__blank'
=
link_to
pretty_url
(
Gitlab
.
config
.
mattermost
.
host
),
Gitlab
.
config
.
mattermost
.
host
,
class:
'col-sm-9'
,
target:
'__blank'
.row
%strong
.col-sm-3.text-right
Installation
.col-sm-9
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment