Bugzilla – Attachment 37079 Details for
Bug 13886
Add ability to merge records directly from cataloging search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13886 - Add ability to merge records directly from cataloging search
Bug-13886---Add-ability-to-merge-records-directly-.patch (text/plain), 2.75 KB, created by
Nick Clemens (kidclamp)
on 2015-03-21 15:38:11 UTC
(
hide
)
Description:
Bug 13886 - Add ability to merge records directly from cataloging search
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2015-03-21 15:38:11 UTC
Size:
2.75 KB
patch
obsolete
>From 808e372f78b3b57d36efc239307d5fc9eb3c5727 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@quecheelibrary.org> >Date: Sat, 21 Mar 2015 11:31:14 -0400 >Subject: [PATCH] Bug 13886 - Add ability to merge records directly from > cataloging search > >This patch adds a merge button and checkboxes to the cataloging search results screen to allow librarians to merge directly from these reults > >To test: >1 - Apply patch >2 - Perform a cataloging search >3 - Try to select 1 or more than 2 records to merge and check that you get an error >4 - Select 2 records to merge and confirm the correct records are passed to the merge tool >--- > .../prog/en/modules/cataloguing/addbooks.tt | 21 ++++++++++++++++++++ > 1 file changed, 21 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 5619816..59380e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -18,6 +18,10 @@ > PopupZ3950($(this).prop('id')); > return false; > }); >+ $(".merge-items").on("click",function(e){ >+ e.preventDefault(); >+ MergeItems(); >+ }); > }); > > /* this function open a popup to search on z3950 server. */ >@@ -36,6 +40,20 @@ > return strQuery; > } > >+ /** >+ * This function checks if the adequate number of records are checked for merging >+ */ >+ function MergeItems() { >+ var checkboxes = $("input:checkbox:checked"); >+ var nbCheckbox = checkboxes.length; >+ if (nbCheckbox != 2) { >+ alert(_("Two records must be selected for merging.")); >+ } else { >+ location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&biblionumber=' + checkboxes[1].value; >+ } >+ return false; >+ } >+ > //]]> > </script> > </head> >@@ -73,6 +91,7 @@ > [% END %] > </ul> > </div> >+ <div class="btn-group"><button type="submit" class="btn btn-small merge-items"><i class="icon-merge"></i> Merge selected</button></div> > </div> > [% END %] > >@@ -89,6 +108,7 @@ > <div class="searchresults"> > <table> > <tr> >+ <th> </th> > <th>Title</th> > <th>Location</th> > <th>Preview</th> >@@ -101,6 +121,7 @@ > [% ELSE %] > <tr> > [% END %] >+ <td><input type="checkbox" class="selection" id="bib[% resultsloo.biblionumber %]" name="biblionumber" value="[% resultsloo.biblionumber %]" /></td> > <td> > <p> > <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% resultsloo.biblionumber %]">[% resultsloo.title |html %]</a> >-- >1.7.10.4
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 13886
:
37079
|
37346
|
37347
|
37348
|
37349
|
38052
|
38054
|
38817