2015-11-22 09:32:09 +03:00
|
|
|
<div class="ui six wide column">
|
2015-12-08 01:30:52 +03:00
|
|
|
<h4 class="ui top attached header">
|
|
|
|
<strong>{{.Team.Name}}</strong>
|
|
|
|
<div class="ui right">
|
2016-07-23 20:08:22 +03:00
|
|
|
{{if .Team.IsMember $.SignedUser.ID}}
|
2021-08-27 05:57:40 +03:00
|
|
|
<form>
|
|
|
|
<button class="ui red tiny button delete-button" data-modal-id="leave-team-sidebar"
|
2021-11-16 21:18:25 +03:00
|
|
|
data-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
|
2021-08-27 05:57:40 +03:00
|
|
|
data-name="{{.Team.Name}}">{{$.i18n.Tr "org.teams.leave"}}</button>
|
2020-02-25 23:28:47 +03:00
|
|
|
</form>
|
2015-12-08 01:30:52 +03:00
|
|
|
{{else if .IsOrganizationOwner}}
|
2021-11-16 21:18:25 +03:00
|
|
|
<form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/join">
|
2020-02-25 23:28:47 +03:00
|
|
|
{{$.CsrfTokenHtml}}
|
2020-02-28 01:00:13 +03:00
|
|
|
<input type="hidden" name="page" value="team"/>
|
|
|
|
<button type="submit" class="ui blue tiny button" name="uid" value="{{$.SignedUser.ID}}">{{$.i18n.Tr "org.teams.join"}}</button>
|
2020-02-25 23:28:47 +03:00
|
|
|
</form>
|
2015-12-08 01:30:52 +03:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment detail">
|
|
|
|
<div class="item">
|
|
|
|
{{if .Team.Description}}
|
|
|
|
{{.Team.Description}}
|
|
|
|
{{else}}
|
|
|
|
<span class="text grey italic">{{.i18n.Tr "org.teams.no_desc"}}</span>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2018-12-09 09:42:11 +03:00
|
|
|
|
2015-12-08 01:30:52 +03:00
|
|
|
<div class="item">
|
|
|
|
{{if eq .Team.LowerName "owners"}}
|
|
|
|
{{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
|
2022-01-05 06:37:00 +03:00
|
|
|
{{else if (eq .Team.AccessMode 1)}}
|
2019-11-06 12:37:14 +03:00
|
|
|
{{if .Team.IncludesAllRepositories}}
|
|
|
|
{{.i18n.Tr "org.teams.all_repositories_read_permission_desc" | Str2html}}
|
|
|
|
{{else}}
|
|
|
|
{{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
|
|
|
|
{{end}}
|
2022-01-05 06:37:00 +03:00
|
|
|
{{else if (eq .Team.AccessMode 2)}}
|
2019-11-06 12:37:14 +03:00
|
|
|
{{if .Team.IncludesAllRepositories}}
|
|
|
|
{{.i18n.Tr "org.teams.all_repositories_write_permission_desc" | Str2html}}
|
|
|
|
{{else}}
|
|
|
|
{{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
|
|
|
|
{{end}}
|
2022-01-05 06:37:00 +03:00
|
|
|
{{else if (eq .Team.AccessMode 3)}}
|
2019-11-06 12:37:14 +03:00
|
|
|
{{if .Team.IncludesAllRepositories}}
|
|
|
|
{{.i18n.Tr "org.teams.all_repositories_admin_permission_desc" | Str2html}}
|
|
|
|
{{else}}
|
|
|
|
{{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
|
|
|
|
{{end}}
|
2015-12-08 01:30:52 +03:00
|
|
|
{{end}}
|
2019-11-20 14:27:49 +03:00
|
|
|
{{if .Team.CanCreateOrgRepo}}
|
|
|
|
<br><br>{{.i18n.Tr "org.teams.create_repo_permission_desc" | Str2html}}
|
|
|
|
{{end}}
|
2015-12-08 01:30:52 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{if .IsOrganizationOwner}}
|
|
|
|
<div class="ui bottom attached segment">
|
2021-11-16 21:18:25 +03:00
|
|
|
<a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit">{{svg "octicon-gear"}} {{$.i18n.Tr "org.teams.settings"}}</a>
|
2015-12-08 01:30:52 +03:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2021-08-27 05:57:40 +03:00
|
|
|
<div class="ui small basic delete modal" id="leave-team-sidebar">
|
|
|
|
<div class="ui icon header">
|
|
|
|
{{svg "octicon-x" 16 "close inside"}}
|
|
|
|
{{$.i18n.Tr "org.teams.leave"}}
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<p>{{$.i18n.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
|
|
|
|
</div>
|
|
|
|
{{template "base/delete_modal_actions" .}}
|
|
|
|
</div>
|