Merge branch 'v8-fix-remove-element-type-template-assignment' of https://github.com/kjac/Umbraco-CMS into temp8-pr4117

This commit is contained in:
Stephan
2019-01-22 14:22:36 +01:00
7 changed files with 48 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
<umb-box>
<umb-box ng-hide="model.isElement">
<umb-box-content>
<div class="sub-view-columns">
<div class="sub-view-column-left">
@@ -15,4 +15,9 @@
</div>
</div>
</umb-box-content>
</umb-box>
</umb-box>
<umb-empty-state
ng-show="model.isElement"
position="center">
<localize key="contentTypeEditor_elementDoesNotSupport">This is not applicable for an Element type</localize>
</umb-empty-state>

View File

@@ -3,7 +3,7 @@
<umb-box>
<umb-box-content>
<div class="sub-view-columns">
<div class="sub-view-columns" ng-hide="model.isElement">
<div class="sub-view-column-left">
<h5><localize key="contentTypeEditor_allowAsRootHeading" /></h5>
@@ -19,7 +19,7 @@
</div>
<div class="sub-view-columns">
<div class="sub-view-columns" ng-hide="model.isElement">
<div class="sub-view-column-left">
<h5><localize key="contentTypeEditor_childNodesHeading" /></h5>

View File

@@ -19,13 +19,13 @@
vm.canCreateTemplate = false;
vm.updateTemplatePlaceholder = false;
vm.loadingTemplates = false;
vm.isElement = $scope.model.isElement;
vm.createTemplate = createTemplate;
/* ---------- INIT ---------- */
function onInit() {
vm.loadingTemplates = true;
entityResource.getAll("Template").then(function (templates) {
@@ -86,6 +86,15 @@
vm.canCreateTemplate = existingTemplate ? false : true;
}
var unbindWatcher = $scope.$watch("model.isElement",
function(newValue, oldValue) {
vm.isElement = newValue;
}
);
$scope.$on("$destroy", function () {
unbindWatcher();
});
onInit();
}

View File

@@ -1,5 +1,5 @@
<div ng-controller="Umbraco.Editors.DocumentType.TemplatesController as vm">
<umb-box>
<umb-box ng-hide="vm.isElement">
<umb-box-content>
<div class="sub-view-columns">
@@ -9,29 +9,34 @@
</div>
<div class="sub-view-column-right">
<umb-grid-selector
ng-if="vm.availableTemplates"
selected-items="model.allowedTemplates"
available-items="vm.availableTemplates"
default-item="model.defaultTemplate"
item-name="template"
name="model.name"
alias="model.alias"
update-placeholder="vm.updateTemplatePlaceholder">
</umb-grid-selector>
<umb-grid-selector
ng-if="vm.availableTemplates"
selected-items="model.allowedTemplates"
available-items="vm.availableTemplates"
default-item="model.defaultTemplate"
item-name="template"
name="model.name"
alias="model.alias"
update-placeholder="vm.updateTemplatePlaceholder">
</umb-grid-selector>
<umb-button
ng-if="vm.canCreateTemplate"
type="button"
button-style="info"
action="vm.createTemplate()"
state="vm.createTemplateButtonState"
label-key="settings_createMatchingTemplate">
</umb-button>
<umb-button
ng-if="vm.canCreateTemplate"
type="button"
button-style="info"
action="vm.createTemplate()"
state="vm.createTemplateButtonState"
label-key="settings_createMatchingTemplate">
</umb-button>
</div>
</div>
</umb-box-content>
</umb-box>
<umb-empty-state
ng-show="vm.isElement"
position="center">
<localize key="contentTypeEditor_elementDoesNotSupport">This is not applicable for an Element type</localize>
</umb-empty-state>
</div>

View File

@@ -1223,6 +1223,9 @@ Mange hilsner fra Umbraco robotten
<key alias="memberCanEdit">Medlem kan redigere</key>
<key alias="showOnMemberProfile">Vis på medlemsprofil</key>
<key alias="tabHasNoSortOrder">fane har ingen sorteringsrækkefølge</key>
<key alias="elementHeading">Er en Element-type</key>
<key alias="elementDescription">En Element-type er tiltænkt brug i f.eks. Nested Content, ikke i indholdstræet</key>
<key alias="elementDoesNotSupport">Dette benyttes ikke for en Element-type</key>
</area>
<area alias="languages">
<key alias="addLanguage">Tilføj sprog</key>

View File

@@ -1516,6 +1516,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="allowVaryByCulture">Allow varying by culture</key>
<key alias="elementHeading">Is an Element type</key>
<key alias="elementDescription">An Element type is meant to be used for instance in Nested Content, and not in the tree</key>
<key alias="elementDoesNotSupport">This is not applicable for an Element type</key>
</area>
<area alias="modelsBuilder">
<key alias="buildingModels">Building models</key>

View File

@@ -1556,6 +1556,7 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="allowVaryByCulture">Allow varying by culture</key>
<key alias="elementHeading">Is an Element type</key>
<key alias="elementDescription">An Element type is meant to be used for instance in Nested Content, and not in the tree</key>
<key alias="elementDoesNotSupport">This is not applicable for an Element type</key>
</area>
<area alias="languages">
<key alias="addLanguage">Add language</key>