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
Léo-Paul Géneau
gitlab-ce
Commits
27863b10
Commit
27863b10
authored
Jan 31, 2018
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor repository_storages_options_for_select
parent
08e01343
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+2
-2
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+2
-1
No files found.
app/helpers/application_settings_helper.rb
View file @
27863b10
...
@@ -96,12 +96,12 @@ module ApplicationSettingsHelper
...
@@ -96,12 +96,12 @@ module ApplicationSettingsHelper
]
]
end
end
def
repository_storages_options_for_select
def
repository_storages_options_for_select
(
selected
)
options
=
Gitlab
.
config
.
repositories
.
storages
.
map
do
|
name
,
storage
|
options
=
Gitlab
.
config
.
repositories
.
storages
.
map
do
|
name
,
storage
|
[
"
#{
name
}
-
#{
storage
[
'path'
]
}
"
,
name
]
[
"
#{
name
}
-
#{
storage
[
'path'
]
}
"
,
name
]
end
end
options_for_select
(
options
,
@application_setting
.
repository_storages
)
options_for_select
(
options
,
selected
)
end
end
def
sidekiq_queue_options_for_select
def
sidekiq_queue_options_for_select
...
...
app/views/admin/application_settings/_form.html.haml
View file @
27863b10
...
@@ -537,7 +537,8 @@
...
@@ -537,7 +537,8 @@
.form-group
.form-group
=
f
.
label
:repository_storages
,
'Storage paths for new projects'
,
class:
'control-label col-sm-2'
=
f
.
label
:repository_storages
,
'Storage paths for new projects'
,
class:
'control-label col-sm-2'
.col-sm-10
.col-sm-10
=
f
.
select
:repository_storages
,
repository_storages_options_for_select
,
{
include_hidden:
false
},
multiple:
true
,
class:
'form-control'
=
f
.
select
:repository_storages
,
repository_storages_options_for_select
(
@application_setting
.
repository_storages
),
{
include_hidden:
false
},
multiple:
true
,
class:
'form-control'
.help-block
.help-block
Manage repository storage paths. Learn more in the
Manage repository storage paths. Learn more in the
=
succeed
"."
do
=
succeed
"."
do
...
...
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