Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added app/assets/images/homepage/1897chif.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/homepage/Abbotfamily4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/homepage/Aladdin19231024_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/homepage/Brinleyreceipts_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/homepage/EHTheKillers1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/homepage/Rohland.2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/homepage/SaraPurmet1024_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/helpers/catalog_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module CatalogHelper
include Blacklight::CatalogHelperBehavior

def has_no_query
request.path == "/" && params[:q].blank? && params[:f].blank?
end
end

Check failure on line 7 in app/helpers/catalog_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/TrailingEmptyLines: Final newline missing.
35 changes: 35 additions & 0 deletions app/helpers/homepage_helper.rb
Original file line number Diff line number Diff line change
@@ -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')

Check failure on line 11 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

Check failure on line 11 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
end

def random_feature
img_index = config_features['image_list'].keys.sample

Check failure on line 15 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
config_features['image_list'][img_index]

Check failure on line 16 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
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('/'))

Check failure on line 24 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

Check failure on line 24 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/SpaceInsideArrayLiteralBrackets: Use space inside array brackets.

Check failure on line 24 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

Check failure on line 24 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/SpaceInsideArrayLiteralBrackets: Use space inside array brackets.
end

def collection_count_home
search_service = Blacklight.repository_class.new(blacklight_config)
query = search_service.search(
q: 'level_sim:Collection',

Check failure on line 30 in app/helpers/homepage_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
rows: 1
)
query.response['numFound']
end
end
9 changes: 9 additions & 0 deletions app/helpers/repository_helper.rb
Original file line number Diff line number Diff line change
@@ -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
7 changes: 6 additions & 1 deletion app/views/arclight/repositories/_repository.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,18 @@
<address>
<h3><%= t('arclight.views.repositories.address') %>:</h3>
<div class="al-repository-street-address">
<% %i[building address1 address2 city_state_zip_country].each do |f| %>
<% %i[building address1 address2].each do |f| %>
<% if repository.send(f).present? %>
<div class='al-repository-street-address-<%= f %>'>
<%= repository.send(f) %>
</div>
<% end %>
<% end %>
<% if repository.city and repository.state and repository.zip and repository.country %>
<div class='al-repository-street-address-city_state_zip_country'>
<%= city_state_zip_country(repository) %>
</div>
<% end %>
</div>

<div class="al-repository-contact-info">
Expand Down
65 changes: 65 additions & 0 deletions app/views/catalog/_home.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<% @page_title = t('arclight.views.home.title', application_name: application_name) %>
<% @random_feature = random_feature %>
<div class="row homepage main-feature mt-5 mb-5">
<div class="col-md-12" >
<div class="imgback col-md-5 col-lg-6 col-xl-6 hidden-sm-down"></div>
<div class="imgback imgback-image col-md-5 col-lg-6 col-xl-6 hidden-sm-down"
style="background-image: url(<%= feature_img_url(@random_feature['image']) %>)">
<div class="feature-caption"><span class="sr-only">Featured image: </span><%= @random_feature['caption_html'].html_safe %></div>
</div>

<div class="col-md-7 col-lg-6 col-xl-5 rl-menu-title">
<h1 class="main-title">Find Archival Materials</h1>
<p>Detailed inventories of <%= number_with_delimiter(collection_count_home) %> collections</p>

<%#= render_search_bar %>

<div class="intro-buttons mt-3 mb-3 d-flex">
<div id="browse-links" class="btn-group mr-3">
<%= link_to t('um_arclight.home.browse_all'), arclight_engine.collections_path %>
</div>

<%#= render 'search_extra_controls' %>

</div>

<a class="d-flex align-items-center mt-4 mb-3" href="/repositories">
<div>Browse All Repositories</div>
</a>
</div>
</div>
<div class="container-fluid full-width">

<%# Configurable alert banner %>
<%# keys in config/locales/um_arclight.en.yml %>
<% if I18n.exists?('um_arclight.home.alert') %>
<div id="homepage-alert" class="mb-5 col-md-12 banner-wrapper banner-warning d-flex flex-row">
<div class="banner-part banner-heading">
<%= blacklight_icon :exclamation_triangle_solid %>
<span class="banner-heading-text d-none d-lg-inline pr-4">
<%= t('um_arclight.home.alert.title') %>
</span>
</div>
<div class="banner-part banner-shadow"></div>
<div class="banner-part banner-message flex-grow-1">
<div class="mb-0 banner-message-text p-2">
<%= t('um_arclight.home.alert.message_html').html_safe %>
</div>
</div>
</div>
<% end %>

