app/models/toc_item.rb
# TODO - really, this list should be in a config of some kind.
really, this list should be in a config of some kind.
really this list should be in a config of some kind .
def exclude_from_details
      @@exclude_from_details ||= cached('exclude_from_details') do
        temp = []
        temp = temp | ["Education", "Education Resources", "High School Lab Series"] 
        temp = temp | ["Identification Resources"] 
        temp = temp | ["Search the Web"] 
        temp = temp | ["Literature References", "Biodiversity Heritage Library", "Bibliographies", "Bibliography"] 
        temp = temp | ["Biomedical Terms", "On the Web"] 
        temp = temp | ["Related Names", "Synonyms", "Common Names"]
        temp = temp | ["Content Summary"] 
        temp = temp | ["Content Partners"] 
        temp = temp | ["Citizen Science"]
        temp = temp | ["Citizen Science links"]
        temp.collect{ |label| TocItem.cached_find_translated(:label, label, 'en', find_all: true) }.flatten.compact
      end
    end
def exclude_from_details @@exclude_from_details ||= cached ( 'exclude_from_details' ) do temp = [ ] temp = temp | [ "Education" , "Education Resources" , "High School Lab Series" ] temp = temp | [ "Identification Resources" ] temp = temp | [ "Search the Web" ] temp = temp | [ "Literature References" , "Biodiversity Heritage Library" , "Bibliographies" , "Bibliography" ] temp = temp | [ "Biomedical Terms" , "On the Web" ] temp = temp | [ "Related Names" , "Synonyms" , "Common Names" ] temp = temp | [ "Content Summary" ] temp = temp | [ "Content Partners" ] temp = temp | [ "Citizen Science" ] temp = temp | [ "Citizen Science links" ] temp . collect { | label | TocItem . cached_find_translated ( :label , label , 'en' , find_all : true ) } . flatten . compact end end
TODO - really, this list should be in a config of some kind.
TODO - really this list should be in a config of some kind .
# Education: # to Resource tab # Physical Description: # to Resource tab # References and More Information: # to be removed # to Literature Tab # to Resources tab # Names and Taxonomy: ---> Names Tab # Page Statistics: # to Updates tab # Resources: # to Resource tab # Citizen Science - to Resource tab