[Archivesspace_Users_Group] Remove option from drop-down menu in PUI search bar

Majewski, Steven Dennis (sdm7g) sdm7g at virginia.edu
Mon Nov 20 16:36:35 EST 2017

I don’t believe that is something that can be configured with a :pui_hide option. 

That form control is generated by this partial:


    <% if i == 0 %>
      <div class="col-sm-3 form-group form-inline norepeat">
        <%= label_tag(:limit, t('search-limit'),:class => 'sr-only') %>
        <%= select_tag(:limit, options_for_select(limit_options, @search[:limit]), :class=> 'form-control fill-column') %>

which gets called from several different views with limit_options set. 

For example:

You could either:

[1] find those cases and override limit_options in  plugins/local/public/views/ for all of those instances,
[2] just override that partial in plugins to strip out or ignore that particular option, 
[3] Or, I think the simplest and easiest way is to remove it with javascript added to plugins/local/public/views/layout_head.html.erb : 

<script type="text/javascript" >
    $( function() { $( "select#limit >option[value='digital_object']" ).remove(); });

That’s off the top of my head: you should probably double check or test that that selector doesn’t turn up in any other views. 

— Steve Majewski

> On Nov 20, 2017, at 3:35 PM, Celia Caust-Ellenbogen <ccauste1 at swarthmore.edu> wrote:
> Hello all,
> We're using v2.1.2 and getting ready to launch the PUI. We're not using digital objects at all so I'd like to hide "Limit to digital materials" from the search options. 
> <Screen Shot 2017-11-20 at 3.31.05 PM.png>
> I could swear I figured this out earlier, but then I un-did it for some reason, and now I can't remember how to do it. 
> Thanks,
> Celia
> -- 
> Celia Caust-Ellenbogen 
> Friends Historical Library of Swarthmore College <http://swarthmore.edu/friends-historical-library>
> 610-328-8498
> ccauste1 at swarthmore.edu <mailto:ccauste1 at swarthmore.edu>
> she/her/hers
> _______________________________________________
> Archivesspace_Users_Group mailing list
> 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/20171120/8727509c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4943 bytes
Desc: not available
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20171120/8727509c/attachment.bin>

More information about the Archivesspace_Users_Group mailing list