{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin badge")}}
	<div class="admin-setting-content">
		<h4 class="ui top attached header">
			{{.Title}}
		</h4>
		<div class="ui attached segment">
			<form class="ui form" action="{{.Link}}" method="post">
				<div id="search-user-box" class="ui search input tw-align-middle">
					<input class="prompt" name="user" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" autofocus required>
				</div>
				<button class="ui primary button">{{ctx.Locale.Tr "admin.badges.add_user"}}</button>
			</form>
		</div>
		{{if .Users}}
		<div class="ui attached segment">
			<div class="flex-list">
				{{range .Users}}
					<div class="flex-item tw-items-center">
						<div class="flex-item-leading">
							<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a>
						</div>
						<div class="flex-item-main">
							<div class="flex-item-title">
								{{template "shared/user/name" .}}
							</div>
						</div>
						<div class="flex-item-trailing">
							<a class="ui red tiny button inline link-action" data-url="{{$.Link}}/delete?id={{.ID}}" data-modal-confirm="{{ctx.Locale.Tr "admin.badges.delete_user_desc"}}">
								{{ctx.Locale.Tr "admin.badges.remove_user"}}
							</a>
						</div>
					</div>
				{{end}}
			</div>
		</div>
		{{end}}
		{{template "base/paginate" .}}
	</div>

{{template "admin/layout_footer" .}}
