LogEntries.html 7.83 KB
Newer Older
1
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
2
{namespace belog=TYPO3\CMS\Belog\ViewHelpers}
3
4

<f:if condition="{constraint.groupByPage}">
5
6
	<div>
		<h2>
7
			<f:translate key="overview" />
8
		</h2>
9
10
11
		<f:translate
			key="timeInfo"
			arguments="{
12
13
				0: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
				1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
14
15
			}"
		/>
16
17
18
19
20
21
22
23
24
25
26
27
28
29
		<p>
			<f:for each="{groupedLogEntries}" as="pidEntry" key="pid">
				<f:if condition="{pid} > 0">
					<br />
					<f:translate
						key="pagenameWithUID"
						arguments="{
							0: '{belog:be.pagePath(pid:\'{pid}\')}',
							1: '{pid}'
						}"
					/>
				</f:if>
			</f:for>
		</p>
30
31
32
33
34
	</div>
</f:if>

<f:for each="{groupedLogEntries}" as="pidEntry" key="pid">
	<div>
35
		<h2>
36
37
38
39
40
41
42
43
44
			<f:if condition="{constraint.groupByPage}">
				<f:then>
					<f:if condition="{pid} < 1">
						<f:then>
							<f:if condition="{pid} == -1">
								<f:translate
									key="logForNonPageRelatedActionsOrRootLevelOrPage"
									arguments="{
										0: '{f:translate(key:\'forNonPageRelatedActions\')}',
45
46
										1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
										2: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
47
48
49
50
51
52
53
54
									}"
								/>
							</f:if>
							<f:if condition="{pid} == 0">
								<f:translate
									key="logForNonPageRelatedActionsOrRootLevelOrPage"
									arguments="{
										0: '{f:translate(key:\'forRootLevel\')}',
55
56
										1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
										2: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
									}"
								/>
							</f:if>
						</f:then>
						<f:else>
							<f:comment>
								Nest view helpers three times:
								1. Feed pid as argument to be.pagePath
								2. Use this as argument for 'forPage' translate
								3. Use this as argument for 'logForNonPageRelatedActionsOrRootLevelOrPage' translate
							</f:comment>
							<f:translate
								key="logForNonPageRelatedActionsOrRootLevelOrPage"
								arguments="{
									0: '{f:translate(
										key:\'forPage\',
										htmlEscape:\'0\',
										arguments:\'{
											0:\\\'{belog:be.pagePath(pid:\\\\\\\'{pid}\\\\\\\')}\\\',
											1:\\\'{pid}\\\'
										}\'
									)}',
79
80
									1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
									2: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
81
82
83
84
85
86
87
88
89
90
								}"
							/>
						</f:else>
					</f:if>
				</f:then>
				<f:else>
					<f:translate
						key="logForNonPageRelatedActionsOrRootLevelOrPage"
						arguments="{
							0: '',
91
92
							1: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.startTimestamp}\')}',
							2: '{f:format.date(format:\'{settings.dateFormat} {settings.timeFormat}\', date:\'@{constraint.endTimestamp}\')}'
93
94
95
96
						}"
					/>
				</f:else>
			</f:if>
97
		</h2>
98
		<f:for each="{pidEntry}" as="day" key="dayTimestamp">
99
			<h3>
100
				<f:format.date format="{settings.dateFormat}">@{dayTimestamp}</f:format.date>
101
102
			</h3>

103
			<table class="table table-striped table-hover">
104
105
				<thead>
					<tr>
106
						<th valign="top">
107
108
109
110
							<strong>
								<f:translate key="chLog_l_error" />
							</strong>
						</th>
111
						<th><span style="width: 10px; height: 1px; display: inline-block"></span></th>
112
						<th valign="top">
113
114
115
116
							<strong>
								<f:translate key="chLog_l_time" />
							</strong>
						</th>
117
						<th><span style="width: 10px; height: 1px; display: inline-block"></span></th>
118
						<th valign="top" colspan="2">
119
120
121
122
							<strong>
								<f:translate key="chLog_l_user" />
							</strong>
						</th>
123
						<th><span style="width: 10px; height: 1px; display: inline-block"></span></th>
124
						<th valign="top">
