Skip to content

Commit b54fdcc

Browse files
committed
Move all templates from syncTemplates into shared and rename includes in templates
1 parent e478ac7 commit b54fdcc

File tree

228 files changed

+489
-1935
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+489
-1935
lines changed

com.woltlab.wcf/acpTemplateDelete.xml

+43
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,49 @@
108108
<template>__formFieldDependencies</template>
109109
<template>__formFieldDescription</template>
110110
<template>__formFieldErrors</template>
111+
<template>__singleSelectionFormField</template>
111112
<template>__formFieldDataHandler</template>
113+
<template>__mediaSetCategoryDialog</template>
114+
<template>__messageQuoteManager</template>
115+
<template>__topReaction</template>
116+
<template>__wysiwygCmsToolbar</template>
117+
<template>aclPermissionJavaScript</template>
118+
<template>aclSimple</template>
119+
<template>articleAddDialog</template>
120+
<template>benchmark</template>
121+
<template>booleanOptionType</template>
122+
<template>booleanSearchableOptionType</template>
123+
<template>captcha</template>
124+
<template>categoryOptionList</template>
125+
<template>checkboxesOptionType</template>
126+
<template>checkboxesSearchableOptionType</template>
127+
<template>codeMetaCode</template>
128+
<template>codemirror</template>
129+
<template>colorPickerJavaScript</template>
130+
<template>fontAwesomeJavaScript</template>
131+
<template>formError</template>
132+
<template>formNotice</template>
133+
<template>formSuccess</template>
134+
<template>languageChooser</template>
135+
<template>lineBreakSeparatedTextOptionType</template>
136+
<template>mediaManager</template>
137+
<template>messageFormAttachments</template>
138+
<template>messageTableOfContents</template>
139+
<template>multipleLanguageInputJavascript</template>
140+
<template>passwordStrengthLanguage</template>
141+
<template>quoteMetaCode</template>
142+
<template>radioButtonSearchableOptionType</template>
143+
<template>recaptcha</template>
144+
<template>scrollablePageCheckboxList</template>
145+
<template>sitemapEnd</template>
146+
<template>sitemapStart</template>
147+
<template>trophyImage</template>
148+
<template>unfurlUrl</template>
149+
<template>uploadFieldComponent</template>
150+
<template>userBBCodeTag</template>
151+
<template>userConditions</template>
152+
<template>userOptionsCondition</template>
153+
<template>worker</template>
154+
<template>wysiwyg</template>
112155
</delete>
113156
</data>

com.woltlab.wcf/templateDelete.xml

+42
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,47 @@
6767
<template>__formFieldErrors</template>
6868
<template>__formFieldDataHandler</template>
6969
<template>__singleSelectionFormField</template>
70+
<template>__mediaSetCategoryDialog</template>
71+
<template>__messageQuoteManager</template>
72+
<template>__topReaction</template>
73+
<template>__wysiwygCmsToolbar</template>
74+
<template>aclPermissionJavaScript</template>
75+
<template>aclSimple</template>
76+
<template>articleAddDialog</template>
77+
<template>benchmark</template>
78+
<template>booleanOptionType</template>
79+
<template>booleanSearchableOptionType</template>
80+
<template>captcha</template>
81+
<template>categoryOptionList</template>
82+
<template>checkboxesOptionType</template>
83+
<template>checkboxesSearchableOptionType</template>
84+
<template>codeMetaCode</template>
85+
<template>codemirror</template>
86+
<template>colorPickerJavaScript</template>
87+
<template>fontAwesomeJavaScript</template>
88+
<template>formError</template>
89+
<template>formNotice</template>
90+
<template>formSuccess</template>
91+
<template>languageChooser</template>
92+
<template>lineBreakSeparatedTextOptionType</template>
93+
<template>mediaManager</template>
94+
<template>messageFormAttachments</template>
95+
<template>messageTableOfContents</template>
96+
<template>multipleLanguageInputJavascript</template>
97+
<template>passwordStrengthLanguage</template>
98+
<template>quoteMetaCode</template>
99+
<template>radioButtonSearchableOptionType</template>
100+
<template>recaptcha</template>
101+
<template>scrollablePageCheckboxList</template>
102+
<template>sitemapEnd</template>
103+
<template>sitemapStart</template>
104+
<template>trophyImage</template>
105+
<template>unfurlUrl</template>
106+
<template>uploadFieldComponent</template>
107+
<template>userBBCodeTag</template>
108+
<template>userConditions</template>
109+
<template>userOptionsCondition</template>
110+
<template>worker</template>
111+
<template>wysiwyg</template>
70112
</delete>
71113
</data>

