<xf:title>{{ phrase('administrators') }}</xf:title>

<xf:pageaction>
	<xf:button href="{{ link('admins/add') }}" icon="add">{{ phrase('add_administrator') }}</xf:button>
</xf:pageaction>

<div class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:datalist>
				<xf:foreach loop="$admins" value="$admin">
					<xf:datarow>
						<xf:cell class="dataList-cell--min dataList-cell--image dataList-cell--imageSmall"
							href="{{ link('admins/edit', $admin) }}">
							<xf:avatar user="$admin.User" size="s" href="" />
						</xf:cell>
						<xf:main href="{{ link('admins/edit', $admin) }}" label="{$admin.User.username}">
							<xf:hint>
								<ul class="listInline listInline--bullet listInline--selfInline">
									<li>{{ phrase('last_login:') }} {{ $admin.last_login ? date_dynamic($admin.last_login) : phrase('n_a') }}</li>
									<xf:if is="$admin.is_super_admin">
										<li>{{ phrase('super_administrator') }}</li>
									</xf:if>
								</ul>
							</xf:hint>
						</xf:main>
						<xf:action href="{{ link('users/edit', $admin.User) }}">{{ phrase('user_info') }}</xf:action>
						<xf:delete href="{{ link('admins/delete', $admin) }}" overlay="true" />
					</xf:datarow>
				</xf:foreach>
			</xf:datalist>
		</div>
	</div>
</div>