@@ -, +, @@
want add it
---
C4/Biblio.pm | 4 +-
.../prog/en/modules/cataloguing/addbiblio.tt | 53 +++-------------------
2 files changed, 9 insertions(+), 48 deletions(-)
--- a/C4/Biblio.pm
+++ a/C4/Biblio.pm
@@ -617,12 +617,12 @@ sub LinkBibHeadingsToAuthorities {
$field->delete_subfield( code => '9' );
$num_headings_changed++;
$results{'unlinked'}->{ $heading->display_form() }++;
- push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND'}) if $verbose;
+ push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND', auth_type => $heading->auth_type()}) if $verbose;
}
}
else {
$results{'unlinked'}->{ $heading->display_form() }++;
- push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND'}) if $verbose;
+ push(@{$results{'details'}}, { tag => $field->tag(), authid => undef, status => 'NONE_FOUND', auth_type => $heading->auth_type()}) if $verbose;
}
}
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
@@ -167,54 +167,15 @@ function PopupZ3950() {
}
}
-function addCreateAuthorityButton(tag_subfield_line, tag, index) {
+/**
+* this function append button for create new authority if not found
+*/
+
+function addCreateAuthorityButton(tag_subfield_line, auth_type) {
var title = _("Create authority");
var elem = $('');
+ elem.attr("onclick","window.open('../authorities/authorities.pl?authtypecode=" + auth_type + "','','fullscreen','scrollbars')");
tag_subfield_line.append(elem);
-
- elem.click(function() {
- var biblioindex = $(this).parents('.subfield_line').find('input').eq(1).attr('id');
- var popup = window.open("", "new_auth_popup",'width=700,height=550,toolbar=false,scrollbars=yes');
-
- if(popup !== null) {
- // Create a new form that will be POSTed in the new window
- var form = $('