Skip to content

Commit

Permalink
Merge pull request #698 from UCLALibrary/CAL-737_METADATA_FIELD_PAGE_…
Browse files Browse the repository at this point in the history
…LAYOUT

New metadata field Page layout on show and edit pages
  • Loading branch information
sourcefilter authored Aug 7, 2019
2 parents 79a6165 + 5f8e9e9 commit 75c20a6
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/assets/csv/import_manifest.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Object Type,Title,Item ARK,Parent ARK,Rights.copyrightStatus,File Name,AltIdentifier.local,AltTitle.other,Coverage.geographic,Date.creation,Date.normalized,Description.caption,Description.fundingNote,Description.latitude,Description.longitude,Description.note,Format.dimensions,Format.extent,Format.medium,Language,Name.architect,Name.photographer,Name.repository,Name.subject,Project Name,Publisher.publisherName,Relation.isPartOf,Rights.countryCreation,Rights.rightsHolderContact,Subject,Type.genre,Type.typeOfResource,Place of origin,AltTitle.uniform,Support,Summary
Object Type,Title,Item ARK,Parent ARK,Rights.copyrightStatus,File Name,AltIdentifier.local,AltTitle.other,Coverage.geographic,Date.creation,Date.normalized,Description.caption,Description.fundingNote,Description.latitude,Description.longitude,Description.note,Format.dimensions,Format.extent,Format.medium,Language,Name.architect,Name.photographer,Name.repository,Name.subject,Project Name,Publisher.publisherName,Relation.isPartOf,Rights.countryCreation,Rights.rightsHolderContact,Subject,Type.genre,Type.typeOfResource,Place of origin,AltTitle.uniform,Support,Summary,Page layout
3 changes: 3 additions & 0 deletions app/assets/markdown/importer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- [Name.photographer](#name.photographer)
- [Name.repository](#name.repository)
- [Name.subject](#name.subject)
- [Page layout](#page-layout)
- [Project Name](#project-name)
- [Place of origin](#place-of-origin)
- [Publisher.publisherName](#publisher.publishername)
Expand Down Expand Up @@ -168,6 +169,8 @@ accepts AltTitle.translated

### Name.subject

### Page layout

### Place of origin

### Project Name
Expand Down
1 change: 1 addition & 0 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def self.modified_field
config.add_show_field solr_name('medium', :stored_searchable)
config.add_show_field solr_name('named_subject', :stored_searchable)
config.add_show_field solr_name('normalized_date', :stored_searchable)
config.add_show_field 'page_layout_ssim'
config.add_show_field solr_name('photographer', :stored_searchable)
config.add_show_field 'place_of_origin_tesim'
config.add_show_field 'preservation_copy_ssi'
Expand Down
2 changes: 2 additions & 0 deletions app/forms/hyrax/californica_collections_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class CalifornicaCollectionsForm < Hyrax::Forms::CollectionForm
:medium,
:named_subject,
:normalized_date,
:page_layout,
:photographer,
:place_of_origin,
:repository,
Expand Down Expand Up @@ -67,6 +68,7 @@ def secondary_terms
:medium,
:named_subject,
:normalized_date,
:page_layout,
:photographer,
:place_of_origin,
:publisher,
Expand Down
1 change: 1 addition & 0 deletions app/forms/hyrax/work_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class WorkForm < Hyrax::Forms::WorkForm
:medium,
:named_subject,
:normalized_date,
:page_layout,
:photographer,
:place_of_origin,
:preservation_copy,
Expand Down
1 change: 1 addition & 0 deletions app/importers/californica_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CalifornicaMapper < Darlingtonia::HashMapper
"Subject.corporateName",
"Subject.personalName"],
normalized_date: "Date.normalized",
page_layout: "Page layout",
photographer: ["Name.photographer",
"Personal or Corporate Name.photographer"],
place_of_origin: "Place of origin",
Expand Down
4 changes: 4 additions & 0 deletions app/models/solr_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def normalized_date
self[:normalized_date_tesim]
end

def page_layout
self[:page_layout_ssim]
end

def photographer
self[:photographer_tesim]
end
Expand Down
4 changes: 4 additions & 0 deletions app/models/ucla_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ module UclaMetadata
index.as :stored_searchable, :facetable
end

property :page_layout, predicate: ::RDF::URI.intern('http://id.loc.gov/ontologies/bibframe.html#p_layout') do |index|
index.as :symbol
end

property :photographer, predicate: ::RDF::URI.intern('http://id.loc.gov/vocabulary/relators/pht.html') do |index|
index.as :stored_searchable, :facetable
end
Expand Down
1 change: 1 addition & 0 deletions app/presenters/hyrax/californica_collection_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def self.terms
:medium,
:named_subject,
:normalized_date,
:page_layout,
:photographer,
:place_of_origin,
:publisher,
Expand Down
1 change: 1 addition & 0 deletions app/presenters/hyrax/work_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class WorkPresenter < Hyrax::WorkShowPresenter
:medium,
:named_subject,
:normalized_date,
:page_layout,
:photographer,
:place_of_origin,
:preservation_copy,
Expand Down
1 change: 1 addition & 0 deletions app/uploaders/csv_manifest_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
'Name.photographer',
'Name.repository',
'Name.subject',
'Page layout',
'Place of origin',
'Project Name',
'Publisher.publisherName',
Expand Down
1 change: 1 addition & 0 deletions app/views/hyrax/base/_attribute_rows.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<%= presenter.attribute_to_html(:medium, html_dl: true) %>
<%= presenter.attribute_to_html(:named_subject, html_dl: true) %>
<%= presenter.attribute_to_html(:normalized_date, html_dl: true) %>
<%= presenter.attribute_to_html(:page_layout, html_dl: true) %>
<%= presenter.attribute_to_html(:photographer, html_dl: true) %>
<%= presenter.attribute_to_html(:place_of_origin, html_dl: true) %>
<%= presenter.attribute_to_html(:preservation_copy, html_dl: true) %>
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/coordinates_example.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Project Name,Parent ARK,Item ARK,Visibility,Subject,Type.typeOfResource,Rights.copyrightStatus,Type.genre,Name.subject,Coverage.geographic,Relation.isPartOf,Publisher.publisherName,Rights.countryCreation,Rights.rightsHolderContact,Name.architect,Name.photographer,Name.repository,Date.normalized,AltIdentifier.local,Title,Date.creation,Format.extent,Format.medium,Format.dimensions,Description.note,Description.fundingNote,Description.longitude,Description.latitude,Description.caption,File Name,AltTitle.other,AltTitle.translated,Place of origin,AltTitle.uniform,Support,Author,Summary
Los Angeles Daily News Negatives,111/222,13030/hb338nb26f,public,"Altars|~|Mass|~|Communion table|~|Mexican American Catholics|~|Festivals|~|Guadalupe, Our Lady of|~|Historic buildings $z California $z Los Angeles|~|Churches $z California $z Los Angeles|~|Religion|~|Catholic churches $z California $z Los Angeles ",still image,copyrighted,news photographs,"Plaza Church (Los Angeles, Calif.)",Los Angeles (Calif.)|~|Los Angeles (Calif.),"Los Angeles Daily News Negatives. Department of Special Collections, Charles E. Young Research Library, University of California at Los Angeles.",Los Angeles Daily News,US,"UCLA Charles E. Young Research Library Department of Special Collections, A1713 Young Research Library, Box 951575, Los Angeles, CA 90095-1575. E-mail: [email protected]. Phone: (310)825-4988",Imhotep,Famous Photographer,,1942/1952,uclamss_1387_b112_40911-1,"Communion at Plaza Church, Los Angeles, 1942-1952",[between 1942-1947],Fake Extent,Fake Medium,200x200,"A woman takes Communion during a Plaza Church mass for the fiesta of Nuestra Senora de Guadalupe.|~|Our Lady Queen of Los Angeles Catholic Church, (aka La Iglesia de Nuestra Señora la Reina de Los Ángeles, and The Church of Our Lady the Queen of the Angels), was built in 1822 and is the oldest church in Los Angeles.",Fake Funding Note,-118.239577,34.05707,Fake Caption,clusc_1_1_00010432a.tif,Communion table,Mesa de Comunión,Los Angeles,Mexican American Catholics,UCLA,Famous Author,Mexican American Catholics
Project Name,Parent ARK,Item ARK,Visibility,Subject,Type.typeOfResource,Rights.copyrightStatus,Type.genre,Name.subject,Coverage.geographic,Relation.isPartOf,Publisher.publisherName,Rights.countryCreation,Rights.rightsHolderContact,Name.architect,Name.photographer,Name.repository,Date.normalized,AltIdentifier.local,Title,Date.creation,Format.extent,Format.medium,Format.dimensions,Description.note,Description.fundingNote,Description.longitude,Description.latitude,Description.caption,File Name,AltTitle.other,AltTitle.translated,Place of origin,AltTitle.uniform,Support,Author,Summary,Page layout
Los Angeles Daily News Negatives,111/222,13030/hb338nb26f,public,"Altars|~|Mass|~|Communion table|~|Mexican American Catholics|~|Festivals|~|Guadalupe, Our Lady of|~|Historic buildings $z California $z Los Angeles|~|Churches $z California $z Los Angeles|~|Religion|~|Catholic churches $z California $z Los Angeles ",still image,copyrighted,news photographs,"Plaza Church (Los Angeles, Calif.)",Los Angeles (Calif.)|~|Los Angeles (Calif.),"Los Angeles Daily News Negatives. Department of Special Collections, Charles E. Young Research Library, University of California at Los Angeles.",Los Angeles Daily News,US,"UCLA Charles E. Young Research Library Department of Special Collections, A1713 Young Research Library, Box 951575, Los Angeles, CA 90095-1575. E-mail: [email protected]. Phone: (310)825-4988",Imhotep,Famous Photographer,,1942/1952,uclamss_1387_b112_40911-1,"Communion at Plaza Church, Los Angeles, 1942-1952",[between 1942-1947],Fake Extent,Fake Medium,200x200,"A woman takes Communion during a Plaza Church mass for the fiesta of Nuestra Senora de Guadalupe.|~|Our Lady Queen of Los Angeles Catholic Church, (aka La Iglesia de Nuestra Señora la Reina de Los Ángeles, and The Church of Our Lady the Queen of the Angels), was built in 1822 and is the oldest church in Los Angeles.",Fake Funding Note,-118.239577,34.05707,Fake Caption,clusc_1_1_00010432a.tif,Communion table,Mesa de Comunión,Los Angeles,Mexican American Catholics,UCLA,Famous Author,Mexican American Catholics,images
4 changes: 2 additions & 2 deletions spec/fixtures/coordinates_example_update.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Project Name,Parent ARK,Item ARK,Subject,Type.typeOfResource,Rights.copyrightStatus,Type.genre,Name.subject,Coverage.geographic,Relation.isPartOf,Publisher.publisherName,Rights.countryCreation,Rights.rightsHolderContact,Name.photographer,Name.repository,Date.normalized,AltIdentifier.local,Title,Date.creation,Format.extent,Format.medium,Format.dimensions,Description.note,Description.fundingNote,Description.longitude,Description.latitude,Description.caption,File Name,Author
Los Angeles Daily News Negatives,111/222,13030/hb338nb26f,"Altars|~|Mass|~|Communion table|~|Mexican American Catholics|~|Festivals|~|Guadalupe, Our Lady of|~|Historic buildings $z California $z Los Angeles|~|Churches $z California $z Los Angeles|~|Religion|~|Catholic churches $z California $z Los Angeles ",still image,copyrighted,news photographs,"Plaza Church (Los Angeles, Calif.)",Los Angeles (Calif.)|~|Los Angeles (Calif.),"Los Angeles Daily News Negatives. Department of Special Collections, Charles E. Young Research Library, University of California at Los Angeles.",Los Angeles Daily News,US,"UCLA Charles E. Young Research Library Department of Special Collections, A1713 Young Research Library, Box 951575, Los Angeles, CA 90095-1575. E-mail: [email protected]. Phone: (310)825-4988",Famous Photographer,,1942/1952,uclamss_1387_b112_40911-1,"Communion at Plaza Church, Los Angeles, 1942-1952",[between 1942-1947],Better Extent,,200x200,"A woman takes Communion during a Plaza Church mass for the fiesta of Nuestra Senora de Guadalupe.|~|Our Lady Queen of Los Angeles Catholic Church, (aka La Iglesia de Nuestra Señora la Reina de Los Ángeles, and The Church of Our Lady the Queen of the Angels), was built in 1822 and is the oldest church in Los Angeles.",Better Funding Note,-118.239577,34.05707,Better Caption,clusc_1_1_00010432a.tif, Famous Author
Project Name,Parent ARK,Item ARK,Subject,Type.typeOfResource,Rights.copyrightStatus,Type.genre,Name.subject,Coverage.geographic,Relation.isPartOf,Publisher.publisherName,Rights.countryCreation,Rights.rightsHolderContact,Name.photographer,Name.repository,Date.normalized,AltIdentifier.local,Title,Date.creation,Format.extent,Format.medium,Format.dimensions,Description.note,Description.fundingNote,Description.longitude,Description.latitude,Description.caption,File Name,Author,Page layout
Los Angeles Daily News Negatives,111/222,13030/hb338nb26f,"Altars|~|Mass|~|Communion table|~|Mexican American Catholics|~|Festivals|~|Guadalupe, Our Lady of|~|Historic buildings $z California $z Los Angeles|~|Churches $z California $z Los Angeles|~|Religion|~|Catholic churches $z California $z Los Angeles ",still image,copyrighted,news photographs,"Plaza Church (Los Angeles, Calif.)",Los Angeles (Calif.)|~|Los Angeles (Calif.),"Los Angeles Daily News Negatives. Department of Special Collections, Charles E. Young Research Library, University of California at Los Angeles.",Los Angeles Daily News,US,"UCLA Charles E. Young Research Library Department of Special Collections, A1713 Young Research Library, Box 951575, Los Angeles, CA 90095-1575. E-mail: [email protected]. Phone: (310)825-4988",Famous Photographer,,1942/1952,uclamss_1387_b112_40911-1,"Communion at Plaza Church, Los Angeles, 1942-1952",[between 1942-1947],Better Extent,,200x200,"A woman takes Communion during a Plaza Church mass for the fiesta of Nuestra Senora de Guadalupe.|~|Our Lady Queen of Los Angeles Catholic Church, (aka La Iglesia de Nuestra Señora la Reina de Los Ángeles, and The Church of Our Lady the Queen of the Angels), was built in 1822 and is the oldest church in Los Angeles.",Better Funding Note,-118.239577,34.05707,Better Caption,clusc_1_1_00010432a.tif, Famous Author,images
6 changes: 3 additions & 3 deletions spec/fixtures/csv_import/good/all_fields.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Object Type,Title,Item ARK,Parent ARK,Rights.copyrightStatus,File Name,AltIdentifier.local,Coverage.geographic,Date.creation,Date.normalized,Description.caption,Description.fundingNote,Description.latitude,Description.longitude,Description.note,Format.dimensions,Format.extent,Format.medium,Language,Name.photographer,Name.repository,Name.subject,Project Name,Publisher.publisherName,Relation.isPartOf,Rights.countryCreation,Rights.rightsHolderContact,Rights.servicesContact,Subject,Type.genre,Type.typeOfResource,Name.architect,AltTitle.other,AltTitle.translated,Place of origin,AltTitle.uniform,Support,Author,Summary
Collection,"Bennett (Walter E.) Photographic Collection, 1937-1983 (bulk 1952-1982)",21198/zz00011f8m,,copyrighted,,Collection 686,,1937-1983,1937/1983,,,,,"Walter E. Bennett (1921-1995) was the first salaried photographer for Time, where he worked from 1952 to 1982. The collection consists of photographic materials such as prints, negatives and slides. It also includes miscellaneous manuscripts and ephemera related to Bennett's life and career.",,,,,"Bennett, Walter E. (Walter Edward), 1921-1995","University of California, Los Angeles. $b Library Special Collections",,,,,,,"UCLA Charles E. Young Research Library Department of Special Collections, A1713 Young Research Library, Box 951575, Los Angeles, CA 90095-1575. E-mail: [email protected]. Phone: (310)825-4988",,,,,,,Los Angeles,"Bennett (Walter E.) Photographic Collection, 1937-1983 (bulk 1952-1982)",UCLA,A collection of photos by Walter Bennett
Work,Anti-war demonstrators attend the 1971 May Day Protest in Washington D.C.,21198/zz0001q2jd,21198/zz00011f8m,copyrighted,food.tif,uclamss_686_b4_f16_1,,"May 3, 1971",1971-05-03,,,,,,35 mm,,1 photograph|~|color slide,,"Bennett, Walter E. (Walter Edward), 1921-1995","University of California, Los Angeles. $b Library Special Collections",,,,,,,,"Demonstrations--Washington (D.C.)|~|Vietnamese Conflict, 1961-1975--Protest movements--Washington (D.C)",news photographs,still image,Imhotep,"Walter Bennett Collection","Walter Bennett Colección",California,Anti-war demonstrators attend the 1971 May Day Protest in Washington D.C.,UCLA,Famous Author,May Day protest in 1971
Object Type,Title,Item ARK,Parent ARK,Rights.copyrightStatus,File Name,AltIdentifier.local,Coverage.geographic,Date.creation,Date.normalized,Description.caption,Description.fundingNote,Description.latitude,Description.longitude,Description.note,Format.dimensions,Format.extent,Format.medium,Language,Name.photographer,Name.repository,Name.subject,Project Name,Publisher.publisherName,Relation.isPartOf,Rights.countryCreation,Rights.rightsHolderContact,Rights.servicesContact,Subject,Type.genre,Type.typeOfResource,Name.architect,AltTitle.other,AltTitle.translated,Place of origin,AltTitle.uniform,Support,Author,Summary,Page layout
Collection,"Bennett (Walter E.) Photographic Collection, 1937-1983 (bulk 1952-1982)",21198/zz00011f8m,,copyrighted,,Collection 686,,1937-1983,1937/1983,,,,,"Walter E. Bennett (1921-1995) was the first salaried photographer for Time, where he worked from 1952 to 1982. The collection consists of photographic materials such as prints, negatives and slides. It also includes miscellaneous manuscripts and ephemera related to Bennett's life and career.",,,,,"Bennett, Walter E. (Walter Edward), 1921-1995","University of California, Los Angeles. $b Library Special Collections",,,,,,,"UCLA Charles E. Young Research Library Department of Special Collections, A1713 Young Research Library, Box 951575, Los Angeles, CA 90095-1575. E-mail: [email protected]. Phone: (310)825-4988",,,,,,,Los Angeles,"Bennett (Walter E.) Photographic Collection, 1937-1983 (bulk 1952-1982)",UCLA,A collection of photos by Walter Bennett,images
Work,Anti-war demonstrators attend the 1971 May Day Protest in Washington D.C.,21198/zz0001q2jd,21198/zz00011f8m,copyrighted,food.tif,uclamss_686_b4_f16_1,,"May 3, 1971",1971-05-03,,,,,,35 mm,,1 photograph|~|color slide,,"Bennett, Walter E. (Walter Edward), 1921-1995","University of California, Los Angeles. $b Library Special Collections",,,,,,,,"Demonstrations--Washington (D.C.)|~|Vietnamese Conflict, 1961-1975--Protest movements--Washington (D.C)",news photographs,still image,Imhotep,"Walter Bennett Collection","Walter Bennett Colección",California,Anti-war demonstrators attend the 1971 May Day Protest in Washington D.C.,UCLA,Famous Author,May Day protest in 1971,images
Loading

0 comments on commit 75c20a6

Please sign in to comment.