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
28964dcd
Commit
28964dcd
authored
May 11, 2020
by
Nicolò Maria Mezzopera
Committed by
Martin Wortschack
May 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update copy of sidebar for package
- ce sidebar - ee sidebar - pot file
parent
d66a9a7b
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
120 additions
and
26 deletions
+120
-26
app/views/groups/sidebar/_packages.html.haml
app/views/groups/sidebar/_packages.html.haml
+2
-2
app/views/layouts/nav/sidebar/_project_packages_link.html.haml
...iews/layouts/nav/sidebar/_project_packages_link.html.haml
+2
-2
changelogs/unreleased/199428-update-the-main-left-side-navigation-for-the-package-area-to-bette.yml
...in-left-side-navigation-for-the-package-area-to-bette.yml
+5
-0
ee/app/views/groups/sidebar/_packages.html.haml
ee/app/views/groups/sidebar/_packages.html.haml
+4
-4
ee/app/views/layouts/nav/sidebar/_project_packages_link.html.haml
...iews/layouts/nav/sidebar/_project_packages_link.html.haml
+4
-4
ee/spec/features/groups/navbar_spec.rb
ee/spec/features/groups/navbar_spec.rb
+35
-0
ee/spec/features/projects/navbar_spec.rb
ee/spec/features/projects/navbar_spec.rb
+19
-5
ee/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
ee/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
+11
-8
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/features/groups/navbar_spec.rb
spec/features/groups/navbar_spec.rb
+17
-0
spec/features/projects/navbar_spec.rb
spec/features/projects/navbar_spec.rb
+18
-1
No files found.
app/views/groups/sidebar/_packages.html.haml
View file @
28964dcd
...
...
@@ -4,12 +4,12 @@
.nav-icon-container
=
sprite_icon
(
'package'
)
%span
.nav-item-name
=
_
(
'Packages'
)
=
_
(
'Packages
& Registries
'
)
%ul
.sidebar-sub-level-items
=
nav_link
(
controller:
[
:packages
,
:repositories
],
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
group_container_registries_path
(
@group
),
title:
_
(
'Container Registry'
)
do
%strong
.fly-out-top-item-name
=
_
(
'Packages'
)
=
_
(
'Packages
& Registries
'
)
%li
.divider.fly-out-top-item
=
nav_link
(
controller:
'groups/container_registries'
)
do
=
link_to
group_container_registries_path
(
@group
),
title:
_
(
'Container Registry'
)
do
...
...
app/views/layouts/nav/sidebar/_project_packages_link.html.haml
View file @
28964dcd
...
...
@@ -4,12 +4,12 @@
.nav-icon-container
=
sprite_icon
(
'package'
)
%span
.nav-item-name
=
_
(
'Packages'
)
=
_
(
'Packages
& Registries
'
)
%ul
.sidebar-sub-level-items
=
nav_link
(
controller: :repositories
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
project_container_registry_index_path
(
@project
)
do
%strong
.fly-out-top-item-name
=
_
(
'Packages'
)
=
_
(
'Packages
& Registries
'
)
%li
.divider.fly-out-top-item
=
nav_link
controller: :repositories
do
=
link_to
project_container_registry_index_path
(
@project
),
class:
'shortcuts-container-registry'
,
title:
_
(
'Container Registry'
)
do
...
...
changelogs/unreleased/199428-update-the-main-left-side-navigation-for-the-package-area-to-bette.yml
0 → 100644
View file @
28964dcd
---
title
:
Update sidebar packages name
merge_request
:
30712
author
:
type
:
changed
ee/app/views/groups/sidebar/_packages.html.haml
View file @
28964dcd
...
...
@@ -6,17 +6,17 @@
.nav-icon-container
=
sprite_icon
(
'package'
)
%span
.nav-item-name
=
_
(
'Packages'
)
=
_
(
'Packages
& Registries
'
)
%ul
.sidebar-sub-level-items
=
nav_link
(
controller:
[
:packages
,
:repositories
],
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
packages_link
,
title:
_
(
'Packages'
)
do
=
link_to
packages_link
,
title:
_
(
'Packages
& Registries
'
)
do
%strong
.fly-out-top-item-name
=
_
(
'Packages'
)
=
_
(
'Packages
& Registries
'
)
%li
.divider.fly-out-top-item
-
if
group_packages_list_nav?
=
nav_link
(
controller:
'groups/packages'
)
do
=
link_to
group_packages_path
(
@group
),
title:
_
(
'Packages'
)
do
%span
=
_
(
'
List
'
)
%span
=
_
(
'
Package Registry
'
)
-
if
group_container_registry_nav?
=
nav_link
(
controller:
'groups/container_registries'
)
do
=
link_to
group_container_registries_path
(
@group
),
title:
_
(
'Container Registry'
)
do
...
...
ee/app/views/layouts/nav/sidebar/_project_packages_link.html.haml
View file @
28964dcd
...
...
@@ -6,17 +6,17 @@
.nav-icon-container
=
sprite_icon
(
'package'
)
%span
.nav-item-name
=
_
(
'Packages'
)
=
_
(
'Packages
& Registries
'
)
%ul
.sidebar-sub-level-items
=
nav_link
(
controller:
[
:packages
,
:repositories
],
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
packages_link
do
%strong
.fly-out-top-item-name
=
_
(
'Packages'
)
=
_
(
'Packages
& Registries
'
)
%li
.divider.fly-out-top-item
-
if
project_nav_tab?
:packages
=
nav_link
controller: :packages
do
=
link_to
project_packages_path
(
@project
),
title:
_
(
'Package
s
'
)
do
%span
=
_
(
'
List
'
)
=
link_to
project_packages_path
(
@project
),
title:
_
(
'Package
Registry
'
)
do
%span
=
_
(
'
Package Registry
'
)
-
if
project_nav_tab?
:container_registry
=
nav_link
controller: :repositories
do
=
link_to
project_container_registry_index_path
(
@project
),
class:
'shortcuts-container-registry'
,
title:
_
(
'Container Registry'
)
do
...
...
ee/spec/features/groups/navbar_spec.rb
View file @
28964dcd
...
...
@@ -141,4 +141,39 @@ describe 'Group navbar' do
it_behaves_like
'verified navigation bar'
end
context
'when packages are available'
do
before
do
stub_config
(
packages:
{
enabled:
true
},
registry:
{
enabled:
false
})
stub_licensed_features
(
packages:
true
)
insert_after_nav_item
(
_
(
'Kubernetes'
),
new_nav_item:
{
nav_item:
_
(
'Packages & Registries'
),
nav_sub_items:
[
_
(
'Package Registry'
)]
}
)
visit
group_path
(
group
)
end
it_behaves_like
'verified navigation bar'
context
'when container registry is available'
do
before
do
stub_config
(
registry:
{
enabled:
true
})
insert_after_sub_nav_item
(
_
(
'Package Registry'
),
within:
_
(
'Packages & Registries'
),
new_sub_nav_item_name:
_
(
'Container Registry'
)
)
visit
group_path
(
group
)
end
it_behaves_like
'verified navigation bar'
end
end
end
ee/spec/features/projects/navbar_spec.rb
View file @
28964dcd
...
...
@@ -61,16 +61,14 @@ describe 'Project navbar' do
context
'when packages are available'
do
before
do
allow
(
Gitlab
.
config
.
packages
).
to
receive
(
:enabled
).
and_return
(
true
)
stub_config
(
packages:
{
enabled:
true
},
registry:
{
enabled:
false
}
)
stub_licensed_features
(
packages:
true
)
insert_after_nav_item
(
_
(
'Operations'
),
new_nav_item:
{
nav_item:
_
(
'Packages'
),
nav_sub_items:
[
_
(
'List'
)
]
nav_item:
_
(
'Packages & Registries'
),
nav_sub_items:
[
_
(
'Package Registry'
)]
}
)
...
...
@@ -78,6 +76,22 @@ describe 'Project navbar' do
end
it_behaves_like
'verified navigation bar'
context
'when container registry is available'
do
before
do
stub_config
(
registry:
{
enabled:
true
})
insert_after_sub_nav_item
(
_
(
'Package Registry'
),
within:
_
(
'Packages & Registries'
),
new_sub_nav_item_name:
_
(
'Container Registry'
)
)
visit
project_path
(
project
)
end
it_behaves_like
'verified navigation bar'
end
end
context
'when requirements is available'
do
...
...
ee/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
View file @
28964dcd
...
...
@@ -224,6 +224,9 @@ describe 'layouts/nav/sidebar/_project' do
describe
'Packages'
do
let
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:package_menu_name
)
{
'Packages & Registries'
}
let_it_be
(
:package_entry_name
)
{
'Package Registry'
}
before
do
project
.
team
.
add_developer
(
user
)
sign_in
(
user
)
...
...
@@ -234,13 +237,13 @@ describe 'layouts/nav/sidebar/_project' do
it
'packages link is visible'
do
render
expect
(
rendered
).
to
have_link
(
'Packages'
,
href:
project_packages_path
(
project
))
expect
(
rendered
).
to
have_link
(
package_menu_name
,
href:
project_packages_path
(
project
))
end
it
'packages list link is visible'
do
render
expect
(
rendered
).
to
have_link
(
'List'
,
href:
project_packages_path
(
project
))
expect
(
rendered
).
to
have_link
(
package_entry_name
,
href:
project_packages_path
(
project
))
end
it
'container registry link is visible'
do
...
...
@@ -258,19 +261,19 @@ describe 'layouts/nav/sidebar/_project' do
it
'packages list link is not visible'
do
render
expect
(
rendered
).
not_to
have_link
(
'List'
,
href:
project_packages_path
(
project
))
expect
(
rendered
).
not_to
have_link
(
package_entry_name
,
href:
project_packages_path
(
project
))
end
it
'top level packages link links to container registry'
do
render
expect
(
rendered
).
to
have_link
(
'Packages'
,
href:
project_container_registry_index_path
(
project
))
expect
(
rendered
).
to
have_link
(
package_menu_name
,
href:
project_container_registry_index_path
(
project
))
end
it
'packages top level and container registry links are visible'
do
render
expect
(
rendered
).
to
have_link
(
'Packages'
,
href:
project_container_registry_index_path
(
project
))
expect
(
rendered
).
to
have_link
(
package_menu_name
,
href:
project_container_registry_index_path
(
project
))
expect
(
rendered
).
to
have_link
(
'Container Registry'
,
href:
project_container_registry_index_path
(
project
))
end
end
...
...
@@ -283,8 +286,8 @@ describe 'layouts/nav/sidebar/_project' do
it
'packages top level and list link are visible'
do
render
expect
(
rendered
).
to
have_link
(
'Packages'
,
href:
project_packages_path
(
project
))
expect
(
rendered
).
to
have_link
(
'List'
,
href:
project_packages_path
(
project
))
expect
(
rendered
).
to
have_link
(
package_menu_name
,
href:
project_packages_path
(
project
))
expect
(
rendered
).
to
have_link
(
package_entry_name
,
href:
project_packages_path
(
project
))
end
it
'container registry link is not visible'
do
...
...
@@ -303,7 +306,7 @@ describe 'layouts/nav/sidebar/_project' do
it
'packages top level item is not visible'
do
render
expect
(
rendered
).
not_to
have_link
(
'Packages'
,
href:
project_packages_path
(
project
))
expect
(
rendered
).
not_to
have_link
(
package_menu_name
,
href:
project_packages_path
(
project
))
end
end
end
...
...
locale/gitlab.pot
View file @
28964dcd
...
...
@@ -14791,6 +14791,9 @@ msgstr ""
msgid "Packages"
msgstr ""
msgid "Packages & Registries"
msgstr ""
msgid "Page not found"
msgstr ""
...
...
spec/features/groups/navbar_spec.rb
View file @
28964dcd
...
...
@@ -20,4 +20,21 @@ describe 'Group navbar' do
visit
group_path
(
group
)
end
end
context
'when container registry is available'
do
before
do
stub_config
(
registry:
{
enabled:
true
})
insert_after_nav_item
(
_
(
'Kubernetes'
),
new_nav_item:
{
nav_item:
_
(
'Packages & Registries'
),
nav_sub_items:
[
_
(
'Container Registry'
)]
}
)
visit
group_path
(
group
)
end
it_behaves_like
'verified navigation bar'
end
end
spec/features/projects/navbar_spec.rb
View file @
28964dcd
...
...
@@ -42,7 +42,7 @@ describe 'Project navbar' do
context
'when pages are available'
do
before
do
allow
(
Gitlab
.
config
.
pages
).
to
receive
(
:enabled
).
and_return
(
true
)
stub_config
(
pages:
{
enabled:
true
}
)
insert_after_sub_nav_item
(
_
(
'Operations'
),
...
...
@@ -55,4 +55,21 @@ describe 'Project navbar' do
it_behaves_like
'verified navigation bar'
end
context
'when container registry is available'
do
before
do
stub_config
(
registry:
{
enabled:
true
})
insert_after_nav_item
(
_
(
'Operations'
),
new_nav_item:
{
nav_item:
_
(
'Packages & Registries'
),
nav_sub_items:
[
_
(
'Container Registry'
)]
}
)
visit
project_path
(
project
)
end
it_behaves_like
'verified navigation bar'
end
end
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