@@ -8,9 +8,11 @@ import {
88 TransitionReplace ,
99 Toast ,
1010 StandardModal ,
11+ Button ,
12+ ActionRow ,
1113} from '@openedx/paragon' ;
1214import { Helmet } from 'react-helmet' ;
13- import { CheckCircle as CheckCircleIcon } from '@openedx/paragon/icons' ;
15+ import { CheckCircle as CheckCircleIcon , CloseFullscreen , OpenInFull } from '@openedx/paragon/icons' ;
1416import { useSelector } from 'react-redux' ;
1517import {
1618 arrayMove ,
@@ -61,6 +63,7 @@ import {
6163} from './drag-helper/utils' ;
6264import { useCourseOutline } from './hooks' ;
6365import messages from './messages' ;
66+ import headerMessages from './header-navigations/messages' ;
6467import { getTagsExportFile } from './data/api' ;
6568import OutlineAddChildButtons from './OutlineAddChildButtons' ;
6669import { StatusBar } from './status-bar/StatusBar' ;
@@ -333,6 +336,24 @@ const CourseOutline = () => {
333336 />
334337 ) }
335338 />
339+ { showNewActionsBar
340+ ? (
341+ < StatusBar
342+ courseId = { courseId }
343+ isLoading = { isLoading }
344+ statusBarData = { statusBarData }
345+ notificationCount = { 3 }
346+ />
347+ ) : (
348+ < LegacyStatusBar
349+ courseId = { courseId }
350+ isLoading = { isLoading }
351+ statusBarData = { statusBarData }
352+ openEnableHighlightsModal = { openEnableHighlightsModal }
353+ handleVideoSharingOptionChange = { handleVideoSharingOptionChange }
354+ />
355+ ) }
356+ < hr className = 'mt-4 mb-0 w-100 text-light-400' />
336357 < Layout
337358 lg = { [ { span : 9 } , { span : 3 } ] }
338359 md = { [ { span : 9 } , { span : 3 } ] }
@@ -343,24 +364,22 @@ const CourseOutline = () => {
343364 < Layout . Element >
344365 < article >
345366 < div >
367+ { showNewActionsBar && < ActionRow className = 'mt-3' >
368+ { Boolean ( sectionsList . length ) && (
369+ < Button
370+ variant = "outline-primary"
371+ id = "expand-collapse-all-button"
372+ data-testid = "expand-collapse-all-button"
373+ iconBefore = { isSectionsExpanded ? CloseFullscreen : OpenInFull }
374+ onClick = { headerNavigationsActions . handleExpandAll }
375+ >
376+ { isSectionsExpanded
377+ ? intl . formatMessage ( headerMessages . collapseAllButton )
378+ : intl . formatMessage ( headerMessages . expandAllButton ) }
379+ </ Button >
380+ ) }
381+ </ ActionRow > }
346382 < section className = "course-outline-section" >
347- { showNewActionsBar
348- ? (
349- < StatusBar
350- courseId = { courseId }
351- isLoading = { isLoading }
352- statusBarData = { statusBarData }
353- notificationCount = { 3 }
354- />
355- ) : (
356- < LegacyStatusBar
357- courseId = { courseId }
358- isLoading = { isLoading }
359- statusBarData = { statusBarData }
360- openEnableHighlightsModal = { openEnableHighlightsModal }
361- handleVideoSharingOptionChange = { handleVideoSharingOptionChange }
362- />
363- ) }
364383 { ! errors ?. outlineIndexApi && (
365384 < div className = "pt-4" >
366385 { sections . length ? (
0 commit comments