aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/profile.tmpl
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-21 04:24:11 -0800
committerUnknwon <u@gogs.io>2015-12-21 04:24:11 -0800
commita49af93fafe824cdd375318d15de420b3ed61e79 (patch)
tree1508c0bbd9f9caf2c3af8163e4e9abe326093558 /templates/user/profile.tmpl
parentc62a6b7a1238524225ec9c214dc5eac7da017663 (diff)
downloadgitea-a49af93fafe824cdd375318d15de420b3ed61e79.tar.gz
gitea-a49af93fafe824cdd375318d15de420b3ed61e79.zip
#1692 APIs: Users Followers
- User profile un/follow - List user's followers/following
Diffstat (limited to 'templates/user/profile.tmpl')
-rw-r--r--templates/user/profile.tmpl27
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 476b45dd5e..cceaa0de57 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -39,6 +39,33 @@
</li>
{{end}}
<li><i class="icon octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}</li>
+ <li>
+ <i class="user icon"></i>
+ <a href="{{.Owner.HomeLink}}/followers">
+ {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
+ </a>
+ -
+ <a href="{{.Owner.HomeLink}}/following">
+ {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
+ </a>
+ </li>
+ {{/*
+ <li>
+ <i class="octicon octicon-star"></i>
+ <a href="{{.Owner.HomeLink}}/stars">
+ {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
+ </a>
+ </li>
+ */}}
+ {{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
+ <li class="follow">
+ {{if .SignedUser.IsFollowing .Owner.Id}}
+ <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
+ {{else}}
+ <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
+ {{end}}
+ </li>
+ {{end}}
</ul>
</div>
</div>