diff options
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/meta/followers.tmpl | 6 | ||||
-rw-r--r-- | templates/user/meta/header.tmpl | 25 | ||||
-rw-r--r-- | templates/user/meta/stars.tmpl | 0 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 27 |
4 files changed, 58 insertions, 0 deletions
diff --git a/templates/user/meta/followers.tmpl b/templates/user/meta/followers.tmpl new file mode 100644 index 0000000000..403a4e8a2b --- /dev/null +++ b/templates/user/meta/followers.tmpl @@ -0,0 +1,6 @@ +{{template "base/head" .}} +<div class="user followers"> + {{template "user/meta/header" .}} + {{template "repo/user_cards" .}} +</div> +{{template "base/footer" .}}
\ No newline at end of file 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 diff --git a/templates/user/meta/stars.tmpl b/templates/user/meta/stars.tmpl new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/templates/user/meta/stars.tmpl 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> |