forked from projectblacklight/arclight
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from mlibrary/DCP2-233-using-these-materials
Using These Materials base page & links
- Loading branch information
Showing
8 changed files
with
143 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,43 @@ | ||
# frozen_string_literal: true | ||
|
||
module Arclight | ||
# Controller for our /repositories index page | ||
class RepositoriesController < ApplicationController | ||
def index | ||
@repositories = Arclight::Repository.all | ||
load_collection_counts | ||
end | ||
# Controller for our /repositories index page | ||
class RepositoriesController < ApplicationController | ||
def index | ||
@repositories = Arclight::Repository.all | ||
load_collection_counts | ||
end | ||
|
||
def show | ||
@repository = Arclight::Repository.find_by!(slug: params[:id]) | ||
search_service = Blacklight.repository_class.new(blacklight_config) | ||
@response = search_service.search( | ||
q: "level_sim:Collection repository_sim:\"#{@repository.name}\"", | ||
rows: 100 | ||
) | ||
@collections = @response.documents | ||
end | ||
def show | ||
@repository = Arclight::Repository.find_by!(slug: params[:id]) | ||
search_service = Blacklight.repository_class.new(blacklight_config) | ||
@response = search_service.search( | ||
q: "level_sim:Collection repository_sim:\"#{@repository.name}\"", | ||
rows: 100 | ||
) | ||
@collections = @response.documents | ||
end | ||
|
||
private | ||
def about | ||
@repository = Arclight::Repository.find_by(slug: params[:id]) | ||
render "arclight/repositories/about" | ||
end | ||
|
||
def load_collection_counts | ||
counts = fetch_collection_counts | ||
@repositories.each do |repository| | ||
repository.collection_count = counts[repository.name] || 0 | ||
end | ||
end | ||
private | ||
|
||
def fetch_collection_counts | ||
search_service = Blacklight.repository_class.new(blacklight_config) | ||
results = search_service.search( | ||
q: 'level_sim:Collection', | ||
'facet.field': 'repository_sim', | ||
rows: 0 | ||
) | ||
Hash[*results.facet_fields['repository_sim']] | ||
def load_collection_counts | ||
counts = fetch_collection_counts | ||
@repositories.each do |repository| | ||
repository.collection_count = counts[repository.name] || 0 | ||
end | ||
end | ||
|
||
def fetch_collection_counts | ||
search_service = Blacklight.repository_class.new(blacklight_config) | ||
results = search_service.search( | ||
q: 'level_sim:Collection', | ||
'facet.field': 'repository_sim', | ||
rows: 0 | ||
) | ||
Hash[*results.facet_fields['repository_sim']] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<%#= @repository.inspect %> | ||
<div class="prose prose-container"> | ||
<h1>Using Materials from <%= @repository.name %></h1> | ||
|
||
<p><%= @repository.using_materials.html_safe %></p> | ||
|
||
<% if @repository.visitor_info %> | ||
<h2>Info for Visitors</h2> | ||
|
||
<p><%= @repository.visitor_info.html_safe %></p> | ||
<% end %> | ||
|
||
<% if @repository.how_to_request %> | ||
<h2 id="requesting">How to Request</h2> | ||
|
||
<p><%= @repository.how_to_request.html_safe %></p> | ||
<% end %> | ||
|
||
<% if @repository.how_to_order %> | ||
<h2 id="ordering">Ordering Reproductions</h2> | ||
|
||
<p><%= @repository.how_to_order.html_safe %></p> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,11 @@ bhl: | |
phone: '' | ||
contact_info: '[email protected]' | ||
thumbnail_url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Bhlexterior.jpg/150px-Bhlexterior.jpg' | ||
repo_about: | ||
using_materials: 'Finding aids describe collections of primary sources and other unique, original, or rare materials. Some finding aids contain links to digitized versions of parts or all of a collection. Access to the original physical items, when available, requires requesting items for use in the reading room. Items may not be requested for use outside of the library.' | ||
visitor_info: 'The Bentley is open by appointment only Monday-Friday 10am - 4pm, including the general public. For more information, visit <a href="https://bentley.umich.edu/research/policies/">In-Person Research Policies</a>.' | ||
how_to_request: 'Please visit <a href="https://bentley.umich.edu/research/requesting-items-new2020/">Requesting Items</a>.' | ||
how_to_order: 'Please visit <a href="https://bentley.umich.edu/research/duplication/">Duplication of Materials</a>.' | ||
request_types: | ||
aeon_hidden_form_request: | ||
request_url: https://aeon-dev.bentley.umich.edu/ead_request | ||
|
@@ -47,6 +52,11 @@ scrc: | |
phone: '' | ||
contact_info: '[email protected]' | ||
thumbnail_url: 'https://upload.wikimedia.org/wikipedia/commons/9/96/University_of_Michigan_library_stacks.JPG' | ||
repo_about: | ||
using_materials: 'Finding aids describe collections of primary sources and other unique, original, or rare materials. Collections are non-circulating and must be used in the Special Collections Research Center reading room. Requests for collection material must be made at least 7 days in advance of a planned visit.' | ||
visitor_info: 'For more information <a href="https://www.lib.umich.edu/locations-and-hours/special-collections-research-center">Special Collections Research Center -- Visit</a>.' | ||
how_to_request: 'Please visit <a href="https://www.lib.umich.edu/locations-and-hours/special-collections-research-center/access-our-materials">Special Collections Research Center -- Access Our Materials</a>.' | ||
how_to_order: 'Please visit <a href="https://www.lib.umich.edu/locations-and-hours/special-collections-research-center/access-our-materials">Special Collections Research Center -- Access Our Materials</a>.' | ||
request_types: | ||
aeon_web_ead: | ||
request_url: 'https://aeon.lib.umich.edu/logon' | ||
|
@@ -69,6 +79,11 @@ clements: | |
phone: '' | ||
contact_info: '[email protected]' | ||
thumbnail_url: 'https://upload.wikimedia.org/wikipedia/commons/1/1d/University_of_Michigan_August_2013_179_%28William_L._Clements_Library%29.jpg' | ||
repo_about: | ||
using_materials: 'Finding aids describe collections of primary sources and other unique, original, or rare materials. Collections are non-circulating and must be used in the Clements Library reading room. Some finding aids contain links to digitized versions of parts or all of a collection, but in most cases viewing a collection in its entirety will require visiting the library.' | ||
visitor_info: 'See <a href="https://clements.umich.edu/research/plan-your-visit/">Clements Library Plan Your Visit</a>.' | ||
how_to_request: 'See <a href="https://clements.umich.edu/research/request-materials/">Clements Library Request Materials</a>.' | ||
how_to_order: 'See <a href="https://clements.umich.edu/research/duplication-and-use/">Clements Library Duplication and Use</a>.' | ||
request_types: | ||
aeon_web_ead: | ||
request_url: 'https://aeon.clements.umich.edu/logon' | ||
|
@@ -91,6 +106,11 @@ clarke: | |
phone: '' | ||
contact_info: '[email protected]' | ||
thumbnail_url: 'https://www.cmich.edu/images/default-source/academic-affairs-division/cmu-libraries/about/support-the-libraries/20210723_support_universityseal_0086fdf1a7f-50e7-4d64-a7ca-f7979508b7a2.jpg' | ||
repo_about: | ||
using_materials: 'Finding aids describe collections of primary sources and other unique, original, or rare materials. Collections are non-circulating and must be used in the Clarke Library reading room. Some finding aids contain links to digitized versions of parts or all of a collection, but in most cases viewing a collection in its entirety will require visiting the library.' | ||
visitor_info: 'Please visit <a href="https://www.cmich.edu/research/clarke-historical-library/services/reference-research-help">Clarke Research and Reference Help</a>.' | ||
how_to_request: '<a href="[email protected]">Contact the Clarke</a> for assistance with collections.' | ||
how_to_order: 'Please visit <a href="https://www.cmich.edu/research/clarke-historical-library/about/policies#a3">Clarke Digital Reproduction Policies and Fees</a>.' | ||
vrc: | ||
name: 'University of Michigan. History of Art. Visual Resources Collection' | ||
description: "The VRC maintains nearly two million images of art. The collection's roots are more than 90 years old and developed as a teaching collection to support University of Michigan faculty and students. Through these online finding aids, we hope to help you connect with our vast resources of images of art, architecture, and artifacts." | ||
|
@@ -105,6 +125,9 @@ vrc: | |
phone: '' | ||
contact_info: '[email protected]' | ||
thumbnail_url: 'https://mapproxy.studentlife.umich.edu/images/tappan-hall/AXP2S1698.jpg' | ||
repo_about: | ||
using_materials: 'Finding aids describe collections of primary sources and other unique, original, or rare materials. Access to the original physical items, when available, requires requesting items for use in the reading room associated with a given collection. Items may not be requested for offsite use.' | ||
visitor_info: 'See <a href="https://lsa.umich.edu/histartvrc/faculty-students.html">https://lsa.umich.edu/histartvrc/faculty-students.html</a>' | ||
archivemi: | ||
name: 'Archives of Michigan' | ||
description: 'The Archives of Michigan is responsible for preserving the records of Michigan government and other public institutions. The collections also include documents, maps, photographs and film from private individuals and organizations.' | ||
|
@@ -119,6 +142,10 @@ archivemi: | |
phone: '' | ||
contact_info: '[email protected]' | ||
thumbnail_url: 'https://www.michigan.gov/mhc/-/media/Project/Websites/mhc/images/archives/archives_womanresearcher.jpg' | ||
repo_about: | ||
using_materials: 'Finding aids describe collections of primary sources and other unique, original, or rare materials. Access to the original physical items, when available, requires requesting items for use in the reading room associated with a given collection. Items may not be requested for offsite use.' | ||
visitor_info: 'See <a href="https://www.michigan.gov/mhc/archives/plan-your-archives-visit">https://www.michigan.gov/mhc/archives/plan-your-archives-visit</a> for information on policies and parking' | ||
how_to_order: 'See <a href="https://www.michigan.gov/mhc/archives/plan-your-archives-visit#Copies">https://www.michigan.gov/mhc/archives/plan-your-archives-visit#Copies</a> for policies and pricing' | ||
mlibraryead: | ||
name: 'MLibrary Finding Aids' | ||
description: "MLibrary's Finding Aids site provides access to finding aids or descriptive inventories for archival records and manuscript collections not held in the Special Collections Research Center." | ||
|
@@ -133,3 +160,7 @@ mlibraryead: | |
phone: '' | ||
contact_info: '[email protected]' | ||
thumbnail_url: 'https://www.lib.umich.edu/static/f7ffa2d7bc8b7d2c2e56eaf08f237c8b/53249/AerialsNov08(186)Stock-a.webp' | ||
repo_about: | ||
using_materials: 'Finding aids describe collections of primary sources and other unique, original, or rare materials. Access to the original physical items, when available, requires requesting items for use in the reading room associated with a given collection. Items may not be requested for offsite use.' | ||
visitor_info: '<p>The Evangeline Marie Lehman Papers and Voice of America African Music Collection recordings are held at the Music Library. Please contact them for access: <a href="https://www.lib.umich.edu/locations-and-hours/music-library">https://www.lib.umich.edu/locations-and-hours/music-library</a></p> | ||
<p>The Jon Cohen AIDS Research Collection is held in the Special Collections Research Center. Please contact them for access: <a href="https://www.lib.umich.edu/locations-and-hours/special-collections-research-center">Special Collections Research Center -- Visit</a></p>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters