{{template "admin/layout_head" (dict "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 flex-text-block" action="{{.Link}}" method="post">
				<div id="search-user-box" class="ui search input">
					<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-divided-list items-with-main">
				{{range .Users}}
					<div class="item tw-items-center">
						<div class="item-leading">
							<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a>
						</div>
						<div class="item-main">
							<div class="item-title">
								{{template "shared/user/name" .}}
							</div>
						</div>
						<div class="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" .}}
