diff --git a/app/assets/images/homepage/1897chif.jpg b/app/assets/images/homepage/1897chif.jpg new file mode 100644 index 0000000..761c5c9 Binary files /dev/null and b/app/assets/images/homepage/1897chif.jpg differ diff --git a/app/assets/images/homepage/Abbotfamily4.jpg b/app/assets/images/homepage/Abbotfamily4.jpg new file mode 100644 index 0000000..337f344 Binary files /dev/null and b/app/assets/images/homepage/Abbotfamily4.jpg differ diff --git a/app/assets/images/homepage/Aladdin19231024_1.jpg b/app/assets/images/homepage/Aladdin19231024_1.jpg new file mode 100644 index 0000000..20dafa8 Binary files /dev/null and b/app/assets/images/homepage/Aladdin19231024_1.jpg differ diff --git a/app/assets/images/homepage/BourgeoiseATFscrapbookcovercloseup1024_1.jpg b/app/assets/images/homepage/BourgeoiseATFscrapbookcovercloseup1024_1.jpg new file mode 100644 index 0000000..274299d Binary files /dev/null and b/app/assets/images/homepage/BourgeoiseATFscrapbookcovercloseup1024_1.jpg differ diff --git a/app/assets/images/homepage/Brinleyreceipts_2.jpg b/app/assets/images/homepage/Brinleyreceipts_2.jpg new file mode 100644 index 0000000..5b8d823 Binary files /dev/null and b/app/assets/images/homepage/Brinleyreceipts_2.jpg differ diff --git a/app/assets/images/homepage/CityofGreenBayPostcardCaptBacon1024_1.jpg b/app/assets/images/homepage/CityofGreenBayPostcardCaptBacon1024_1.jpg new file mode 100644 index 0000000..9f906f7 Binary files /dev/null and b/app/assets/images/homepage/CityofGreenBayPostcardCaptBacon1024_1.jpg differ diff --git a/app/assets/images/homepage/EHTheKillers1.jpg b/app/assets/images/homepage/EHTheKillers1.jpg new file mode 100644 index 0000000..6c7d08b Binary files /dev/null and b/app/assets/images/homepage/EHTheKillers1.jpg differ diff --git a/app/assets/images/homepage/Fremont_Pressed_flowers.jpg b/app/assets/images/homepage/Fremont_Pressed_flowers.jpg new file mode 100644 index 0000000..27982d9 Binary files /dev/null and b/app/assets/images/homepage/Fremont_Pressed_flowers.jpg differ diff --git a/app/assets/images/homepage/GriffinCassettePHartCenterDedicationSpeech1024_1.jpg b/app/assets/images/homepage/GriffinCassettePHartCenterDedicationSpeech1024_1.jpg new file mode 100644 index 0000000..9e74a04 Binary files /dev/null and b/app/assets/images/homepage/GriffinCassettePHartCenterDedicationSpeech1024_1.jpg differ diff --git a/app/assets/images/homepage/LakeSuperiorScenery.jpg b/app/assets/images/homepage/LakeSuperiorScenery.jpg new file mode 100644 index 0000000..56fb264 Binary files /dev/null and b/app/assets/images/homepage/LakeSuperiorScenery.jpg differ diff --git a/app/assets/images/homepage/PortlandWhiteMountainsStage.jpg b/app/assets/images/homepage/PortlandWhiteMountainsStage.jpg new file mode 100644 index 0000000..c657819 Binary files /dev/null and b/app/assets/images/homepage/PortlandWhiteMountainsStage.jpg differ diff --git a/app/assets/images/homepage/Portrait-Grosvenor-Townsend.jpg b/app/assets/images/homepage/Portrait-Grosvenor-Townsend.jpg new file mode 100644 index 0000000..42dc3ee Binary files /dev/null and b/app/assets/images/homepage/Portrait-Grosvenor-Townsend.jpg differ diff --git a/app/assets/images/homepage/Rohland.2.jpg b/app/assets/images/homepage/Rohland.2.jpg new file mode 100644 index 0000000..bcd20b7 Binary files /dev/null and b/app/assets/images/homepage/Rohland.2.jpg differ diff --git a/app/assets/images/homepage/SaraPurmet1024_1.jpg b/app/assets/images/homepage/SaraPurmet1024_1.jpg new file mode 100644 index 0000000..f8d1c32 Binary files /dev/null and b/app/assets/images/homepage/SaraPurmet1024_1.jpg differ diff --git a/app/assets/images/homepage/Tea-fight_EdwardWilliamsClay.jpg b/app/assets/images/homepage/Tea-fight_EdwardWilliamsClay.jpg new file mode 100644 index 0000000..4fc239c Binary files /dev/null and b/app/assets/images/homepage/Tea-fight_EdwardWilliamsClay.jpg differ diff --git a/app/assets/images/homepage/YoungManAfraidofHisHorses.jpg b/app/assets/images/homepage/YoungManAfraidofHisHorses.jpg new file mode 100644 index 0000000..dc17221 Binary files /dev/null and b/app/assets/images/homepage/YoungManAfraidofHisHorses.jpg differ diff --git a/app/assets/images/homepage/bhl_bl001282_full_897_492__0_native.jpg b/app/assets/images/homepage/bhl_bl001282_full_897_492__0_native.jpg new file mode 100644 index 0000000..5d6ec0b Binary files /dev/null and b/app/assets/images/homepage/bhl_bl001282_full_897_492__0_native.jpg differ diff --git a/app/assets/images/homepage/bhl_bl002207_full_5280_5197__0_native.jpg b/app/assets/images/homepage/bhl_bl002207_full_5280_5197__0_native.jpg new file mode 100644 index 0000000..d3fae78 Binary files /dev/null and b/app/assets/images/homepage/bhl_bl002207_full_5280_5197__0_native.jpg differ diff --git a/app/assets/images/homepage/bhl_bl004042_full_4800_6794__0_native.jpg b/app/assets/images/homepage/bhl_bl004042_full_4800_6794__0_native.jpg new file mode 100644 index 0000000..d1b0636 Binary files /dev/null and b/app/assets/images/homepage/bhl_bl004042_full_4800_6794__0_native.jpg differ diff --git a/app/assets/images/homepage/bhl_hs10699_full_5748_4490__0_native.jpg b/app/assets/images/homepage/bhl_hs10699_full_5748_4490__0_native.jpg new file mode 100644 index 0000000..671eb1d Binary files /dev/null and b/app/assets/images/homepage/bhl_hs10699_full_5748_4490__0_native.jpg differ diff --git a/app/assets/images/homepage/bhl_hs14631_full_3680_2456__0_native.jpg b/app/assets/images/homepage/bhl_hs14631_full_3680_2456__0_native.jpg new file mode 100644 index 0000000..59e6761 Binary files /dev/null and b/app/assets/images/homepage/bhl_hs14631_full_3680_2456__0_native.jpg differ diff --git a/app/assets/images/homepage/bhl_hs15706_full_5148_3088__0_native.jpg b/app/assets/images/homepage/bhl_hs15706_full_5148_3088__0_native.jpg new file mode 100644 index 0000000..f2555a4 Binary files /dev/null and b/app/assets/images/homepage/bhl_hs15706_full_5148_3088__0_native.jpg differ diff --git a/app/assets/images/homepage/bhl_hs17962_full_5615_4459__0_native.jpg b/app/assets/images/homepage/bhl_hs17962_full_5615_4459__0_native.jpg new file mode 100644 index 0000000..d17919a Binary files /dev/null and b/app/assets/images/homepage/bhl_hs17962_full_5615_4459__0_native.jpg differ diff --git a/app/assets/images/homepage/sclib_24627_0028_full_872_624__0_native.jpg b/app/assets/images/homepage/sclib_24627_0028_full_872_624__0_native.jpg new file mode 100644 index 0000000..3982986 Binary files /dev/null and b/app/assets/images/homepage/sclib_24627_0028_full_872_624__0_native.jpg differ diff --git a/app/assets/images/homepage/wcl1ic_wcl004061_full_775_501__0_native.jpg b/app/assets/images/homepage/wcl1ic_wcl004061_full_775_501__0_native.jpg new file mode 100644 index 0000000..4560c64 Binary files /dev/null and b/app/assets/images/homepage/wcl1ic_wcl004061_full_775_501__0_native.jpg differ diff --git a/app/helpers/catalog_helper.rb b/app/helpers/catalog_helper.rb new file mode 100644 index 0000000..c6ca6e1 --- /dev/null +++ b/app/helpers/catalog_helper.rb @@ -0,0 +1,7 @@ +module CatalogHelper + include Blacklight::CatalogHelperBehavior + + def has_no_query + request.path == "/" && params[:q].blank? && params[:f].blank? + end +end \ No newline at end of file diff --git a/app/helpers/homepage_helper.rb b/app/helpers/homepage_helper.rb new file mode 100644 index 0000000..f9dd2a9 --- /dev/null +++ b/app/helpers/homepage_helper.rb @@ -0,0 +1,35 @@ +module HomepageHelper + def config_features + @config_features ||= begin + YAML.safe_load(::File.read(config_filename)) + rescue Errno::ENOENT + {} + end + end + + def config_filename + Rails.root.join('config', 'featured_images.yml') + end + + def random_feature + img_index = config_features['image_list'].keys.sample + config_features['image_list'][img_index] + end + + # Image can be an absolute URL to any external image, or alternatively, + # a name of a local file within assets/images/homepage + def feature_img_url(image) + return image if image.match(/^#{URI.regexp(%w[http https])}$/) + + image_url(['homepage', image].join('/')) + end + + def collection_count_home + search_service = Blacklight.repository_class.new(blacklight_config) + query = search_service.search( + q: 'level_sim:Collection', + rows: 1 + ) + query.response['numFound'] + end +end \ No newline at end of file diff --git a/app/helpers/repository_helper.rb b/app/helpers/repository_helper.rb new file mode 100644 index 0000000..3a407e3 --- /dev/null +++ b/app/helpers/repository_helper.rb @@ -0,0 +1,9 @@ +module RepositoryHelper + # Modified from UM Arclight/DUL Arclight + # @return [String] handles the formatting of "city, state zip, country" + def city_state_zip_country(repository) + state_zip = repository.state + state_zip += " #{repository.zip}" if repository.zip + [ repository.city, state_zip, repository.country ].compact.join(", ") + end +end \ No newline at end of file diff --git a/app/views/arclight/repositories/_repository.html.erb b/app/views/arclight/repositories/_repository.html.erb index c6ee9a3..3933f1c 100755 --- a/app/views/arclight/repositories/_repository.html.erb +++ b/app/views/arclight/repositories/_repository.html.erb @@ -58,13 +58,18 @@

