gitlab-org--gitlab-foss/app/views/shared/projects/_search_bar.html.haml

31 lines
1.8 KiB
Text
Raw Normal View History

- @sort ||= sort_value_latest_activity
- is_explore = local_assigns.fetch(:is_explore, false)
- is_explore_trending = local_assigns.fetch(:is_explore_trending, false)
- without_tabs = local_assigns.fetch(:without_tabs, false)
.filtered-search-block.row-content-block.bt-0
.filtered-search-wrapper.d-flex.flex-nowrap.flex-column.flex-sm-wrap.flex-sm-row.flex-xl-nowrap
- unless without_tabs
.filtered-search-nav.d-flex.mb-2.mb-lg-0
= render 'dashboard/projects/nav', is_explore: is_explore, is_explore_trending: is_explore_trending
.filtered-search.d-flex.w-100.mb-2.mb-lg-0{ class: without_tabs ? "extended-filtered-search-box ml-0 mb-2 mb-lg-0" : "ml-0 ml-sm-3" }
.btn-group.w-100{ role: "group" }
.btn-group.w-100{ role: "group" }
.filtered-search-box.m-0
.filtered-search-box-input-container.pl-2
= render 'shared/projects/search_form', admin_view: false, search_form_placeholder: _("Search projects...")
-# TODO: since we are no longer triggering search when we type
-# we might be able to remove app/assets/javascripts/projects_list.js
%button.btn.btn-secondary{ type: 'submit', form: 'project-filter-form' }
= sprite_icon('search', size: 16, css_class: 'search-icon ')
.filtered-search-dropdown.d-flex.flex-row.align-items-center.mb-2.m-sm-0#filtered-search-visibility-dropdown
.filtered-search-dropdown-label.p-0.pl-sm-3.font-weight-bold
%span
= _("Visibility")
= render 'explore/projects/filter', has_label: true
.filtered-search-dropdown.d-flex.flex-row.align-items-center.m-sm-0#filtered-search-sorting-dropdown
.filtered-search-dropdown-label.p-0.pl-sm-3.font-weight-bold
%span
= _("Sort by")
= render 'shared/projects/sort_dropdown'