From 2ff3f69aafc6f776ef2d4b891742ffa4cffa237f Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Thu, 12 Oct 2023 14:41:52 -0700 Subject: [PATCH] feat(Import Step): Move to Create New Step Menu (#1445) Co-authored-by: Jonathan Lim-Breitbart --- ...choose-import-step-location.component.html | 2 +- .../choose-import-step-location.component.ts | 4 +- .../choose-import-step.component.html | 2 +- .../choose-import-unit.component.html | 4 +- src/app/teacher/authoring-routing.module.ts | 34 ++++----- .../authoringTool/addNode/NewNodeTemplate.ts | 1 - .../choose-new-node-template.component.html | 2 +- .../choose-new-node-template.component.ts | 8 +- .../project-authoring.component.html | 19 +---- .../project-authoring.component.ts | 8 +- src/messages.xlf | 73 +++++++------------ 11 files changed, 64 insertions(+), 93 deletions(-) diff --git a/src/app/authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component.html b/src/app/authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component.html index 3019caf4155..f09f9ae423c 100644 --- a/src/app/authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component.html +++ b/src/app/authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component.html @@ -40,6 +40,6 @@
Choose a location for the imported steps.
diff --git a/src/app/authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component.ts b/src/app/authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component.ts index 480b37882dd..7b413eddd1b 100644 --- a/src/app/authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component.ts +++ b/src/app/authoring-tool/import-step/choose-import-step-location/choose-import-step-location.component.ts @@ -39,14 +39,14 @@ export class ChooseImportStepLocationComponent { this.projectService.refreshProject(); if (nodesWithNewNodeIds.length === 1) { const newNode = nodesWithNewNodeIds[0]; - this.router.navigate(['../../node', newNode.id], { + this.router.navigate(['../../../node', newNode.id], { relativeTo: this.route, state: { newComponents: newNode.components } }); } else { - this.router.navigate(['../..'], { relativeTo: this.route }); + this.router.navigate(['../../..'], { relativeTo: this.route }); } }); }); diff --git a/src/app/authoring-tool/import-step/choose-import-step/choose-import-step.component.html b/src/app/authoring-tool/import-step/choose-import-step/choose-import-step.component.html index dab2916a288..1dcf5932e25 100644 --- a/src/app/authoring-tool/import-step/choose-import-step/choose-import-step.component.html +++ b/src/app/authoring-tool/import-step/choose-import-step/choose-import-step.component.html @@ -55,7 +55,7 @@
Back - +
diff --git a/src/app/teacher/authoring-routing.module.ts b/src/app/teacher/authoring-routing.module.ts index 860caaca2f2..e8d84dfec90 100644 --- a/src/app/teacher/authoring-routing.module.ts +++ b/src/app/teacher/authoring-routing.module.ts @@ -91,6 +91,23 @@ const routes: Routes = [ path: 'choose-location', component: ChooseNewNodeLocation }, + { + path: 'import-step', + children: [ + { + path: 'choose-location', + component: ChooseImportStepLocationComponent + }, + { + path: 'choose-step', + component: ChooseImportStepComponent + }, + { + path: 'choose-unit', + component: ChooseImportUnitComponent + } + ] + }, { path: 'simulation', children: [{ path: 'choose-item', component: ChooseSimulationComponent }] @@ -104,23 +121,6 @@ const routes: Routes = [ }, { path: 'choose-copy-location', component: ChooseCopyNodeLocationComponent }, { path: 'choose-move-location', component: ChooseMoveNodeLocationComponent }, - { - path: 'import-step', - children: [ - { - path: 'choose-location', - component: ChooseImportStepLocationComponent - }, - { - path: 'choose-step', - component: ChooseImportStepComponent - }, - { - path: 'choose-unit', - component: ChooseImportUnitComponent - } - ] - }, { path: 'info', component: ProjectInfoAuthoringComponent }, { path: 'milestones', component: MilestonesAuthoringComponent }, { diff --git a/src/assets/wise5/authoringTool/addNode/NewNodeTemplate.ts b/src/assets/wise5/authoringTool/addNode/NewNodeTemplate.ts index 1436835ecf2..a334a6d9dd0 100644 --- a/src/assets/wise5/authoringTool/addNode/NewNodeTemplate.ts +++ b/src/assets/wise5/authoringTool/addNode/NewNodeTemplate.ts @@ -1,6 +1,5 @@ export interface NewNodeTemplate { label: string; - description: string; icon: string; route: string; } diff --git a/src/assets/wise5/authoringTool/addNode/choose-new-node-template/choose-new-node-template.component.html b/src/assets/wise5/authoringTool/addNode/choose-new-node-template/choose-new-node-template.component.html index 3a12f6ec83a..03577ef8500 100644 --- a/src/assets/wise5/authoringTool/addNode/choose-new-node-template/choose-new-node-template.component.html +++ b/src/assets/wise5/authoringTool/addNode/choose-new-node-template/choose-new-node-template.component.html @@ -1,4 +1,4 @@ -
Start from scratch or choose a step template:
+
Start from scratch, import from another unit, or choose a step template:
@@ -24,9 +24,9 @@ -