diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-07-07 23:27:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 17:27:12 +0200 |
commit | 128d77a3a05c3bde86d5e1f2ac299dbd9c434e2d (patch) | |
tree | 563f7826ae0fc541b990000112932bd9f8733afe /templates/shared | |
parent | a6a9389c702abcb003cbd4a304ec3650345fc14f (diff) | |
download | gitea-128d77a3a05c3bde86d5e1f2ac299dbd9c434e2d.tar.gz gitea-128d77a3a05c3bde86d5e1f2ac299dbd9c434e2d.zip |
Following up fixes for "Fix inconsistent user profile layout across tabs" (#25739)
Follow
https://github.com/go-gitea/gitea/pull/25625#issuecomment-1621577816
1. Fix the incorrect "project view" layout
2. Fix the "follow/unfollow" link on "packages" and "projects" tab
Before:
![image](https://github.com/go-gitea/gitea/assets/2114189/3b071235-c186-4097-8a19-dd90dcb2a344)
After:
![image](https://github.com/go-gitea/gitea/assets/2114189/d1d23cd7-28d8-43e3-9f68-03e8a34a9b97)
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/shared')
-rw-r--r-- | templates/shared/user/profile_big_avatar.tmpl | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl index 408877e481..5a1e43b88e 100644 --- a/templates/shared/user/profile_big_avatar.tmpl +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -99,15 +99,13 @@ {{if and .IsSigned (ne .SignedUserID .ContextUser.ID)}} <li class="follow"> {{if $.IsFollowing}} - <form method="post" action="{{.Link}}?action=unfollow&redirect_to={{$.Link}}"> - {{$.CsrfTokenHtml}} - <button type="submit" class="ui basic red button">{{svg "octicon-person"}} {{.locale.Tr "user.unfollow"}}</button> - </form> + <button class="ui basic red button link-action" data-url="{{.ContextUser.HomeLink}}?action=unfollow"> + {{svg "octicon-person"}} {{.locale.Tr "user.unfollow"}} + </button> {{else}} - <form method="post" action="{{.Link}}?action=follow&redirect_to={{$.Link}}"> - {{$.CsrfTokenHtml}} - <button type="submit" class="ui basic green button">{{svg "octicon-person"}} {{.locale.Tr "user.follow"}}</button> - </form> + <button class="ui basic green button link-action" data-url="{{.ContextUser.HomeLink}}?action=follow"> + {{svg "octicon-person"}} {{.locale.Tr "user.follow"}} + </button> {{end}} </li> {{end}} |