Merge branch '5.2' into 5.3
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / acp / templates / rebuildData.tpl
CommitLineData
e3667539
MW
1{include file='header' pageTitle='wcf.acp.rebuildData'}
2
9887f297 3<script data-relocate="true">
835354e5 4 require(['Language', 'WoltLabSuite/Core/Acp/Ui/Worker'], function (Language, AcpUiWorker) {
9f663473 5 Language.add('wcf.acp.worker.abort.confirmMessage', '{jslang}wcf.acp.worker.abort.confirmMessage{/jslang}');
835354e5
AE
6
7 elBySelAll('.jsRebuildDataWorker', undefined, function (button) {
8 if (button.classList.contains('disabled')) return;
9
10 button.addEventListener(WCF_CLICK_EVENT, function (event) {
11 event.preventDefault();
12
13 new AcpUiWorker({
14 // dialog
15 dialogId: 'cache',
16 dialogTitle: button.textContent,
17
18 // ajax
19 className: elData(button, 'class-name'),
20 loopCount: -1,
21 parameters: { },
22
23 // callbacks
24 callbackAbort: null,
25 callbackFailure: null,
26 callbackSuccess: function() {
27 {if $convertEncoding}
28 var span = button.nextElementSibling;
29 if (span && span.nodeName === 'SPAN') elRemove(span);
30
31 span = elCreate('span');
32 span.innerHTML = ' <span class="icon icon16 fa-check green"></span> {lang}wcf.acp.worker.success{/lang}';
33 button.parentNode.insertBefore(span, button.nextElementSibling);
34 {else}
35 // force reload after converting the database encoding
36 window.location.reload();
37 {/if}
38 }
39 });
40 });
9887f297 41 });
835354e5 42 });
9887f297
MS
43</script>
44
95961bdf 45<header class="contentHeader">
b5c94e9e
AE
46 <div class="contentHeaderTitle">
47 <h1 class="contentTitle">{lang}wcf.acp.rebuildData{/lang}</h1>
48 </div>
49
e3667539 50 {hascontent}
b5c94e9e 51 <nav class="contentHeaderNavigation">
e3667539 52 <ul>
b5c94e9e 53 {content}{event name='contentHeaderNavigation'}{/content}
e3667539
MW
54 </ul>
55 </nav>
56 {/hascontent}
b5c94e9e
AE
57</header>
58
b29020d2
MS
59{event name='afterContentHeader'}
60
95961bdf
MW
61<section class="section">
62 <header class="sectionHeader">
63 <h2 class="sectionTitle">{lang}wcf.acp.rebuildData{/lang}</h2>
114b5320 64 <p class="sectionDescription">{lang}wcf.acp.rebuildData.description{/lang}</p>
95961bdf
MW
65 </header>
66
67 {foreach from=$objectTypes item=objectType}
a4fa35db
AE
68 {assign var=_allowRebuild value=true}
69 {if !$convertEncoding && $objectType->objectType != 'com.woltlab.wcf.databaseConvertEncoding'}
70 {assign var=_allowRebuild value=false}
71 {/if}
72
95961bdf
MW
73 <dl class="wide">
74 <dd>
835354e5
AE
75 <a href="#"
76 class="button small jsRebuildDataWorker{if !$_allowRebuild} disabled{/if}"
77 data-class-name="{$objectType->className}" data-object-type="{$objectType->objectType}"
78 >{lang}wcf.acp.rebuildData.{@$objectType->objectType}{/lang}</a>
95961bdf 79 <small>{lang}wcf.acp.rebuildData.{@$objectType->objectType}.description{/lang}</small>
95961bdf
MW
80 </dd>
81 </dl>
82 {/foreach}
83</section>
e3667539 84
b5c94e9e 85<footer class="contentFooter">
e3667539 86 {hascontent}
b5c94e9e 87 <nav class="contentFooterNavigation">
e3667539 88 <ul>
b5c94e9e 89 {content}{event name='contentFooterNavigation'}{/content}
e3667539
MW
90 </ul>
91 </nav>
92 {/hascontent}
b5c94e9e 93</footer>
e3667539 94
9887f297 95{include file='footer'}