mirror of
https://github.com/go-gitea/gitea
synced 2024-11-18 16:14:26 +00:00
4cb18601ff
* Change action GETs to POST * submite = submit + smite * No more # href * Fix test * Match other tests * Explicit csrf Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
60 lines
2.2 KiB
Cheetah
60 lines
2.2 KiB
Cheetah
<div class="ui six wide column">
|
|
<h4 class="ui top attached header">
|
|
<strong>{{.Team.Name}}</strong>
|
|
<div class="ui right">
|
|
{{if .Team.IsMember $.SignedUser.ID}}
|
|
<form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.ID}}&page=home">
|
|
{{$.CsrfTokenHtml}}
|
|
<button type="submit" class="ui red tiny button">{{$.i18n.Tr "org.teams.leave"}}</button>
|
|
</form>
|
|
{{else if .IsOrganizationOwner}}
|
|
<form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.ID}}&page=team">
|
|
{{$.CsrfTokenHtml}}
|
|
<button type="submit" class="ui blue tiny button">{{$.i18n.Tr "org.teams.join"}}</button>
|
|
</form>
|
|
{{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>
|
|
|
|
<div class="item">
|
|
{{if eq .Team.LowerName "owners"}}
|
|
{{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
|
|
{{else if (eq .Team.Authorize 1)}}
|
|
{{if .Team.IncludesAllRepositories}}
|
|
{{.i18n.Tr "org.teams.all_repositories_read_permission_desc" | Str2html}}
|
|
{{else}}
|
|
{{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
|
|
{{end}}
|
|
{{else if (eq .Team.Authorize 2)}}
|
|
{{if .Team.IncludesAllRepositories}}
|
|
{{.i18n.Tr "org.teams.all_repositories_write_permission_desc" | Str2html}}
|
|
{{else}}
|
|
{{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
|
|
{{end}}
|
|
{{else if (eq .Team.Authorize 3)}}
|
|
{{if .Team.IncludesAllRepositories}}
|
|
{{.i18n.Tr "org.teams.all_repositories_admin_permission_desc" | Str2html}}
|
|
{{else}}
|
|
{{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
|
|
{{end}}
|
|
{{end}}
|
|
{{if .Team.CanCreateOrgRepo}}
|
|
<br><br>{{.i18n.Tr "org.teams.create_repo_permission_desc" | Str2html}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{if .IsOrganizationOwner}}
|
|
<div class="ui bottom attached segment">
|
|
<a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/edit"><span class="octicon octicon-gear"></span> {{$.i18n.Tr "org.teams.settings"}}</a>
|
|
</div>
|
|
{{end}}
|
|
</div>
|