Noah, Steve and Eric -- thank you for your help. I've got the plug-in running
and in search results I now have a column for "ID" ... however it only shows an
ID for a Resource result and not with any of the archival objects. In the
Plug-in, I see this bit of code and am wondering how to have it also display
the collection (resource) "identifier" for "archival object". Our reference
staff would like to be able to sort / know to which collection the archival
objects belong without having to open each one to find that out.
My continued thanks! -Kari
<% @search_data['results'].each do |result|
deleted = (params.has_key?("deleted_uri") and
Array(params["deleted_uri"]).include?(result["id"])) || false
# SET DISPLAY IDENTIFIER
@display_identifier = ""
@display_identifier = result["identifier"].html_safe if
result["identifier"]
@display_identifier = result["digital_object_id"].html_safe if
result["digital_object_id"]
@display_identifier = result["authority_id"].html_safe if
result["authority_id"]
if result["primary_type"] == "archival_object"
json = JSON.parse(result["json"])
@display_identifier = json["component_id"].html_safe if
json["component_id"]
end
%>
________________________________
From: Noah Huffman [[email protected]]
Sent: Tuesday, September 13, 2016 09:02
To: Kari R Smith
Subject: RE: [Archivesspace_Users_Group] Adding display fields for search
results - How to?
Hi Kari,
As Steve and Eric mentioned, you need a comma between the last two plugin names
and you should uncomment the line by removing the # from the beginning of the
line.
Should look like this:
AppConfig[:plugins] = ['local', 'lcnaf', 'aspace-public-formats',
'aspace-search-identifier']
If you make those change and restart, it should work. If not, I’m happy to
troubleshoot.
We use this plugin at Duke and it’s very useful.
-Noah
From: [email protected]
[mailto:[email protected]] On Behalf Of
Kari R Smith
Sent: Monday, September 12, 2016 5:02 PM
To: Archivesspace Users Group <[email protected]>
Subject: Re: [Archivesspace_Users_Group] Adding display fields for search
results - How to?
Noah,
Does this snippet look like it's formatted correctly to work in the config.rb
file? I saved this to the plug-in folder and restarted ASpace but it's not
taking (meaning, ID is not showing up in search results.)
#AppConfig[:plugins] = ['local', 'lcnaf', 'aspace-public-formats'
'aspace-search-identifier']
Thanks for your help with this
Kari
________________________________
From:
[email protected]<mailto:[email protected]>
[[email protected]] on behalf of Noah
Huffman [[email protected]]
Sent: Monday, September 12, 2016 13:52
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] Adding display fields for search
results - How to?
Kari,
Here is a plugin that adds an identifier column to search results in the staff
interface:
https://github.com/lyrasis/aspace-search-identifier<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_lyrasis_aspace-2Dsearch-2Didentifier&d=CwMFEA&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=F0JE8U9-xhxe_nE7d7aEUi-uqfKqvYJ222bS0oz9mko&m=XzVVdhtu-NOYwHpF7t1-skr-ItWN1h9pITcz5Cbf_uE&s=DhHvT91cE0yMiKtoYywN7I2G7ilS_k2IDiDwCZnTUqA&e=>
I assume you could tweak this to have the identifier column display in the
public interface as well.
-Noah
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of
Kari R Smith
Sent: Monday, September 12, 2016 1:40 PM
To: Archivesspace Users Group
([email protected]<mailto:[email protected]>)
<[email protected]<mailto:[email protected]>>
Subject: [Archivesspace_Users_Group] Adding display fields for search results -
How to?
Hi,
I’m interested in hearing about any solutions for adding to the display fields
for search results. Our main interest is in having the collection ID display
in addition to the Resource Type and Title (currently the only displayed data +
last modified data).
Thanks,
Kari R. Smith
Digital Archivist, Institute Archives and Special Collections
Massachusetts Institute of Technology Libraries
617.253.5690 smithkr at mit.edu
http://libraries.mit.edu/archives/<https://urldefense.proofpoint.com/v2/url?u=http-3A__libraries.mit.edu_archives_&d=CwMFEA&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=F0JE8U9-xhxe_nE7d7aEUi-uqfKqvYJ222bS0oz9mko&m=XzVVdhtu-NOYwHpF7t1-skr-ItWN1h9pITcz5Cbf_uE&s=EBE7rM9t-8OTzIMav4NpIY7v4ego4g7TTFaz_c7R0Rg&e=>
_______________________________________________
Archivesspace_Users_Group mailing list
[email protected]
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group