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>
}
}
- 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;
}
[% 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 %]