Commit | Line | Data |
---|---|---|
e3667539 MW |
1 | {include file='header' pageTitle='wcf.acp.rebuildData'} |
2 | ||
9887f297 | 3 | <script data-relocate="true"> |
b84cb385 TD |
4 | require(['Language', 'WoltLabSuite/Core/Acp/Ui/Maintenance/RebuildData'], (Language, RebuildData) => { |
5 | Language.addObject({ | |
6 | 'wcf.acp.worker.abort.confirmMessage': '{jslang}wcf.acp.worker.abort.confirmMessage{/jslang}', | |
7 | 'wcf.acp.worker.success': '{jslang}wcf.acp.worker.success{/jslang}', | |
8 | }); | |
835354e5 | 9 | |
b84cb385 TD |
10 | document.querySelectorAll('.jsRebuildDataWorker').forEach((button) => { |
11 | RebuildData.register(button); | |
12 | }); | |
13 | document.querySelectorAll('.jsRebuildAll').forEach((button) => { | |
14 | button.addEventListener('click', (ev) => { | |
15 | ev.preventDefault(); | |
16 | void RebuildData.runAllWorkers(); | |
835354e5 | 17 | }); |
9887f297 | 18 | }); |
835354e5 | 19 | }); |
9887f297 MS |
20 | </script> |
21 | ||
95961bdf | 22 | <header class="contentHeader"> |
b5c94e9e AE |
23 | <div class="contentHeaderTitle"> |
24 | <h1 class="contentTitle">{lang}wcf.acp.rebuildData{/lang}</h1> | |
25 | </div> | |
26 | ||
b84cb385 TD |
27 | <nav class="contentHeaderNavigation"> |
28 | <ul> | |
95861281 | 29 | <li><button class="button jsRebuildAll">{icon name='down-long'} <span>{lang}wcf.acp.rebuildData.rebuildAll{/lang}</span></button></li> |
b84cb385 TD |
30 | {event name='contentHeaderNavigation'} |
31 | </ul> | |
32 | </nav> | |
b5c94e9e AE |
33 | </header> |
34 | ||
8e0b5379 | 35 | {if !OFFLINE} |
a14d7068 | 36 | <woltlab-core-notice type="warning">{lang}wcf.acp.rebuildData.offline{/lang}</woltlab-core-notice> |
8e0b5379 AE |
37 | {/if} |
38 | ||
b29020d2 MS |
39 | {event name='afterContentHeader'} |
40 | ||
95961bdf MW |
41 | <section class="section"> |
42 | <header class="sectionHeader"> | |
43 | <h2 class="sectionTitle">{lang}wcf.acp.rebuildData{/lang}</h2> | |
114b5320 | 44 | <p class="sectionDescription">{lang}wcf.acp.rebuildData.description{/lang}</p> |
95961bdf MW |
45 | </header> |
46 | ||
ce606c06 TD |
47 | {assign var='offset' value=0} |
48 | {foreach from=$workers item=worker} | |
95961bdf MW |
49 | <dl class="wide"> |
50 | <dd> | |
ce606c06 | 51 | <button |
e4de8413 | 52 | class="button small jsRebuildDataWorker" |
ce606c06 | 53 | data-nicevalue="{$offset}" |
4ca76b39 | 54 | data-class-name="{$worker->getClassName()}" |
ce606c06 TD |
55 | >{$worker->getName()}</button> |
56 | <small>{$worker->getDescription()}</small> | |
95961bdf MW |
57 | </dd> |
58 | </dl> | |
ce606c06 | 59 | {assign var='offset' value=$offset+1} |
95961bdf MW |
60 | {/foreach} |
61 | </section> | |
e3667539 | 62 | |
39f48521 TD |
63 | <section class="section"> |
64 | <header class="sectionHeader"> | |
65 | <h2 class="sectionTitle">{lang}wcf.acp.rebuildData.cli{/lang}</h2> | |
66 | <p class="sectionDescription">{lang}wcf.acp.rebuildData.cli.description{/lang}</p> | |
67 | </header> | |
68 | ||
69 | <textarea class="monospace" cols="40" rows="15">{implode from=$workers item='worker' glue="\n"}worker {$worker->getEncodedCliClassName()}{/implode}</textarea> | |
70 | </section> | |
71 | ||
b5c94e9e | 72 | <footer class="contentFooter"> |
e3667539 | 73 | {hascontent} |
b5c94e9e | 74 | <nav class="contentFooterNavigation"> |
e3667539 | 75 | <ul> |
b5c94e9e | 76 | {content}{event name='contentFooterNavigation'}{/content} |
e3667539 MW |
77 | </ul> |
78 | </nav> | |
79 | {/hascontent} | |
b5c94e9e | 80 | </footer> |
e3667539 | 81 | |
9887f297 | 82 | {include file='footer'} |