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
0510532f
Commit
0510532f
authored
Jan 19, 2022
by
huzaifaiftikhar1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove count badge for projects pending deletion tab
parent
cab18008
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
23 deletions
+3
-23
app/views/dashboard/_projects_nav.html.haml
app/views/dashboard/_projects_nav.html.haml
+1
-1
ee/app/controllers/ee/dashboard/projects_controller.rb
ee/app/controllers/ee/dashboard/projects_controller.rb
+0
-7
ee/app/controllers/ee/explore/projects_controller.rb
ee/app/controllers/ee/explore/projects_controller.rb
+0
-7
ee/app/views/dashboard/_removed_projects_tab.html.haml
ee/app/views/dashboard/_removed_projects_tab.html.haml
+0
-1
ee/spec/controllers/ee/dashboard/projects_controller_spec.rb
ee/spec/controllers/ee/dashboard/projects_controller_spec.rb
+2
-7
No files found.
app/views/dashboard/_projects_nav.html.haml
View file @
0510532f
...
@@ -10,4 +10,4 @@
...
@@ -10,4 +10,4 @@
=
gl_tab_counter_badge
(
limited_counter_with_delimiter
(
@total_starred_projects_count
))
=
gl_tab_counter_badge
(
limited_counter_with_delimiter
(
@total_starred_projects_count
))
=
gl_tab_link_to
_
(
"Explore projects"
),
explore_root_path
,
{
item_active:
is_explore_projects_path
,
data:
{
placement:
'right'
}
}
=
gl_tab_link_to
_
(
"Explore projects"
),
explore_root_path
,
{
item_active:
is_explore_projects_path
,
data:
{
placement:
'right'
}
}
=
gl_tab_link_to
_
(
"Explore topics"
),
topics_explore_projects_path
,
{
data:
{
placement:
'right'
}
}
=
gl_tab_link_to
_
(
"Explore topics"
),
topics_explore_projects_path
,
{
data:
{
placement:
'right'
}
}
=
render_if_exists
"dashboard/removed_projects_tab"
,
removed_projects_count:
@removed_projects_count
=
render_if_exists
"dashboard/removed_projects_tab"
ee/app/controllers/ee/dashboard/projects_controller.rb
View file @
0510532f
...
@@ -33,13 +33,6 @@ module EE
...
@@ -33,13 +33,6 @@ module EE
.
with_group_saml_provider
.
with_group_saml_provider
end
end
override
:load_projects
def
load_projects
(
finder_params
)
@removed_projects_count
=
::
ProjectsFinder
.
new
(
params:
finder_params_for_removed
,
current_user:
current_user
).
execute
# rubocop:disable Gitlab/ModuleWithInstanceVariables
super
end
def
check_adjourned_deletion_listing_availability
def
check_adjourned_deletion_listing_availability
return
render_404
unless
can?
(
current_user
,
:list_removable_projects
)
return
render_404
unless
can?
(
current_user
,
:list_removable_projects
)
end
end
...
...
ee/app/controllers/ee/explore/projects_controller.rb
View file @
0510532f
...
@@ -11,13 +11,6 @@ module EE
...
@@ -11,13 +11,6 @@ module EE
def
preload_associations
(
projects
)
def
preload_associations
(
projects
)
super
.
with_compliance_framework_settings
super
.
with_compliance_framework_settings
end
end
override
:load_project_counts
def
load_project_counts
@removed_projects_count
=
::
ProjectsFinder
.
new
(
params:
{
aimed_for_deletion:
true
},
current_user:
current_user
).
execute
# rubocop:disable Gitlab/ModuleWithInstanceVariables
super
end
end
end
end
end
end
end
ee/app/views/dashboard/_removed_projects_tab.html.haml
View file @
0510532f
-
if
can?
(
current_user
,
:list_removable_projects
)
-
if
can?
(
current_user
,
:list_removable_projects
)
=
gl_tab_link_to
removed_dashboard_projects_path
,
{
data:
{
placement:
'right'
}
}
do
=
gl_tab_link_to
removed_dashboard_projects_path
,
{
data:
{
placement:
'right'
}
}
do
=
_
(
"Pending deletion"
)
=
_
(
"Pending deletion"
)
=
gl_tab_counter_badge
(
limited_counter_with_delimiter
(
removed_projects_count
))
ee/spec/controllers/ee/dashboard/projects_controller_spec.rb
View file @
0510532f
...
@@ -45,12 +45,6 @@ RSpec.describe Dashboard::ProjectsController do
...
@@ -45,12 +45,6 @@ RSpec.describe Dashboard::ProjectsController do
expect
(
assigns
(
:projects
).
count
).
to
eq
(
1
)
expect
(
assigns
(
:projects
).
count
).
to
eq
(
1
)
end
end
it
'accounts total removable projects'
do
subject
expect
(
assigns
(
:removed_projects_count
).
count
).
to
eq
(
2
)
end
end
end
context
'for non-admin users'
,
:saas
do
context
'for non-admin users'
,
:saas
do
...
@@ -89,13 +83,14 @@ RSpec.describe Dashboard::ProjectsController do
...
@@ -89,13 +83,14 @@ RSpec.describe Dashboard::ProjectsController do
with_them
do
with_them
do
before
do
before
do
allow
(
Kaminari
.
config
).
to
receive
(
:default_per_page
).
and_return
(
10
)
stub_ee_application_setting
(
should_check_namespace_plan:
should_check_namespace_plan
)
stub_ee_application_setting
(
should_check_namespace_plan:
should_check_namespace_plan
)
end
end
it
'accounts total removable projects'
do
it
'accounts total removable projects'
do
subject
subject
expect
(
assigns
(
:
removed_projects_count
).
count
).
to
eq
(
removed_projects_count
)
expect
(
assigns
(
:
projects
).
count
).
to
eq
(
removed_projects_count
)
end
end
end
end
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