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

Polish 'Explore topics' page

parent 8a0c21b4
...@@ -52,9 +52,9 @@ module Projects ...@@ -52,9 +52,9 @@ module Projects
case params[:sort] case params[:sort]
when 'name_asc' then 'tags.name asc' when 'name_asc' then 'tags.name asc'
when 'name_desc' then 'tags.name desc' when 'name_desc' then 'tags.name desc'
when 'popularity_desc' then 'count desc' when 'popularity_desc' then 'count desc, tags.name asc'
else else
'count desc' 'count desc, tags.name asc'
end end
end end
end end
......
...@@ -267,6 +267,7 @@ module Nav ...@@ -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: '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: '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: '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.add_secondary_menu_item(id: 'create', title: _('Create new project'), href: new_project_path)
builder.build builder.build
end end
......
= form_tag filter_topics_path, method: :get, class: "topic-filter-form js-topic-filter-form", id: 'topic-filter-form' do |f| = 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? - if params[:sort].present?
= hidden_field_tag :sort, params[:sort] = 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.gl-mb-5
.gl-card-body .gl-card-body
.gl-float-left.gl-mr-4
= sprite_icon('label', size: 32)
.topic-info .topic-info
%h5.gl-m-0 %h5.gl-m-0
= topic.name = topic.name
......
...@@ -14594,6 +14594,9 @@ msgstr "" ...@@ -14594,6 +14594,9 @@ msgstr ""
msgid "Filter by name" msgid "Filter by name"
msgstr "" msgstr ""
msgid "Filter by name..."
msgstr ""
msgid "Filter by test cases that are currently archived." msgid "Filter by test cases that are currently archived."
msgstr "" msgstr ""
...@@ -17290,6 +17293,9 @@ msgstr "" ...@@ -17290,6 +17293,9 @@ msgstr ""
msgid "Import project members" msgid "Import project members"
msgstr "" msgstr ""
msgid "Import project/repository"
msgstr ""
msgid "Import projects from Bitbucket" msgid "Import projects from Bitbucket"
msgstr "" msgstr ""
...@@ -35827,9 +35833,6 @@ msgstr "" ...@@ -35827,9 +35833,6 @@ msgstr ""
msgid "TopicsEmptyState|There are no topics to show." msgid "TopicsEmptyState|There are no topics to show."
msgstr "" msgstr ""
msgid "Topics|Search by name"
msgstr ""
msgid "Total" msgid "Total"
msgstr "" msgstr ""
......
...@@ -188,6 +188,11 @@ RSpec.describe Nav::TopNavHelper do ...@@ -188,6 +188,11 @@ RSpec.describe Nav::TopNavHelper do
href: '/explore', href: '/explore',
id: 'explore', id: 'explore',
title: 'Explore projects' 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) 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