Bugzilla – Attachment 79397 Details for
Bug 11299
Add a button to automatically link authority records in cataloguing (AJAX)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug11299 - Populated field for record when import authority in z3950
Bug11299---Populated-field-for-record-when-import-.patch (text/plain), 7.48 KB, created by
Bouzid Fergani
on 2018-09-25 19:38:50 UTC
(
hide
)
Description:
Bug11299 - Populated field for record when import authority in z3950
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2018-09-25 19:38:50 UTC
Size:
7.48 KB
patch
obsolete
>From afd6e60a67b2081a985db6d197cad393a3ed40d6 Mon Sep 17 00:00:00 2001 >From: Bouzid Fergani <bouzid.fergani@inlibro.com> >Date: Fri, 21 Sep 2018 14:55:31 -0400 >Subject: [PATCH] Bug11299 - Populated field for record when import authority > in z3950 > >--- > cataloguing/z3950_auth_search.pl | 3 +++ > koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 6 ++++++ > .../intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt | 3 ++- > koha-tmpl/intranet-tmpl/prog/js/z3950_search.js | 7 ++++--- > 5 files changed, 17 insertions(+), 5 deletions(-) > >diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl >index e65b8aa..c066441 100755 >--- a/cataloguing/z3950_auth_search.pl >+++ b/cataloguing/z3950_auth_search.pl >@@ -42,6 +42,7 @@ my $subjectsubdiv = $input->param('subjectsubdiv'); > my $srchany = $input->param('srchany'); > my $op = $input->param('op')||''; > my $page = $input->param('current_page') || 1; >+my $index =$input->param('index'); > $page = $input->param('goto_page') if $input->param('changepage_goto'); > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ >@@ -63,6 +64,7 @@ $template->param( > subjectsubdiv => $subjectsubdiv, > srchany => $srchany, > authid => $authid, >+ index => $index, > ); > > if ( $op ne "do_search" ) { >@@ -72,6 +74,7 @@ if ( $op ne "do_search" ) { > $template->param( > serverloop => $serverloop, > opsearch => "search", >+ index => $index, > ); > output_html_with_http_headers $input, $cookie, $template->output; > exit; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index ec97bf4..3b969c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -22,8 +22,9 @@ > $("#z3950submit").click(function(){ > if (confirm(_("Please note that this Z39.50 search could replace the current record."))){ > var strQuery = GetZ3950Terms(); >+ var index = "&index=[% index %]"; > if(strQuery){ >- window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid | html %]"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); >+ window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid | html %]"+strQuery+index,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); > } > } > return false; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 7335c5f..9bffa19 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -177,6 +177,7 @@ function addCreateAuthorityButton(tag_subfield_line, heading, tag_index) { > tag_subfield_line.append(elem); > var tag_subfield_line_a = $('.subfield_line[id^=subfield' + heading.tag + 'a]').eq(tag_index); > var subfield_a = tag_subfield_line_a.children('.input_marceditor').eq(0); >+ var index = subfield_a.attr('id'); > elem.click(function() { > var popup = window.open("", "new_auth_popup",'fullscreen,toolbar=false,scrollbars=yes'); > if(popup !== null) { >@@ -202,6 +203,11 @@ function addCreateAuthorityButton(tag_subfield_line, heading, tag_index) { > name: 'tagbiblio', > value: heading.tag > })); >+ form.append($('<input>').attr({ >+ type: 'hidden', >+ name: 'index', >+ value: index >+ })); > $('.tag[id^=tag_' + heading.tag + '_]').eq(tag_index).find(':input').each(function(){ > form.append($('<input>').attr({ > type: 'hidden', >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >index 7a4a279..5971aa5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >@@ -21,6 +21,7 @@ > <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed"> > <input type="hidden" name="op" id="op" value="do_search" /> > <input type="hidden" name="authid" value="[% authid | html %]" /> >+ <input type="hidden" name="index" value="[% index %]" /> > <div class="row"> > <div class="col-xs-6"> > <fieldset class="rows"> >@@ -94,7 +95,7 @@ > </a> > <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% breeding_loo.breedingid | html %]"> > <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | html %]" class="previewMARC"><i class="fa fa-eye"></i> MARC preview</a></li> >- <li><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid | html %]" data-heading_code="[% breeding_loo.heading_code | html %]" data-authid="[% breeding_loo.authid | html %]"><i class="fa fa-download"></i> Import</a></li> >+ <li><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid | html %]" data-heading_code="[% breeding_loo.heading_code | html %]" data-authid="[% breeding_loo.authid | html %]" data-index="[% index %]" ><i class="fa fa-download"></i> Import</a></li> > </ul> > </div> > </td> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >index 95ef673..4c02a26 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >@@ -1,10 +1,10 @@ > //z3950_search.js for Authorities, Bib records and Acquisitions module >-function Import(Breeding, recordid, AuthType, FrameworkCode) { >+function Import(Breeding, recordid, AuthType, FrameworkCode, index) { > > if ( AuthType == false ) { > opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+recordid+"&z3950=1&frameworkcode="+FrameworkCode+"&breedingid="+Breeding; > } else { >- opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid; >+ opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid+"&index="+index; > } > window.close(); > return false; >@@ -87,10 +87,11 @@ $( document ).ready( function() { > var data_authid = $( this ).data( "authid" ); > var data_biblionumber = $( this ).data( "biblionumber" ); > var data_frameworkcode = $( this ).data( "frameworkcode" ); >+ var data_index = $( this ).data( "index" ); > if ( data_headingcode == undefined ) { > Import( data_breedingid, data_biblionumber, false , data_frameworkcode ); > } else { >- Import( data_breedingid, data_authid, data_headingcode ); >+ Import( data_breedingid, data_authid, data_headingcodei, "", data_index ); > } > return false; > }); >-- >2.7.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 11299
:
23146
|
26715
|
33074
|
37912
|
37913
|
37972
|
38737
|
39477
|
39478
|
39479
|
40831
|
41229
|
45218
|
56440
|
56508
|
56509
|
58307
|
60998
|
63311
|
63312
|
63313
|
64075
|
67162
|
67708
|
67709
|
67710
|
67712
|
67713
|
67714
|
67824
|
67825
|
67826
|
67827
|
67828
|
67829
|
79385
|
79386
|
79387
|
79388
|
79389
|
79390
|
79391
|
79392
|
79393
|
79394
|
79395
|
79396
|
79397
|
79398
|
79399
|
79447
|
79448
|
79449
|
79450
|
79451
|
79452
|
79545
|
94818
|
95126
|
95152
|
98571
|
98572
|
99249
|
108091
|
108309
|
108310
|
108396
|
108552
|
108834
|
108835
|
109062
|
109063
|
109069
|
109181
|
110553
|
110554
|
110555
|
110556
|
110557
|
110568
|
110569
|
110570
|
110571
|
110572
|
111706
|
111707
|
111708
|
111709
|
111710
|
112125
|
112126
|
112127
|
112128
|
112129
|
112130
|
112131
|
112132
|
112133
|
112134
|
112135
|
113562
|
113563
|
113564
|
113565
|
113566
|
113567
|
113568
|
114803
|
114924
|
114925
|
114926
|
114927
|
114928
|
114929
|
114930
|
114931
|
114932