Skip to content

Commit

Permalink
correct titles for resource-type facet
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 18, 2018
1 parent 07ba1e3 commit f223890
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/concerns/facetable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def facet_by_region(arr)

def facet_by_resource_type(arr)
arr.map do |hsh|
{ "id" => hsh["key"].underscore.dasherize,
{ "id" => hsh["key"],
"title" => hsh["key"].underscore.humanize,
"count" => hsh["doc_count"] }
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def self.query_aggregations
created: { date_histogram: { field: 'created', interval: 'year', min_doc_count: 1 } },
registered: { date_histogram: { field: 'registered', interval: 'year', min_doc_count: 1 } },
providers: { terms: { field: 'provider_id', size: 10, min_doc_count: 1 } },
clients: { terms: { field: 'client_id', size: 10, min_doc_count: 1 } },
clients: { terms: { field: 'client_id', size: 25, min_doc_count: 1 } },
prefixes: { terms: { field: 'prefix', size: 10, min_doc_count: 1 } },
schema_versions: { terms: { field: 'schema_version', size: 10, min_doc_count: 1 } },
sources: { terms: { field: 'source', size: 10, min_doc_count: 1 } }
Expand Down Expand Up @@ -281,7 +281,7 @@ def uid
end

def resource_type_id
resource_type_general.downcase if resource_type_general.present?
resource_type_general.underscore.dasherize if resource_type_general.present?
end

def media_ids
Expand Down

0 comments on commit f223890

Please sign in to comment.