Sha256: 5a4ecc259e34886ae637c7d09831e859e033e0550b631bf54f94a163680bb071

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

json.links do
  json.self url_for(search_state.to_h.merge(only_path: false))
  json.prev url_for(search_state.to_h.merge(only_path: false, page: @response.prev_page.to_s)) if @response.prev_page
  json.next url_for(search_state.to_h.merge(only_path: false, page: @response.next_page.to_s)) if @response.next_page
  json.last url_for(search_state.to_h.merge(only_path: false, page: @response.total_pages.to_s))
end

json.meta do
  json.pages @presenter.pagination_info
end

json.data do
  json.array! @presenter.documents do |document|
    json.id document.id
  end
end

json.included do
  json.array! search_fields do |(label, key)|
    json.type "search_field"
    json.id key
    json.attributes do
      json.label label
    end
    json.links do
      json.self url_for(search_state.to_h.merge(search_field: key, only_path: false))
    end
  end

  json.array! active_sort_fields do |key, field|
    json.type "sort"
    json.id key
    json.attributes do
      json.label field.label
    end
    json.links do
      json.self url_for(search_state.to_h.merge(sort: key, only_path: false))
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
geoblacklight_admin-0.7.0 app/views/admin/ids/index.json.jbuilder
geoblacklight_admin-0.6.3 app/views/admin/ids/index.json.jbuilder
geoblacklight_admin-0.6.2 app/views/admin/ids/index.json.jbuilder
geoblacklight_admin-0.6.1 app/views/admin/ids/index.json.jbuilder
geoblacklight_admin-0.6.0 app/views/admin/ids/index.json.jbuilder