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
1c4a0e09
Commit
1c4a0e09
authored
Jun 28, 2021
by
Jonas Wälter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish 'Explore topics' page
parent
8a0c21b4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
9 deletions
+21
-9
app/finders/projects/topics_finder.rb
app/finders/projects/topics_finder.rb
+2
-2
app/helpers/nav/top_nav_helper.rb
app/helpers/nav/top_nav_helper.rb
+1
-0
app/views/shared/topics/_search_form.html.haml
app/views/shared/topics/_search_form.html.haml
+6
-1
app/views/shared/topics/_topic.html.haml
app/views/shared/topics/_topic.html.haml
+1
-3
locale/gitlab.pot
locale/gitlab.pot
+6
-3
spec/helpers/nav/top_nav_helper_spec.rb
spec/helpers/nav/top_nav_helper_spec.rb
+5
-0
No files found.
app/finders/projects/topics_finder.rb
View file @
1c4a0e09
...
...
@@ -52,9 +52,9 @@ module Projects
case
params
[
:sort
]
when
'name_asc'
then
'tags.name asc'
when
'name_desc'
then
'tags.name desc'
when
'popularity_desc'
then
'count desc'
when
'popularity_desc'
then
'count desc
, tags.name asc
'
else
'count desc'
'count desc
, tags.name asc
'
end
end
end
...
...
app/helpers/nav/top_nav_helper.rb
View file @
1c4a0e09
...
...
@@ -267,6 +267,7 @@ module Nav
builder
.
add_primary_menu_item
(
id:
'your'
,
title:
_
(
'Your projects'
),
href:
dashboard_projects_path
)
builder
.
add_primary_menu_item
(
id:
'starred'
,
title:
_
(
'Starred projects'
),
href:
starred_dashboard_projects_path
)
builder
.
add_primary_menu_item
(
id:
'explore'
,
title:
_
(
'Explore projects'
),
href:
explore_root_path
)
builder
.
add_primary_menu_item
(
id:
'topics'
,
title:
_
(
'Explore topics'
),
href:
topics_explore_projects_path
)
builder
.
add_secondary_menu_item
(
id:
'create'
,
title:
_
(
'Create new project'
),
href:
new_project_path
)
builder
.
build
end
...
...
app/views/shared/topics/_search_form.html.haml
View file @
1c4a0e09
=
form_tag
filter_topics_path
,
method: :get
,
class:
"topic-filter-form js-topic-filter-form"
,
id:
'topic-filter-form'
do
|
f
|
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
s_
(
'Topics|Search by name'
),
class:
'topic-filter-form-field form-control js-topics-list-filter qa-topics-filter'
,
spellcheck:
false
,
id:
'topic-filter-form-field'
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
s_
(
'Filter by name...'
),
class:
'topic-filter-form-field form-control input-short js-topics-list-filter'
,
spellcheck:
false
,
id:
'topic-filter-form-field'
,
autofocus:
local_assigns
[
:autofocus
]
-
if
params
[
:sort
].
present?
=
hidden_field_tag
:sort
,
params
[
:sort
]
...
...
app/views/shared/topics/_topic.html.haml
View file @
1c4a0e09
.col-lg-
3.col-md-4
.col-sm-12
.col-lg-
2.col-md-3
.col-sm-12
.gl-card.gl-mb-5
.gl-card-body
.gl-float-left.gl-mr-4
=
sprite_icon
(
'label'
,
size:
32
)
.topic-info
%h5
.gl-m-0
=
topic
.
name
...
...
locale/gitlab.pot
View file @
1c4a0e09
...
...
@@ -14594,6 +14594,9 @@ msgstr ""
msgid "Filter by name"
msgstr ""
msgid "Filter by name..."
msgstr ""
msgid "Filter by test cases that are currently archived."
msgstr ""
...
...
@@ -17290,6 +17293,9 @@ msgstr ""
msgid "Import project members"
msgstr ""
msgid "Import project/repository"
msgstr ""
msgid "Import projects from Bitbucket"
msgstr ""
...
...
@@ -35827,9 +35833,6 @@ msgstr ""
msgid "TopicsEmptyState|There are no topics to show."
msgstr ""
msgid "Topics|Search by name"
msgstr ""
msgid "Total"
msgstr ""
...
...
spec/helpers/nav/top_nav_helper_spec.rb
View file @
1c4a0e09
...
...
@@ -188,6 +188,11 @@ RSpec.describe Nav::TopNavHelper do
href:
'/explore'
,
id:
'explore'
,
title:
'Explore projects'
),
::
Gitlab
::
Nav
::
TopNavMenuItem
.
build
(
href:
'/explore/projects/topics'
,
id:
'topics'
,
title:
'Explore topics'
)
]
expect
(
projects_view
[
:linksPrimary
]).
to
eq
(
expected_links_primary
)
...
...
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