mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-26 15:02:16 +00:00
ad0b637d46
Before: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/c82f8615-04d4-408f-95bf-689c227a8814) ![image](https://github.com/go-gitea/gitea/assets/2114189/d01d05a7-09ca-48f3-a0e7-fec48119b426) </details> After: ![image](https://github.com/go-gitea/gitea/assets/2114189/e560398e-2fa4-4f46-9229-f6acc70e32ab) ![image](https://github.com/go-gitea/gitea/assets/2114189/bd18961d-0636-4584-b893-c465daaf40af)
57 lines
2.4 KiB
Go HTML Template
57 lines
2.4 KiB
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
|
|
{{template "org/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
{{if .IsOrganizationOwner}}
|
|
<div class="text right">
|
|
<a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{ctx.Locale.Tr "org.create_new_team"}}</a>
|
|
</div>
|
|
<div class="divider"></div>
|
|
{{end}}
|
|
|
|
<div class="ui two column stackable grid">
|
|
{{range .Teams}}
|
|
<div class="column">
|
|
<div class="ui top attached header">
|
|
<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.Name}}</strong></a>
|
|
<div class="ui right">
|
|
<a class="ui primary tiny button" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{ctx.Locale.Tr "view"}}</a>
|
|
{{if .IsMember ctx $.SignedUser.ID}}
|
|
<form>
|
|
<button class="ui red tiny button delete-button" data-modal-id="leave-team"
|
|
data-url="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
|
|
data-name="{{.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
|
|
</form>
|
|
{{else if $.IsOrganizationOwner}}
|
|
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/join">
|
|
{{$.CsrfTokenHtml}}
|
|
<button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
|
|
</form>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
<div class="ui attached segment members">
|
|
{{range .Members}}
|
|
{{template "shared/user/avatarlink" dict "user" .}}
|
|
{{end}}
|
|
</div>
|
|
<div class="ui bottom attached header">
|
|
<p class="team-meta"><a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}}</a> · <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories">{{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</a></p>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ui g-modal-confirm delete modal" id="leave-team">
|
|
<div class="header">
|
|
{{ctx.Locale.Tr "org.teams.leave"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{ctx.Locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</div>
|
|
{{template "base/footer" .}}
|