[Archivesspace_Users_Group] Question about displaying Box # in the container listing on a Resource record (ver 1.4 or 1.5x PUI)
Majewski, Steven Dennis (sdm7g)
sdm7g at eservices.virginia.edu
Wed Dec 14 17:15:48 EST 2016
https://github.com/archivesspace/archivesspace/blob/v1.4.2/public/app/views/records/_components.html.erb#L30-L37
is the file you need to modify in local plugin.
That template gets expanded by javascript
https://github.com/archivesspace/archivesspace/blob/v1.4.2/public/app/assets/javascripts/record_tree.js
and template variables are pulling from the resource_tree children.
So VERY roughly and just for illustration, you could do something like:
<div id="template_record_tree_node"><!--
<li class="record-tree-node {if has_children} has-children{else} no-children{/if}" data-uri="${record_uri}">
{if has_children}<a href="#" class="record-tree-node-toggle"><span class="record-tree-node-toggle-icon"></span></a>{/if}
<span class="icon icon-${node_type}"></span>
<a href="${record_uri}" class="record-tree-node-title">${title}</a>
[${level}]: ${containers[0].type_1} ${containers[0].indicator_1},
${containers[0].type_2} ${containers[0].indicator_2}
${containers[0].type_3} ${containers[0].indicator_3}
{if has_children}<ul class="record-sub-tree"></ul>{/if}
</li>
--></div>
except since containers is an array and possibly empty, you need some more logic to do it properly.
In which case, it might be easier to add the expansion in javascript rather than in directly in the template.
But that code above gets you this far (note the error at the end, from I assume an empty container array, which stops it from iterating to the end of the component list ):
[cid:EF13182E-9822-4F3E-980A-1D5E2D76D12B at virginia.edu]
On Dec 14, 2016, at 12:04 PM, Kari R Smith <smithkr at mit.edu<mailto:smithkr at mit.edu>> wrote:
Hello, is it possible to configure the 1.42 Public Interface display so that on a Resource Record, at the bottom in the Container listing we can also have the Box # display next to the component title.
Second, is it possible to have the Resource ID or Title display on the Component Record.
Now that the new PUI is coming out in June 2017, we plan to use the 1.5x PUI for public access to our collection descriptions.
Thank you for your (community) help with possible solutions!
Kari
Kari R. Smith
Digital Archivist and Program Head for Born-digital Archives
Institute Archives and Special Collections
Massachusetts Institute of Technology Libraries, Cambridge, Massachusetts
617.253.5690 smithkr at mit.edu<http://mit.edu/> http://libraries.mit.edu/archives/ @karirene69
_______________________________________________
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/20161214/bf1f6cbc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: components.png
Type: image/png
Size: 1186784 bytes
Desc: components.png
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20161214/bf1f6cbc/attachment-0001.png>
More information about the Archivesspace_Users_Group
mailing list