Skip to content

Commit 307c848

Browse files
committed
Hide catalog menu if only one option BT#16817
1 parent c28d326 commit 307c848

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

main/inc/lib/CoursesAndSessionsCatalog.class.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,9 @@ public static function getCatalogSearchSettings()
13961396
'show_session_info' => true,
13971397
'show_session_date' => true,
13981398
],
1399+
'courses'=> [
1400+
'by_title' => true,
1401+
]
13991402
];
14001403
}
14011404

@@ -1427,6 +1430,11 @@ public static function getTabList($active = 1)
14271430
];
14281431
}
14291432

1433+
// If only one option hide menu.
1434+
if (1 === count($headers)) {
1435+
return '';
1436+
}
1437+
14301438
return Display::tabsOnlyLink($headers, $active);
14311439
}
14321440

0 commit comments

Comments
 (0)