{{template "base/head" .}}
<div class="page-content organization teams">
{{template "org/header" .}}
<div class="ui container">
{{template "base/alert" .}}
<div class="ui grid">
{{template "org/team/sidebar" .}}
<div class="ui ten wide column">
{{template "org/team/navbar" .}}
{{if .IsOrganizationOwner}}
<div class="ui attached segment">
<form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="uid" value="{{.SignedUser.ID}}">
<div class="inline field ui left">
<div id="search-user-box" class="ui search">
<div class="ui input">
<input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
</div>
<button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button>
</form>
{{end}}
<div class="ui bottom attached table segment members">
{{range .Team.Members}}
<div class="item">
{{if and $.IsOrganizationOwner (not (eq $.SignedUser.ID .ID))}}
<form>
<button class="ui red button delete-button right" data-modal-id="remove-team-member"
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/remove" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}"
data-data-team-name="{{$.Team.Name}}">{{$.i18n.Tr "org.members.remove"}}</button>
<a href="{{.HomeLink}}">
{{avatar .}}
{{.DisplayName}}
</a>
{{else}}
<span class="text grey italic">{{$.i18n.Tr "org.teams.members.none"}}</span>
<div class="ui small basic delete modal" id="remove-team-member">
<div class="ui icon header">
{{svg "octicon-x" 16 "close inside"}}
{{$.i18n.Tr "org.members.remove"}}
<div class="content">
<p>{{$.i18n.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p>
{{template "base/delete_modal_actions" .}}
{{template "base/footer" .}}