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
61248933
Commit
61248933
authored
May 05, 2020
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Requirements count from navigation bar
Removes total Requirements count from left navigation sidebar
parent
972c347a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
12 deletions
+0
-12
ee/app/assets/javascripts/requirements/components/requirements_root.vue
...javascripts/requirements/components/requirements_root.vue
+0
-4
ee/app/views/layouts/nav/_requirements_link.html.haml
ee/app/views/layouts/nav/_requirements_link.html.haml
+0
-5
ee/spec/features/projects/requirements/requirements_list_spec.rb
.../features/projects/requirements/requirements_list_spec.rb
+0
-3
No files found.
ee/app/assets/javascripts/requirements/components/requirements_root.vue
View file @
61248933
...
...
@@ -136,8 +136,6 @@ export default {
opened
:
tabsContainerEl
.
querySelector
(
'
.js-opened-count
'
),
archived
:
tabsContainerEl
.
querySelector
(
'
.js-archived-count
'
),
all
:
tabsContainerEl
.
querySelector
(
'
.js-all-count
'
),
nav
:
document
.
querySelector
(
'
.js-nav-requirements-count
'
),
navFlyOut
:
document
.
querySelector
(
'
.js-nav-requirements-count-fly-out
'
),
},
};
},
...
...
@@ -200,8 +198,6 @@ export default {
const
totalCount
=
this
.
requirements
.
count
.
ALL
;
this
.
countEls
.
all
.
innerText
=
totalCount
;
this
.
countEls
.
nav
.
innerText
=
totalCount
;
this
.
countEls
.
navFlyOut
.
innerText
=
totalCount
;
},
openedCount
(
value
)
{
this
.
countEls
.
opened
.
innerText
=
value
;
...
...
ee/app/views/layouts/nav/_requirements_link.html.haml
View file @
61248933
-
return
unless
Feature
.
enabled?
(
:requirements_management
,
project
,
default_enabled:
true
)
-
return
unless
can?
(
current_user
,
:read_requirement
,
project
)
-
requirements_count
=
Hash
.
new
(
0
).
merge
(
project
.
requirements
.
counts_by_state
)
-
total_count
=
requirements_count
[
'opened'
]
+
requirements_count
[
'archived'
]
=
nav_link
(
path:
'requirements#index'
)
do
=
link_to
project_requirements_path
(
project
),
class:
'qa-project-requirements-link'
do
.nav-icon-container
=
sprite_icon
(
'requirements'
)
%span
.nav-item-name
=
_
(
'Requirements'
)
%span
.badge.badge-pill.count.js-nav-requirements-count
=
number_with_delimiter
(
total_count
)
%ul
.sidebar-sub-level-items
=
nav_link
(
path:
'requirements#index'
,
html_options:
{
class:
"fly-out-top-item"
}
)
do
=
link_to
project_requirements_path
(
project
)
do
%strong
.fly-out-top-item-name
=
_
(
'Requirements'
)
%span
.badge.badge-pill.count.requirements_counter.fly-out-badge.js-nav-requirements-count-fly-out
=
number_with_delimiter
(
total_count
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'requirements#index'
,
html_options:
{
class:
'home'
})
do
=
link_to
project_requirements_path
(
project
),
title:
'List'
do
...
...
ee/spec/features/projects/requirements/requirements_list_spec.rb
View file @
61248933
...
...
@@ -42,7 +42,6 @@ describe 'Requirements list', :js do
it
'shows the requirements in the navigation sidebar'
do
expect
(
first
(
'.nav-sidebar .active a .nav-item-name'
)).
to
have_content
(
'Requirements'
)
expect
(
first
(
'.nav-sidebar .active a .count'
)).
to
have_content
(
'4'
)
end
it
'shows requirements tabs for each status type'
do
...
...
@@ -93,7 +92,6 @@ describe 'Requirements list', :js do
end
it
'updates requirements count in nav sidebar and opened and all tab badges'
do
expect
(
page
.
find
(
'.js-nav-requirements-count'
)).
to
have_content
(
'4'
)
page
.
within
(
'.requirements-state-filters'
)
do
expect
(
find
(
'li > a#state-opened .badge'
)).
to
have_content
(
'3'
)
expect
(
find
(
'li > a#state-all .badge'
)).
to
have_content
(
'4'
)
...
...
@@ -101,7 +99,6 @@ describe 'Requirements list', :js do
create_requirement
(
'Foobar'
)
expect
(
page
.
find
(
'.js-nav-requirements-count'
)).
to
have_content
(
'5'
)
page
.
within
(
'.requirements-state-filters'
)
do
expect
(
find
(
'li > a#state-opened .badge'
)).
to
have_content
(
'4'
)
expect
(
find
(
'li > a#state-all .badge'
)).
to
have_content
(
'5'
)
...
...
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