<xf:title>{{ phrase('ip_addresses_logged_for_x', {'name': $user.username}) }}</xf:title>

<xf:if is="$ips is not empty">
	<div class="block">
		<div class="block-container">
			<div class="block-body">
				<xf:datalist data-xf-init="responsive-data-list">
					<xf:datarow rowtype="header">
						<xf:cell>{{ phrase('ip') }}</xf:cell>
						<xf:cell>{{ phrase('total') }}</xf:cell>
						<xf:cell>{{ phrase('earliest') }}</xf:cell>
						<xf:cell>{{ phrase('latest') }}</xf:cell>
						<xf:cell>&nbsp;</xf:cell>
						<xf:cell>&nbsp;</xf:cell>
					</xf:datarow>
					<xf:foreach loop="$ips" value="$ip">
						<xf:datarow rowclass="dataList-row--noHover">
							<xf:cell href="{{ link_type('public', 'misc/ip-info', null, {'ip': $ip.ip|ip}) }}" target="_blank">{$ip.ip|ip}</xf:cell>
							<xf:cell>{$ip.total|number}</xf:cell>
							<xf:cell><xf:date time="{$ip.first_date}" /></xf:cell>
							<xf:cell><xf:date time="{$ip.last_date}" /></xf:cell>
							<xf:action href="{{ link('users/ip-users', null, {'ip': $ip.ip|ip}) }}" overlay="true">{{ phrase('more_users') }}</xf:action>
							<xf:popup label="&#8226;&#8226;&#8226;" class="dataList-cell--separated">
								<div class="menu" data-menu="menu" aria-hidden="true" data-menu-builder="dataList">
									<div class="menu-content">
										<h3 class="menu-header">{{ phrase('more_options') }}</h3>
										<a href="{{ link('banning/ips/add', null, {'ip': $ip.ip|ip}) }}" class="menu-linkRow" data-xf-click="overlay">{{ phrase('ban') }}</a>
										<a href="{{ link('banning/discouraged-ips/add', null, {'ip': $ip.ip|ip}) }}" class="menu-linkRow" data-xf-click="overlay">{{ phrase('discourage') }}</a>
										<div class="js-menuBuilderTarget u-showMediumBlock"></div>
									</div>
								</div>
							</xf:popup>
						</xf:datarow>
					</xf:foreach>
				</xf:datalist>
			</div>
		</div>
	</div>
<xf:else />
	<div class="blockMessage">{{ phrase('no_ip_logs_for_requested_user') }}</div>
</xf:if>