Start updating the model/controller for editing variants in the back office and wiring up the angular side of things
This commit is contained in:
@@ -53,61 +53,6 @@
|
||||
// We don't get the info tab from the server from version 7.8 so we need to manually add it
|
||||
//contentEditingHelper.addInfoTab($scope.content.tabs);
|
||||
|
||||
// prototype variants
|
||||
$scope.content.variants = [
|
||||
{
|
||||
"cultureDisplayName": "English (United States)",
|
||||
"culture": "en-US",
|
||||
"current": true,
|
||||
"segments" : [
|
||||
{
|
||||
"name": "Mobile"
|
||||
},
|
||||
{
|
||||
"name": "Job campign"
|
||||
}
|
||||
],
|
||||
"state": "Published"
|
||||
},
|
||||
{
|
||||
"cultureDisplayName": "Danish",
|
||||
"culture": "da-DK",
|
||||
"current": false,
|
||||
"segments" : [
|
||||
{
|
||||
"name": "Mobile"
|
||||
}
|
||||
],
|
||||
"state": "Published"
|
||||
},
|
||||
{
|
||||
"cultureDisplayName": "Spanish (Spain)",
|
||||
"culture": "es-ES",
|
||||
"current": false,
|
||||
"state": "Published (pending changes)"
|
||||
},
|
||||
{
|
||||
"cultureDisplayName": "French (France)",
|
||||
"culture": "fr-FR",
|
||||
"current": false,
|
||||
"segments" : [
|
||||
{
|
||||
"name": "Mobile"
|
||||
},
|
||||
{
|
||||
"name": "Job campign"
|
||||
}
|
||||
],
|
||||
"state": "Draft"
|
||||
},
|
||||
{
|
||||
"cultureDisplayName": "German (Germany)",
|
||||
"culture": "de-DE",
|
||||
"current": false,
|
||||
"state": "Draft"
|
||||
}
|
||||
];
|
||||
|
||||
// prototype content and info apps
|
||||
var contentApp = {
|
||||
"name": "Content",
|
||||
|
||||
@@ -136,13 +136,13 @@
|
||||
}
|
||||
|
||||
// published node
|
||||
if(node.hasPublishedVersion === true && node.publishDate && node.published === true) {
|
||||
if(node.publishDate && node.published === true) {
|
||||
scope.publishStatus.label = localizationService.localize("content_published");
|
||||
scope.publishStatus.color = "success";
|
||||
}
|
||||
|
||||
// published node with pending changes
|
||||
if(node.hasPublishedVersion === true && node.publishDate && node.published === false) {
|
||||
if (node.edited === true && node.publishDate) {
|
||||
scope.publishStatus.label = localizationService.localize("content_publishedPendingChanges");
|
||||
scope.publishStatus.color = "success"
|
||||
}
|
||||
|
||||
@@ -50,15 +50,15 @@
|
||||
server-validation-field="Alias">
|
||||
</umb-generate-alias>
|
||||
|
||||
<a ng-if="variants.length > 0" class="umb-variant-switcher__toggle" href="" ng-click="vm.dropdownOpen = !vm.dropdownOpen">
|
||||
<span>{{vm.currentVariant.cultureDisplayName}}</span>
|
||||
<a ng-if="variants.length > 1" class="umb-variant-switcher__toggle" href="" ng-click="vm.dropdownOpen = !vm.dropdownOpen">
|
||||
<span>{{vm.currentVariant.language.name}}</span>
|
||||
<ins class="umb-variant-switcher__expand" ng-class="{'icon-navigation-down': !vm.dropdownOpen, 'icon-navigation-up': vm.dropdownOpen}"> </ins>
|
||||
</a>
|
||||
|
||||
<umb-dropdown ng-if="vm.dropdownOpen" style="width: 100%; max-height: 250px; overflow-y: scroll; margin-top: 5px;" on-close="vm.dropdownOpen = false" umb-keyboard-list>
|
||||
<umb-dropdown-item class="umb-variant-switcher__item" ng-class="{'umb-variant-switcher_item--current': variant.current}" ng-repeat="variant in variants">
|
||||
<a href="" class="umb-variant-switcher__name-wrapper" ng-click="selectVariant($event, variant)" prevent-default>
|
||||
<span class="umb-variant-switcher__name">{{variant.cultureDisplayName}}</span>
|
||||
<span class="umb-variant-switcher__name">{{variant.language.name}}</span>
|
||||
<span class="umb-variant-switcher__state">{{variant.state}}</span>
|
||||
</a>
|
||||
<div ng-if="splitViewOpen !== true" class="umb-variant-switcher__split-view" ng-click="openInSplitView($event, variant)">Open in split view</div>
|
||||
@@ -115,4 +115,4 @@
|
||||
view="dialogModel.view">
|
||||
</umb-overlay>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user