|
Lines 16-21
package Koha::UI::Form::Builder::Item;
Link Here
|
| 16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
|
|
19 |
use MARC::Record; |
| 19 |
use C4::Context; |
20 |
use C4::Context; |
| 20 |
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio GetMarcStructure IsMarcStructureInternal ); |
21 |
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio GetMarcStructure IsMarcStructureInternal ); |
| 21 |
use C4::Koha qw( GetAuthorisedValues ); |
22 |
use C4::Koha qw( GetAuthorisedValues ); |
|
Lines 475-481
sub edit_form {
Link Here
|
| 475 |
$library->{selected} = 1 if $branchcode && $library->{branchcode} eq $branchcode; |
476 |
$library->{selected} = 1 if $branchcode && $library->{branchcode} eq $branchcode; |
| 476 |
} |
477 |
} |
| 477 |
|
478 |
|
| 478 |
my $item = $self->{item}; |
479 |
my $item = $self->{item}; |
|
|
480 |
my $marc_more_subfields = $item->{more_subfields_xml} |
| 481 |
? |
| 482 |
# FIXME Use Maybe MARC::Record::new_from_xml if encoding issues on subfield (??) |
| 483 |
MARC::Record->new_from_xml( $item->{more_subfields_xml}, 'UTF-8' ) |
| 484 |
: undef; |
| 485 |
|
| 479 |
my $biblionumber = $self->{biblionumber}; |
486 |
my $biblionumber = $self->{biblionumber}; |
| 480 |
my $frameworkcode = $biblionumber ? GetFrameworkCode($biblionumber) : q{}; |
487 |
my $frameworkcode = $biblionumber ? GetFrameworkCode($biblionumber) : q{}; |
| 481 |
my $marc_record = $biblionumber ? GetMarcBiblio( { biblionumber => $biblionumber } ) : undef; |
488 |
my $marc_record = $biblionumber ? GetMarcBiblio( { biblionumber => $biblionumber } ) : undef; |
|
Lines 527-535
sub edit_form {
Link Here
|
| 527 |
} |
534 |
} |
| 528 |
else { |
535 |
else { |
| 529 |
# Not mapped, picked the values from more_subfields_xml's MARC |
536 |
# Not mapped, picked the values from more_subfields_xml's MARC |
| 530 |
my $marc_more = $item->{marc_more_subfields_xml}; |
537 |
if ($marc_more_subfields) { |
| 531 |
if ($marc_more) { |
538 |
for my $f ( $marc_more_subfields->fields($tag) ) { |
| 532 |
for my $f ( $marc_more->fields($tag) ) { |
|
|
| 533 |
push @values, $f->subfield($subfieldtag); |
539 |
push @values, $f->subfield($subfieldtag); |
| 534 |
} |
540 |
} |
| 535 |
} |
541 |
} |