mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 14:51:00 +01:00
fix leave team 404 (#1154)
This commit is contained in:
parent
d2b2881306
commit
b40496533b
2 changed files with 3 additions and 1 deletions
|
@ -108,6 +108,8 @@ func TeamsAction(ctx *context.Context) {
|
||||||
switch page {
|
switch page {
|
||||||
case "team":
|
case "team":
|
||||||
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName)
|
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName)
|
||||||
|
case "home":
|
||||||
|
ctx.Redirect(ctx.Org.Organization.HomeLink())
|
||||||
default:
|
default:
|
||||||
ctx.Redirect(ctx.Org.OrgLink + "/teams")
|
ctx.Redirect(ctx.Org.OrgLink + "/teams")
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<strong>{{.Team.Name}}</strong>
|
<strong>{{.Team.Name}}</strong>
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
{{if .Team.IsMember $.SignedUser.ID}}
|
{{if .Team.IsMember $.SignedUser.ID}}
|
||||||
<a class="ui red tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.ID}}&page=team">{{$.i18n.Tr "org.teams.leave"}}</a>
|
<a class="ui red tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.ID}}&page=home">{{$.i18n.Tr "org.teams.leave"}}</a>
|
||||||
{{else if .IsOrganizationOwner}}
|
{{else if .IsOrganizationOwner}}
|
||||||
<a class="ui blue tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.ID}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a>
|
<a class="ui blue tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.ID}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Loading…
Reference in a new issue