summaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-04-30 04:13:58 +0900
committerGitHub <noreply@github.com>2023-04-29 15:13:58 -0400
commitcc64a925602d54f3439dd19f16b5280bd0377a7a (patch)
tree36b9d91bee60fe8e71a6aaaf2a40fac3f554d46e /templates/org
parent94d6b5b09d49b2622c2164a03cfae45dced96c74 (diff)
downloadgitea-cc64a925602d54f3439dd19f16b5280bd0377a7a.tar.gz
gitea-cc64a925602d54f3439dd19f16b5280bd0377a7a.zip
Add follow organization and fix the logic of following page (#24345)
![image](https://user-images.githubusercontent.com/18380374/234740589-066f2e5c-30c7-4fc3-a539-066100e1f138.png) ![image](https://user-images.githubusercontent.com/18380374/234740605-88efe55d-7eaa-422e-ab86-0b5a402ca11c.png) Maybe we can fix user card tmpl in #24319? Or maybe a list is better here ![image](https://user-images.githubusercontent.com/18380374/234451417-7f93df20-4b19-4abb-a62d-4c67e1aa2220.png) --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/home.tmpl12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl
index 1bd017d119..afd7d61ca9 100644
--- a/templates/org/home.tmpl
+++ b/templates/org/home.tmpl
@@ -19,6 +19,18 @@
{{if .Org.Website}}<div class="item">{{svg "octicon-link"}} <a target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
</div>
</div>
+ <div class="right stackable menu">
+ <form method="post" action="{{.Link}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}&redirect_to={{$.Link}}">
+ {{$.CsrfTokenHtml}}
+ <button type="submit" class="ui basic button gt-mr-0">
+ {{if $.IsFollowing}}
+ {{.locale.Tr "user.unfollow"}}
+ {{else}}
+ {{.locale.Tr "user.follow"}}
+ {{end}}
+ </button>
+ </form>
+ </div>
</div>
{{template "org/menu" .}}