|
Lines 47-52
use C4::Members; # to use GetMember
Link Here
|
| 47 |
use C4::Serials; # CountSubscriptionFromBiblionumber |
47 |
use C4::Serials; # CountSubscriptionFromBiblionumber |
| 48 |
use C4::Search; # enabled_staff_search_views |
48 |
use C4::Search; # enabled_staff_search_views |
| 49 |
use C4::Acquisition qw(GetOrdersByBiblionumber); |
49 |
use C4::Acquisition qw(GetOrdersByBiblionumber); |
|
|
50 |
use Koha::RecordProcessor; |
| 50 |
|
51 |
|
| 51 |
|
52 |
|
| 52 |
#---- Internal function |
53 |
#---- Internal function |
|
Lines 68-83
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Link Here
|
| 68 |
} |
69 |
} |
| 69 |
); |
70 |
); |
| 70 |
|
71 |
|
| 71 |
my $res = GetISBDView($biblionumber, "intranet"); |
72 |
if ( not defined $biblionumber ) { |
| 72 |
if ( not defined $res ) { |
|
|
| 73 |
# biblionumber invalid -> report and exit |
73 |
# biblionumber invalid -> report and exit |
| 74 |
$template->param( unknownbiblionumber => 1, |
74 |
$template->param( unknownbiblionumber => 1, |
| 75 |
biblionumber => $biblionumber |
75 |
biblionumber => $biblionumber |
| 76 |
); |
76 |
); |
| 77 |
output_html_with_http_headers $query, $cookie, $template->output; |
77 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 78 |
exit; |
78 |
exit; |
| 79 |
} |
79 |
} |
| 80 |
|
80 |
|
|
|
81 |
my $record_unfiltered = GetMarcBiblio($biblionumber,1); |
| 82 |
my $record_processor = Koha::RecordProcessor->new({ |
| 83 |
filters => 'ViewPolicy', |
| 84 |
options => { |
| 85 |
interface => 'intranet', |
| 86 |
}, |
| 87 |
}); |
| 88 |
my $record_filtered = $record_unfiltered->clone(); |
| 89 |
my $record = $record_processor->process($record_filtered); |
| 90 |
|
| 91 |
if ( not defined $record ) { |
| 92 |
# biblionumber invalid -> report and exit |
| 93 |
$template->param( unknownbiblionumber => 1, |
| 94 |
biblionumber => $biblionumber |
| 95 |
); |
| 96 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 97 |
exit; |
| 98 |
} |
| 99 |
|
| 100 |
my $framework = GetFrameworkCode( $biblionumber ); |
| 101 |
my $res = GetISBDView({ |
| 102 |
'record' => $record, |
| 103 |
'template' => 'intranet', |
| 104 |
'framework' => $framework, |
| 105 |
}); |
| 106 |
|
| 81 |
if($query->cookie("holdfor")){ |
107 |
if($query->cookie("holdfor")){ |
| 82 |
my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); |
108 |
my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor")); |
| 83 |
$template->param( |
109 |
$template->param( |
|
Lines 101-107
if ($subscriptionsnumber) {
Link Here
|
| 101 |
subscriptiontitle => $subscriptiontitle, |
127 |
subscriptiontitle => $subscriptiontitle, |
| 102 |
); |
128 |
); |
| 103 |
} |
129 |
} |
| 104 |
my $record = GetMarcBiblio($biblionumber); |
|
|
| 105 |
|
130 |
|
| 106 |
$template->param ( |
131 |
$template->param ( |
| 107 |
ISBD => $res, |
132 |
ISBD => $res, |