|
1 | 1 | {capture assign='__contentHeader'} |
2 | 2 | <header class="contentHeader"> |
3 | 3 | <div class="contentHeaderTitle"> |
4 | | - <h1 class="contentTitle"> |
5 | | - {if $articleIsFrontend|empty} |
6 | | - {if $action == 'add'}{lang}wcf.acp.article.add{/lang}{else}{lang}wcf.acp.article.edit{/lang}{/if} |
7 | | - {else} |
8 | | - {$__wcf->getActivePage()->getTitle()} |
9 | | - {/if} |
10 | | - </h1> |
| 4 | + <h1 class="contentTitle">{$__wcf->getActivePage()->getTitle()}</h1> |
11 | 5 | </div> |
12 | 6 |
|
13 | 7 | {hascontent} |
|
25 | 19 | </header> |
26 | 20 | {/capture} |
27 | 21 |
|
28 | | -{capture assign='contentInteractionButtons'} |
29 | | - {if $action == 'edit'} |
30 | | - {if $article->canDelete()} |
31 | | - <button |
32 | | - type="button" |
33 | | - class="contentInteractionButton button small jsButtonRestore" |
34 | | - {if !$article->isDeleted} style="display: none"{/if} |
35 | | - > |
36 | | - {icon name='rotate-left'} |
37 | | - <span>{lang}wcf.global.button.restore{/lang}</span> |
38 | | - </button> |
39 | | - <button |
40 | | - type="button" |
41 | | - class="contentInteractionButton button small jsButtonDelete" |
42 | | - {if !$article->isDeleted} style="display: none"{/if} |
43 | | - > |
44 | | - {icon name='xmark'} |
45 | | - <span>{lang}wcf.global.button.delete{/lang}</span> |
46 | | - </button> |
47 | | - <button |
48 | | - type="button" |
49 | | - class="contentInteractionButton button small jsButtonTrash" |
50 | | - {if $article->isDeleted} style="display: none"{/if} |
51 | | - > |
52 | | - {icon name='trash-can'} |
53 | | - <span>{lang}wcf.global.button.trash{/lang}</span> |
54 | | - </button> |
55 | | - {/if} |
56 | | - {if $languages|count > 1 || $article->isMultilingual} |
57 | | - <button type="button" class="contentInteractionButton button small jsButtonToggleI18n"> |
58 | | - {icon name='language'} |
59 | | - <span>{lang}wcf.acp.article.button.toggleI18n{/lang}</span> |
60 | | - </button> |
61 | | - {/if} |
62 | | - {/if} |
63 | | -{/capture} |
64 | | - |
65 | | -{if $articleIsFrontend|empty} |
66 | | - {include file='header' pageTitle='wcf.acp.article.'|concat:$action} |
67 | | -{else} |
68 | | - {include file='header' contentHeader=$__contentHeader} |
69 | | -{/if} |
| 22 | +{include file='header' contentHeader=$__contentHeader} |
70 | 23 |
|
71 | 24 | {if $__wcf->session->getPermission('admin.content.article.canManageArticle')} |
72 | 25 | <script data-relocate="true"> |
|
94 | 47 | {/if} |
95 | 48 |
|
96 | 49 | <script data-relocate="true"> |
97 | | - require(['Language', 'WoltLabSuite/Core/Ui/User/Search/Input', 'WoltLabSuite/Core/Acp/Ui/Article/InlineEditor'], function(Language, UiUserSearchInput, AcpUiArticleInlineEditor) { |
98 | | - Language.addObject({ |
99 | | - 'wcf.article.convertFromI18n.question': '{jslang}wcf.article.convertFromI18n.question{/jslang}', |
100 | | - 'wcf.article.convertFromI18n.description': '{jslang}wcf.article.convertFromI18n.description{/jslang}', |
101 | | - 'wcf.article.convertToI18n.question': '{jslang}wcf.article.convertToI18n.question{/jslang}', |
102 | | - 'wcf.article.convertToI18n.description': '{jslang}wcf.article.convertToI18n.description{/jslang}', |
103 | | - 'wcf.acp.article.i18n.source': '{jslang}wcf.acp.article.i18n.source{/jslang}', |
104 | | - 'wcf.message.status.deleted': '{jslang}wcf.message.status.deleted{/jslang}', |
105 | | - }); |
106 | | - |
| 50 | + require(['WoltLabSuite/Core/Ui/User/Search/Input'], (UiUserSearchInput) => { |
107 | 51 | new UiUserSearchInput(document.querySelector('input[name="username"]')); |
108 | | - {if $action == 'edit'} |
109 | | - new AcpUiArticleInlineEditor({$article->articleID}, { |
110 | | - i18n: { |
111 | | - defaultLanguageId: {$defaultLanguageID}, |
112 | | - isI18n: {if $article->isMultilingual}true{else}false{/if}, |
113 | | - languages: { {implode from=$languages item=language glue=', '}{$language->languageID}: '{$language|encodeJS}'{/implode} } |
114 | | - }, |
115 | | - redirectUrl: '{link controller='ArticleList'}{/link}' |
116 | | - }); |
117 | | - {/if} |
118 | 52 | }); |
119 | 53 | </script> |
120 | 54 |
|
|
131 | 65 | </script> |
132 | 66 | {/if} |
133 | 67 |
|
134 | | -{if $articleIsFrontend|empty} |
135 | | - {unsafe:$__contentHeader} |
136 | | -{/if} |
137 | | - |
138 | 68 | {include file='shared_formNotice'} |
139 | 69 |
|
140 | 70 | {if $action == 'edit'} |
|
0 commit comments