<%= t('arclight.views.repositories.address') %>:

- <% %i[building address1 address2 city_state_zip_country].each do |f| %> + <% %i[building address1 address2].each do |f| %> <% if repository.send(f).present? %>
<%= repository.send(f) %>
<% end %> <% end %> + <% if repository.city and repository.state and repository.zip and repository.country %> +
+ <%= city_state_zip_country(repository) %> +
+ <% end %>
diff --git a/app/views/catalog/_home.html.erb b/app/views/catalog/_home.html.erb new file mode 100644 index 0000000..42c4574 --- /dev/null +++ b/app/views/catalog/_home.html.erb @@ -0,0 +1,65 @@ +<% @page_title = t('arclight.views.home.title', application_name: application_name) %> +<% @random_feature = random_feature %> +
+
+
+
+
Featured image: <%= @random_feature['caption_html'].html_safe %>
+
+ +
+

Find Archival Materials

+

Detailed inventories of <%= number_with_delimiter(collection_count_home) %> collections

+ + <%#= render_search_bar %> + +
+ + + <%#= render 'search_extra_controls' %> + +
+ + +
Browse All Repositories
+
+
+
+
+ + <%# Configurable alert banner %> + <%# keys in config/locales/um_arclight.en.yml %> + <% if I18n.exists?('um_arclight.home.alert') %> + + <% end %> + +
+
+
+
+ info +
+

<%= t('um_arclight.home.about.heading') %>

+
+
+ <%= t('um_arclight.home.about.text_html').html_safe %> +
+
+
+
\ No newline at end of file diff --git a/app/views/catalog/index.html.erb b/app/views/catalog/index.html.erb new file mode 100644 index 0000000..e7ebcfb --- /dev/null +++ b/app/views/catalog/index.html.erb @@ -0,0 +1,19 @@ +<% content_for(:head) do %> + +<% end %> +<% content_for(:sidebar) do %> + <% conf = blacklight_config.view_config(document_index_view_type) %> + <%= render conf.sidebar_component.new(blacklight_config: blacklight_config, + response: @response, + view_config: conf) %> +<% end %> + +<%# Overriding base template so we use our own check for a query, since has_search_parameters always returns true %> +<%# with our Blacklight config. %> +<% if has_no_query %> + <%# if there are no input/search related params, display the "home" partial -%> + <%= render 'home' %> + <%= render 'shared/sitelinks_search_box' %> +<% else %> + <%= render 'search_results' %> +<% end %> diff --git a/config/featured_images.yml b/config/featured_images.yml new file mode 100644 index 0000000..8eaa783 --- /dev/null +++ b/config/featured_images.yml @@ -0,0 +1,115 @@ +image_list: + 1: + caption_html: | + "It's so simple" Jell-O, America's most famous dessert from + Culinary Ephemera: Gelatin and Tapioca + image: sclib_24627_0028_full_872_624__0_native.jpg + 2: + caption_html: | + Souvenir program from the November 25, 1897 University of Chicago v. Michigan football game + from Athletic Department (University of Michigan) records + image: 1897chif.jpg + 3: + caption_html: | + African American family, 1889? from + David V. Tinder Collection of Michigan Photography + image: wcl1ic_wcl004061_full_775_501__0_native.jpg + 4: + caption_html: | + Sara Purmet, from + Abel Bingham Family Papers, 1765-1964 + image: SaraPurmet1024_1.jpg + 5: + caption_html: | + Excerpts of Michigan Senator Robert P. Griffin’s speech at the Dedication of the Phil Hart Sand Dunes Visitor Center from + Senator Robert P. Griffin Papers Collection + image: GriffinCassettePHartCenterDedicationSpeech1024_1.jpg + 6: + caption_html: | + "AEF in France" photographic album cover from + Mary M. Bourgeois Family Papers + image: BourgeoiseATFscrapbookcovercloseup1024_1.jpg + 7: + caption_html: | + City of Green Bay ferry postcard from + Capt. William C. Bacon, Michigan Car Ferries Collection + image: CityofGreenBayPostcardCaptBacon1024_1.jpg + 8: + caption_html: | + 1923 Aladdin Homes Catalog from + Aladdin Company Collection + image: Aladdin19231024_1.jpg + 9: + caption_html: | + "The Killers" one-sheet movie poster (circa 1964) from + Ernest Hemingway Collection + image: EHTheKillers1.jpg + 10: + caption_html: | + Selection of nineteenth-century receipts from + George Brinley papers + image: Brinleyreceipts_2.jpg + 11: + caption_html: | + Selection of childhood letters and cyanotype of Grace Abbot from + Abbot family papers + image: Abbotfamily4.jpg + 12: + caption_html: | + Pressed flowers from + Lily Frémont flower album, 1859 + image: Fremont_Pressed_flowers.jpg + 13: + caption_html: | + Pages from + Portland & White Mountains Stage Coach records + image: PortlandWhiteMountainsStage.jpg + 14: + caption_html: | + Textile weaving pattern from + Jacob Rohland pattern book, 1815 + image: Rohland.2.jpg + 15: + caption_html: | + A spectacular watercolor scene from Michigan's Upper Peninsula from + Lake Superior Scenery + image: LakeSuperiorScenery.jpg + 16: + caption_html: | + Studio portrait of Spanish-American and Philippine-American War veteran Lt. Grosvenor L. Townsend from + Grosvenor L. Townsend scrapbooks + image: Portrait-Grosvenor-Townsend.jpg + 17: + caption_html: | + Photograph showing Lakota chief Young Man Afraid of His Horses (Thasunke Khokiphapi) from + Richard Pohrt, Jr. Collection of Native American Photography + image: YoungManAfraidofHisHorses.jpg + 18: + caption_html: | + Watercolor poking fun at the 1825 fashions of Philadelphia from + Edward Williams Clay watercolors, scrapbook fragments, and silhouettes + image: Tea-fight_EdwardWilliamsClay.jpg + 19: + caption_html: | + A general [planting] plan for the grounds of the Henry Ford Hospital from Jens Jensen drawings and papers + image: bhl_bl002207_full_5280_5197__0_native.jpg + 20: + caption_html: | + Plan for Grounds of Camp Algonquin, Algonquin, IL, February 1911 from Jens Jensen drawings and papers + image: bhl_hs15706_full_5148_3088__0_native.jpg + 21: + caption_html: | + George Romney with the Supremes, 1965 Michigan State Fair from George Romney papers + image: bhl_bl004042_full_4800_6794__0_native.jpg + 22: + caption_html: | + Howlin' Wolf and Muddy Waters with others backstage, 1st Ann Arbor Blues Festival from Frank and Peggy Bach Papers + image: bhl_hs10699_full_5748_4490__0_native.jpg + 23: + caption_html: | + Using the Fitz telescope, U-M’s Detroit Observatory, 2015 from Detroit Observatory (University of Michigan) records, 1860-2004 + image: bhl_hs14631_full_3680_2456__0_native.jpg + 24: + caption_html: | + Interior of Cahow Drug Store, 213 S. Main, Ann Arbor, 10 May 1957 from Ivory Photo photograph collection, circa 1927-1971 + image: bhl_hs17962_full_5615_4459__0_native.jpg diff --git a/config/locales/um_arclight.en.yml b/config/locales/um_arclight.en.yml new file mode 100644 index 0000000..b2481d7 --- /dev/null +++ b/config/locales/um_arclight.en.yml @@ -0,0 +1,89 @@ +en: + um_arclight: + insert_content: "INSERT CONTENT HERE" + + home: + browse_all: "Browse All Collections" + about: + heading: About This Site + text_html:

Use this site to search and explore finding aids, also called collection guides. Finding aids describe collections of primary sources and other unique, original, or rare materials held by these repositories. Materials include manuscripts, correspondence, organizational records, photographs, audio visual recordings, ephemera, and born-digital materials.

The finding aid provides information about:

  • The origin of the collection
  • A brief biography or historical sketch of the individual or organization that created the collection
  • A statement of the intellectual and physical organization of the collections
  • A narrative "scope and content note" describing the intellectual content of the collection as a whole and of its major subdivisions
  • A detailed "contents list" providing a hierarchical listing of the collections from the series down to the file, or possibly the item, level
+ ask: + heading: Ask a Librarian + alert: + title: Some alert + message_html:

Warning warning!

+ + + advanced_search: + title: "Advanced Search" + within_collections_label: "Search in" + search_fields_label: "Search field" + available_online: "Includes Digital Content" + search_label: "Search for" + submit: "Search" + start_over: "Start Over" + + digital_objects: + online_banner: + message_text: Some materials from this collection are available online. + dc_html: View Digital Collection + filter_online_html: Only view items with online access + ddr_embed_link: View Item Page / More Info / Download + request_this_record: Request This Record + electronic-record-master: Electronic Record (Master) + electronic-record-use-copy: Electronic Record (Use Copy) + + tooltips: + online: "Includes Digital Content" + bookmarks: + present: "In Bookmarks" + absent: "Add to Bookmarks" + restricted: "Some restrictions apply" + + views: + index: + number_of_components: + one: entry + other: entries + show: + access: + more: "More..." + more_restriction: "More about accessing and using these materials..." + help_links: + citations: "Citations, Permissions, & Copyright" + requesting: "How to Request" + reproductions: "Ordering Reproductions" + visitors: "Info for Visitors" + containers: + see_all: "Expand list" + field_group_note: + indexed_terms_field: "Click on terms below to find any related finding aids on this site." + sidebar: + collection_title: Collection + collection_info_icon_label: Advanced collection info + mobile_sidebar_btn: Navigate the Collection + request: + tooltip: Select items for reading room use or request copies. + current_containers: | + The item you are currently viewing is in:
%{containers} + multi_aleph: | + Since this collection guide represents multiple collections, first choose the + collection that includes the material you'd like to request, then click Request. + email: | + Email %{email} to request onsite use.

This collection does not have a record in + the library catalog. + + contact: + title: "Contact Us" + + ead_element_labels: + separatedmaterial: "Alternate Locations" + relatedmaterial: "Related Materials" + bibliography: "Bibliography" + + errors: + redirected_to_collection: | + We’re not sure what section of the finding aid you were looking for; + you've been redirected to the collection main page. + Please contact us if + you cannot find what you're looking for. \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index bad2570..4f86910 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,7 +2,7 @@ mount Blacklight::Engine => "/" mount Arclight::Engine => "/" - root to: "arclight/repositories#index" + root to: "catalog#index" concern :searchable, Blacklight::Routes::Searchable.new resource :catalog, only: [], as: "catalog", path: "/catalog", controller: "catalog" do