Sha256: 8e5f82f2f06a2dc3c8340e72b73c286f3485f62a3d26ff6ede7e8f6da172a057

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

ruby:
  show_nav         ||= false
  navigation_items ||= []
  records          ||= []

ul.search-results.js-search-results

  - if show_nav && @fae_topnav_items.present?

    - @fae_topnav_items.each do |item|
      li.search-topnav
        a href=item[:nested_path] = item[:text]
        - if item[:subitems]
          ul
            - item[:subitems].each do |subitem|
              li: a href=subitem[:nested_path] = subitem[:text]

  - elsif navigation_items.present? || records.present?

    - if navigation_items.present?
      - navigation_items.each do |item|
        li: a.search-nav-item href=item[:nested_path] = item[:text]

    - if records.present?
      - records.each do |item|
        - begin
          - parent = item.respond_to?(:fae_parent) ? item.fae_parent : nil
          - edit_path = edit_polymorphic_path([main_app, fae_scope.to_sym, parent, item])
          li
            a href=edit_path
              span.search-record-label = item.class.name
              = item.fae_display_field
        - rescue

  - else

    li = t('fae.navbar.no_results')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fae-rails-3.0.0 app/views/fae/application/_global_search_results.html.slim
fae-rails-2.2.0 app/views/fae/application/_global_search_results.html.slim