Commit 1c4a0e09 authored by Jonas Wälter's avatar Jonas Wälter

Polish 'Explore topics' page

parent 8a0c21b4
......@@ -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
......
......@@ -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
......
= 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]
......
.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
......
......@@ -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 ""
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment