diff --git a/kolibri/plugins/coach/assets/src/constants/tabsConstants.js b/kolibri/plugins/coach/assets/src/constants/tabsConstants.js index cd0b25481e..19d0a538d7 100644 --- a/kolibri/plugins/coach/assets/src/constants/tabsConstants.js +++ b/kolibri/plugins/coach/assets/src/constants/tabsConstants.js @@ -5,3 +5,10 @@ export const ReportsTabs = { GROUPS: 'tabGroups', LEARNERS: 'tabLearners', }; + +export const PLAN_TABS_ID = 'coachPlan'; +export const PlanTabs = { + LESSONS: 'tabLessons', + QUIZZES: 'tabQuizzes', + GROUPS: 'tabGroups', +}; diff --git a/kolibri/plugins/coach/assets/src/views/plan/CoachExamsPage/index.vue b/kolibri/plugins/coach/assets/src/views/plan/CoachExamsPage/index.vue index 93b477d4dc..6023b774b3 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CoachExamsPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CoachExamsPage/index.vue @@ -7,153 +7,157 @@ > - - -
-

- {{ $tr('totalQuizSize', { size: calcTotalSizeOfVisibleQuizzes }) }} -

- - - - - - -
- + +
+

+ {{ $tr('totalQuizSize', { size: calcTotalSizeOfVisibleQuizzes }) }} +

+ -
-
- - - + + +
+ +
+
+ + + - + + + + -

- {{ $tr('noExams') }} -

-

- {{ $tr('noStartedExams') }} -

-

- {{ $tr('noExamsNotStarted') }} -

-

- {{ $tr('noEndedExams') }} -

+

+ {{ $tr('noExams') }} +

+

+ {{ $tr('noStartedExams') }} +

+

+ {{ $tr('noExamsNotStarted') }} +

+

+ {{ $tr('noEndedExams') }} +

- - -

{{ coachString('openQuizModalDetail') }}

-

{{ coachString('lodQuizDetail') }}

-

{{ coachString('fileSizeToDownload', { size: quizSize(activeQuizId) }) }}

-
- -
{{ coachString('closeQuizModalDetail') }}
-
+ + +

{{ coachString('openQuizModalDetail') }}

+

{{ coachString('lodQuizDetail') }}

+

{{ coachString('fileSizeToDownload', { size: quizSize(activeQuizId) }) }}

