summaryrefslogtreecommitdiffstats
path: root/templates/user/profile.tmpl
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2016-12-29 12:58:24 -0200
committerLunny Xiao <xiaolunwen@gmail.com>2016-12-29 22:58:24 +0800
commitb9928588834a9aad1771ba79f1d6638cdc29904a (patch)
tree790d6d87a1565076a1fd06d28618d465366b9350 /templates/user/profile.tmpl
parent2d1a1fce934cb87cc67b85083d342b14bb52b780 (diff)
downloadgitea-b9928588834a9aad1771ba79f1d6638cdc29904a.tar.gz
gitea-b9928588834a9aad1771ba79f1d6638cdc29904a.zip
Tab on user profile to show starred repos (#519)
* Tab on user profile to show starred repos * Make golint happy and use transactions on StarRepo function * x -> sess * Use sess.Close() instead of sess.Rollback() * Add copyright * Fix lint
Diffstat (limited to 'templates/user/profile.tmpl')
-rw-r--r--templates/user/profile.tmpl25
1 files changed, 15 insertions, 10 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 7734d94c99..cfb646ace1 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -75,23 +75,28 @@
</div>
<div class="ui eleven wide column">
<div class="ui secondary pointing menu">
- <a class="{{if ne .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}">
+ <a class='{{if and (ne .TabName "activity") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}">
<i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
</a>
- <a class="item">
- <a class="{{if eq .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}?tab=activity">
- <i class="octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
- </a>
+ <a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity">
+ <i class="octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
+ </a>
+ <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
+ <i class="octicon octicon-star"></i> {{.i18n.Tr "user.starred"}}
</a>
</div>
- {{if ne .TabName "activity"}}
- {{template "explore/repo_list" .}}
- {{template "base/paginate" .}}
- {{else}}
- <br>
+
+ {{if eq .TabName "activity"}}
<div class="feeds">
{{template "user/dashboard/feeds" .}}
</div>
+ {{else if eq .TabName "stars"}}
+ <div class="stars">
+ {{template "explore/repo_list" .}}
+ </div>
+ {{else}}
+ {{template "explore/repo_list" .}}
+ {{template "base/paginate" .}}
{{end}}
</div>
</div>