From aa449f514543bbfd74ba6cef6b23afae8dd8705b Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Tue, 9 Jun 2026 11:45:01 -0400 Subject: [PATCH 1/2] Add USE search box toggle and form to search widget --- .../class-multisearch-widget.php | 65 ++++++++++++++----- .../mitlib-multisearch-widget.css | 57 ++++++++++++++++ .../templates/tab-all-use.php | 39 +++++++++++ 3 files changed, 146 insertions(+), 15 deletions(-) create mode 100644 web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use.php diff --git a/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php b/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php index e3873dd2..4bdda903 100644 --- a/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php +++ b/web/app/plugins/mitlib-multisearch-widget/class-multisearch-widget.php @@ -45,6 +45,9 @@ public function widget( $args, $instance ) { $articles_tab_name = 'Articles + chapters'; $more_template = 'templates/tab-more-alma.php'; } + if ( 'use' == $instance['targets'] ) { + $all_template = 'templates/tab-all-use.php'; + } // Strip initial arguments. $args = null; @@ -84,27 +87,44 @@ public function widget( $args, $instance ) { include( 'templates/form_nojs.html' ); echo ''; echo '
'; - echo '

Search the MIT libraries

- '; + + // Render the individual tab panes + echo '
'; + include( $all_template ); + echo '
'; + echo '
'; + include( $books_template ); + echo '
'; + echo '
'; + include( $articles_template ); + echo '
'; + echo '
'; + include( $more_template ); + echo '
'; + + }; + + if ( $instance['targets'] == 'use' ) { + + echo '
'; + include( $all_template ); + echo '
'; + + }; + if ( $instance['banner_text'] ) { $allowed = array( 'a' => array( @@ -186,6 +206,21 @@ class="widefat" Alma and Primo +
  • + +
  • All panel

    +
    + +
    +
    + +
    +
    + +
    +
    +
    + From b7da68aa5ca8170f97e3a554834f643d9c60d6d9 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Tue, 9 Jun 2026 15:14:02 -0400 Subject: [PATCH 2/2] Updating url to search USE --- .../plugins/mitlib-multisearch-widget/templates/tab-all-use.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use.php b/web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use.php index 168a587f..f5ebce56 100644 --- a/web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use.php +++ b/web/app/plugins/mitlib-multisearch-widget/templates/tab-all-use.php @@ -10,7 +10,7 @@

    All panel