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

<xf:wrap template="account_wrapper" />

<div class="block">
	<div class="block-container">
		<div class="block-body">

			<xf:if is="$clients is not empty">
				<div class="block-row block-row--separated">
					{{ phrase('these_applications_that_you_have_authorized_to_access_your_account') }}
				</div>

				<xf:foreach loop="$clients" value="$client">
					<li class="block-row block-row--separated">
						<div class="contentRow">
							<div class="contentRow-figure contentRow-figure--fixedSmall">
								<xf:if is="$client.image_url">
									<img src="{{ base_url($client.image_url) }}" alt="{$client.title}" />
								<xf:else />
									<xf:fa icon="fa-cog fa-3x u-muted" />
								</xf:if>
							</div>
							<div class="contentRow-main">
								<div class="contentRow-extra">
									<xf:button href="{{ link('account/applications/revoke', $client) }}" class="button--link" overlay="true">{{ phrase('revoke') }}</xf:button>
								</div>

								<h3 class="contentRow-header">
									<a href="{{ link('account/applications', $client) }}">{$client.title}</a>
								</h3>

								<div class="contentRow-snippet">{$client.description}</div>
							</div>
						</div>
					</li>
				</xf:foreach>
			<xf:else />
				<div class="block-row block-row--separated">
					{{ phrase('you_have_not_authorized_any_applications_to_access_your_account') }}
				</div>
			</xf:if>
		</div>
	</div>
</div>