app/helpers/hydra/hydra_helper_behavior.rb in hydra-head-4.0.3 vs app/helpers/hydra/hydra_helper_behavior.rb in hydra-head-4.1.0

- old
+ new

@@ -1,26 +1,32 @@ require "hydra/submission_workflow" +require 'deprecation' + module Hydra::HydraHelperBehavior + extend Deprecation + self.deprecation_horizon = 'hydra-head 5.x' include Hydra::SubmissionWorkflow + ## Deprecation functionality provided by Blacklight # collection of stylesheet links to be rendered in the <head> - def stylesheet_links - @stylesheet_links ||= [] - end - + # def stylesheet_links + # @stylesheet_links ||= [] + # end # collection of javascript includes to be rendered in the <head> - def javascript_includes - @javascript_includes ||= [] - end + # def javascript_includes + # @javascript_includes ||= [] + # end def async_load_tag( url, tag ) # Commenting out becasue async_load is provieded by a JS file that we're not currently loading. # javascript_tag do # "window._token='#{form_authenticity_token}'" # "async_load('#{url}', '\##{tag}');" # end end + deprecation_deprecate :async_load_tag + def link_to_multifacet( name, args={} ) facet_params = {} options = {} args.each_pair do |k,v| @@ -34,10 +40,11 @@ end end link_to(name, catalog_index_path(facet_params), options).html_safe end + deprecation_deprecate :link_to_multifacet def edit_and_browse_links result = "" if params[:action] == "edit" result << "<a href=\"#{catalog_path(@document[:id], :viewing_context=>"browse")}\" class=\"browse toggle\">Switch to browse view</a>" @@ -55,10 +62,11 @@ else count = response.docs.total end pluralize(count, 'document') end + deprecation_deprecate :grouped_result_count def grouping_facet fields = Hash[sort_fields] case h(params[:sort]) when fields['date -'] @@ -85,10 +93,11 @@ return item.hits else return default_response end end + deprecation_deprecate :facet_value_hits def get_html_data_with_label(doc, label, field_string, opts={}) if opts[:default] && !doc[field_string] doc[field_string] = opts[:default] end @@ -123,10 +132,11 @@ end text += "</dd>" text end end + deprecation_deprecate :get_html_data_with_label def get_textile_data_with_label(doc, label, field_string, opts={}) if opts[:default] && !doc[field_string] doc[field_string] = opts[:default] end @@ -146,9 +156,10 @@ end text += "</dd>" text end end + deprecation_deprecate :get_textile_data_with_label def render_previous_workflow_steps previous_show_partials(params[:wf_step]).map{|partial| render partial}.join end