Fix missing template for follow button in organization (#29215)

Leftover from https://github.com/go-gitea/gitea/pull/29005

# Before

![before](https://github.com/go-gitea/gitea/assets/20454870/24c74278-ccac-4dc6-bf26-713e90c07239)

# After

![after](https://github.com/go-gitea/gitea/assets/20454870/f91d503b-87d4-4c17-a56c-9c0a81fd9082)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
pull/29203/head^2
Yarden Shoham 9 months ago committed by GitHub
parent b96fbb567c
commit aa6f88638f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      routers/web/user/profile.go
  2. 7
      templates/org/follow_unfollow.tmpl
  3. 8
      templates/org/home.tmpl

@ -29,7 +29,7 @@ import (
const (
tplProfileBigAvatar base.TplName = "shared/user/profile_big_avatar"
tplFollowUnfollow base.TplName = "shared/user/follow_unfollow"
tplFollowUnfollow base.TplName = "org/follow_unfollow"
)
// OwnerProfile render profile page for a user or a organization (aka, repo owner)

@ -0,0 +1,7 @@
<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>

@ -26,13 +26,7 @@
</a>
{{end}}
{{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>
{{template "org/follow_unfollow" .}}
{{end}}
</div>
</div>

Loading…
Cancel
Save