[Archivesspace_Users_Group] getting rid of <emph> in titles [was: Character limits on sub notes?]
Majewski, Steven Dennis (sdm7g)
sdm7g at eservices.virginia.edu
Thu Nov 3 12:38:26 EDT 2016
One possible fix to get rid of the markup in public interface record titles:
copy public/app/views/records/_title_pane.html.erb into plugins/local/public/views/records/
change this first line in the template to the last line below:
< <h2><%= record_title %>
---
> <h2><%= record_title.gsub( /<[^>]+>/ , '' ) %>
This removes markup tags entirely.
A better solution might be to transform EAD markup into HTML markup in the view.
A lot of models have a display_string as well as a title, so it might also be a better solution might be to fix these titles in the display_strings upstream in the controller rather than the view, but that probably requires changing it in several places and I’m not sure if there are other issues with making that sort of change.
I may be looking at this issue further in the near future: we have EAD that imports records with mixed content — specifically <title> tags around manuscript titles in the JSONmodel titles, which I will want to preserve on EAD export, but scrub in the display. ( So I may push a patch after I have figured out and tested the best way to handle this. )
— Steve Majewski / UVA Alderman Library
On Oct 24, 2016, at 11:47 AM, Jane LaBarbara <jane.labarbara at mail.wvu.edu<mailto:jane.labarbara at mail.wvu.edu>> wrote:
Dear all,
My institution is migrating into ASpace and using the Public User Interface, and we’re hoping to completely transition out of our old system/user interface by the end of 2016.
Because of the issue with <emph> tags/@render attributes showing up as text instead of displaying as italics etc. (AR-1234—we’ve noticed this in the “title” field, example here:https://archives.lib.wvu.edu/repositories/2/archival_objects/328) , we’re trying to find a workaround for one of our most prominent collections, the Pearl Buck Literary Manuscripts, which has a LOT of folder titles that include italics (you can see the S/C note and contents list here https://findingaids.lib.wvu.edu/cgi/f/findaid/findaid-idx?c=wvcguide;cc=wvcguide;type=simple;rgn=Entire%20Finding%20Aid;q1=4052;view=reslist;subview=standard;sort=occur;start=1;size=25;didno=4052;focusrgn=scopecontent;byte=24750517&newsid=1).
I thought we could try to put the contents list of each series in the series Scope and Content Note until the bug is fixed (so our italics won’t look ugly to the public), but when I tried that, saved the record, and tried to navigate around in that resource record, I got something about “an error occurred” and “FULL head” – we were able to fix that with help from a previous listserv exchange--see http://lyralists.lyrasis.org/mailman/htdig/archivesspace_users_group/2016-March/003316.html-- but our Systems person doesn’t want to leave the fix in place, which means I can’t put that much text in the Scope and Content Note. I had this issue in version 1.4.2, but we’re in the middle of moving to 1.5.1.
TL;DR Does anyone know how many characters can fit into a sub note without breaking it?
Any other ideas on how to present this massive contents list to the public until the italics-related bug is fixed would also be welcome.
Thank you,
Jane
/ Jane Metters LaBarbara
Assistant Curator, West Virginia & Regional History Center<https://wvrhc.lib.wvu.edu/>
West Virginia University Libraries
(304) 293-0352 office
jane.labarbara at mail.wvu.edu<mailto:jane.labarbara at mail.wvu.edu>
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20161103/57355085/attachment.html>
More information about the Archivesspace_Users_Group
mailing list