forked from forgejo/forgejo
Fix broken following organization (#29005)
- following organization is broken from #28908 - add login check for the follow button in organization profile page (cherry picked from commit 68227996a7a84a240b36c304d04c5c8d82948df8)
This commit is contained in:
parent
1ad195aa40
commit
fd3b4afa2b
2 changed files with 21 additions and 9 deletions
|
@ -30,13 +30,15 @@
|
|||
{{svg "octicon-rss" 24}}
|
||||
</a>
|
||||
{{end}}
|
||||
<button class="link-action ui basic button gt-mr-0" data-url="{{.Org.HomeLink}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}">
|
||||
{{if $.IsFollowing}}
|
||||
{{ctx.Locale.Tr "user.unfollow"}}
|
||||
{{else}}
|
||||
{{ctx.Locale.Tr "user.follow"}}
|
||||
{{end}}
|
||||
</button>
|
||||
{{if .IsSigned}}
|
||||
<button class="ui basic button gt-mr-0" hx-post="{{.Org.HomeLink}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}">
|
||||
{{if $.IsFollowing}}
|
||||
{{ctx.Locale.Tr "user.unfollow"}}
|
||||
{{else}}
|
||||
{{ctx.Locale.Tr "user.follow"}}
|
||||
{{end}}
|
||||
</button>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue