[Archivesspace_Users_Group] Change order of items on PUI navigation bar using local plug-in override?
Corey Schmidt
Corey.Schmidt at uga.edu
Fri Mar 12 15:25:42 EST 2021
Awesome! Thank you for the info! I'll forward it to my colleague.
Corey
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Steele, Henry <Henry.Steele at tufts.edu>
Sent: Friday, March 12, 2021 2:38 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Change order of items on PUI navigation bar using local plug-in override?
[EXTERNAL SENDER - PROCEED CAUTIOUSLY]
I saw this message earlier and meant to reply. The way we have reordered various links, and elements of the content, is through a JS file, which I used jquery for.
Here’s how I moved the search bar e.g.
$("<li id='search_label'><a id='search_labal_a'>Search:</a></li>").insertAfter($(".navbar-nav li:nth-child(2)"));
What you would do is put a .js file in /plugins/local/public/assets, with the appropriate jquery to reorder elements.
And then place a file in /plugins/local/public/views called layout_head.html.erb with the following line
<%= javascript_include_tag "#{@base_url}/assets/<name of JS file>.js" %>
Incidentally, I also used the same method for our local css
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Corey Schmidt
Sent: Friday, March 12, 2021 2:28 PM
To: archivesspace_users_group at lyralists.lyrasis.org
Subject: [Archivesspace_Users_Group] Change order of items on PUI navigation bar using local plug-in override?
Good afternoon all,
I'm forwarding this message that a colleague of mine sent to the Google Group, hoping to catch more bites here. Any advice/info would be appreciated. Thanks!
We're using ArchivesSpace 2.7.1 and have been using the local plugin overrides to customize. I've been successful in suppressing items through the config file and relabeling using the localizations, but I can't figure out how to change the order that the links in the nav bar appear in. Anybody know how to do this? I can't seem to find the relevant file. Currently we've got a local copy of plugins\local\public\views\shared\_navigation.html.erb that we are working with, and I see where it looks like it's constructing the nav bar and links, but I'm not sure what the underlying file is that I need to target to change it.
My colleague suspects that control of the order of the links in the nav bar exists outside of the local plugins architecture because it's under the config folder filepath (/public/config/initializers/public_new_defaults.rb?), which the documentation on the local plugin says isn't one that LP includes.
Thanks,
Corey
Corey Schmidt
ArchivesSpace Project Manager
University of Georgia Special Collections Libraries
Email: Corey.Schmidt at uga.edu<mailto:Corey.Schmidt at uga.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20210312/e11936ed/attachment.html>
More information about the Archivesspace_Users_Group
mailing list