Browse Source

Bug 13420: Fallback to the previous behavior if published date is not used

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Jonathan Druart 4 years ago
committed by Martin Renvoize
parent
commit
0ecf7694ea
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 3
      catalogue/detail.pl
  2. 10
      koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

3
catalogue/detail.pl

@ -314,7 +314,7 @@ foreach my $item (@items) {
$item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
my $copynumber = $item->{'copynumber'};
$item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri)) {
foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri publisheddate)) { # Warning when removing GetItemsInfo - publisheddate (at least) is not part of the items table
$itemfields{$_} = 1 if ( $item->{$_} );
}
@ -416,6 +416,7 @@ $template->param(
itemdata_uri => $itemfields{uri},
itemdata_copynumber => $itemfields{copynumber},
itemdata_stocknumber => $itemfields{stocknumber},
itemdata_publisheddate => $itemfields{publisheddate},
volinfo => $itemfields{enumchron},
itemdata_itemnotes => $itemfields{itemnotes},
itemdata_nonpublicnotes => $itemfields{itemnotes_nonpublic},

10
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

@ -229,7 +229,13 @@
<th>Home library</th>
[% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
<th>Call number</th>
[% IF volinfo %]<th class="title-string">Serial enumeration / chronology</th>[% END %]
[% IF volinfo %]
[% IF itemdate_publisheddate #If there is at least one published date, use it for sorting%]
<th class="title-string">Serial enumeration / chronology</th>
[% ELSE %]
<th>Serial enumeration / chronology</th>
[% END %]
[% END %]
<th>Status</th>
<th class="title-string">Last seen</th>
<th class="title-string">Date accessioned</th>
@ -286,7 +292,7 @@ Note that permanent location is a code, and location may be an authval.
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
[% IF ( volinfo ) %]
<td class="enumchron">
<span title="[% item.publisheddate | html %]">
[% IF itemdate_publisheddate %]<span title="[% item.publisheddate | html %]">[% END %]
[% IF ( itemdata_enumchron ) %]
[% IF item.enumchron && item.serialseq %]
<span class="enum">[% item.enumchron | html %]</span>

Loading…
Cancel
Save