125
126
127
128
129
130
131
132
133
134
135
							<strong>
								<f:if condition="{constraint.isInPageContext}">
									<f:then>
										<f:translate key="chLog_l_table" />
									</f:then>
									<f:else>
										<f:translate key="chLog_l_types" />
									</f:else>
								</f:if>
							</strong>
						</th>
136
						<th><span style="width: 10px; height: 1px; display: inline-block"></span></th>
137
						<th valign="top">
138
139
140
141
							<strong>
								<f:translate key="chLog_l_action" />
							</strong>
						</th>
142
						<th><span style="width: 10px; height: 1px; display: inline-block"></span></th>
143
						<th valign="top">
144
145
146
147
							<strong>
								<f:translate key="chLog_l_details" />
							</strong>
						</th>
148
						<th><span style="width: 10px; height: 1px; display: inline-block"></span></th>
149
150
151
152
153
154
155
156
					</tr>
				</thead>
				<tbody>
					<f:for each="{day}" as="logItem">
						<tr>
							<td valign="top">
								<belog:ErrorIcon errorNumber="{logItem.error}" />
							</td>
157
							<td><span style="width: 10px; height: 1px; display: inline-block"></span></td>
158
159
160
161

							<td valign="top">
								<f:format.date format="H:i:s">@{logItem.tstamp}</f:format.date>
							</td>
162
							<td><span style="width: 10px; height: 1px; display: inline-block"></span></td>
163

164
165
166
167
168
							<td class="col-icon" valign="top">
								<f:if condition="{belog:username(uid:logItem.backendUserUid)}">
									<be:avatar backendUser="{logItem.backendUserUid}" showIcon="true" />
								</f:if>
							</td>
169
							<td valign="top">
170
171
172
173
								<f:if condition="{belog:username(uid:logItem.backendUserUid)}">
									<f:then><belog:username uid="{logItem.backendUserUid}" /></f:then>
									<f:else>[{logItem.backendUserUid}]</f:else>
								</f:if>
174
								<f:if condition="{logItem.logData.originalUser}">
175
176
177
178
179
									({f:translate(key:'viaUser')}
									<f:if condition="{belog:username(uid:logItem.logData.originalUser)}">
										<f:then><belog:username uid="{logItem.logData.originalUser}" /></f:then>
										<f:else>[{logItem.logData.originalUser}]</f:else>
									</f:if>)
180
181
								</f:if>
								<br>
182
183
184
185
186
187
								<span class="text-muted">
									<f:if condition="{belog:workspaceTitle(uid:logItem.workspaceUid)}">
										<f:then><belog:workspaceTitle uid="{logItem.workspaceUid}" /></f:then>
										<f:else>[{logItem.workspaceUid}]</f:else>
									</f:if>
								</span>
188
							</td>
189
							<td><span style="width: 10px; height: 1px; display: inline-block"></span></td>
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

							<td valign="top">
								<f:if condition="{constraint.isInPageContext}">
									<f:then>
										{logItem.tableName}
									</f:then>
									<f:else>
										<f:if condition="{f:translate(key:'type_{logItem.type}')}">
											<f:then>
												<f:translate key="type_{logItem.type}" />
											</f:then>
											<f:else>
												[{logItem.type}]
											</f:else>
										</f:if>
									</f:else>
								</f:if>
							</td>
208
							<td><span style="width: 10px; height: 1px; display: inline-block"></span></td>
209
210
211
212

							<td valign="top">
								<f:if condition="{f:translate(key:'action_{logItem.type}_{logItem.action}')}">
									<f:then>
213
										<f:translate key="action_{logItem.type}_{logItem.action}" />
214
215
216
217
218
219
									</f:then>
									<f:else>
										[{logItem.action}]
									</f:else>
								</f:if>
							</td>
220
							<td><span style="width: 10px; height: 1px; display: inline-block"></span></td>
221
222
223
224
225
226
227
228

							<td valign="top">
								<belog:formatDetails logEntry="{logItem}" />
								<belog:historyEntry uid="{logItem.uid}" />
								<f:if condition="{logItem.detailsNumber} > 0">
									(msg#{logItem.type}.{logItem.action}.{logItem.detailsNumber})
								</f:if>
							</td>
229
							<td><span style="width: 10px; height: 1px; display: inline-block"></span></td>
230
231
232
233
234
235
						</tr>
					</f:for>
				</tbody>
			</table>
		</f:for>
	</div>
236
</f:for>