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
bdf7365d
Commit
bdf7365d
authored
Oct 21, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hides registry if project is disabled
parent
266fcfb1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
app/assets/javascripts/project_new.js
app/assets/javascripts/project_new.js
+12
-1
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+2
-2
No files found.
app/assets/javascripts/project_new.js
View file @
bdf7365d
...
...
@@ -45,7 +45,9 @@
};
ProjectNew
.
prototype
.
toggleRepoVisibility
=
function
()
{
var
$repoAccessLevel
=
$
(
'
.js-repo-access-level select
'
);
var
$repoAccessLevel
=
$
(
'
.js-repo-access-level select
'
),
containerRegistry
=
document
.
querySelectorAll
(
'
.js-container-registry
'
)[
0
],
containerRegistryCheckbox
=
document
.
getElementById
(
'
project_container_registry_enabled
'
);
this
.
$repoSelects
.
find
(
"
option[value='
"
+
$repoAccessLevel
.
val
()
+
"
']
"
)
.
nextAll
()
...
...
@@ -70,8 +72,17 @@
if
(
selectedVal
)
{
this
.
$repoSelects
.
removeClass
(
'
disabled
'
);
if
(
containerRegistry
)
{
containerRegistry
.
style
.
display
=
''
;
}
}
else
{
this
.
$repoSelects
.
addClass
(
'
disabled
'
);
if
(
containerRegistry
)
{
containerRegistry
.
style
.
display
=
'
none
'
;
containerRegistryCheckbox
.
checked
=
false
;
}
}
}.
bind
(
this
));
};
...
...
app/views/projects/edit.html.haml
View file @
bdf7365d
...
...
@@ -102,7 +102,7 @@
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'workflow/lfs/manage_large_binaries_with_git_lfs'
)
-
if
Gitlab
.
config
.
registry
.
enabled
.form-group
.form-group
.js-container-registry
{
style:
(
"display: none;"
if
@project
.
project_feature
.
send
(
:repository_access_level
)
==
0
)
}
.checkbox
=
f
.
label
:container_registry_enabled
do
=
f
.
check_box
:container_registry_enabled
...
...
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