+
+ +
{{ coachString('closeQuizModalDetail') }}
+
+
@@ -169,6 +173,7 @@ import plugin_data from 'plugin_data'; import bytesForHumans from 'kolibri.utils.bytesForHumans'; import { PageNames } from '../../../constants'; + import { PLAN_TABS_ID, PlanTabs } from '../../../constants/tabsConstants'; import commonCoach from '../../common'; import CoachAppBarPage from '../../CoachAppBarPage'; import PlanHeader from '../../plan/PlanHeader'; @@ -183,6 +188,8 @@ mixins: [commonCoach, commonCoreStrings], data() { return { + PLAN_TABS_ID, + PlanTabs, statusSelected: { label: this.coachString('filterQuizAll'), value: this.coachString('filterQuizAll'), diff --git a/kolibri/plugins/coach/assets/src/views/plan/GroupsPage/index.vue b/kolibri/plugins/coach/assets/src/views/plan/GroupsPage/index.vue index f25ac4371a..daa81efcba 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/GroupsPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/GroupsPage/index.vue @@ -6,61 +6,65 @@ :showSubNav="true" > - -
- + +
+ +
+ + + + + + +

+ {{ $tr('noGroups') }} +

+ + -
- - - - - - -

- {{ $tr('noGroups') }} -

- - - - - - + + + +
@@ -78,6 +82,7 @@ import CoachAppBarPage from '../../CoachAppBarPage'; import PlanHeader from '../../plan/PlanHeader'; import { GroupModals } from '../../../constants'; + import { PLAN_TABS_ID, PlanTabs } from '../../../constants/tabsConstants'; import CreateGroupModal from './CreateGroupModal'; import GroupRowTr from './GroupRow'; import RenameGroupModal from './RenameGroupModal'; @@ -102,6 +107,8 @@ }); return { + PLAN_TABS_ID, + PlanTabs, selectedGroup, setSelectedGroup(name, id) { selectedGroup.value = { name, id }; diff --git a/kolibri/plugins/coach/assets/src/views/plan/LessonsRootPage/index.vue b/kolibri/plugins/coach/assets/src/views/plan/LessonsRootPage/index.vue index 792f473988..87b2ade8bb 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/LessonsRootPage/index.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/LessonsRootPage/index.vue @@ -2,142 +2,147 @@ - -

- {{ $tr('totalLessonsSize', { size: calcTotalSizeOfVisibleLessons }) }} -

-
- - -
+ + +

+ {{ $tr('totalLessonsSize', { size: calcTotalSizeOfVisibleLessons }) }} +

+
+ + +
- - - - + + + + -

- {{ $tr('noLessons') }} -

-

- {{ $tr('noVisibleLessons') }} -

-

- {{ $tr('noLessonsNotVisible') }} -

+

+ {{ $tr('noLessons') }} +

+

+ {{ $tr('noVisibleLessons') }} +

+

+ {{ $tr('noLessonsNotVisible') }} +

- -

{{ $tr('makeLessonVisibleText') }}

-

{{ $tr('fileSizeToDownload', { size: lessonSize(activeLesson.id) }) }}

- -
+ +

{{ $tr('makeLessonVisibleText') }}

+

{{ $tr('fileSizeToDownload', { size: lessonSize(activeLesson.id) }) }}

+ +
- -

{{ $tr('makeLessonNotVisibleText') }}

-

{{ $tr('fileSizeToRemove', { size: lessonSize(activeLesson.id) }) }}

- -
+ +

{{ $tr('makeLessonNotVisibleText') }}

+

{{ $tr('fileSizeToRemove', { size: lessonSize(activeLesson.id) }) }}

+ +
- - - + @submit="$refs.detailsModal.submitData()" + > + + +
@@ -160,6 +165,7 @@ import bytesForHumans from 'kolibri.utils.bytesForHumans'; import CoachAppBarPage from '../../CoachAppBarPage'; import { LessonsPageNames } from '../../../constants/lessonsConstants'; + import { PLAN_TABS_ID, PlanTabs } from '../../../constants/tabsConstants'; import commonCoach from '../../common'; import PlanHeader from '../../plan/PlanHeader'; import AssignmentDetailsModal from '../../plan/assignments/AssignmentDetailsModal'; @@ -176,6 +182,8 @@ mixins: [commonCoach, commonCoreStrings], data() { return { + PLAN_TABS_ID, + PlanTabs, showModal: false, showLessonIsVisibleModal: false, showLessonIsNotVisibleModal: false, diff --git a/kolibri/plugins/coach/assets/src/views/plan/PlanHeader.vue b/kolibri/plugins/coach/assets/src/views/plan/PlanHeader.vue index b137442caf..bf0cb755ee 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/PlanHeader.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/PlanHeader.vue @@ -10,18 +10,13 @@

{{ $tr('planYourClassLabel') }}

{{ $tr('planYourClassDescription') }}

- - - - + @@ -34,16 +29,48 @@ import { mapGetters } from 'vuex'; import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings'; import commonCoach from '../common'; + import { PageNames } from '../../constants'; import { LessonsPageNames } from '../../constants/lessonsConstants'; + import { PLAN_TABS_ID, PlanTabs } from '../../constants/tabsConstants'; export default { name: 'PlanHeader', mixins: [commonCoach, commonCoreStrings], + props: { + activeTabId: { + type: String, + required: true, + }, + }, + data() { + return { + PLAN_TABS_ID, + }; + }, computed: { ...mapGetters(['classListPageEnabled']), LessonsPageNames() { return LessonsPageNames; }, + tabs() { + return [ + { + id: PlanTabs.LESSONS, + label: this.coreString('lessonsLabel'), + to: this.classRoute(this.LessonsPageNames.PLAN_LESSONS_ROOT), + }, + { + id: PlanTabs.QUIZZES, + label: this.coreString('quizzesLabel'), + to: this.classRoute(PageNames.EXAMS), + }, + { + id: PlanTabs.GROUPS, + label: this.coachString('groupsLabel'), + to: this.classRoute('GroupsPage'), + }, + ]; + }, }, $trs: { planYourClassLabel: {