<div id="homepage-text-blocks" class="row mt-4 mb-5 d-flex flex-wrap">
<div class="mb-2">
<div class="card-title d-flex align-items-center">
<div class="card-icon"><span class="material-icons">
info
</span></div>
<h2><%= t('um_arclight.home.about.heading') %></h2>
</div>
<div class="content-block">
<%= t('um_arclight.home.about.text_html').html_safe %>
</div>
</div>
</div>
</div>
19 changes: 19 additions & 0 deletions app/views/catalog/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<% content_for(:head) do %>
<meta name="blacklight-search-storage" content="<%= blacklight_config.track_search_session.storage %>">
<% 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 %>
115 changes: 115 additions & 0 deletions config/featured_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
image_list:
1:
caption_html: |
"It's so simple" Jell-O, America's most famous dessert from <a href="/catalog/umich-scl-ams0084">
Culinary Ephemera: Gelatin and Tapioca</a>
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 <a href="/catalog/umich-bhl-943">Athletic Department (University of Michigan) records</a>
image: 1897chif.jpg
3:
caption_html: |
African American family, 1889? from <a href="/catalog/umich-wcl-F-830tin">
David V. Tinder Collection of Michigan Photography</a>
image: wcl1ic_wcl004061_full_775_501__0_native.jpg
4:
caption_html: |
Sara Purmet, from <a href="/catalog/ehll--bingham">
Abel Bingham Family Papers, 1765-1964</a>
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 <a href="/catalog/ehll--griffin">
Senator Robert P. Griffin Papers Collection</a>
image: GriffinCassettePHartCenterDedicationSpeech1024_1.jpg
6:
caption_html: |
"AEF in France" photographic album cover from <a href="/catalog/ehll--bourgeois">
Mary M. Bourgeois Family Papers</a>
image: BourgeoiseATFscrapbookcovercloseup1024_1.jpg
7:
caption_html: |
City of Green Bay ferry postcard from <a href="/catalog/ehll--bacon">
Capt. William C. Bacon, Michigan Car Ferries Collection</a>
image: CityofGreenBayPostcardCaptBacon1024_1.jpg
8:
caption_html: |
1923 Aladdin Homes Catalog from <a href="/catalog/ehll--aladdin">
Aladdin Company Collection</a>
image: Aladdin19231024_1.jpg
9:
caption_html: |
"The Killers" one-sheet movie poster (circa 1964) from <a href="/catalog/ehll--HemingwayErnest">
Ernest Hemingway Collection</a>
image: EHTheKillers1.jpg
10:
caption_html: |
Selection of nineteenth-century receipts from <a href="/catalog/umich-wcl-M-401bri">
George Brinley papers</a>
image: Brinleyreceipts_2.jpg
11:
caption_html: |
Selection of childhood letters and cyanotype of Grace Abbot from <a href="/catalog/umich-wcl-M-4180-3abb">
Abbot family papers</a>
image: Abbotfamily4.jpg
12:
caption_html: |
Pressed flowers from <a href="/catalog/umich-wcl-P-2493fre">
Lily Frémont flower album, 1859</a>
image: Fremont_Pressed_flowers.jpg
13:
caption_html: |
Pages from <a href="/catalog/umich-wcl-M-7252por">
Portland & White Mountains Stage Coach records</a>
image: PortlandWhiteMountainsStage.jpg
14:
caption_html: |
Textile weaving pattern from <a href="/catalog/umich-wcl-M-3444roh">
Jacob Rohland pattern book, 1815</a>
image: Rohland.2.jpg
15:
caption_html: |
A spectacular watercolor scene from Michigan's Upper Peninsula from <a href="/catalog/umich-wcl-P-2881lak">
Lake Superior Scenery</a>
image: LakeSuperiorScenery.jpg
16:
caption_html: |
Studio portrait of Spanish-American and Philippine-American War veteran Lt. Grosvenor L. Townsend from <a href="/catalog/umich-wcl-F-696tow">
Grosvenor L. Townsend scrapbooks</a>
image: Portrait-Grosvenor-Townsend.jpg
17:
caption_html: |
Photograph showing Lakota chief Young Man Afraid of His Horses (Thasunke Khokiphapi) from <a href="/catalog/umich-wcl-F-1156poh">
Richard Pohrt, Jr. Collection of Native American Photography</a>
image: YoungManAfraidofHisHorses.jpg
18:
caption_html: |
Watercolor poking fun at the 1825 fashions of Philadelphia from <a href="/catalog/umich-wcl-P-2510cla">
Edward Williams Clay watercolors, scrapbook fragments, and silhouettes</a>
image: Tea-fight_EdwardWilliamsClay.jpg
19:
caption_html: |
A general [planting] plan for the grounds of the Henry Ford Hospital from <a href="/catalog/umich-bhl-97105">Jens Jensen drawings and papers</a>
image: bhl_bl002207_full_5280_5197__0_native.jpg
20:
caption_html: |
Plan for Grounds of Camp Algonquin, Algonquin, IL, February 1911 from <a href="/catalog/umich-bhl-97105">Jens Jensen drawings and papers</a>
image: bhl_hs15706_full_5148_3088__0_native.jpg
21:
caption_html: |
George Romney with the Supremes, 1965 Michigan State Fair from <a href="/catalog/umich-bhl-852178">George Romney papers</a>
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 <a href="/catalog/umich-bhl-03124">Frank and Peggy Bach Papers</a>
image: bhl_hs10699_full_5748_4490__0_native.jpg
23:
caption_html: |
Using the Fitz telescope, U-M’s Detroit Observatory, 2015 from <a href="/catalog/umich-bhl-0713">Detroit Observatory (University of Michigan) records, 1860-2004</a>
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 <a href="/catalog/umich-bhl-92324">Ivory Photo photograph collection, circa 1927-1971</a>
image: bhl_hs17962_full_5615_4459__0_native.jpg
89 changes: 89 additions & 0 deletions config/locales/um_arclight.en.yml
Original file line number Diff line number Diff line change
@@ -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: <p>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.</p><p>The finding aid provides information about:</p><ul><li>The origin of the collection</li> <li>A brief biography or historical sketch of the individual or organization that created the collection</li><li>A statement of the intellectual and physical organization of the collections</li><li>A narrative "scope and content note" describing the intellectual content of the collection as a whole and of its major subdivisions</li><li>A detailed "contents list" providing a hierarchical listing of the collections from the series down to the file, or possibly the item, level</li></ul></div>
ask:
heading: Ask a Librarian
alert:
title: Some alert
message_html: <p>Warning warning!</p>


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: <span class='fas fa-external-link-alt'></span> View Digital Collection
filter_online_html: <span class='fas fa-filter'></span> 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:<br/><strong>%{containers}</strong>
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 <strong>%{email}</strong> to request onsite use.<br/><br/>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 <strong><a href="%{contact_link}" referrerpolicy="unsafe-url">contact us</a></strong> if
you cannot find what you're looking for.
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading