summaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-07-26 18:37:18 -0400
committerUnknwon <joe2010xtmf@163.com>2014-07-26 18:37:18 -0400
commit5e8138341357f367868a32b631495c9d5a286477 (patch)
treefb36040422534e051ac381cde594ff1a208e4195 /templates/user
parent02a81ddb6252d1a08900d548ddb63e41bcb0b8ef (diff)
downloadgitea-5e8138341357f367868a32b631495c9d5a286477.tar.gz
gitea-5e8138341357f367868a32b631495c9d5a286477.zip
Git installation check, show image in single file view, show short SHA1 instead of 40-length string, complete log module
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/dashboard/dashboard.tmpl48
-rw-r--r--templates/user/dashboard/nav.tmpl2
-rw-r--r--templates/user/dashboard/repo_list.tmpl12
3 files changed, 47 insertions, 15 deletions
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl
index 209a495b58..b472953136 100644
--- a/templates/user/dashboard/dashboard.tmpl
+++ b/templates/user/dashboard/dashboard.tmpl
@@ -48,7 +48,9 @@
<div id="dashboard-sidebar" class="right grid-1-3">
<ul id="dashboard-sidebar-menu" class="menu menu-line">
<li class="js-tab-nav js-tab-nav-show first" data-tab-target="#dashboard-my-repo"><a href="#">{{.i18n.Tr "repository"}}</a></li>
+ {{if not .ContextUser.IsOrganization}}
<li class="js-tab-nav" data-tab-target="#dashboard-my-org"><a href="#">{{.i18n.Tr "organization"}}</a></li>
+ {{end}}
<li class="js-tab-nav last" data-tab-target="#dashboard-my-mirror"><a href="#">{{.i18n.Tr "mirror"}}</a></li>
<li class="drop right">
<button class="btn btn-green text-bold" id="dashboard-new-repo">
@@ -70,26 +72,68 @@
<div class="panel-body">
<ul class="list-no-style">
{{range .Repos}}
- {{template "user/dashboard/repo_list" .}}
+ <li {{if .IsPrivate}}class="private"{{end}}>
+ <a href="{{$.ContextUser.Name}}/{{.Name}}">
+ <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
+ <span class="repo-name">
+ <strong class="repo">{{.Name}}</strong>
+ </span>
+ <span class="right repo-star">
+ <i class="octicon octicon-star"></i>{{.NumStars}}
+ </span>
+ </a>
+ </li>
{{end}}
</ul>
</div>
+ {{if not .ContextUser.IsOrganization}}
<div class="panel-header repo-contrib-header">
<h4 class="text-bold">{{.i18n.Tr "home.collaborative_repos"}}</h4>
</div>
<div class="panel-body">
<ul class="list-no-style">
{{range .CollaborativeRepos}}
- {{template "user/dashboard/repo_list" .}}
+ <li {{if .IsPrivate}}class="private"{{end}}>
+ <a href="{{.Owner.Name}}/{{.Name}}">
+ <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
+ <span class="repo-name">
+ <span class="repo-name-prefix">{{.Owner.Name}} / </span>
+ <strong class="repo">{{.Name}}</strong>
+ </span>
+ <span class="right repo-star">
+ <i class="octicon octicon-star"></i>{{.NumStars}}
+ </span>
+ </a>
+ </li>
{{end}}
</ul>
</div>
+ {{end}}
</div>
+ {{if not .ContextUser.IsOrganization}}
<div class="panel" id="dashboard-my-org">
<div class="panel-header">
<h4 class="text-bold">{{.i18n.Tr "home.my_orgs"}}</h4>
</div>
+ <div class="panel-body">
+ <ul class="list-no-style">
+ {{range .ContextUser.Orgs}}
+ <li>
+ <a href="/{{.Name}}">
+ <i class="octicon octicon-organization"></i>
+ <span class="repo-name">
+ <strong class="repo">{{.Name}}</strong>
+ </span>
+ <span class="right repo-star">
+ <i class="octicon octicon-repo"></i>{{.NumRepos}}
+ </span>
+ </a>
+ </li>
+ {{end}}
+ </ul>
+ </div>
</div>
+ {{end}}
<div class="panel" id="dashboard-my-mirror">
<div class="panel-header">
<h4 class="text-bold">{{.i18n.Tr "home.my_mirrors"}}</h4>
diff --git a/templates/user/dashboard/nav.tmpl b/templates/user/dashboard/nav.tmpl
index 6064f35692..a2d990fa7d 100644
--- a/templates/user/dashboard/nav.tmpl
+++ b/templates/user/dashboard/nav.tmpl
@@ -15,7 +15,7 @@
{{.SignedUser.Name}}
</a>
</li>
- {{range .Orgs}}
+ {{range .ContextUser.Orgs}}
<li class="org {{if eq $.ContextUser.Id .Id}}checked{{end}}">
<a href="{{.DashboardLink}}">
<i class="octicon octicon-check"></i>
diff --git a/templates/user/dashboard/repo_list.tmpl b/templates/user/dashboard/repo_list.tmpl
deleted file mode 100644
index e3d35e8ecc..0000000000
--- a/templates/user/dashboard/repo_list.tmpl
+++ /dev/null
@@ -1,12 +0,0 @@
-<li {{if .IsPrivate}}class="private"{{end}}>
- <a href="{{.Owner.Name}}/{{.Name}}">
- <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
- <span class="repo-name">
- <!-- <span class="repo-name-prefix">gogits / </span> -->
- <strong class="repo">{{.Name}}</strong>
- </span>
- <span class="right repo-star">
- <i class="octicon octicon-star"></i>{{.NumStars}}
- </span>
- </a>
-</li> \ No newline at end of file