app/controllers/search_controller.rb in umlaut-3.3.1 vs app/controllers/search_controller.rb in umlaut-4.0.0.beta1
- old
+ new
@@ -29,21 +29,21 @@
class SearchController < UmlautController
@@search_batch_size = 20
@@az_batch_size = 20
@@autocomplete_limit = 15
- layout :layout_name, :except => [ :opensearch, :opensearch_description ]
+ layout :layout_name
before_filter :normalize_params
def initialize(*params)
super(*params)
self.extend( search_method_module )
end
def index
- @page_title = "Journals"
+ @page_title = t('umlaut.search.journals_page_name')
journals()
end
def journals
@submit_hash = params["umlaut.display_coins"] ? {:controller=>'resolve', :action=>'display_coins'} : {:controller=>'search', :action=>'journal_search'}
@@ -118,12 +118,11 @@
# Calculate end-result number for display
@end_result_num = @start_result_num + @batch_size - 1
if @end_result_num > @hits
@end_result_num = @hits
end
- # TODO: Make page titles configurable
- @page_title = "Browse by Journal Title: #{params['id']}"
+ @page_title = t('umlaut.search.browse_by_jtitle', :query => params['id'])
# Use our ordinary search displayer to display
# It'll notice the action and do just a bit of special stuff.
render(:template => "search/journal_search")
end
@@ -141,13 +140,9 @@
metadata = co.referent.metadata
{:object_id => metadata["object_id"], :title => (metadata["jtitle"] || metadata["btitle"] || metadata["title"])}
end
end
render :text => @titles.to_json, :content_type => "application/json"
- end
-
- def opensearch_description
- @headers['Content-Type'] = 'application/opensearchdescription+xml'
end
protected
# We intentionally use a method calculated at request-time for layout,
\ No newline at end of file