Bugzilla – Attachment 13286 Details for
Bug 6813
Search for duplicates across orders, suggestions and catalog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6813: Followup: FIX tabs and replace all occurrences of duplicate search
Bug-6813-Followup-FIX-tabs-and-replace-all-occurre.patch (text/plain), 16.05 KB, created by
Jonathan Druart
on 2012-11-07 15:32:32 UTC
(
hide
)
Description:
Bug 6813: Followup: FIX tabs and replace all occurrences of duplicate search
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-11-07 15:32:32 UTC
Size:
16.05 KB
patch
obsolete
>From 17a324e0ec91f3a99abc74413a453b9366123609 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 7 Nov 2012 16:24:40 +0100 >Subject: [PATCH] Bug 6813: Followup: FIX tabs and replace all occurrences of > duplicate search > >- tabs was broken >- 'duplicate search' have to be replaced with 'duplicate finder' >- adds datatable instead of tablesorter >--- > acqui/acqui-home.pl | 1 - > acqui/{duplicatesearch.pl => duplicatefinder.pl} | 4 +- > .../prog/en/includes/acquisitions-menu.inc | 2 +- > .../prog/en/modules/acqui/duplicatefinder.tt | 148 +++++++++++++++++++ > .../prog/en/modules/acqui/duplicatesearch.tt | 154 -------------------- > 5 files changed, 151 insertions(+), 158 deletions(-) > rename acqui/{duplicatesearch.pl => duplicatefinder.pl} (97%) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatefinder.tt > delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatesearch.tt > >diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl >index 8b6c584..621c2b0 100755 >--- a/acqui/acqui-home.pl >+++ b/acqui/acqui-home.pl >@@ -94,7 +94,6 @@ my $totavail_active = 0; > my @budget_loop; > foreach my $budget ( @{$budget_arr} ) { > next unless (CanUserUseBudget($loggedinuser, $budget, $userflags)); >- > $budget->{budget_code_indent} =~ s/\ /\ \;/g; > > $budget->{'budget_branchname'} = >diff --git a/acqui/duplicatesearch.pl b/acqui/duplicatefinder.pl >similarity index 97% >rename from acqui/duplicatesearch.pl >rename to acqui/duplicatefinder.pl >index 32c5763..88a5bcf 100755 >--- a/acqui/duplicatesearch.pl >+++ b/acqui/duplicatefinder.pl >@@ -22,7 +22,7 @@ > > =head1 NAME > >-duplicatesearch.pl >+duplicatefinder.pl > > =head1 DESCRIPTION > >@@ -49,7 +49,7 @@ my $op = $input->param('op'); > # getting the template > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >- template_name => "acqui/duplicatesearch.tmpl", >+ template_name => "acqui/duplicatefinder.tt", > query => $input, > type => "intranet", > authnotrequired => 0, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >index 9be34c4..a00bd9e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc >@@ -5,7 +5,7 @@ > [% IF ( CAN_user_acquisition_budget_manage ) %] > <li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a></li> > <li><a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a></li> >- <li><a href="/cgi-bin/koha/acqui/duplicatesearch.pl">Duplicate finder</a></li> >+ <li><a href="/cgi-bin/koha/acqui/duplicatefinder.pl">Duplicate finder</a></li> > [% END %] > [% IF ( CAN_user_parameters ) %] > <li><a href="/cgi-bin/koha/admin/currency.pl">Currencies</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatefinder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatefinder.tt >new file mode 100644 >index 0000000..8a5b2bf >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatefinder.tt >@@ -0,0 +1,148 @@ >+[% USE KohaDates %] >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Acquisitions › Duplicate finder</title> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'doc-head-close.inc' %] >+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> >+<script type="text/javascript">//<![CDATA[ >+ $(document).ready(function(){ >+ $("#order_results, #suggestion_results, #catalogue_results").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button", >+ "aoColumnDefs": [ >+ { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >+ ], >+ } ) ); >+ $('#alerttabs').tabs(); >+ } ); >+ /** >+ * checkDuplicateFinderForm(myForm) >+ * This function checks the form to be correctly filled (search terms not empty). >+ */ >+ function checkDuplicateFinderForm(myForm) { >+ if( (myForm.title.value.trim() + myForm.author.value.trim() + myForm.isbn.value.trim()).length == 0 ){ >+ alert(_("Please enter a search term for Title, Author and/or ISBN.")); >+ return false; >+ } >+ return true; >+ } >+//]]> >+</script> >+</head> >+<body id="acq_duplicatefinder" class="acq"> >+[% INCLUDE 'header.inc' %] >+[% INCLUDE 'acquisitions-search.inc' %] >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="duplicatefinder.pl">Duplicate finder</a></div> >+ <div id="doc3" class="yui-t2"> >+ <div id="bd"> >+ <div id="yui-main"> >+ <div class="yui-b"> >+ >+ <h1>Duplicate finder</h1> >+ <p>Please note that search can be slow on a large database.</p> >+ <div id="acq_duplicatefinder"> >+ [% IF ( result ) %] >+ <div id="alerttabs" class="toptabs"> >+ <ul> >+ <li><a href="#pagerordertable">Order ([% numresults_order %])</a></li> >+ <li><a href="#pagersuggestiontable">Suggestion ([% numresults_sugg %])</a></li> >+ <li><a href="#pagercatalogtable">Catalog ([% numresults_bib %])</a></li> >+ </ul> >+ <div id="pagerordertable"> >+ [% IF (numresults_order) %] >+ <table id="order_results"> >+ <thead> >+ <tr> >+ <th>Basket name</th> >+ <th>Order number</th> >+ <th>Summary</th> >+ <th>Vendor</th> >+ </tr> >+ </thead> >+ [% FOREACH orders_loo IN orders_loop %] >+ <tr> >+ <td><a href="basket.pl?basketno=[% orders_loo.basketno %]">[% orders_loo.basketname %]</a></td> >+ <td><a href="neworderempty.pl?ordernumber=[% orders_loo.ordernumber %]">[% orders_loo.ordernumber %]</a></td> >+ <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% orders_loo.biblionumber %]">[% orders_loo.title |html %]</a><br />[% orders_loo.author %]</td> >+ <td><a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% orders_loo.id %]">[% orders_loo.name %]</a></td> >+ </tr> >+ [% END %] >+ </table> >+ [% ELSE %] >+ No results found. >+ [% END %] >+ </div> >+ <div id="pagersuggestiontable"> >+ <h1>Suggestion search results</h1> >+ [% IF (numresults_sugg) %] >+ <table id="suggestion_results"> >+ <thead> >+ <tr> >+ <th>Title</th> >+ <th>Author</th> >+ <th>ISBN</th> >+ <th>Status</th> >+ </tr> >+ </thead> >+ [% FOREACH sugg_loo IN sugg_loop %] >+ <tr> >+ <td><a href ="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% sugg_loo.suggestionid %]&op=edit"/>[% sugg_loo.title %]</a></td> >+ <td>[% sugg_loo.author %]</td> >+ <td>[% sugg_loo.isbn %]</td> >+ <td>[% sugg_loo.STATUS %]</td> >+ </tr> >+ [% END %] >+ </table> >+ [% ELSE %] >+ No results found. >+ [% END %] >+ </div> >+ <div id="pagercatalogtable"> >+ <h1>Catalog search results</h1> >+ [% IF (numresults_bib) %] >+ <table id="catalogue_results"> >+ <thead> >+ <tr> >+ <th>Title</th> >+ <th>Author</th> >+ <th>ISBN</th> >+ </tr> >+ </thead> >+ [% FOREACH bib_loo IN bib_loop %] >+ <tr> >+ <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% bib_loo.biblionumber %]">[% bib_loo.title %]</a></td> >+ <td>[% bib_loo.author %]</td> >+ <td>[% bib_loo.isbn %]</td> >+ </tr> >+ [% END %] >+ </table> >+ [% ELSE %] >+ No results found. >+ [% END %] >+ </div> >+ </div> >+[% ELSE %] >+ <p>Please enter search terms.</p> >+[% END %] >+ >+</div> >+</div> >+</div> >+<div class="yui-b"> >+<form name="duplicateFinderForm" onsubmit="return checkDuplicateFinderForm(this);" action="/cgi-bin/koha/acqui/duplicatefinder.pl" method="post"> >+ <input type="hidden" name="op" value="result" /> >+ <fieldset class="brief"> >+ <h4>Find duplicates:</h4> >+ <ol> >+ <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" size="20" /></li> >+ <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" size="20" /></li> >+ <li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]" size="20" /></li> >+ </ol> >+ <input type="submit" value="Search" /> <a href="/cgi-bin/koha/acqui/duplicatefinder.pl">Clear All</a> >+ </fieldset> >+</form> >+[% INCLUDE 'acquisitions-menu.inc' %] >+</div> >+</div> >+[% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatesearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatesearch.tt >deleted file mode 100644 >index fcf71cf..0000000 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicatesearch.tt >+++ /dev/null >@@ -1,154 +0,0 @@ >-[% USE KohaDates %] >-[% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Acquisitions › Duplicate finder</title> >-[% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script> >-<script type="text/javascript">//<![CDATA[ >- $(document).ready(function(){ >- $(".sorted").tablesorter({ >- sortList: [[0,0]], >- headers: { 1: { sorter: false}} >- }).tablesorterPager({container: $(".pager"),positionFixed: false,size: 10}); >-});//]]> >-</script> >-<script type="text/javascript">//<![CDATA[ >-$(function(){ >- $('#alerttabs > ul').tabs(); >-}); //]]> >-</script> >-</head> >-<body id="acq_duplicatesearch" class="acq"> >-[% INCLUDE 'header.inc' %] >-[% INCLUDE 'acquisitions-search.inc' %] >-<script type="text/javascript"> >-// <![CDATA[ >- /** >- * checkDuplicateFinderForm(myForm) >- * This function checks the form to be correctly filled (search terms not empty). >- */ >- function checkDuplicateFinderForm(myForm) { >- if( (myForm.title.value.trim() + myForm.author.value.trim() + myForm.isbn.value.trim()).length == 0 ){ >- alert(_("Please enter a search term for Title, Author and/or ISBN.")); >- return false; >- } >- return true; >- } >- // ]]> >-</script> >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="duplicatesearch.pl">Duplicate finder</a></div> >- <div id="doc3" class="yui-t2"> >- <div id="bd"> >- <div id="yui-main"> >- <div class="yui-b"> >- >- <h1>Duplicate finder</h1> >- <p>Please note that search can be slow on a large database.</p> >- <div id="acq_duplicatesearch"> >- [% IF ( result ) %] >- <div id="alerttabs" class="toptabs"> >- <ul> >- <li><a href="#pagerordertable">Order ([% numresults_order %])</a></li> >- <li><a href="#pagersuggestiontable">Suggestion ([% numresults_sugg %])</a></li> >- <li><a href="#pagercatalogtable">Catalog ([% numresults_bib %])</a></li> >- </ul> >- <div id="pagerordertable"> >- [% IF (numresults_order) %] >- [% INCLUDE 'table-pager.inc' perpage='10' %] >- <table id="ordertable" class="sorted"> >- [% ELSE %] >- <table> >- [% END %] >- <thead> >- <tr> >- <th>Basket name</th> >- <th>Order number</th> >- <th>Summary</th> >- <th>Vendor</th> >- </tr> >- </thead> >- [% FOREACH orders_loo IN orders_loop %] >- <tr> >- <td><a href="basket.pl?basketno=[% orders_loo.basketno %]">[% orders_loo.basketname %]</a></td> >- <td><a href="neworderempty.pl?ordernumber=[% orders_loo.ordernumber %]">[% orders_loo.ordernumber %]</a></td> >- <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% orders_loo.biblionumber %]">[% orders_loo.title |html %]</a><br />[% orders_loo.author %]</td> >- <td><a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% orders_loo.id %]">[% orders_loo.name %]</a></td> >- </tr> >- [% END %] >- </table> >- </div> >- <div id="pagersuggestiontable"> >- <h1>Suggestion search results</h1> >- [% IF (numresults_sugg) %] >- [% INCLUDE 'table-pager.inc' perpage='10' %] >- <table id="suggestiontable" class="sorted"> >- [% ELSE %] >- <table> >- [% END %] >- <thead> >- <tr> >- <th>Title</th> >- <th>Author</th> >- <th>ISBN</th> >- <th>Status</th> >- </tr> >- </thead> >- [% FOREACH sugg_loo IN sugg_loop %] >- <tr> >- <td><a href ="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% sugg_loo.suggestionid %]&op=edit"/>[% sugg_loo.title %]</a></td> >- <td>[% sugg_loo.author %]</td> >- <td>[% sugg_loo.isbn %]</td> >- <td>[% sugg_loo.STATUS %]</td> >- </tr> >- [% END %] >- </table> >- </div> >- <div id="pagercatalogtable"> >- <h1>Catalog search results</h1> >- [% IF (numresults_bib) %] >- [% INCLUDE 'table-pager.inc' perpage='10' %] >- <table id="catalogtable" class="sorted"> >- [% ELSE %] >- <table> >- [% END %] >- <thead> >- <tr> >- <th>Title</th> >- <th>Author</th> >- <th>ISBN</th> >- </tr> >- </thead> >- [% FOREACH bib_loo IN bib_loop %] >- <tr> >- <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% bib_loo.biblionumber %]">[% bib_loo.title %]</a></td> >- <td>[% bib_loo.author %]</td> >- <td>[% bib_loo.isbn %]</td> >- </tr> >- [% END %] >- </table> >- </div> >- </div> >-[% ELSE %] >- <p>Please enter search terms.</p> >-[% END %] >- >-</div> >-</div> >-</div> >-<div class="yui-b"> >-<form name="duplicateFinderForm" onsubmit="return checkDuplicateFinderForm(this);" action="/cgi-bin/koha/acqui/duplicatesearch.pl" method="post"> >- <input type="hidden" name="op" value="result" /> >- <fieldset class="brief"> >- <h4>Find duplicates:</h4> >- <ol> >- <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" size="20" /></li> >- <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" size="20" /></li> >- <li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% isbn %]" size="20" /></li> >- </ol> >- <input type="submit" value="Search" /> <a href="/cgi-bin/koha/acqui/duplicatesearch.pl">Clear All</a> >- </fieldset> >-</form> >-[% INCLUDE 'acquisitions-menu.inc' %] >-</div> >-</div> >-[% INCLUDE 'intranet-bottom.inc' %] >-- >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 6813
:
9982
|
11527
|
11531
|
11532
|
11533
|
11534
|
11537
|
11538
|
11539
|
11541
|
11542
|
12456
|
12714
|
12715
|
12716
|
13286
|
13806
|
14009
|
15793
|
15794
|
15795
|
15796