Fix editing template and show warning message when using runtime mode production

This commit is contained in:
Ronald Barendse
2022-07-14 22:48:43 +02:00
parent db90b16cb1
commit 802f2baaa0
6 changed files with 715 additions and 700 deletions

View File

@@ -1630,6 +1630,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="tabRules">Editor</key>
</area>
<area alias="template">
<key alias="runtimeModeProduction"><![CDATA[Template content is not editable when using runtime mode <code>Production</code>.]]></key>
<key alias="deleteByIdFailed">Failed to delete template with ID %0%</key>
<key alias="edittemplate">Edit template</key>
<key alias="insertSections">Sections</key>

View File

@@ -1683,6 +1683,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<key alias="tabRules">Rich Text Editor</key>
</area>
<area alias="template">
<key alias="runtimeModeProduction"><![CDATA[Template content is not editable when using runtime mode <code>Production</code>.]]></key>
<key alias="deleteByIdFailed">Failed to delete template with ID %0%</key>
<key alias="edittemplate">Edit template</key>
<key alias="insertSections">Sections</key>

View File

@@ -1444,6 +1444,7 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
<key alias="tabRules">Rich Text Editor</key>
</area>
<area alias="template">
<key alias="runtimeModeProduction"><![CDATA[Sjablooninhoud kan niet worden bewerkt in de runtime-modus <code>Production</code>.]]></key>
<key alias="deleteByIdFailed">Kan sjabloon met ID %0% niet verwijderen</key>
<key alias="edittemplate">Sjabloon aanpassen</key>
<key alias="insertSections">Secties</key>

View File

@@ -597,7 +597,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
{ "assemblyVersion", _umbracoVersion.AssemblyVersion?.ToString() }
};
app.Add("runtimeMode", _runtimeSettings.Mode.ToString());
//the value is the hash of the version, cdf version and the configured state
app.Add("cacheBuster", $"{version}.{_runtimeState.Level}.{_runtimeMinifier.CacheBuster}".GenerateHash());

View File

@@ -12,6 +12,7 @@
<umb-editor-header
name="vm.template.name"
alias="vm.template.alias"
alias-locked="vm.runtimeModeProduction"
key="vm.template.key"
description="vm.template.virtualPath"
description-locked="true"
@@ -22,7 +23,13 @@
<umb-editor-container>
<umb-box>
<umb-box-content>
<umb-box-content ng-if="vm.runtimeModeProduction">
<div class="umb-alert umb-alert--info">
<localize key="template_runtimeModeProduction">Template content is not editable when using runtime mode <code>Production</code>.</localize>
</div>
</umb-box-content>
<umb-box-content ng-if="!vm.runtimeModeProduction">
<div class="flex" style="margin-bottom: 30px;">
@@ -106,6 +113,7 @@
<umb-editor-footer-content-left>
<umb-keyboard-shortcuts-overview
ng-if="!vm.runtimeModeProduction"
model="vm.page.keyboardShortcutsOverview"
show-overlay="vm.showKeyboardShortcut"
on-close="vm.closeShortcuts()">