updates the UI to show culture when the item is not variant and shows the unpublished status if the culture has no variants

This commit is contained in:
Shannon
2018-12-19 15:58:18 +11:00
parent 36fd32ee9a
commit 72d42e4228
2 changed files with 21 additions and 2 deletions

View File

@@ -53,7 +53,8 @@
"prompt_unsavedChanges",
"prompt_doctypeChangeWarning",
"general_history",
"auditTrails_historyIncludingVariants"
"auditTrails_historyIncludingVariants",
"content_itemNotPublished"
];
localizationService.localizeMany(keys)
@@ -65,11 +66,23 @@
labels.notCreated = data[4];
labels.unsavedChanges = data[5];
labels.doctypeChangeWarning = data[6];
labels.notPublished = data[9];
scope.historyLabel = scope.node.variants && scope.node.variants.length === 1 ? data[7] : data[8];
setNodePublishStatus();
if (scope.currentUrls.length === 0) {
if (scope.node.id > 0) {
//it's created but not published
scope.currentUrls.push({ text: labels.notPublished, isUrl: false });
}
else {
//it's new
scope.currentUrls.push({ text: labels.notCreated, isUrl: false })
}
}
});
scope.auditTrailOptions = {

View File

@@ -8,13 +8,19 @@
<ul class="nav nav-stacked" style="margin-bottom: 0;">
<li ng-repeat="url in currentUrls">
<span ng-if="url.isUrl">
<span ng-if="node.variants.length === 1 && url.culture" style="font-size: 13px; color: #cccccc; width: 50px;display: inline-block">{{url.culture}}</span>
<a href="{{url.text}}" target="_blank">
<i class="icon icon-window-popin"></i>
<span>{{url.text}}</span>
</a>
</span>
<div ng-if="!url.isUrl" style="margin-top: 4px;">
<span>{{url.text}}</span>
<span ng-if="node.variants.length === 1 && url.culture" style="font-size: 13px; color: #cccccc; width: 50px;display: inline-block">{{url.culture}}</span>
<em>{{url.text}}</em>
</div>
</li>
</ul>