Bugzilla – Attachment 148082 Details for
Bug 33167
Cleanup staff interface catalog details page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33167: Cleanup staff detail page
Bug-33167-Cleanup-staff-detail-page.patch (text/plain), 36.04 KB, created by
Nick Clemens (kidclamp)
on 2023-03-10 16:16:36 UTC
(
hide
)
Description:
Bug 33167: Cleanup staff detail page
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-03-10 16:16:36 UTC
Size:
36.04 KB
patch
obsolete
>From 3e83b27b131f11eccd8088c8f2b4a4b14a911492 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 9 Mar 2023 20:37:28 +0000 >Subject: [PATCH] Bug 33167: Cleanup staff detail page > >This patch begins reduing some of the extra things we are doing in >detail.pl that could easily be handled in the templates - fetching >authorised values and branches etc > >It also removes a loop to find items that should be hidden, and instead >uses a searh parameter > >The template changes either use item object rather than passed >variables, or utilize plugins to fetch authorised valued > >Template also includes addition of chomp to the template directives, >this reduces the size of the items table by several megabytes >on records with many items > >WIP >--- > catalogue/detail.pl | 66 +--- > .../prog/en/modules/catalogue/detail.tt | 348 +++++++++--------- > 2 files changed, 179 insertions(+), 235 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 905120ec9d..c5d6f98227 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -190,15 +190,10 @@ $template->param( > ); > > my $itemtypes = { map { $_->itemtype => $_ } @{ Koha::ItemTypes->search_with_localization->as_list } }; >-my $all_items = $biblio->items->search_ordered; >-my @items; >+my $params; > my $patron = Koha::Patrons->find( $borrowernumber ); >-while ( my $item = $all_items->next ) { >- push @items, $item >- unless $item->itemlost >- && $patron->category->hidelostitems >- && !$showallitems; >-} >+$params->{ itemlost } = 0 if $patron->category->hidelostitems && !$showallitems; >+my @items = $biblio->items->search_ordered( $params )->as_list; > > # flag indicating existence of at least one item linked via a host record > my $hostrecords; >@@ -210,6 +205,11 @@ if ( $hostitems->count ) { > } > > my $dat = &GetBiblioData($biblionumber); >+$dat->{'count'} = $biblio->items->count + $hostitems->count; >+$dat->{'showncount'} = scalar @items + $hostitems->count; >+$dat->{'hiddencount'} = $dat->{'count'} - $dat->{'showncount'}; >+ >+ > > #is biblio a collection and are bundles enabled > my $leader = $marc_record->leader(); >@@ -320,16 +320,6 @@ if ( defined $dat->{'itemtype'} ) { > $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }->imageurl ); > } > >-$dat->{'count'} = $all_items->count + $hostitems->count; >-$dat->{'showncount'} = scalar @items + $hostitems->count; >-$dat->{'hiddencount'} = $all_items->count + $hostitems->count - scalar @items; >- >-my $shelflocations = >- { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $fw, kohafield => 'items.location' } ) }; >-my $collections = >- { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $fw, kohafield => 'items.ccode' } ) }; >-my $copynumbers = >- { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $fw, kohafield => 'items.copynumber' } ) }; > my (@itemloop, @otheritemloop, %itemfields); > > my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.itemlost', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] }); >@@ -371,14 +361,6 @@ foreach my $item (@items) { > my $item_info = $item->unblessed; > $item_info->{itemtype} = $itemtypes->{$item->effective_itemtype}; > >- #get shelf location and collection code description if they are authorised value. >- # same thing for copy number >- my $shelfcode = $item->location; >- $item_info->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) ); >- my $ccode = $item->ccode; >- $item_info->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) ); >- my $copynumber = $item->copynumber; >- $item_info->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) ); > foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri )) { > $itemfields{$_} = 1 if $item->$_; > } >@@ -398,21 +380,6 @@ foreach my $item (@items) { > $item_info->{first_hold} = $first_hold; > } > >- $item_info->{checkout} = $item->checkout; >- >- # Check the transit status >- my $transfer = $item->get_transfer; >- if ( $transfer ) { >- $item_info->{transfer} = $transfer; >- } >- >- foreach my $f (qw( itemnotes )) { >- if ($item_info->{$f}) { >- $item_info->{$f} =~ s|\n|<br />|g; >- $itemfields{$f} = 1; >- } >- } >- > #item has a host number if its biblio number does not match the current bib > > if ($item->biblionumber ne $biblionumber){ >@@ -444,23 +411,6 @@ foreach my $item (@items) { > > $item_info->{can_be_edited} = $patron->can_edit_item( $item ); > >- if ( C4::Context->preference("LocalCoverImages") == 1 ) { >- $item_info->{cover_images} = $item->cover_images; >- } >- >- if ( C4::Context->preference('UseRecalls') ) { >- $item_info->{recall} = $item->recall; >- } >- >- if ( C4::Context->preference('IndependentBranches') ) { >- my $userenv = C4::Context->userenv(); >- if ( not C4::Context->IsSuperLibrarian() >- and $userenv->{branch} ne $item->homebranch ) { >- $item_info->{cannot_be_edited} = 1; >- $item_info->{not_same_branch} = 1; >- } >- } >- > if ( $item->is_bundle ) { > $item_info->{bundled} = > $item->bundle_items->search( { itemlost => { '!=' => 0 } } ) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 707a5d7cf3..1212af980c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -380,192 +380,186 @@ > <tbody> > [% FOREACH item IN items %] > <tr id="item_[% item.itemnumber | html %]" data-itemnumber="[% item.itemnumber | html %]" data-duedate="[% item.datedue | html %]"> >- [% IF (StaffDetailItemSelection) %] >+ [%- IF (StaffDetailItemSelection) %] > <td style="text-align:center;vertical-align:middle"> >- [% IF item.can_be_edited %] >+ [%- IF item.can_be_edited %] > <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" /> >- [% END %] >+ [%- END %] > </td> >- [% END %] >- [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] >+ [%- END %] >+ [%- IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] > <td class="cover"> > <div class="bookcoverimg"> > <div class="cover-slider"> >- [% FOREACH image IN item.cover_images %] >+ [%- FOREACH image IN item.object.cover_images %] > <div class="cover-image local-coverimg"> > <a href="/cgi-bin/koha/catalogue/image.pl?itemnumber=[% image.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" title="Local cover image"> > <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image.imagenumber | uri %]" alt="Local cover image" data-link="/cgi-bin/koha/catalogue/imageviewer.pl?itemnumber=[% item.itemnumber | uri %]&imagenumber=[% image.imagenumber | uri %]" /> > </a> > </div> >- [% END %] >+ [%- END %] > </div> > </div> > </td> >- [% END %] >+ [%- END %] > >- [% IF ( item_level_itypes ) %] >+ [%- IF ( item_level_itypes ) %] > <td class="itype"> >- [% SET itemtype = item.itemtype %] >- [% IF !noItemTypeImages && itemtype.image_location('intranet') %] >+ [%- SET itemtype = item.itemtype %] >+ [%- IF !noItemTypeImages && itemtype.image_location('intranet') %] > <img src="[% itemtype.image_location('intranet') | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" /> >- [% END %] >+ [%- END %] > <span class="itypedesc itypetext">[% itemtype.translated_description | html %]</span> > </td> >- [% END %] >+ [%- END %] > <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td> > <td class="homebranch"> > <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span> > <span class="shelvingloc"> >-<!-- >-If permanent location is defined, show description or code and display current location in parentheses. If not, display current location. >-Note that permanent location is a code, and location may be an authval. >---> >- [% IF item.permanent_location %] >- [% SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %] >- [% permloc_authval | html %] >- [% IF item.location AND item.location != permloc_authval AND item.location != item.permanent_location %] >- ([% item.location | html %]) >- [% END %] >- [% ELSE %] >- [% item.location | html %] >- [% END %] >+ [%# If permanent location is defined, show description or code and >+ display current location in parentheses. If not, display current location. >+ Note that permanent location is a code, and location may be an authval. >+ %] >+ [%- IF item.permanent_location %] >+ [%- SET permloc_authval = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.permanent_location ) %] >+ [%- permloc_authval | html %] >+ [%- SET item_locatoin = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) %] >+ [%- IF item_location AND item_location != permloc_authval AND item.location != item.permanent_location %] >+ ([% item_location | html %]) >+ [%- END %] >+ [%- ELSE %] >+ [%- item_location | html %] >+ [%- END %] > </span> > </td> >- [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] >- [% IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %] >+ [%- IF ( itemdata_ccode ) %]<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>[% END %] >+ [%- IF Koha.Preference('EnableItemGroups') %]<td class="item_group">[% item.object.item_group.description | html %]</td>[% END %] > <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> >- [% IF ( volinfo ) %] >- [% SET serial = item.itemserial.serial %] >- [% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %] >+ [%- IF ( volinfo ) %] >+ [%- SET serial = item.itemserial.serial %] >+ [%- IF itemdata_publisheddate #If there is at least one published date, use it for sorting %] > <td class="enumchron" data-order="[% serial.publisheddate | html %]"> >- [% ELSE %] >+ [%- ELSE %] > <td class="enumchron"> >- [% END %] >- [% IF ( itemdata_enumchron ) %] >- [% IF item.enumchron && serial.serialseq %] >+ [%- END %] >+ [%- IF ( itemdata_enumchron ) %] >+ [%- IF item.enumchron && serial.serialseq %] > <span class="enum">[% item.enumchron | html %]</span> >- [% IF ( item.serialseq && item.enumchron != serial.serialseq ) %] >+ [%- IF ( item.serialseq && item.enumchron != serial.serialseq ) %] > <span class="sep"> -- </span> > <span class="serialseq">[% serial.serialseq | html %]</span> >- [% END %] >- [% ELSIF item.enumchron %] >+ [%- END %] >+ [%- ELSIF item.enumchron %] > <span class="enum">[% item.enumchron | html %]</span> >- [% ELSIF item.serialseq %] >+ [%- ELSIF item.serialseq %] > <span class="serialseq">[% serial.serialseq | html %]</span> >- [% END %] >- [% IF serial.publisheddate %] >+ [%- END %] >+ [%- IF serial.publisheddate %] > <span class="pubdate">([% serial.publisheddate | $KohaDates %])</span> >- [% END %] >- [% END %] >+ [%- END %] >+ [%- END %] > </span> > </td> >- [% END %] >+ [%- END %] > <td class="status"> > >- [% IF item.checkout %] >- [% IF item.checkout.onsite_checkout %] >+ [%- IF item.object.checkout %] >+ [%- IF item.checkout.onsite_checkout %] > <span>Currently in local use >- [% ELSE %] >+ [%- ELSE %] > <span class="datedue">Checked out >- [% END %] >- [% UNLESS ( item.not_same_branch) %] >- [% IF item.checkout.onsite_checkout %] >+ [%- END %] >+ [%- IF item.can_be_edited %] >+ [%- IF item.object.checkout.onsite_checkout %] > by >- [% ELSE %] >+ [%- ELSE %] > to >- [% END %] >+ [%- END %] > [% INCLUDE 'patron-title.inc' patron=item.checkout.patron hide_patron_infos_if_needed=1 %] >- [% END %] >- : due [% item.checkout.date_due | $KohaDates as_due_date => 1 %] >+ [%- END %] >+ : due [% item.object.checkout.date_due | $KohaDates as_due_date => 1 %] > </span> >- [% ELSIF ( item.transfer ) %] >- [% IF (item.transfer.datesent) %] >- <span class="intransit">In transit from [% Branches.GetName( item.transfer.frombranch ) | html %] to [% Branches.GetName( item.transfer.tobranch ) | html %] since [% item.transfer.datesent | $KohaDates %]</span> >- [% ELSE %] >- <span class="transitrequested">Transit pending from [% Branches.GetName( item.transfer.frombranch ) | html %] to [% Branches.GetName( item.transfer.tobranch ) | html %] since [% item.transfer.daterequested | $KohaDates %]</span> >- >- [% END %] >- [% END %] >- >- [% IF ( item.itemlost ) %] >- [% IF itemlostloop %] >- [% FOREACH itemlostloo IN itemlostloop %] >- [% IF itemlostloo.authorised_value == item.itemlost %] >- <span class="lost">[% itemlostloo.lib | html %]</span> >- [% END %] >- [% END %] >- [% ELSE %] >+ [%- ELSIF ( transfer = item.object.get_transfer ) %] >+ [%- IF (transfer.datesent) %] >+ <span class="intransit">In transit from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% transfer.datesent | $KohaDates %]</span> >+ [%- ELSE %] >+ <span class="transitrequested">Transit pending from [% Branches.GetName( transfer.frombranch ) | html %] to [% Branches.GetName( transfer.tobranch ) | html %] since [% item.transfer.daterequested | $KohaDates %]</span> >+ >+ [%- END %] >+ [%- END -%] >+ >+ [%- IF ( item.itemlost ) %] >+ [%- SET itemlost_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %] >+ [%- IF itemlostloop %] >+ <span class="lost">[% itemlost_description | html %]</span> >+ [%- ELSE %] > <span class="lost">Unavailable (lost or missing)</span> >- [% END %] >- [% END %] >- >- [% IF ( item.withdrawn ) %] >- [% IF itemwithdrawnloop %] >- [% FOREACH itemwithdrawnloo IN itemwithdrawnloop %] >- [% IF itemwithdrawnloo.authorised_value == item.withdrawn %] >- <span class="wdn">[% itemwithdrawnloo.lib | html %]</span> >- [% END %] >- [% END %] >- [% ELSE %] >+ [%- END %] >+ [%- END -%] >+ >+ [%- IF ( item.withdrawn ) %] >+ [%- SET withdrawn_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %] >+ [%- IF withdrawn_description %] >+ <span class="wdn">[% withdrawn_description | html %]</span> >+ [%- ELSE %] > <span class="wdn">Withdrawn</span> >- [% END %] >- [% END %] >- >- [% IF ( item.damaged ) %] >- [% IF itemdamagedloop %] >- [% FOREACH itemdamagedloo IN itemdamagedloop %] >- [% IF itemdamagedloo.authorised_value == item.damaged %] >- <span class="dmg">[% itemdamagedloo.lib | html %]</span> >- [% END %] >- [% END %] >- [% ELSE %] >+ [%- END %] >+ [%- END -%] >+ >+ [%- IF ( item.damaged ) %] >+ [%- SET damaged_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged ) %] >+ [%- IF damaged_description %] >+ <span class="dmg">[% damaged_description | html %]</span> >+ [%- ELSE %] > <span class="dmg">Damaged</span> >- [% END %] >- [% END %] >+ [%- END %] >+ [%- END -%] > >- [% IF ( item.notforloan || item.itemtype.notforloan ) %] >+ [%- IF ( item.notforloan || item.itemtype.notforloan ) %] > <span class="notforloan">Not for loan >- [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] >- [% IF not_for_loan_description %] >+ [%- SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] >+ [%- IF not_for_loan_description %] > <span class="reason">([% not_for_loan_description | html %])</span> >- [% END %] >+ [%- END %] > </span> >- [% END %] >+ [%- END -%] > >- [% SET hold = item.first_hold %] >- [% IF hold %] >- [% IF hold.waitingdate %] >+ [%- SET hold = item.first_hold %] >+ [%- IF hold %] >+ [%- IF hold.waitingdate %] > <span class="waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %][% IF ( hold.desk_id ) %], [% hold.desk.desk_name | html %][% END %] since [% hold.waitingdate | $KohaDates %].</span> >- [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %] >+ [%- IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %] > <span class="heldfor">Hold for:</span> >- [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %] >- [% END %] >- [% ELSE %] >+ [%- INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %] >+ [%- END %] >+ [%- ELSE %] > <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span> >- [% END %] >- [% END %] >- >- [% SET recall = item.recall %] >- [% IF recall %] >- [% IF recall.waiting_date %] >- <span>Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</span> >- [% ELSE %] >- [% patron_link = BLOCK %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %] ([% recall.patron.cardnumber | html %])</a>[% END %] >- <span>recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</span> >- [% END %] >- [% END %] >- >- [% UNLESS ( item.notforloan || item.itemtype.notforloan || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfer || hold || ( Koha.Preference('UseRecalls') && recall ) ) %] >+ [%- END %] >+ [%- END -%] >+ >+ [% IF Koha.Preference('UseRecalls') %] >+ [%- SET recall = item.object.recall %] >+ [%- IF recall %] >+ [%- IF recall.waiting_date %] >+ <span>Waiting at [% Branches.GetName( recall.pickup_library_id ) | html %] since [% recall.waiting_date | $KohaDates %]</span> >+ [%- ELSE %] >+ [%- patron_link = BLOCK %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %] ([% recall.patron.cardnumber | html %])</a>[% END %] >+ <span>recalled by [% patron_link| $raw %] on [% recall.created_date | $KohaDates %]</span> >+ [%- END %] >+ [%- END -%] >+ [%- END -%] >+ >+ [%- UNLESS ( item.notforloan || item.itemtype.notforloan || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfer || hold || ( Koha.Preference('UseRecalls') && recall ) ) %] > <span>Available</span> >- [% END %] >+ [%- END -%] > >- [% IF ( item.restricted ) %] >+ [%- IF ( item.restricted ) %] > <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span> >- [% END %] >+ [%- END -%] > >- [% IF ( item.bundle_host ) %] >+ [%- IF ( item.bundle_host ) %] > <span class="bundled">In bundle: [% INCLUDE 'biblio-title.inc' biblio = item.bundle_host.biblio link = 1 %]</span> >- [% END %] >+ [%- END -%] > > </td> > <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td> >@@ -574,92 +568,92 @@ Note that permanent location is a code, and location may be an authval. > <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td> > <td class="datelastborrowed" data-order="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</td> > <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.itemnumber | uri %]&biblionumber=[% item.biblionumber | uri %]&bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td> >- [% IF ( itemdata_uri ) %] >- [% IF item.uri.split(' \| ').size > 1 %] >+ [%- IF ( itemdata_uri ) %] >+ [%- IF item.uri.split(' \| ').size > 1 %] > <td class="uri"> >- [% FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %] >+ [%- FOREACH uri IN item.uri.split(' \| ') %]<a href="[% uri | url %]">[% uri | html %]</a><br>[% END %] > </td> >- [% ELSE %] >+ [%- ELSE %] > <td class="uri"> >- [% IF item.uri %] >+ [%- IF item.uri %] > <a href="[% item.uri | url %]">[% IF Koha.Preference('URLLinkText') %][% Koha.Preference('URLLinkText') | html %][% ELSE %]Link to resource[% END %]</a> >- [% END %] >+ [%- END %] > </td> >- [% END %] >- [% END %] >- [% IF ( itemdata_copynumber ) %] >- <td class="copynumber">[% item.copynumber | html %]</td> >- [% END %] >- [% IF ( itemdata_stocknumber ) %] >+ [%- END %] >+ [%- END %] >+ [%- IF ( itemdata_copynumber ) %] >+ <td class="copynumber">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.copynumber', authorised_value => item.copynumber ) | html %]</td> >+ [%- END %] >+ [%- IF ( itemdata_stocknumber ) %] > <td class="stocknumber">[% item.stocknumber | html %]</td> >- [% END %] >- [% IF materials %] >+ [%- END %] >+ [%- IF materials %] > <td class="materials"> [% item.materials | html %] </td> >- [% END %] >- [% IF ( itemdata_itemnotes ) %] >- <td><div class="itemnotes">[% item.itemnotes | $raw %]</div></td> >- [% END %] >- [% IF itemdata_nonpublicnotes %] >+ [%- END %] >+ [%- IF ( itemdata_itemnotes ) %] >+ <td><div class="itemnotes">[% item.object.itemnotes.replace('\n','<br />') | $raw %]</div></td> >+ [%- END %] >+ [%- IF itemdata_nonpublicnotes %] > <td class="nonpublicnote">[% item.itemnotes_nonpublic | html %]</td> >- [% END %] >- [% IF ( hostrecords ) %] >+ [%- END %] >+ [%- IF ( hostrecords ) %] > <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber | uri %]" >[% item.hosttitle | html %]</a>[% END %]</td> >- [% END %] >- [% IF ( analyze ) %] >+ [%- END %] >+ [%- IF ( analyze ) %] > <td> >- [% IF ( item.countanalytics ) %] >+ [%- IF ( item.countanalytics ) %] > <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&q=[% item.itemnumber | uri %]">[% item.countanalytics | html %] analytics</a> >- [% END %] >+ [%- END %] > </td> >- [% END %] >- [% IF ( analyze ) %] >+ [%- END %] >+ [%- IF ( analyze ) %] > <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber | uri %]&hostitemnumber=[% item.itemnumber | uri %]">Create analytics</a></td> >- [% END %] >+ [%- END -%] > >- [% IF ShowCourseReserves %] >+ [%- IF ShowCourseReserves %] > <td> >- [% IF item.course_reserves %] >- [% FOREACH r IN item.course_reserves %] >- [% IF r.course.enabled == 'yes' %] >+ [%- IF item.course_reserves %] >+ [%- FOREACH r IN item.course_reserves %] >+ [%- IF r.course.enabled == 'yes' %] > <p> > <a href="/cgi-bin/koha/course_reserves/course-details.pl?course_id=[% r.course.course_id | uri %]"> >- [% r.course.course_name | html %] >+ [%- r.course.course_name | html %] > <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]--> >- [% IF r.course.section %] [% r.course.section | html %] [% END %] >- [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %] >+ [%- IF r.course.section %] [% r.course.section | html %] [% END %] >+ [%- IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %] > </a> > </p> >- [% END %] >- [% END %] >- [% END %] >+ [%- END %] >+ [%- END %] >+ [%- END %] > </td> >- [% END %] >+ [%- END -%] > >- [% IF ( SpineLabelShowPrintOnBibDetails ) %] >+ [%- IF ( SpineLabelShowPrintOnBibDetails ) %] > <td><a class="btn btn-default btn-xs print-label" href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode | uri %]"><i class="fa fa-print"></i> Print label</a></td> >- [% END %] >+ [%- END -%] > >- [% IF CAN_user_editcatalogue_edit_items %] >+ [%- IF CAN_user_editcatalogue_edit_items %] > <td class="actions"> >- [% IF item.can_be_edited %] >- [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %] >+ [%- IF item.can_be_edited %] >+ [%- IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %] > <div class="btn-group"> > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a> > <ul class="dropdown-menu pull-right"> > <li><a href="/cgi-bin/koha/tools/upload-cover-image.pl?itemnumber=[% item.itemnumber | uri %]&filetype=image"><i class="fa fa-upload"></i> Upload image</a></li> > </ul> > </div> >- [% ELSE %] >+ [%- ELSE %] > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a> >- [% END %] >- [% END %] >- [% IF bundlesEnabled %] >+ [%- END %] >+ [%- END %] >+ [%- IF bundlesEnabled %] > <button class="btn btn-default btn-xs details-control"><i class="fa fa-folder"></i> Manage bundle ([% item.bundled | html %]|[% item.bundled_lost | html %])</button> >- [% END %] >+ [%- END %] > </td> >- [% END %] >+ [%- END %] > </tr> >- [% END %] >+ [%- END %] > </tbody> > </table> > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33167
:
148029
|
148082
|
148083
|
148084
|
148085
|
148431
|
148432
|
148433
|
148434
|
149677
|
149704
|
150075
|
150076