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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
206aa022
Commit
206aa022
authored
Sep 04, 2018
by
Martin Wortschack
Committed by
Dmitriy Zaporozhets
Sep 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conditional partial rendering for EE in application settings
parent
3fc25f54
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
182 additions
and
173 deletions
+182
-173
app/views/admin/application_settings/show.html.haml
app/views/admin/application_settings/show.html.haml
+4
-44
ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
.../admin/application_settings/_elasticsearch_form.html.haml
+70
-58
ee/app/views/admin/application_settings/_external_authorization_service_form.html.haml
...n_settings/_external_authorization_service_form.html.haml
+51
-39
ee/app/views/admin/application_settings/_geo.html.haml
ee/app/views/admin/application_settings/_geo.html.haml
+24
-12
ee/app/views/admin/application_settings/_slack.html.haml
ee/app/views/admin/application_settings/_slack.html.haml
+33
-20
No files found.
app/views/admin/application_settings/show.html.haml
View file @
206aa022
...
...
@@ -337,53 +337,13 @@
=
render
partial:
'repository_mirrors_form'
-# EE-only
-
if
Gitlab
::
Geo
.
license_allows?
%section
.settings.as-geo.no-animate
#js-geo-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'GitLab Geo'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'Geo allows you to replicate your GitLab instance to other geographical locations.'
)
.settings-content
=
render
'geo'
=
render_if_exists
'admin/application_settings/geo'
,
expanded:
expanded
-
if
License
.
feature_available?
(
:external_authorization_service
)
%section
.settings.as-external-auth.no-animate
#js-external-auth-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'External authentication'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'External Classification Policy Authorization'
)
.settings-content
=
render
'external_authorization_service_form'
=
render_if_exists
'admin/application_settings/external_authorization_service_form'
,
expanded:
expanded
-
if
License
.
feature_available?
(
:elastic_search
)
%section
.settings.as-elasticsearch.no-animate
#js-elasticsearch-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Elasticsearch'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'Elasticsearch intergration. Elasticsearch AWS IAM.'
)
.settings-content
=
render
partial:
'elasticsearch_form'
=
render_if_exists
'admin/application_settings/elasticsearch_form'
,
expanded:
expanded
-
if
Gitlab
.
com?
||
Rails
.
env
.
development?
%section
.settings.as-slack.no-animate
#js-slack-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Slack application'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'Slack integration allows you to interact with GitLab via shash commands in a chat window.'
)
.settings-content
=
render
partial:
'slack'
=
render_if_exists
'admin/application_settings/slack'
,
expanded:
expanded
=
render_if_exists
'admin/application_settings/templates'
,
expanded:
expanded
...
...
ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
View file @
206aa022
=
form_for
@application_setting
,
url:
admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
),
html:
{
class:
'fieldset-form'
}
do
|
f
|
-
return
unless
License
.
feature_available?
(
:elastic_search
)
%section
.settings.as-elasticsearch.no-animate
#js-elasticsearch-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Elasticsearch'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'Elasticsearch intergration. Elasticsearch AWS IAM.'
)
.settings-content
=
form_for
@application_setting
,
url:
admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
),
html:
{
class:
'fieldset-form'
}
do
|
f
|
=
form_errors
(
@application_setting
)
%fieldset
...
...
ee/app/views/admin/application_settings/_external_authorization_service_form.html.haml
View file @
206aa022
=
form_for
@application_setting
,
url:
admin_application_settings_path
(
anchor:
'js-external-auth-settings'
),
html:
{
class:
'fieldset-form'
}
do
|
f
|
-
return
unless
License
.
feature_available?
(
:external_authorization_service
)
%section
.settings.as-external-auth.no-animate
#js-external-auth-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'External authentication'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'External Classification Policy Authorization'
)
.settings-content
=
form_for
@application_setting
,
url:
admin_application_settings_path
(
anchor:
'js-external-auth-settings'
),
html:
{
class:
'fieldset-form'
}
do
|
f
|
=
form_errors
(
@application_setting
)
%fieldset
...
...
ee/app/views/admin/application_settings/_geo.html.haml
View file @
206aa022
=
form_for
@application_setting
,
url:
admin_application_settings_path
(
anchor:
'js-geo-settings'
),
html:
{
class:
'fieldset-form'
}
do
|
f
|
-
return
unless
Gitlab
::
Geo
.
license_allows?
%section
.settings.as-geo.no-animate
#js-geo-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'GitLab Geo'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'Geo allows you to replicate your GitLab instance to other geographical locations.'
)
.settings-content
=
form_for
@application_setting
,
url:
admin_application_settings_path
(
anchor:
'js-geo-settings'
),
html:
{
class:
'fieldset-form'
}
do
|
f
|
=
form_errors
(
@application_setting
)
%fieldset
...
...
ee/app/views/admin/application_settings/_slack.html.haml
View file @
206aa022
=
form_for
@application_setting
,
url:
admin_application_settings_path
(
anchor:
'js-slack-settings'
),
html:
{
class:
'fieldset-form'
}
do
|
f
|
-
return
unless
Gitlab
.
com?
||
Rails
.
env
.
development?
%section
.settings.as-slack.no-animate
#js-slack-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Slack application'
)
%button
.btn.js-settings-toggle
{
type:
'button'
}
=
expanded
?
'Collapse'
:
'Expand'
%p
=
_
(
'Slack integration allows you to interact with GitLab via shash commands in a chat window.'
)
.settings-content
=
form_for
@application_setting
,
url:
admin_application_settings_path
(
anchor:
'js-slack-settings'
),
html:
{
class:
'fieldset-form'
}
do
|
f
|
=
form_errors
(
@application_setting
)
%fieldset
...
...
@@ -20,3 +32,4 @@
=
f
.
text_field
:slack_app_verification_token
,
class:
'form-control'
=
f
.
submit
'Save changes'
,
class:
"btn btn-success"
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