diff --git a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/create.controller.js b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/create.controller.js new file mode 100644 index 0000000000..31089f4281 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/create.controller.js @@ -0,0 +1,35 @@ +/** + * @ngdoc controller + * @name Umbraco.Editors.ContentBlueprint.CreateController + * @function + * + * @description + * The controller for creating content blueprints + */ +function ContentBlueprintCreateController($scope, $location, contentTypeResource, navigationService) { + + var vm = this; + var node = $scope.dialogOptions.currentNode; + + vm.createBlueprint = createBlueprint; + + function onInit() { + + vm.loading = true; + + contentTypeResource.getAll() + .then(function (documentTypes) { + vm.documentTypes = documentTypes; + vm.loading = false; + }); + } + + function createBlueprint(documentType) { + $location.path("/settings/contentBlueprints/edit/" + node.id).search("create", "true").search("doctype", documentType.alias); + navigationService.hideMenu(); + } + + onInit(); +} + +angular.module("umbraco").controller("Umbraco.Editors.ContentBlueprint.CreateController", ContentBlueprintCreateController); diff --git a/src/Umbraco.Web.UI.Client/src/views/contentblueprints/create.html b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/create.html new file mode 100644 index 0000000000..7d04dfa771 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/contentblueprints/create.html @@ -0,0 +1,41 @@ +