Bugzilla – Attachment 67829 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), 8.68 KB, created by
Katrin Fischer
on 2017-10-09 06:29:21 UTC
(
hide
)
Description:
Bug11299 - Populated field for record when import authority in z3950
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-10-09 06:29:21 UTC
Size:
8.68 KB
patch
obsolete
>From 67942831f5722e3a29602f76b2cbb95674c971b8 Mon Sep 17 00:00:00 2001 >From: Bouzid Fergani <bouzid.fergani@inlibro.com> >Date: Fri, 6 Oct 2017 08:25:23 -0400 >Subject: [PATCH] Bug11299 - Populated field for record when import authority > in z3950 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > cataloguing/z3950_auth_search.pl | 4 ++++ > 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 | 5 +++-- > koha-tmpl/intranet-tmpl/prog/js/z3950_search.js | 7 ++++--- > 5 files changed, 19 insertions(+), 6 deletions(-) > >diff --git a/cataloguing/z3950_auth_search.pl b/cataloguing/z3950_auth_search.pl >index c808b7b7b1..1cc5154652 100755 >--- a/cataloguing/z3950_auth_search.pl >+++ b/cataloguing/z3950_auth_search.pl >@@ -42,6 +42,8 @@ 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 +65,7 @@ $template->param( > subjectsubdiv => $subjectsubdiv, > srchany => $srchany, > authid => $authid, >+ index => $index, > ); > > if ( $op ne "do_search" ) { >@@ -72,6 +75,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 d339b238d2..a307ebbe5a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -20,8 +20,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 %]"+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 %]"+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 54e370a6f8..18d10a91a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -178,6 +178,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) { >@@ -203,6 +204,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 6e6de65fa3..d0f0f11a58 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 >@@ -65,6 +65,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <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 %]" /> >+ <input type="hidden" name="index" value="[% index %]" /> > <div class="yui-g"> > <div class="yui-u first"> > <fieldset class="rows"> >@@ -120,12 +121,12 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <tbody>[% FOREACH breeding_loo IN breeding_loop %] > [% IF ( breeding_loo.breedingid ) %] > <tr id="row[% breeding_loo.breedingid %]"> >- <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">Preview MARC</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td> >+ <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">Preview MARC</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]" data-index="[% index %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td> > <td>[% breeding_loo.heading %]</td> > <td>[% breeding_loo.heading_code %]</td> > <td class="actions"> > <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC btn btn-default btn-xs"><i class="fa fa-eye"></i> Show MARC</a> >- <a href="#" class="import_record btn btn-default btn-xs" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]"><i class="fa fa-download"></i> Import</a> >+ <a href="#" class="import_record btn btn-default btn-xs" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]" data-index="[% index %]"><i class="fa fa-download"></i> Import</a> > </td> > </tr> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >index 95ef673dfe..986566dc94 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_headingcode, '', data_index ); > } > return false; > }); >-- >2.11.0
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