mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
WIP
This commit is contained in:
parent
282b0d1a30
commit
b369bc8a57
2 changed files with 9 additions and 3 deletions
|
@ -83,6 +83,8 @@ func MembersAction(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
redirectURL := ctx.FormString("redirect")
|
||||
|
||||
org := ctx.Org.Organization
|
||||
var err error
|
||||
switch ctx.Params(":action") {
|
||||
|
@ -134,7 +136,11 @@ func MembersAction(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
log.Info("redirecting to", ctx.Org.OrgLink)
|
||||
if redirectURL != "" {
|
||||
ctx.JSONRedirect(redirectURL)
|
||||
return
|
||||
}
|
||||
|
||||
redirect := ctx.Org.OrgLink + "/members"
|
||||
if ctx.Params(":action") == "leave" {
|
||||
redirect = setting.AppSubURL + "/"
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
<div class="flex-item-trailing">
|
||||
{{$isPublic := index $.OrgsIsPublicMember .ID}}
|
||||
{{if $isPublic}}
|
||||
<a class="ui tiny button link-action" href data-url="{{.OrganisationLink}}/members/action/private?uid={{$.SignedUser.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{ctx.Locale.Tr "org.members.public_helper"}}</a>
|
||||
<a class="ui tiny button link-action" href data-url="{{.OrganisationLink}}/members/action/private?uid={{$.SignedUser.ID}}&redirect=/user/settings/organization">{{svg "octicon-eye-closed" 12 "icon"}}{{ctx.Locale.Tr "org.members.public_helper"}}</a>
|
||||
{{else}}
|
||||
<a class="ui tiny button link-action" href data-url="{{.OrganisationLink}}/members/action/public?uid={{$.SignedUser.ID}}">{{svg "octicon-eye" 12 "icon"}}{{ctx.Locale.Tr "org.members.private_helper"}}</a>
|
||||
<a class="ui tiny button link-action" href data-url="{{.OrganisationLink}}/members/action/public?uid={{$.SignedUser.ID}}&redirect=/user/settings/organization">{{svg "octicon-eye" 12 "icon"}}{{ctx.Locale.Tr "org.members.private_helper"}}</a>
|
||||
{{end}}
|
||||
<form>
|
||||
{{$.CsrfTokenHtml}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue