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
96e2fdad
Commit
96e2fdad
authored
Apr 28, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
e2b3ad5b
55ce545d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
app/models/project.rb
app/models/project.rb
+1
-0
app/presenters/project_presenter.rb
app/presenters/project_presenter.rb
+4
-4
No files found.
app/models/project.rb
View file @
96e2fdad
...
...
@@ -129,6 +129,7 @@ class Project < ApplicationRecord
after_create
:check_repository_absence!
acts_as_ordered_taggable
alias_method
:topics
,
:tag_list
attr_accessor
:old_path_with_namespace
attr_accessor
:template_name
...
...
app/presenters/project_presenter.rb
View file @
96e2fdad
...
...
@@ -390,16 +390,16 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
end
def
topics_to_show
project
.
t
ag_list
.
take
(
MAX_TOPICS_TO_SHOW
)
# rubocop: disable CodeReuse/ActiveRecord
project
.
t
opics
.
take
(
MAX_TOPICS_TO_SHOW
)
# rubocop: disable CodeReuse/ActiveRecord
end
def
topics_not_shown
project
.
t
ag_list
-
topics_to_show
project
.
t
opics
-
topics_to_show
end
def
count_of_extra_topics_not_shown
if
project
.
t
ag_list
.
count
>
MAX_TOPICS_TO_SHOW
project
.
t
ag_list
.
count
-
MAX_TOPICS_TO_SHOW
if
project
.
t
opics
.
count
>
MAX_TOPICS_TO_SHOW
project
.
t
opics
.
count
-
MAX_TOPICS_TO_SHOW
else
0
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