[TASK] Use view helper to configure ModuleTemplate in log module
[Packages/TYPO3.CMS.git] / typo3 / sysext / belog / Resources / Private / Partials / Content / LogEntries.html
1 <html
2 xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
3 xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
4 xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
5 xmlns:belog="http://typo3.org/ns/TYPO3/CMS/Belog/ViewHelpers"
6 data-namespace-typo3-fluid="true">
7
8 <f:if condition="{constraint.groupByPage}">
9 <div>
10 <h2>
11 <f:translate key="overview" />
12 </h2>
13 <f:translate
14 key="timeInfo"
15 arguments="{
16 0: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
17 1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
18 }"
19 />
20 <p>
21 <f:for each="{groupedLogEntries}" as="pidEntry" key="pid">
22 <f:if condition="{pid} > 0">
23 <br />
24 <f:translate
25 key="pagenameWithUID"
26 arguments="{
27 0: '{belog:be.pagePath(pid:\'{pid}\')}',
28 1: '{pid}'
29 }"
30 />
31 </f:if>
32 </f:for>
33 </p>
34 </div>
35 </f:if>
36
37 <f:for each="{groupedLogEntries}" as="pidEntry" key="pid">
38 <div>
39 <h2>
40 <f:if condition="{constraint.groupByPage}">
41 <f:then>
42 <f:if condition="{pid} < 1">
43 <f:then>
44 <f:if condition="{pid} == -1">
45 <f:translate
46 key="logForNonPageRelatedActionsOrRootLevelOrPage"
47 arguments="{
48 0: '{f:translate(key:\'forNonPageRelatedActions\')}',
49 1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
50 2: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
51 }"
52 />
53 </f:if>
54 <f:if condition="{pid} == 0">
55 <f:translate
56 key="logForNonPageRelatedActionsOrRootLevelOrPage"
57 arguments="{
58 0: '{f:translate(key:\'forRootLevel\')}',
59 1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
60 2: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
61 }"
62 />
63 </f:if>
64 </f:then>
65 <f:else>
66 <f:comment>
67 Nest view helpers three times:
68 1. Feed pid as argument to be.pagePath
69 2. Use this as argument for 'forPage' translate
70 3. Use this as argument for 'logForNonPageRelatedActionsOrRootLevelOrPage' translate
71 </f:comment>
72 <f:translate
73 key="logForNonPageRelatedActionsOrRootLevelOrPage"
74 arguments="{
75 0: '{f:translate(
76 key:\'forPage\',
77 arguments:\'{
78 0:\\\'{belog:be.pagePath(pid:\\\\\\\'{pid}\\\\\\\')}\\\',
79 1:\\\'{pid}\\\'
80 }\'
81 )}',
82 1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
83 2: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
84 }"
85 />
86 </f:else>
87 </f:if>
88 </f:then>
89 <f:else>
90 <f:translate
91 key="logForNonPageRelatedActionsOrRootLevelOrPage"
92 arguments="{
93 0: '',
94 1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
95 2: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
96 }"
97 />
98 </f:else>
99 </f:if>
100 </h2>
101 <f:for each="{pidEntry}" as="day" key="dayTimestamp">
102 <h3>
103 <f:format.date format="{settings.dateFormat}">@{dayTimestamp}</f:format.date>
104 </h3>
105
106 <div class="table-fit">
107 <table class="table table-striped table-hover">
108 <thead>
109 <tr>
110 <th>
111 <f:translate key="chLog_l_error"/>
112 </th>
113 <th>
114 <f:translate key="chLog_l_time"/>
115 </th>
116 <th colspan="2">
117 <f:translate key="chLog_l_user"/>
118 </th>
119 <th>
120 <f:if condition="{isSubmoduleLayout}">
121 <f:then>
122 <f:translate key="chLog_l_table"/>
123 </f:then>
124 <f:else>
125 <f:translate key="chLog_l_types"/>
126 </f:else>
127 </f:if>
128 </th>
129 <th>
130 <f:translate key="chLog_l_action"/>
131 </th>
132 <th>
133 <f:translate key="chLog_l_details"/>
134 </th>
135 <th>
136 <f:translate key="actions"/>
137 </th>
138 </tr>
139 </thead>
140 <tbody>
141 <f:for each="{day}" as="logItem">
142 <tr>
143 <td>
144 <f:if condition="{logItem.errorIconClass}">
145 <core:icon identifier="{logItem.errorIconClass}" />
146 </f:if>
147 </td>
148 <td>
149 <f:format.date format="H:i:s">@{logItem.tstamp}</f:format.date>
150 </td>
151 <td>
152 <f:if condition="{belog:username(uid:logItem.backendUserUid)}">
153 <be:avatar backendUser="{logItem.backendUserUid}" showIcon="true"/>
154 </f:if>
155 </td>
156 <td>
157 <f:if condition="{belog:username(uid:logItem.backendUserUid)}">
158 <f:then>
159 <belog:username uid="{logItem.backendUserUid}"/>
160 </f:then>
161 <f:else>[{logItem.backendUserUid}]</f:else>
162 </f:if>
163 <f:if condition="{logItem.logData.originalUser}">
164 ({f:translate(key:'viaUser')}
165 <f:if condition="{belog:username(uid:logItem.logData.originalUser)}">
166 <f:then>
167 <belog:username uid="{logItem.logData.originalUser}"/>
168 </f:then>
169 <f:else>[{logItem.logData.originalUser}]</f:else>
170 </f:if>
171 )
172 </f:if>
173 <br>
174 <span class="text-muted">
175 <f:if condition="{belog:workspaceTitle(uid:logItem.workspaceUid)}">
176 <f:then><belog:workspaceTitle uid="{logItem.workspaceUid}"/></f:then>
177 <f:else>[{logItem.workspaceUid}]</f:else>
178 </f:if>
179 </span>
180 </td>
181 <td>
182 <f:if condition="{isSubmoduleLayout}">
183 <f:then>
184 {logItem.tableName}
185 </f:then>
186 <f:else>
187 <f:if condition="{f:translate(key:'type_{logItem.type}')}">
188 <f:then>
189 <f:translate key="type_{logItem.type}"/>
190 </f:then>
191 <f:else>
192 [{logItem.type}]
193 </f:else>
194 </f:if>
195 </f:else>
196 </f:if>
197 </td>
198 <td>
199 <f:if condition="{f:translate(key:'action_{logItem.type}_{logItem.action}')}">
200 <f:then>
201 <f:translate key="action_{logItem.type}_{logItem.action}"/>
202 </f:then>
203 <f:else>
204 [{logItem.action}]
205 </f:else>
206 </f:if>
207 </td>
208 <td class="col-word-break">
209 <belog:formatDetails logEntry="{logItem}"/>
210 <f:if condition="{logItem.logData.history}">
211 <a href="{be:moduleLink(route: 'record_history', arguments: '{historyEntry: logItem.logData.history}')}" title="{f:translate(key: 'showHistory')}">
212 <core:icon identifier="actions-document-history-open" />
213 </a>
214 </f:if>
215 <f:if condition="{logItem.detailsNumber} > 0">
216 (msg#{logItem.type}.{logItem.action}.{logItem.detailsNumber})
217 </f:if>
218 </td>
219 <td>
220 <f:if condition="{logItem.error} == 1">
221 <f:link.action action="deleteMessage" arguments="{errorUid:logItem.uid}" class="btn btn-warning">
222 <f:translate key="actions.deleteWarnings"/>
223 </f:link.action>
224 </f:if>
225 <f:if condition="{logItem.error} == 2">
226 <f:link.action action="deleteMessage" arguments="{errorUid:logItem.uid}" class="btn btn-danger">
227 <f:translate key="actions.delete"/>
228 </f:link.action>
229 </f:if>
230 </td>
231 </tr>
232 </f:for>
233 </tbody>
234 </table>
235 </div>
236 </f:for>
237 </div>
238 </f:for>
239
240 </html>