feat: Show published state in tree picker (#14641)
This commit is contained in:
committed by
GitHub
parent
8e8a09f1ba
commit
7537509ede
@@ -276,6 +276,11 @@ public class EntityMapDefinition : IMapDefinition
|
||||
{
|
||||
target.AdditionalData.Add("contentType", source.Values[ExamineFieldNames.ItemTypeFieldName]);
|
||||
}
|
||||
|
||||
if (source.Values.ContainsKey(UmbracoExamineFieldNames.PublishedFieldName))
|
||||
{
|
||||
target.AdditionalData.Add("published", string.Equals(source.Values[UmbracoExamineFieldNames.PublishedFieldName], "y", StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
}
|
||||
|
||||
private static string? MapContentTypeIcon(IEntitySlim entity)
|
||||
|
||||
@@ -73,6 +73,8 @@ public class UmbracoTreeSearcherFields : IUmbracoTreeSearcherFields
|
||||
fields.Add(field);
|
||||
}
|
||||
|
||||
fields.Add(UmbracoExamineFieldNames.PublishedFieldName);
|
||||
|
||||
return fields;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,6 +257,9 @@ body.touch .umb-tree {
|
||||
> .umb-tree-item__inner > a {
|
||||
opacity: 0.6;
|
||||
}
|
||||
&.umb-search-group-item {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
.not-allowed {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<ul class="umb-tree">
|
||||
<li class="root">
|
||||
<ul class="umb-search-group">
|
||||
<li class="umb-search-group-item" ng-repeat="result in results">
|
||||
<li class="umb-search-group-item" ng-class="{ 'not-published': !result.metaData.published }" ng-repeat="result in results">
|
||||
<div ng-class="{ 'umb-tree-node-checked': result.selected }">
|
||||
<button type="button"
|
||||
class="btn-reset umb-search-group-item-link"
|
||||
|
||||
Reference in New Issue
Block a user