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