From: Alexander Ebert Date: Mon, 2 May 2016 12:15:25 +0000 (+0200) Subject: Overhauled 'Add Page' UI X-Git-Tag: 3.0.0_Beta_1~1775 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed3f188f0ebc2ce739e32bbf9369d72ecc45673b;p=GitHub%2FWoltLab%2FWCF.git Overhauled 'Add Page' UI --- diff --git a/wcfsetup/install/files/acp/templates/__pageAddContent.tpl b/wcfsetup/install/files/acp/templates/__pageAddContent.tpl new file mode 100644 index 0000000000..3c09c19dd0 --- /dev/null +++ b/wcfsetup/install/files/acp/templates/__pageAddContent.tpl @@ -0,0 +1,14 @@ + +{if $pageType == 'text'} + {capture assign='wysiwygSelector'}content{@$languageID}{/capture} + + {include file='wysiwyg' wysiwygSelector=$wysiwygSelector} +{elseif $pageType == 'html'} + {capture assign='codemirrorSelector'}#content{@$languageID}{/capture} + + {include file='codemirror' codemirrorMode='htmlmixed' codemirrorSelector=$codemirrorSelector} +{elseif $pageType == 'tpl'} + {capture assign='codemirrorSelector'}#content{@$languageID}{/capture} + + {include file='codemirror' codemirrorMode='smartymixed' codemirrorSelector=$codemirrorSelector} +{/if} \ No newline at end of file diff --git a/wcfsetup/install/files/acp/templates/codemirror.tpl b/wcfsetup/install/files/acp/templates/codemirror.tpl index 7b18d11ee3..9edce7d3fd 100644 --- a/wcfsetup/install/files/acp/templates/codemirror.tpl +++ b/wcfsetup/install/files/acp/templates/codemirror.tpl @@ -9,6 +9,18 @@ {if $codemirrorMode|isset} + + {if $codemirrorMode == 'htmlmixed' || $codemirrorMode == 'smartymixed'} + {if $codemirrorMode == 'smartymixed'} + + + {/if} + + + + + {/if} + {/if} {event name='javascriptIncludes'} diff --git a/wcfsetup/install/files/acp/templates/pageAdd.tpl b/wcfsetup/install/files/acp/templates/pageAdd.tpl index bcf74ab7b2..a0cd7f35e2 100644 --- a/wcfsetup/install/files/acp/templates/pageAdd.tpl +++ b/wcfsetup/install/files/acp/templates/pageAdd.tpl @@ -65,27 +65,6 @@ - -
-
- - - {if $errorField == 'pageType'} - - {if $errorType == 'empty'} - {lang}wcf.global.form.error.empty{/lang} - {else} - {lang}wcf.acp.page.pageType.error.{@$errorType}{/lang} - {/if} - - {/if} -
- -
@@ -227,7 +206,8 @@
- + {include file='__pageAddContent' languageID=0} + {if $errorField == 'content'} {if $errorType == 'empty'} @@ -321,7 +301,8 @@
- + {include file='__pageAddContent' languageID=$availableLanguage->languageID} + {if $errorField == 'content'} {if $errorType == 'empty'} @@ -377,6 +358,7 @@
+ {@SECURITY_TOKEN_INPUT_TAG}
diff --git a/wcfsetup/install/files/acp/templates/pageAddDialog.tpl b/wcfsetup/install/files/acp/templates/pageAddDialog.tpl new file mode 100644 index 0000000000..088687fc21 --- /dev/null +++ b/wcfsetup/install/files/acp/templates/pageAddDialog.tpl @@ -0,0 +1,40 @@ + + diff --git a/wcfsetup/install/files/acp/templates/pageList.tpl b/wcfsetup/install/files/acp/templates/pageList.tpl index 796423c320..3f39c05e0d 100644 --- a/wcfsetup/install/files/acp/templates/pageList.tpl +++ b/wcfsetup/install/files/acp/templates/pageList.tpl @@ -16,9 +16,7 @@