summaryrefslogtreecommitdiffstats
path: root/templates/user/meta/header.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/meta/header.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/meta/header.tmpl')
-rw-r--r--templates/user/meta/header.tmpl25
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/user/meta/header.tmpl b/templates/user/meta/header.tmpl
new file mode 100644
index 0000000000..366d1e0b5a
--- /dev/null
+++ b/templates/user/meta/header.tmpl
@@ -0,0 +1,25 @@
+{{with .Owner}}
+<div class="ui container">
+ <img class="ui avatar image" src="{{.AvatarLink}}">
+ <span class="header name">
+ <a href="{{.HomeLink}}">{{.Name}}</a>
+ {{with .FullName}}({{.}}){{end}}
+ </span>
+
+ <div class="ui right">
+
+ {{if or $.PageIsFollowers $.PageIsFollowing}}
+ {{if and $.IsSigned (ne $.SignedUserName .Name)}}
+ <div class="follow">
+ {{if $.SignedUser.IsFollowing .Id}}
+ <a class="ui small basic red button" href="{{.HomeLink}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{$.i18n.Tr "user.unfollow"}}</a>
+ {{else}}
+ <a class="ui small basic green button" href="{{.HomeLink}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{$.i18n.Tr "user.follow"}}</a>
+ {{end}}
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+</div>
+{{end}}
+<div class="ui divider"></div> \ No newline at end of file