{namespace be = TYPO3\CMS\Backend\ViewHelpers}
{namespace bu = TYPO3\CMS\Beuser\ViewHelpers}
<f:for each="{onlineUser.sessions}" as="session" iteration="it">
	<tr>
		<f:if condition="{it.isFirst}">
			<f:then>
				<td>
					<a href="#" class="t3js-contextmenutrigger" data-table="be_users" data-uid="{onlineUser.backendUser.uid}" title="{f:if(condition: '{onlineUser.backendUser.description}', then: '{onlineUser.backendUser.description} ')}(id={onlineUser.backendUser.uid})">
						<be:avatar backendUser="{onlineUser.backendUser.uid}" showIcon="true" />
					</a>
				</td>
				<td class="col-title">
					<b>{onlineUser.backendUser.userName}</b>
					<span class="label label-success"><f:translate key="online" /></span><br />
					{onlineUser.backendUser.realName}
				</td>
			</f:then>
			<f:else>
				<td></td>
				<td class="col-title"></td>
			</f:else>
		</f:if>
		<td>
			<f:format.date format="{dateFormat} {timeFormat}" date="{session.timestamp}" />
		</td>
		<td>{session.ip}</td>
		<td class="col-control">
			<div class="btn-group" role="group">
				<f:if condition="{currentSessionId} == {session.id}">
					<f:else>
						<f:link.action
							class="btn btn-default t3js-modal-trigger"
							action="terminateBackendUserSession"
							controller="BackendUser"
							arguments="{backendUser: onlineUser.backendUser, sessionId: session.id}"
							data="{severity: 'warning', title: '{f:translate(key: \'endSession\')}', content: '{f:translate(key: \'reallyLogout\')} {onlineUser.backendUser.userName}?', button-close-text: '{f:translate(key: \'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel\')}'}"
						>
							<core:icon identifier="actions-close" />
							<f:translate key="endSession" />
						</f:link.action>
					</f:else>
				</f:if>
				<a class="btn btn-default" href="#" onclick="top.launchView('be_users', '{onlineUser.backendUser.uid}',''); return false;">
					<core:icon identifier="actions-document-info" />
				</a>
			</div>
		</td>
	</tr>
</f:for>
