Lines 23-32
use CGI qw ( -utf8 );
Link Here
|
23 |
use C4::Auth qw( get_template_and_user ); |
23 |
use C4::Auth qw( get_template_and_user ); |
24 |
use C4::Biblio qw( GetBiblioData ); |
24 |
use C4::Biblio qw( GetBiblioData ); |
25 |
use C4::Context; |
25 |
use C4::Context; |
26 |
use C4::Items qw( GetItemsInfo ); |
|
|
27 |
use C4::Tags qw( get_tag_rows get_tags remove_tag ); |
26 |
use C4::Tags qw( get_tag_rows get_tags remove_tag ); |
28 |
use C4::Output qw( output_html_with_http_headers ); |
27 |
use C4::Output qw( output_html_with_http_headers ); |
29 |
|
28 |
|
|
|
29 |
use Koha::Biblios; |
30 |
|
30 |
my $needed_flags = { tools => 'moderate_tags' |
31 |
my $needed_flags = { tools => 'moderate_tags' |
31 |
}; # FIXME: replace when more specific permission is created. |
32 |
}; # FIXME: replace when more specific permission is created. |
32 |
|
33 |
|
Lines 57-67
else {
Link Here
|
57 |
if ($tag) { |
58 |
if ($tag) { |
58 |
my $taglist = get_tag_rows( { term => $tag } ); |
59 |
my $taglist = get_tag_rows( { term => $tag } ); |
59 |
for ( @{$taglist} ) { |
60 |
for ( @{$taglist} ) { |
|
|
61 |
# FIXME We should use Koha::Biblio here |
60 |
my $dat = &GetBiblioData( $_->{biblionumber} ); |
62 |
my $dat = &GetBiblioData( $_->{biblionumber} ); |
61 |
my @items = GetItemsInfo( $_->{biblionumber} ); |
63 |
my $biblio = Koha::Biblios->find($dat->{biblionumber}); |
|
|
64 |
my $items = $biblio->items->search_ordered; |
62 |
$dat->{biblionumber} = $_->{biblionumber}; |
65 |
$dat->{biblionumber} = $_->{biblionumber}; |
63 |
$dat->{tag_id} = $_->{tag_id}; |
66 |
$dat->{tag_id} = $_->{tag_id}; |
64 |
$dat->{items} = \@items; |
67 |
$dat->{items} = $items; |
65 |
$dat->{TagLoop} = get_tags( |
68 |
$dat->{TagLoop} = get_tags( |
66 |
{ |
69 |
{ |
67 |
biblionumber => $_->{biblionumber}, |
70 |
biblionumber => $_->{biblionumber}, |
68 |
- |
|
|