com.woltlab.wcf/templates/accountManagement.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{include file='header' __disableAds=true __sidebarLeftHasMenu=true}
44

5-
{include file='formError'}
5+
{include file='shared_formError'}
66

77
<woltlab-core-notice type="warning">{lang}wcf.user.accountManagement.warning{/lang}</woltlab-core-notice>
88

@@ -96,7 +96,7 @@
9696

9797
<script data-relocate="true">
9898
require(['WoltLabSuite/Core/Ui/User/PasswordStrength', 'Language'], function (PasswordStrength, Language) {
99-
{include file='passwordStrengthLanguage'}
99+
{include file='shared_passwordStrengthLanguage'}
100100
101101
var relatedInputs = [];
102102
if (elById('username')) relatedInputs.push(elById('username'));

com.woltlab.wcf/templates/articleAdd.tpl

+8-8
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@
105105
isI18n: {if $article->isMultilingual}true{else}false{/if},
106106
languages: { {implode from=$languages item=language glue=', '}{@$language->languageID}: '{$language|encodeJS}'{/implode} }
107107
},
108-
redirectUrl: '{link controller='ArticleList'}{/link}'
109-
});
108+
'{link controller='ArticleList'}{/link}'
109+
})
110110
{/if}
111111
});
112112
</script>
@@ -128,7 +128,7 @@
128128
{@$__contentHeader}
129129
{/if}
130130

131-
{include file='formNotice'}
131+
{include file='shared_formNotice'}
132132

133133
{if $action == 'edit'}
134134
<woltlab-core-notice type="info" class="jsArticleNoticeTrash"{if !$article->isDeleted} hidden{/if}>{lang}wcf.acp.article.trash.notice{/lang}</woltlab-core-notice>
@@ -410,8 +410,8 @@
410410
<dd>
411411
<textarea name="content[0]" id="content0" class="wysiwygTextarea" data-autosave="com.woltlab.wcf.article{$action|ucfirst}-{if $action == 'edit'}{@$articleID}{else}0{/if}-0">{if !$content[0]|empty}{$content[0]}{/if}</textarea>
412412

413-
{include file='__wysiwygCmsToolbar' wysiwygSelector='content0'}
414-
{include file='wysiwyg' wysiwygSelector='content0'}
413+
{include file='shared_wysiwygCmsToolbar' wysiwygSelector='content0'}
414+
{include file='shared_wysiwyg' wysiwygSelector='content0'}
415415

416416
{if $errorField == 'content'}
417417
<small class="innerError">
@@ -576,8 +576,8 @@
576576
<dd>
577577
<textarea name="content[{@$availableLanguage->languageID}]" id="content{@$availableLanguage->languageID}" class="wysiwygTextarea" data-autosave="com.woltlab.wcf.article{$action|ucfirst}-{if $action == 'edit'}{@$articleID}{else}0{/if}-{@$availableLanguage->languageID}">{if !$content[$availableLanguage->languageID]|empty}{$content[$availableLanguage->languageID]}{/if}</textarea>
578578

579-
{include file='__wysiwygCmsToolbar' wysiwygSelector='content'|concat:$availableLanguage->languageID}
580-
{include file='wysiwyg' wysiwygSelector='content'|concat:$availableLanguage->languageID}
579+
{include file='shared_wysiwygCmsToolbar' wysiwygSelector='content'|concat:$availableLanguage->languageID}
580+
{include file='shared_wysiwyg' wysiwygSelector='content'|concat:$availableLanguage->languageID}
581581

