Bug 28854: (follow-up) Add bundle item status to manage button
This patch adds the item counts (Present|Lost) to the 'Manage bundle' button in the catalogue details page. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
b8a2fdcd48
commit
d711d45f4e
|
|
@ -456,8 +456,12 @@ foreach my $item (@items) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($item_object->is_bundle) {
|
||||
$itemfields{bundles} = 1;
|
||||
if ( $item_object->is_bundle ) {
|
||||
$item->{bundled} =
|
||||
$item_object->bundle_items->search( { itemlost => { '!=' => 0 } } )
|
||||
->count;
|
||||
$item->{bundled_lost} =
|
||||
$item_object->bundle_items->search( { itemlost => 0 } )->count;
|
||||
$item->{is_bundle} = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -637,7 +637,7 @@ Note that permanent location is a code, and location may be an authval.
|
|||
[% END %]
|
||||
[% END %]
|
||||
[% IF bundlesEnabled %]
|
||||
<button class="btn btn-default btn-xs details-control"><i class="fa fa-folder"></i> Manage bundle</button>
|
||||
<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 %]
|
||||
</td>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue