File: show.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (33 lines) | stat: -rw-r--r-- 1,681 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
- @hide_top_links = true
- breadcrumb_title _('Search')
- page_title @search_term
- nav 'search'
- if params[:group_id].present?
  = hidden_field_tag :group_id, params[:group_id]
- if params[:project_id].present?
  = hidden_field_tag :project_id, params[:project_id]
- group_attributes = @group&.attributes&.slice('id', 'name')&.merge(full_name: @group&.full_name)
- project_attributes = @project&.attributes&.slice('id', 'namespace_id', 'name')&.merge(name_with_namespace: @project&.name_with_namespace)

- if @search_results && !(@search_results.respond_to?(:failed?) && @search_results.failed?(@scope))
  - if @search_service_presenter.without_count?
    - page_description(_("%{scope} results for term '%{term}'") % { scope: @scope, term: @search_term })
  - else
    - page_description(_("%{count} %{scope} for term '%{term}'") % { count: @search_results.formatted_count(@scope), scope: @scope, term: @search_term })
  - page_card_attributes("Namespace" => @group&.full_path, "Project" => @project&.full_path)

#js-search-topbar{ data: { "default-branch-name": @project&.default_branch } }
.results.lg:gl-flex.gl-mt-0
  #js-search-sidebar{
    data: {
      navigation_json: search_navigation_json,
      search_type: search_service.search_type,
      advanced_search_available: @search_service_presenter.advanced_search_enabled?.to_s,
      zoekt_available: @search_service_presenter.zoekt_enabled?.to_s,
      search_level: search_service.level,
      group_initial_json: group_attributes.to_json,
      project_initial_json: project_attributes.to_json,
      ref: @project.present? ? repository_ref(@project) : nil
    } }
  - if @search_term
    = render 'search/results'