582582
{if $errorField == 'content'|concat:$availableLanguage->languageID}
583583
<small class="innerError">
@@ -620,7 +620,7 @@
620620
});
621621
622622
{if !$labelGroups|empty}
623-
new WCF.Label.ArticleLabelChooser({ {implode from=$labelGroupsToCategories key=__labelCategoryID item=labelGroupIDs}{@$__labelCategoryID}: [ {implode from=$labelGroupIDs item=labelGroupID}{@$labelGroupID}{/implode} ] {/implode} }, { {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '.articleAddForm');
623+
new WCF.Label.ArticleLabelChooser({ {implode from=$labelGroupsToCategories key=__labelCategoryID item=labelGroupIDs}{@$__labelCategoryID}: [ {implode from=$labelGroupIDs item=labelGroupID}{@$labelGroupID}{/implode} ] {/implode} }, { {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '.articleAddForm')
624624
{/if}
625625
626626
new WCF.Message.I18nPreview({

com.woltlab.wcf/templates/articleList.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
'wcf.label.withoutSelection': '{jslang}wcf.label.withoutSelection{/jslang}'
4848
});
4949
50-
new WCF.Label.Chooser({ {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '#sidebarForm', undefined, true);
50+
new WCF.Label.Chooser({ {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '#sidebarForm', undefined, true)
5151
});
5252
</script>
5353
{/if}
@@ -140,7 +140,7 @@
140140
</script>
141141

142142
{if $__wcf->getSession()->getPermission('admin.content.article.canManageArticle') || $__wcf->getSession()->getPermission('admin.content.article.canManageOwnArticles') || $__wcf->getSession()->getPermission('admin.content.article.canContributeArticle')}
143-
{include file='articleAddDialog'}
143+
{include file='shared_articleAddDialog'}
144144
{/if}
145145

146146
{include file='footer'}

com.woltlab.wcf/templates/articleListItems.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<div class="contentItemMetaIcons">
6262
{if MODULE_LIKE && $__wcf->getSession()->getPermission('user.like.canViewLike') && $article->cumulativeLikes}
6363
<div class="contentItemMetaIcon">
64-
{include file='__topReaction' cachedReactions=$article->cachedReactions render='short'}
64+
{include file='shared_topReaction' cachedReactions=$article->cachedReactions render='short'}
6565
</div>
6666
{/if}
6767
{if $article->getDiscussionProvider()->getDiscussionCountPhrase()}{* empty phrase indicates that comments are disabled *}

com.woltlab.wcf/templates/avatarEdit.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<woltlab-core-notice type="error">{lang}wcf.user.avatar.error.disabled{/lang}</woltlab-core-notice>
77
{/if}
88

9-
{include file='formError'}
9+
{include file='shared_formError'}
1010

1111
{if $success|isset}
1212
<woltlab-core-notice type="success">{lang}wcf.global.success.edit{/lang}</woltlab-core-notice>

com.woltlab.wcf/templates/boxArticleList.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{$boxArticle->getDiscussionProvider()->getDiscussionCountPhrase()}
1717
{elseif $boxSortField == 'cumulativeLikes'}
1818
{if MODULE_LIKE && $__wcf->getSession()->getPermission('user.like.canViewLike') && $boxArticle->cachedReactions}
19-
{include file='__topReaction' cachedReactions=$boxArticle->cachedReactions render='full'}
19+
{include file='shared_topReaction' cachedReactions=$boxArticle->cachedReactions render='full'}
2020
{/if}
2121
{/if}
2222
</small>

com.woltlab.wcf/templates/categoryArticleList.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
'wcf.label.withoutSelection': '{jslang}wcf.label.withoutSelection{/jslang}'
5353
});
5454
55-
new WCF.Label.Chooser({ {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '#sidebarForm', undefined, true);
55+
new WCF.Label.Chooser({ {implode from=$labelIDs key=groupID item=labelID}{@$groupID}: {@$labelID}{/implode} }, '#sidebarForm', undefined, true)
5656
});
5757
</script>
5858
{/if}
@@ -104,6 +104,6 @@
104104
});
105105
</script>
106106

107-
{include file='articleAddDialog'}
107+
{include file='shared_articleAddDialog'}
108108

109109
{include file='footer'}

com.woltlab.wcf/templates/commentAddGuestDialog.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
</dd>
1515
</dl>
1616

17-
{include file='captcha'}
17+
{include file='shared_captcha'}

com.woltlab.wcf/templates/commentEditor.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
<button type="button" class="button" data-type="cancel">{lang}wcf.global.button.cancel{/lang}</button>
1414
</div>
1515

16-
{include file='wysiwyg'}
16+
{include file='shared_wysiwyg'}

com.woltlab.wcf/templates/commentResponseEditor.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
<button type="button" class="button" data-type="cancel">{lang}wcf.global.button.cancel{/lang}</button>
1414
</div>
1515

16-
{include file='wysiwyg'}
16+
{include file='shared_wysiwyg'}

com.woltlab.wcf/templates/comments.tpl

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848

4949
{* in-template call for full backwards-compatibility *}
5050
{$commentList->getCommentManager()->setDisallowedBBCodes()}
51-
52-
{include file='wysiwyg' wysiwygSelector=$_commentAddWysiwygSelector}
51+
52+
{include file='shared_wysiwyg' wysiwygSelector=$_commentAddWysiwygSelector}
5353

5454
<div class="formSubmit">
5555
<button type="button" class="button buttonPrimary" data-type="save" accesskey="s">{lang}wcf.global.button.submit{/lang}</button>
@@ -87,8 +87,8 @@
8787

8888
{* in-template call for full backwards-compatibility *}
8989
{$commentList->getCommentManager()->setDisallowedBBCodes()}
90-
91-
{include file='wysiwyg' wysiwygSelector=$_commentResponseWysiwygSelector}
90+
91+
{include file='shared_wysiwyg' wysiwygSelector=$_commentResponseWysiwygSelector}
9292

9393
<div class="formSubmit">
9494
<button type="button" class="button buttonPrimary" data-type="save" accesskey="s">{lang}wcf.global.button.submit{/lang}</button>

com.woltlab.wcf/templates/contact.tpl

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{include file='header'}
22

3-
{include file='formError'}
3+
{include file='shared_formError'}
44

55
<form method="post" action="{link controller='Contact'}{/link}">
66
<section class="section">
@@ -73,7 +73,7 @@
7373

7474
{if CONTACT_FORM_ENABLE_ATTACHMENTS && !$attachmentHandler|empty && $attachmentHandler->canUpload()}
7575
<div class="contactFormAttachments">
76-
{include file='messageFormAttachments' wysiwygSelector=''}
76+
{include file='shared_messageFormAttachments' wysiwygSelector=''}
7777
</div>
7878
{/if}
7979

@@ -93,8 +93,8 @@
9393
</section>
9494

9595
{event name='sections'}
96-
97-
{include file='captcha' supportsAsyncCaptcha=true}
96+
97+
{include file='shared_captcha' supportsAsyncCaptcha=true}
9898

9999
<div class="formSubmit">
100100
<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">

com.woltlab.wcf/templates/formNotice.tpl

-3
This file was deleted.

com.woltlab.wcf/templates/login.tpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{if !$errorField|empty && $errorField == 'cookie'}
1212
<woltlab-core-notice type="error">{lang}wcf.user.login.error.cookieRequired{/lang}</woltlab-core-notice>
1313
{else}
14-
{include file='formError'}
14+
{include file='shared_formError'}
1515
{/if}
1616

1717
<form id="loginForm" method="post" action="{$loginController}">
@@ -53,8 +53,8 @@
5353
</dl>
5454

5555
{event name='fields'}
56-
57-
{include file='captcha' supportsAsyncCaptcha=true}
56+
57+
{include file='shared_captcha' supportsAsyncCaptcha=true}
5858

5959
<div class="formSubmit">
6060
<input type="submit" value="{lang}wcf.user.button.login{/lang}" accesskey="s">

com.woltlab.wcf/templates/mediaEditor.tpl

+5-6
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@
8282
</label>
8383
</dd>
8484
</dl>
85-
86-
{include file='languageChooser' label='wcf.media.languageID'}
85+
{include file='shared_languageChooser' label='wcf.media.languageID'}
8786
{/if}
8887

8988
<dl>
@@ -93,7 +92,7 @@
9392
</dd>
9493
</dl>
9594
{if $availableLanguages|count > 1}
96-
{include file='multipleLanguageInputJavascript' elementIdentifier='title'|concat:'_':$media->mediaID forceSelection=true}
95+
{include file='shared_multipleLanguageInputJavascript' elementIdentifier='title'|concat:'_':$media->mediaID forceSelection=true}
9796
{/if}
9897

9998
{if $media->isImage}
@@ -104,7 +103,7 @@
104103
</dd>
105104
</dl>
106105
{if $availableLanguages|count > 1}
107-
{include file='multipleLanguageInputJavascript' elementIdentifier='caption'|concat:'_':$media->mediaID forceSelection=true}
106+
{include file='shared_multipleLanguageInputJavascript' elementIdentifier='caption'|concat:'_':$media->mediaID forceSelection=true}
108107
{/if}
109108

110109
<dl>
@@ -124,14 +123,14 @@
124123
</dd>
125124
</dl>
126125
{if $availableLanguages|count > 1}
127-
{include file='multipleLanguageInputJavascript' elementIdentifier='altText'|concat:'_':$media->mediaID forceSelection=true}
126+
{include file='shared_multipleLanguageInputJavascript' elementIdentifier='altText'|concat:'_':$media->mediaID forceSelection=true}
128127
{/if}
129128
{/if}
130129

131130
{event name='dataFields'}
132131
</section>
133132

134-
{include file='aclSimple'}
133+
{include file='shared_aclSimple'}
135134

136135
<div class="formSubmit">
137136
<button type="button" data-type="submit" class="button buttonPrimary">{lang}wcf.global.button.submit{/lang}</button>

com.woltlab.wcf/templates/messageFormTabs.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
{if MODULE_SMILEY && !$smileyCategories|empty}{include file='messageFormSmilies'}{/if}
1818
{if !$attachmentHandler|empty && $attachmentHandler->canUpload()}
19-
{include file='messageFormAttachments'}
19+
{include file='shared_messageFormAttachments'}
2020
{/if}
2121

2222
{if $__messageFormSettings}{@$__messageFormSettings}{/if}

com.woltlab.wcf/templates/messageFormTabsInline.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
{if MODULE_SMILEY && !$smileyCategories|empty}{include file='messageFormSmilies'}{/if}
2222
{if !$attachmentHandler|empty && $attachmentHandler->canUpload()}
23-
{include file='messageFormAttachments'}
23+
{include file='shared_messageFormAttachments'}
2424
{/if}
2525

2626
{if $__messageFormSettingsInlineContent}{@$__messageFormSettingsInlineContent}{/if}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<textarea id="{$option->optionName}" name="values[{$option->optionName}]" cols="40" rows="10"{if $option->required} required{/if} class="wysiwygTextarea" data-disable-attachments="true">{$value}</textarea>
2-
{include file='wysiwyg' wysiwygSelector=$option->optionName}
2+
{include file='shared_wysiwyg' wysiwygSelector=$option->optionName}
33

44
<script data-relocate="true">
55
$(function() {
66
$('#{$option->optionName}').parents('dl:eq(0)').addClass('wide');
77
});
8-
</script>
8+
</script>

0 commit comments

Comments
 (0)