|
Lines 107-113
sub _increment_barcode {
Link Here
|
| 107 |
|
107 |
|
| 108 |
|
108 |
|
| 109 |
sub generate_subfield_form { |
109 |
sub generate_subfield_form { |
| 110 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition) = @_; |
110 |
my ($tag, $subfieldtag, $value, $tagslib,$subfieldlib, $branches, $biblionumber, $temp, $loop_data, $i, $restrictededition, $patron) = @_; |
| 111 |
|
111 |
|
| 112 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
112 |
my $frameworkcode = &GetFrameworkCode($biblionumber); |
| 113 |
|
113 |
|
|
Lines 171-177
sub generate_subfield_form {
Link Here
|
| 171 |
my %authorised_lib; |
171 |
my %authorised_lib; |
| 172 |
# builds list, depending on authorised value... |
172 |
# builds list, depending on authorised value... |
| 173 |
if ( $subfieldlib->{authorised_value} eq "branches" ) { |
173 |
if ( $subfieldlib->{authorised_value} eq "branches" ) { |
|
|
174 |
my @allowed = $patron->libraries_where_can_edit_items; |
| 174 |
foreach my $thisbranch (@$branches) { |
175 |
foreach my $thisbranch (@$branches) { |
|
|
176 |
next unless any { /^$thisbranch->{branchcode}$/ } @allowed; |
| 175 |
push @authorised_values, $thisbranch->{branchcode}; |
177 |
push @authorised_values, $thisbranch->{branchcode}; |
| 176 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
178 |
$authorised_lib{$thisbranch->{branchcode}} = $thisbranch->{branchname}; |
| 177 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
179 |
$value = $thisbranch->{branchcode} if $thisbranch->{selected} && !$value; |
|
Lines 927-933
if($itemrecord){
Link Here
|
| 927 |
|
929 |
|
| 928 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
930 |
next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10"); |
| 929 |
|
931 |
|
| 930 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition); |
932 |
my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $patron); |
| 931 |
push @fields, "$tag$subfieldtag"; |
933 |
push @fields, "$tag$subfieldtag"; |
| 932 |
push (@loop_data, $subfield_data); |
934 |
push (@loop_data, $subfield_data); |
| 933 |
$i++; |
935 |
$i++; |
|
Lines 951-957
foreach my $tag ( keys %{$tagslib}){
Link Here
|
| 951 |
my @values = (undef); |
953 |
my @values = (undef); |
| 952 |
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); |
954 |
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); |
| 953 |
for my $value (@values){ |
955 |
for my $value (@values){ |
| 954 |
my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition); |
956 |
my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $libraries, $biblionumber, $temp, \@loop_data, $i, $restrictededition, $patron); |
| 955 |
push (@loop_data, $subfield_data); |
957 |
push (@loop_data, $subfield_data); |
| 956 |
$i++; |
958 |
$i++; |
| 957 |
} |
959 |
} |