Bugzilla – Attachment 194042 Details for
Bug 41496
Item Search Copy sharable Link not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41496: Update current URL for item search
Bug-41496-Update-current-URL-for-item-search.patch (text/plain), 1.99 KB, created by
Andrew Fuerste-Henry
on 2026-02-26 20:17:15 UTC
(
hide
)
Description:
Bug 41496: Update current URL for item search
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2026-02-26 20:17:15 UTC
Size:
1.99 KB
patch
obsolete
>From 0bb6ce03fb90dc040f0bec9c0f8de10d3fd18a42 Mon Sep 17 00:00:00 2001 >From: Kevin Carnes <kevin.carnes@ub.lu.se> >Date: Tue, 24 Feb 2026 13:15:05 +0100 >Subject: [PATCH] Bug 41496: Update current URL for item search > >The "Copy shareable link" button on the item search table creates a link >based on the current URL, but an item search does not update the current URL >with the search parameters. > >This patch copies the code to generate the URL with search parameters and >uses it to update the current URL. > >Test plan: >1. Click "Item search". >2. Perform an item search (e.g. Home library is Centerville). >3. Click the "Copy shareable link" button on the right side of the screen > above the table. >4. Paste and visit the link. >5. Observe that you only see the search page without any results. >6. Apply patch. >7. Repeat steps 1-4. >8. Observe that you see the results with the table settings. >9. Sign off. > >Sponsored-by: Lund University Library >Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> >--- > .../prog/en/modules/catalogue/itemsearch.tt | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index 7e0a947f5e7..9e08f710761 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -726,6 +726,15 @@ > prepSelections(); > $('[data-bs-toggle="tooltip"]').tooltip(); > }); >+ >+ let shareable_params = params.map(p => { >+ if(p.name === 'format') { >+ return { ...p, value: 'shareable' }; >+ } >+ return p; >+ }); >+ let shareable_url = window.location.origin + window.location.pathname + '?' + $.param(shareable_params); >+ history.replaceState(null, "", shareable_url); > } > > $(document).ready(function () { >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41496
:
193715
| 194042