|
3 | 3 | {capture assign='contentHeader'} |
4 | 4 | <header class="contentHeader"> |
5 | 5 | <div class="contentHeaderTitle"> |
6 | | - <h1 class="contentTitle">{$__wcf->getActivePage()->getTitle()}</h1> |
7 | | - |
8 | | - {if $queue->lastChangeTime} |
9 | | - <dl class="plain inlineDataList"> |
10 | | - <dt>{lang}wcf.moderation.lastChangeTime{/lang}</dt> |
11 | | - <dd>{@$queue->lastChangeTime|time}</dd> |
12 | | - </dl> |
13 | | - {/if} |
14 | | - |
15 | | - <dl class="plain inlineDataList" id="moderationAssignedUserContainer"> |
16 | | - <dt>{lang}wcf.moderation.assignedUser{/lang}</dt> |
17 | | - <dd id="moderationAssignedUser"> |
18 | | - {if $queue->assignedUserID} |
19 | | - <a href="{link controller='User' id=$assignedUserID}{/link}" class="userLink" data-object-id="{@$assignedUserID}">{$queue->assignedUsername}</a> |
20 | | - {else} |
21 | | - {lang}wcf.moderation.assignedUser.nobody{/lang} |
22 | | - {/if} |
23 | | - </dd> |
24 | | - </dl> |
25 | | - |
26 | | - <dl class="plain inlineDataList" id="moderationStatusContainer"> |
27 | | - <dt>{lang}wcf.moderation.status{/lang}</dt> |
28 | | - <dd id="moderationQueueStatus">{$queue->getStatus()}</dd> |
29 | | - </dl> |
| 6 | + <h1 class="contentTitle">{$__wcf->getActivePage()->getTitle()}: {$queue->getTitle()}</h1> |
| 7 | + <ul class="inlineList contentHeaderMetaData"> |
| 8 | + {event name='beforeMetaData'} |
| 9 | + |
| 10 | + {if $queue->lastChangeTime} |
| 11 | + <li title="{lang}wcf.moderation.lastChangeTime{/lang}"> |
| 12 | + {icon name='clock'} |
| 13 | + {time time=$queue->lastChangeTime} |
| 14 | + </li> |
| 15 | + {/if} |
| 16 | + |
| 17 | + <li title="{lang}wcf.moderation.assignedUser{/lang}"> |
| 18 | + {icon name='user'} |
| 19 | + <span id="moderationAssignedUser"> |
| 20 | + {if $queue->assignedUserID} |
| 21 | + <a href="{link controller='User' id=$assignedUserID}{/link}" class="userLink" data-object-id="{$assignedUserID}">{$queue->assignedUsername}</a> |
| 22 | + {else} |
| 23 | + {lang}wcf.moderation.assignedUser.nobody{/lang} |
| 24 | + {/if} |
| 25 | + </span> |
| 26 | + </li> |
| 27 | + |
| 28 | + <li title="{lang}wcf.moderation.status{/lang}"> |
| 29 | + {icon name='arrows-rotate'} |
| 30 | + <span id="moderationQueueStatus">{$queue->getStatus()}</span> |
| 31 | + </li> |
| 32 | + |
| 33 | + {event name='afterMetaData'} |
| 34 | + </ul> |
30 | 35 | </div> |
31 | 36 |
|
32 | 37 | {hascontent} |
|
54 | 59 | </button> |
55 | 60 | {if !$queue->isDone()} |
56 | 61 | {if $queueManager->canRemoveContent($queue->getDecoratedObject())} |
57 | | - <button type="button" id="removeContent" class="contentInteractionButton button small jsOnly">{icon name='xmark'} <span>{lang}wcf.moderation.activation.removeContent{/lang}</span></button> |
| 62 | + <button |
| 63 | + type="button" |
| 64 | + id="removeContent" |
| 65 | + class="contentInteractionButton button small jsOnly" |
| 66 | + data-object-id="{$queue->queueID}" |
| 67 | + data-object-name="{$queue->getTitle()}" |
| 68 | + data-redirect-url="{link controller='ModerationList'}{/link}" |
| 69 | + >{icon name='xmark'} <span>{lang}wcf.moderation.activation.removeContent{/lang}</span></button> |
58 | 70 | {/if} |
59 | | - <button type="button" id="removeReport" class="contentInteractionButton button small jsOnly">{icon name='square-check'} <span>{lang}wcf.moderation.report.removeReport{/lang}</span></button> |
| 71 | + <button |
| 72 | + type="button" |
| 73 | + id="removeReport" |
| 74 | + class="contentInteractionButton button small jsOnly" |
| 75 | + data-object-id="{$queue->queueID}" |
| 76 | + data-redirect-url="{link controller='ModerationList'}{/link}" |
| 77 | + >{icon name='square-check'} <span>{lang}wcf.moderation.report.removeReport{/lang}</span></button> |
60 | 78 | {/if} |
61 | 79 | {if $queue->canChangeJustifiedStatus()} |
62 | | - <button type="button" id="changeJustifiedStatus" class="contentInteractionButton button small jsOnly">{icon name='arrows-rotate'} <span>{lang}wcf.moderation.report.changeJustifiedStatus{/lang}</span></button> |
| 80 | + <button |
| 81 | + type="button" |
| 82 | + id="changeJustifiedStatus" |
| 83 | + class="contentInteractionButton button small jsOnly" |
| 84 | + data-object-id="{$queue->queueID}" |
| 85 | + data-redirect-url="{link controller='ModerationReport' object=$queue}{/link}" |
| 86 | + data-justified="{if $queue->markAsJustified}true{else}false{/if}" |
| 87 | + >{icon name='arrows-rotate'} <span>{lang}wcf.moderation.report.changeJustifiedStatus{/lang}</span></button> |
63 | 88 | {/if} |
64 | 89 | {/capture} |
65 | 90 |
|
|
81 | 106 | {else} |
82 | 107 | {lang}wcf.user.guest{/lang} |
83 | 108 | {/if} |
84 | | - <small class="separatorLeft">{@$queue->time|time}</small> |
| 109 | + <small class="separatorLeft">{time time=$queue->time}</small> |
85 | 110 | </h3> |
86 | 111 | </div> |
87 | 112 |
|
88 | | - <div class="containerContent">{@$queue->getFormattedMessage()}</div> |
| 113 | + <div class="containerContent">{unsafe:$queue->getFormattedMessage()}</div> |
89 | 114 | </div> |
90 | 115 | </div> |
91 | 116 | </section> |
92 | 117 |
|
93 | 118 | <section class="section"> |
94 | 119 | <header class="sectionHeader"> |
95 | 120 | <h2 class="sectionTitle">{lang}wcf.moderation.report.reportedContent{/lang}</h2> |
96 | | - <p class="sectionDescription">{lang}wcf.moderation.type.{@$queue->getObjectTypeName()}{/lang}</p> |
| 121 | + <p class="sectionDescription">{lang}wcf.moderation.type.{$queue->getObjectTypeName()}{/lang}</p> |
97 | 122 | </header> |
98 | 123 |
|
99 | | - {@$reportedContent} |
| 124 | + {unsafe:$reportedContent} |
100 | 125 | </section> |
101 | 126 |
|
102 | 127 | <section id="comments" class="section sectionContainerList moderationComments"> |
|
115 | 140 | setup(document.getElementById('moderationAssignUser')); |
116 | 141 | }); |
117 | 142 |
|
118 | | - $(function() { |
119 | | - WCF.Language.addObject({ |
120 | | - 'wcf.moderation.report.removeContent.confirmMessage': '{jslang}wcf.moderation.report.removeContent.confirmMessage{/jslang}', |
121 | | - 'wcf.moderation.report.removeContent.reason': '{jslang}wcf.moderation.report.removeContent.reason{/jslang}', |
122 | | - 'wcf.moderation.report.removeReport.confirmMessage': '{jslang}wcf.moderation.report.removeReport.confirmMessage{/jslang}', |
123 | | - 'wcf.moderation.report.removeReport.markAsJustified': '{jslang}wcf.moderation.report.removeReport.markAsJustified{/jslang}', |
124 | | - 'wcf.moderation.report.removeReport.confirmMessage': '{jslang}wcf.moderation.report.removeReport.confirmMessage{/jslang}', |
125 | | - 'wcf.moderation.report.changeJustifiedStatus.markAsJustified': '{jslang}wcf.moderation.report.changeJustifiedStatus.markAsJustified{/jslang}', |
126 | | - 'wcf.moderation.report.changeJustifiedStatus.confirmMessage': '{jslang}wcf.moderation.report.changeJustifiedStatus.confirmMessage{/jslang}', |
127 | | - }); |
| 143 | + require(['WoltLabSuite/Core/Controller/Moderation/Report'], ({ setup }) => { |
| 144 | + {jsphrase name='wcf.moderation.report.removeReport.confirmMessage'} |
| 145 | + {jsphrase name='wcf.moderation.report.removeReport.markAsJustified'} |
| 146 | + {jsphrase name='wcf.moderation.report.changeJustifiedStatus.confirmMessage'} |
| 147 | + {jsphrase name='wcf.moderation.report.changeJustifiedStatus.markAsJustified'} |
128 | 148 | |
129 | | - new WCF.Moderation.Report.Management( |
130 | | - {@$queue->queueID}, |
131 | | - '{link controller='ModerationList' encode=false}{/link}', |
132 | | - {if $queue->markAsJustified}true{else}false{/if} |
| 149 | + setup( |
| 150 | + document.getElementById('removeContent'), |
| 151 | + document.getElementById('removeReport'), |
| 152 | + document.getElementById('changeJustifiedStatus') |
133 | 153 | ); |
134 | 154 | }); |
135 | 155 | </script> |
|
0 commit comments