Commit | Line | Data |
---|---|---|
158bd3ca | 1 | <!DOCTYPE html> |
7616874e AE |
2 | <html |
3 | dir="{@$__wcf->getLanguage()->getPageDirection()}" | |
4 | lang="{$__wcf->getLanguage()->getBcp47()}" | |
2591a6a5 | 5 | data-color-scheme="{$__wcf->getStyleHandler()->getColorScheme()}" |
7616874e | 6 | > |
158bd3ca | 7 | <head> |
cbbb348c AE |
8 | <meta charset="utf-8"> |
9 | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
10 | <meta name="robots" content="noindex"> | |
b32ef4dd | 11 | <title>{if $pageTitle|isset}{@$pageTitle|language} - {/if}{jslang}wcf.global.acp{/jslang}{if PACKAGE_ID} - {PAGE_TITLE|phrase}{/if}</title> |
f201f350 | 12 | |
d09792c2 AE |
13 | {* work-around for Microsoft Edge that sometimes does not apply this style, if it was set via an external stylesheet *} |
14 | <style>ol, ul { list-style: none; }</style> | |
15 | ||
f201f350 AE |
16 | <!-- Stylesheets --> |
17 | {@$__wcf->getStyleHandler()->getStylesheet(true)} | |
18 | {event name='stylesheets'} | |
19 | ||
208bac1e | 20 | <!-- Icons --> |
3f7b8575 AE |
21 | {if PACKAGE_ID && $__wcf->getStyleHandler()->getDefaultStyle()} |
22 | <link rel="apple-touch-icon" sizes="180x180" href="{$__wcf->getStyleHandler()->getDefaultStyle()->getFaviconAppleTouchIcon()}"> | |
d831a2c2 | 23 | <link rel="manifest" href="{$__wcf->getStyleHandler()->getDefaultStyle()->getFaviconManifest()}"> |
2822f747 | 24 | <link rel="icon" type="image/png" sizes="48x48" href="{$__wcf->getStyleHandler()->getDefaultStyle()->getFavicon()}"> |
d831a2c2 | 25 | <meta name="msapplication-config" content="{$__wcf->getStyleHandler()->getDefaultStyle()->getFaviconBrowserconfig()}"> |
3f7b8575 | 26 | {else} |
d831a2c2 TD |
27 | <link rel="apple-touch-icon" sizes="180x180" href="{$__wcf->getPath()}images/favicon/default.apple-touch-icon.png"> |
28 | <link rel="manifest" href="{$__wcf->getPath()}images/favicon/default.manifest.json"> | |
29 | <link rel="icon" href="{$__wcf->getPath()}images/favicon/default.favicon.ico"> | |
30 | <meta name="msapplication-config" content="{$__wcf->getPath()}images/favicon/default.browserconfig.xml"> | |
3f7b8575 | 31 | {/if} |
9d33f2de AE |
32 | <script data-eager="true"> |
33 | { | |
34 | {if $__wcf->getStyleHandler()->getColorScheme() === 'system'} | |
35 | { | |
36 | const colorScheme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; | |
37 | document.documentElement.dataset.colorScheme = colorScheme; | |
38 | } | |
39 | {/if} | |
40 | ||
41 | const themeColor = document.createElement("meta"); | |
42 | themeColor.name = "theme-color"; | |
43 | themeColor.content = window.getComputedStyle(document.documentElement).getPropertyValue("--wcfHeaderBackground"); | |
44 | document.currentScript.replaceWith(themeColor); | |
45 | } | |
46 | </script> | |
2a1d14c5 AE |
47 | |
48 | <meta name="timezone" content="{$__wcf->user->getTimeZone()->getName()}"> | |
208bac1e | 49 | |
ac5e3aae | 50 | <script data-eager="true"> |
7a353b6a | 51 | var WCF_PATH = '{@$__wcf->getPath()}'; |
1a42371c | 52 | var WSC_API_URL = '{@$__wcf->getPath()}acp/'; |
5dae41d8 | 53 | {* The SECURITY_TOKEN is defined in wcf.globalHelper.js *} |
22a51072 | 54 | var LANGUAGE_ID = {@$__wcf->getLanguage()->languageID}; |
eae52096 | 55 | var LANGUAGE_USE_INFORMAL_VARIANT = {if LANGUAGE_USE_INFORMAL_VARIANT}true{else}false{/if}; |
8574cbfd | 56 | var TIME_NOW = {@TIME_NOW}; |
a623cd24 | 57 | var LAST_UPDATE_TIME = {@LAST_UPDATE_TIME}; |
0e69f27c | 58 | var ENABLE_DEBUG_MODE = {if ENABLE_DEBUG_MODE}true{else}false{/if}; |
b5158645 | 59 | var ENABLE_PRODUCTION_DEBUG_MODE = {if ENABLE_PRODUCTION_DEBUG_MODE}true{else}false{/if}; |
32669648 | 60 | var ENABLE_DEVELOPER_TOOLS = {if ENABLE_DEVELOPER_TOOLS}true{else}false{/if}; |
f5e3a61b | 61 | |
96d31616 AE |
62 | {* This constant is a compiler option, it does not exist in production. *} |
63 | {* Unlike the frontend, this option must be defined in the ACP at all times. *} | |
64 | var COMPILER_TARGET_DEFAULT = true; | |
158bd3ca | 65 | </script> |
54ffc6a0 | 66 | |
dbdbbb60 | 67 | <script data-eager="true" src="{$__wcf->getPath()}js/WoltLabSuite/WebComponent.min.js?v={@LAST_UPDATE_TIME}"></script> |
50a3558b | 68 | <script data-eager="true" src="{$phrasePreloader->getUrl($__wcf->language)}"></script> |
e44f2cf1 | 69 | |
91b3ad54 AE |
70 | {js application='wcf' file='require' bundle='WoltLabSuite.Core' core='true'} |
71 | {js application='wcf' file='require.config' bundle='WoltLabSuite.Core' core='true'} | |
72 | {js application='wcf' file='require.linearExecution' bundle='WoltLabSuite.Core' core='true'} | |
73 | {js application='wcf' file='wcf.globalHelper' bundle='WoltLabSuite.Core' core='true'} | |
4b201fcf | 74 | {js application='wcf' file='3rdParty/tslib' bundle='WoltLabSuite.Core' core='true'} |
55919774 TD |
75 | <script> |
76 | requirejs.config({ | |
8a603e6d | 77 | baseUrl: '{@$__wcf->getPath()}js', |
33d93082 | 78 | urlArgs: 't={@LAST_UPDATE_TIME}' |
7ae41c12 TD |
79 | {hascontent} |
80 | , paths: { | |
81 | {content}{event name='requirePaths'}{/content} | |
82 | } | |
83 | {/hascontent} | |
55919774 | 84 | }); |
7ae41c12 | 85 | {event name='requireConfig'} |
55919774 | 86 | </script> |
7cedac20 | 87 | <script> |
5650aa98 AE |
88 | require(['Language', 'WoltLabSuite/Core/Acp/Bootstrap', 'User'], function(Language, AcpBootstrap, User) { |
89 | Language.addObject({ | |
e2e8c155 | 90 | 'wcf.acp.search.noResults': '{jslang}wcf.acp.search.noResults{/jslang}', |
c99414ac | 91 | |
5650aa98 | 92 | {event name='javascriptLanguageImport'} |
55919774 | 93 | }); |
5650aa98 | 94 | |
c3dbdabd MS |
95 | User.init( |
96 | {@$__wcf->user->userID}, | |
219cfc8d | 97 | {if $__wcf->user->userID}'{@$__wcf->user->username|encodeJS}'{else}''{/if}, |
c3dbdabd MS |
98 | {if $__wcf->user->userID}'{@$__wcf->user->getLink()|encodeJS}'{else}''{/if} |
99 | ); | |
100 | ||
5650aa98 AE |
101 | AcpBootstrap.setup({ |
102 | bootstrap: { | |
d732bab3 | 103 | dynamicColorScheme: {if $__wcf->getStyleHandler()->getColorScheme() === 'system'}true{else}false{/if}, |
2591a6a5 | 104 | enableMobileMenu: {if PACKAGE_ID && $__isLogin|empty}true{else}false{/if}, |
5650aa98 AE |
105 | } |
106 | }); | |
5650aa98 | 107 | }); |
208bac1e | 108 | </script> |
a8160b8d | 109 | |
37113f37 AE |
110 | {include file='__devtoolsLanguageChooser'} |
111 | ||
a8160b8d AE |
112 | <script> |
113 | // prevent jQuery and other libraries from utilizing define() | |
114 | __require_define_amd = define.amd; | |
115 | define.amd = undefined; | |
116 | </script> | |
0d20df38 | 117 | {js application='wcf' lib='jquery'} |
208bac1e AE |
118 | {js application='wcf' lib='jquery-ui'} |
119 | {js application='wcf' lib='jquery-ui' file='touchPunch' bundle='WCF.Combined'} | |
120 | {js application='wcf' lib='jquery-ui' file='nestedSortable' bundle='WCF.Combined'} | |
121 | {js application='wcf' file='WCF.Assets' bundle='WCF.Combined'} | |
122 | {js application='wcf' file='WCF' bundle='WCF.Combined'} | |
123 | {js application='wcf' acp='true' file='WCF.ACP'} | |
124 | <script> | |
a8160b8d | 125 | define.amd = __require_define_amd; |
208bac1e | 126 | $.holdReady(true); |
219cfc8d TD |
127 | WCF.User.init( |
128 | {@$__wcf->user->userID}, | |
129 | {if $__wcf->user->userID}'{@$__wcf->user->username|encodeJS}'{else}''{/if} | |
130 | ); | |
208bac1e | 131 | </script> |
5c09fb63 MS |
132 | {js application='wcf' file='WCF.Message' bundle='WCF.Combined'} |
133 | {js application='wcf' file='WCF.Label' bundle='WCF.Combined'} | |
208bac1e | 134 | <script> |
158bd3ca | 135 | $(function() { |
7a353b6a | 136 | if (jQuery.browser.touch) $('html').addClass('touch'); |
5c2c30ed | 137 | |
5dbeffb3 | 138 | {if $__wcf->user->userID && $__isLogin|empty} |
6476e7a1 | 139 | new WCF.ACP.Search(); |
50922192 | 140 | {/if} |
71662ae8 | 141 | |
2e78af8d | 142 | {event name='javascriptInit'} |
f762ea4f AE |
143 | |
144 | $('form[method=get]').attr('method', 'post'); | |
caa69548 AE |
145 | |
146 | // rewrites legacy links using the `dereferrer.php` service | |
147 | // see https://github.com/WoltLab/WCF/issues/2557 | |
148 | elBySelAll('a', undefined, function(link) { | |
149 | if (/\/dereferrer.php$/.test(link.pathname) && link.search.match(/^\?url=([^&=]+)$/)) { | |
150 | link.href = unescape(RegExp.$1); | |
151 | } | |
152 | ||
153 | if (link.classList.contains('externalURL')) { | |
154 | var rel = (link.rel === '') ? [] : link.rel.split(' '); | |
155 | if (rel.indexOf('noopener') === -1) rel.push('noopener'); | |
caa69548 AE |
156 | |
157 | link.rel = rel.join(' '); | |
158 | } | |
159 | }); | |
e98516f3 | 160 | |
306a3710 | 161 | WCF.DOMNodeInsertedHandler.execute(); |
158bd3ca | 162 | }); |
71c93c40 | 163 | </script> |
208bac1e | 164 | {event name='javascriptInclude'} |
cb215a83 TD |
165 | |
166 | {if !$headContent|empty} | |
167 | {@$headContent} | |
168 | {/if} | |
158bd3ca TD |
169 | </head> |
170 | ||
16e56ee7 | 171 | <body id="tpl{$templateName|ucfirst}" data-template="{$templateName}" data-application="{$templateNameApplication}" class="wcfAcp{if !$__isLogin|empty} acpAuthFlow{/if}"> |
f48f3551 | 172 | <span id="top"></span> |
df812fa0 | 173 | |
4e71a79b | 174 | {assign var=_acpPageSubMenuActive value=false} |
d2eedbaa MS |
175 | {if PACKAGE_ID} |
176 | {assign var=_activeMenuItems value=$__wcf->getACPMenu()->getActiveMenuItems()} | |
177 | {foreach from=$__wcf->getACPMenu()->getMenuItems('') item=_sectionMenuItem} | |
178 | {if $_sectionMenuItem->menuItem|in_array:$_activeMenuItems}{assign var=_acpPageSubMenuActive value=true}{/if} | |
179 | {/foreach} | |
180 | {/if} | |
5dbeffb3 | 181 | <div id="pageContainer" class="pageContainer{if !PACKAGE_ID || !$__wcf->user->userID || !$__isLogin|empty} acpPageHiddenMenu{elseif $_acpPageSubMenuActive} acpPageSubMenuActive{/if}"> |
f2b50825 AE |
182 | {event name='beforePageHeader'} |
183 | ||
184 | {include file='pageHeader'} | |
185 | ||
186 | {event name='afterPageHeader'} | |
187 | ||
6476e7a1 AE |
188 | <div id="acpPageContentContainer" class="acpPageContentContainer"> |
189 | {include file='pageMenu'} | |
158bd3ca | 190 | |
6476e7a1 AE |
191 | <section id="main" class="main" role="main"> |
192 | <div class="layoutBoundary"> | |
193 | <div id="content" class="content"> | |
7ae41c12 | 194 |