Skip to content

Commit a209156

Browse files
IbrahimMNadainada
andauthored
GitHub issue#11299 fix v8 (#11493)
* adding validation * adding localization keys * applying cleaning up notes * fix spaces * revert ex.xml * spaces again * keep it DRY * chenge hasTabsAndFirstRender to hasTabsOrFirstRender Co-authored-by: inada <[email protected]>
1 parent 56e0598 commit a209156

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.doctypepicker.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,22 @@
2222
<umb-icon icon="icon-navigation" class="handle"></umb-icon>
2323
</td>
2424
<td>
25-
{{ph = placeholder(config);""}}
25+
{{ph = placeholder(config);hasTabsOrFirstRender = (elemTypeTabs[config.ncAlias].length || config.ncAlias=='');""}}
2626
<button type="button" class="btn-reset umb-nested-content__placeholder" ng-class="{'umb-nested-content__placeholder--selected':ph}" ng-click="openElemTypeModal($event, config)">
2727
<umb-node-preview ng-if="ph" icon="ph.icon" name="ph.name"></umb-node-preview>
2828
<localize key="content_nestedContentAddElementType" ng-if="!ph">Add element type</localize>
2929
</button>
3030

3131
</td>
3232
<td>
33-
<select id="{{model.alias}}_tab_select"
33+
<select ng-show="hasTabsOrFirstRender" id="{{model.alias}}_tab_select"
3434
ng-options="t for t in elemTypeTabs[config.ncAlias]"
3535
ng-model="config.ncTabAlias" required></select>
36+
<span ng-show="!hasTabsOrFirstRender" class="red">
37+
<localize key="content_nestedContentNoGroups">
38+
The selected element type does not contain any supported groups (tabs are not supported by this editor, either change them to groups or use the Block List editor).
39+
</localize>
40+
</span>
3641
</td>
3742
<td>
3843
<input type="text" ng-model="config.nameTemplate" />

src/Umbraco.Web.UI/Umbraco/config/lang/en.xml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@
273273
<key alias="nestedContentGroupHelpText">Select the group whose properties should be displayed. If left blank, the first group on the Element Type will be used.</key>
274274
<key alias="nestedContentTemplateHelpTextPart1">Enter an angular expression to evaluate against each item for its name. Use</key>
275275
<key alias="nestedContentTemplateHelpTextPart2">to display the item index</key>
276+
<key alias="nestedContentNoGroups">The selected element type does not contain any supported groups (tabs are not supported by this editor, either change them to groups or use the Block List editor).</key>
276277
<key alias="addTextBox">Add another text box</key>
277278
<key alias="removeTextBox">Remove this text box</key>
278279
<key alias="contentRoot">Content root</key>
@@ -1091,17 +1092,16 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
10911092
<key alias="notificationsSavedFor">Notification settings saved for</key>
10921093
<key alias="mailBody"><![CDATA[
10931094
Hi %0%
1094-
1095+
10951096
This is an automated mail to inform you that the task '%1%'
10961097
has been performed on the page '%2%'
10971098
by the user '%3%'
1098-
1099+
10991100
Go to http://%4%/#/content/content/edit/%5% to edit.
1100-
1101+
11011102
%6%
1102-
1103+
11031104
Have a nice day!
1104-
11051105
Cheers from the Umbraco robot
11061106
]]></key>
11071107
<key alias="mailBodyVariantSummary">The following languages have been modified %0%</key>
@@ -1799,17 +1799,16 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
17991799
<key alias="includeSubpages">Include subpages</key>
18001800
<key alias="mailBody"><![CDATA[
18011801
Hi %0%
1802-
1802+
18031803
This is an automated mail to inform you that the document '%1%'
18041804
has been requested for translation into '%5%' by %2%.
1805-
1805+
18061806
Go to http://%3%/translation/details.aspx?id=%4% to edit.
1807-
1807+
18081808
Or log into Umbraco to get an overview of your translation tasks
18091809
http://%3%
1810-
1810+
18111811
Have a nice day!
1812-
18131812
Cheers from the Umbraco robot
18141813
]]></key>
18151814
<key alias="noTranslators">No translator users found. Please create a translator user before you start sending content to translation</key>

src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@
278278
<key alias="nestedContentGroupHelpText">Select the group whose properties should be displayed. If left blank, the first group on the Element Type will be used.</key>
279279
<key alias="nestedContentTemplateHelpTextPart1">Enter an angular expression to evaluate against each item for its name. Use</key>
280280
<key alias="nestedContentTemplateHelpTextPart2">to display the item index</key>
281+
<key alias="nestedContentNoGroups">The selected element type does not contain any supported groups (tabs are not supported by this editor, either change them to groups or use the Block List editor).</key>
281282
<key alias="addTextBox">Add another text box</key>
282283
<key alias="removeTextBox">Remove this text box</key>
283284
<key alias="contentRoot">Content root</key>

0 commit comments

Comments
 (0)