This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/templates/org/team/members.tmpl

78 lines
3.1 KiB
Handlebars
Raw Normal View History

2015-11-22 06:32:09 +00:00
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
2015-11-22 06:32:09 +00:00
{{template "org/header" .}}
<div class="ui container">
{{template "base/alert" .}}
<div class="ui grid">
2015-11-22 06:32:09 +00:00
{{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 ignore-dirty" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/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"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{.locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}>
<div class="ui input">
<input class="prompt" name="uname" placeholder="{{.locale.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
</div>
</div>
</div>
<button class="ui green button">{{.locale.Tr "org.teams.add_team_member"}}</button>
</form>
</div>
{{end}}
<div class="ui bottom attached table segment members">
{{range .Team.Members}}
<div class="item">
{{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
<form>
<button class="ui red button delete-button right" data-modal-id="remove-team-member"
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}"
data-data-team-name="{{$.Team.Name}}">{{$.locale.Tr "org.members.remove"}}</button>
</form>
{{end}}
<a href="{{.HomeLink}}">
{{avatar .}}
{{.DisplayName}}
</a>
</div>
{{else}}
<div class="item">
<span class="text grey italic">{{$.locale.Tr "org.teams.members.none"}}</span>
</div>
{{end}}
2014-08-23 12:24:02 +00:00
</div>
{{if and .Invites $.IsOrganizationOwner}}
<h4 class="ui top attached header">{{$.locale.Tr "org.teams.invite_team_member.list"}}</h4>
<div class="ui bottom attached table segment members">
{{range .Invites}}
<div class="item">
<form action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove_invite" method="post">
{{$.CsrfTokenHtml}}
<input type="hidden" name="iid" value="{{.ID}}" />
<button class="ui red button right">{{$.locale.Tr "org.members.remove"}}</button>
</form>
{{.Email}}
</div>
{{end}}
</div>
{{end}}
2014-08-23 12:24:02 +00:00
</div>
</div>
2014-08-23 12:24:02 +00:00
</div>
</div>
<div class="ui small basic delete modal" id="remove-team-member">
<div class="ui icon header">
{{svg "octicon-x" 16 "close inside"}}
{{$.locale.Tr "org.members.remove"}}
</div>
<div class="content">
<p>{{$.locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
{{template "base/footer" .}}