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 8c678223aa..07b1356576 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -327,26 +327,30 @@
[% Branches.GetLoggedInBranchname | html %] holdings ([% items_to_display_count - ( other_holdings_count || 0 ) - ( hidden_count || 0 ) || 0 | html %])
[% END %]
[% END %]
- [% IF other_holdings_count %]
- [% WRAPPER tab_item tabname= "otherholdings" %]
- Other holdings ([% other_holdings_count || 0 | html %])
- [% END %]
- [% END %]
[% ELSE %]
[% WRAPPER tab_item tabname= "holdings" %]
Holdings ([% items_to_display_count || 0 | html %])
[% END %]
[% END %]
+
[% IF Koha.Preference('SeparateHoldingsByGroup') && lib_groups %]
[% FOREACH group IN lib_groups %]
[% IF ( holdings_count.${group.id} > 0 ) %]
[% WRAPPER tab_item tabname="group_holdings_" _ group.id %]
- [% group.title | html %] - Group ([% holdings_count.${group.id} | html %])
+ [% group.title | html %] holdings ([% holdings_count.${group.id} | html %])
[% END %]
[% END %]
[% END %]
[% END %]
+ [% IF Koha.Preference('SeparateHoldings') %]
+ [% IF other_holdings_count %]
+ [% WRAPPER tab_item tabname= "otherholdings" %]
+ Other holdings ([% other_holdings_count || 0 | html %])
+ [% END %]
+ [% END %]
+ [% END %]
+
[% IF Koha.Preference('EnableItemGroups') %]
[% WRAPPER tab_item tabname= "item_groups" %]
Item groups