From 31277c3dcdfb866f3f50666a2393b92557e5cca0 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Wed, 7 Jan 2009 14:57:28 -0600 Subject: [PATCH] Bug 2747 for staff interface itemtype display. Prefer accuracy over graphical icon. Signed-off-by: Galen Charlton --- C4/Items.pm | 32 +++++++++++++------ .../prog/en/modules/catalogue/detail.tmpl | 18 +++++++---- 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 49adccffc8..d03b8a4d2d 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1190,14 +1190,29 @@ If this is set, it is set to C. sub GetItemsInfo { my ( $biblionumber, $type ) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT items.*,biblio.*,biblioitems.volume,biblioitems.number,biblioitems.itemtype,biblioitems.isbn,biblioitems.issn,biblioitems.publicationyear,biblioitems.publishercode,biblioitems.volumedate,biblioitems.volumedesc,biblioitems.lccn,biblioitems.url,items.notforloan as itemnotforloan - FROM items - LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber - LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber"; - $query .= (C4::Context->preference('item-level_itypes')) ? - " LEFT JOIN itemtypes on items.itype = itemtypes.itemtype " - : " LEFT JOIN itemtypes on biblioitems.itemtype = itemtypes.itemtype "; - $query .= "WHERE items.biblionumber = ? ORDER BY items.dateaccessioned desc" ; + # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance. + my $query = " + SELECT items.*, + biblio.*, + biblioitems.volume, + biblioitems.number, + biblioitems.itemtype, + biblioitems.isbn, + biblioitems.issn, + biblioitems.publicationyear, + biblioitems.publishercode, + biblioitems.volumedate, + biblioitems.volumedesc, + biblioitems.lccn, + biblioitems.url, + items.notforloan as itemnotforloan, + itemtypes.description + FROM items + LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber + LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber + LEFT JOIN itemtypes ON itemtypes.itemtype = " + . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); + $query .= " WHERE items.biblionumber = ? ORDER BY items.dateaccessioned desc" ; my $sth = $dbh->prepare($query); $sth->execute($biblionumber); my $i = 0; @@ -1315,7 +1330,6 @@ sub GetItemsInfo { $results[$i] = $data; $i++; } - $sth->finish; if($serial) { return( sort { ($b->{'publisheddate'} || $b->{'enumchron'}) cmp ($a->{'publisheddate'} || $a->{'enumchron'}) } @results ); } else { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index eb63fb566f..1c72ffadd6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -169,7 +169,18 @@ function verify_images() { - " alt="" title="" /> + + + + + + + " alt="" title="" /> + + + + + @@ -312,11 +323,6 @@ function verify_images() { , - - .gif" title="" /> --> - --> - - -- 2.39.5