2014-07-26 04:24:27 +00:00
|
|
|
{{template "ng/base/head" .}}
|
|
|
|
{{template "ng/base/header" .}}
|
|
|
|
{{template "user/dashboard/nav" .}}
|
|
|
|
<div id="dashboard-wrapper">
|
|
|
|
<div id="dashboard" class="container">
|
2014-09-17 18:52:46 +00:00
|
|
|
{{template "ng/base/alert" .}}
|
2014-07-26 04:24:27 +00:00
|
|
|
<div id="dashboard-news" class="left grid-2-3">
|
|
|
|
{{range .Feeds}}
|
|
|
|
<div class="news clear">
|
|
|
|
<div class="avatar left">
|
|
|
|
<img class="avatar-30" src="{{AvatarLink .GetActEmail}}" alt="">
|
|
|
|
</div>
|
2014-09-16 12:32:13 +00:00
|
|
|
<div class="content left {{if eq .GetOpType 5}}push-news{{end}} grid-4-5">
|
2014-07-26 04:24:27 +00:00
|
|
|
<p class="text-bold">
|
2014-09-14 17:35:22 +00:00
|
|
|
<a href="{{AppRootSubUrl}}/{{.GetActUserName}}">{{.GetActUserName}}</a>
|
2014-07-26 04:24:27 +00:00
|
|
|
{{if eq .GetOpType 1}}
|
2014-09-14 17:35:22 +00:00
|
|
|
{{$.i18n.Tr "action.create_repo" AppRootSubUrl .GetRepoLink .GetRepoLink | Str2html}}
|
2014-07-26 04:24:27 +00:00
|
|
|
{{else if eq .GetOpType 5}}
|
2014-09-14 17:35:22 +00:00
|
|
|
{{$.i18n.Tr "action.commit_repo" AppRootSubUrl .GetRepoLink .GetBranch .GetBranch AppRootSubUrl .GetRepoLink .GetRepoLink | Str2html}}
|
2014-07-26 04:24:27 +00:00
|
|
|
{{else if eq .GetOpType 6}}
|
|
|
|
{{ $index := index .GetIssueInfos 0}}
|
2014-09-14 17:35:22 +00:00
|
|
|
{{$.i18n.Tr "action.create_issue" AppRootSubUrl .GetRepoLink $index .GetRepoLink $index | Str2html}}
|
2014-07-26 04:24:27 +00:00
|
|
|
{{else if eq .GetOpType 10}}
|
|
|
|
{{ $index := index .GetIssueInfos 0}}
|
2014-09-14 17:35:22 +00:00
|
|
|
{{$.i18n.Tr "action.comment_issue" AppRootSubUrl .GetRepoLink $index .GetRepoLink $index | Str2html}}
|
2014-07-26 04:24:27 +00:00
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
{{if eq .GetOpType 5}}
|
|
|
|
<div class="news-content content">
|
|
|
|
<ul class="list-no-style">
|
|
|
|
{{ $push := ActionContent2Commits .}}
|
|
|
|
{{ $repoLink := .GetRepoLink}}
|
|
|
|
{{range $push.Commits}}
|
2014-09-14 17:35:22 +00:00
|
|
|
<li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="{{AppRootSubUrl}}/{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text-truncate grid-4-5">{{.Message}}</span></li>
|
2014-07-26 04:24:27 +00:00
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{else if eq .GetOpType 6}}
|
|
|
|
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
|
|
|
{{else if eq .GetOpType 10}}
|
|
|
|
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
|
|
|
|
{{end}}
|
|
|
|
<p class="news-time text-italic">{{TimeSince .GetCreate $.i18n.Lang}}</p>
|
|
|
|
</div>
|
|
|
|
<i class="mega-octicon octicon-{{ActionIcon .GetOpType}} right"></i>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
<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>
|
2014-07-26 22:37:18 +00:00
|
|
|
{{if not .ContextUser.IsOrganization}}
|
2014-07-26 04:24:27 +00:00
|
|
|
<li class="js-tab-nav" data-tab-target="#dashboard-my-org"><a href="#">{{.i18n.Tr "organization"}}</a></li>
|
2014-07-26 22:37:18 +00:00
|
|
|
{{end}}
|
2014-07-26 04:24:27 +00:00
|
|
|
<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">
|
|
|
|
<i class="octicon octicon-plus"></i>
|
|
|
|
</button>
|
|
|
|
<ul class="menu menu-vertical drop-down" id="dashboard-new-repo-menu">
|
2014-09-14 17:35:22 +00:00
|
|
|
<li><a href="{{AppRootSubUrl}}/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li>
|
|
|
|
<li><a href="{{AppRootSubUrl}}/repo/migrate"><i class="octicon octicon-repo-clone"></i>{{.i18n.Tr "new_migrate"}}</a></li>
|
|
|
|
<li><a href="{{AppRootSubUrl}}/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li>
|
2014-07-26 04:24:27 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div class="panel" id="dashboard-my-repo">
|
|
|
|
<div class="panel-header">
|
|
|
|
<h4 class="left">{{.i18n.Tr "home.my_repos"}}
|
|
|
|
<span class="repo-count label label-gray label-radius">{{.ContextUser.NumRepos}}</span>
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<ul class="list-no-style">
|
|
|
|
{{range .Repos}}
|
2014-07-26 22:37:18 +00:00
|
|
|
<li {{if .IsPrivate}}class="private"{{end}}>
|
2014-09-14 17:35:22 +00:00
|
|
|
<a href="{{AppRootSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
|
2014-07-26 22:37:18 +00:00
|
|
|
<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>
|
2014-07-26 04:24:27 +00:00
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2014-07-26 22:37:18 +00:00
|
|
|
{{if not .ContextUser.IsOrganization}}
|
2014-07-26 04:24:27 +00:00
|
|
|
<div class="panel-header repo-contrib-header">
|
2014-07-27 03:53:16 +00:00
|
|
|
<h4 class="text-bold">{{.i18n.Tr "home.collaborative_repos"}}
|
|
|
|
<span class="repo-count label label-gray label-radius">{{.CollaborateCount}}</span>
|
|
|
|
</h4>
|
2014-07-26 04:24:27 +00:00
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<ul class="list-no-style">
|
2014-07-26 06:28:04 +00:00
|
|
|
{{range .CollaborativeRepos}}
|
2014-07-26 22:37:18 +00:00
|
|
|
<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>
|
2014-07-26 06:28:04 +00:00
|
|
|
{{end}}
|
2014-07-26 04:24:27 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2014-07-26 22:37:18 +00:00
|
|
|
{{end}}
|
2014-07-26 04:24:27 +00:00
|
|
|
</div>
|
2014-07-26 22:37:18 +00:00
|
|
|
{{if not .ContextUser.IsOrganization}}
|
2014-07-26 04:24:27 +00:00
|
|
|
<div class="panel" id="dashboard-my-org">
|
|
|
|
<div class="panel-header">
|
2014-07-27 03:53:16 +00:00
|
|
|
<h4 class="text-bold">{{.i18n.Tr "home.my_orgs"}}
|
|
|
|
<span class="repo-count label label-gray label-radius">{{.ContextUser.GetOrganizationCount}}</span>
|
|
|
|
</h4>
|
2014-07-26 04:24:27 +00:00
|
|
|
</div>
|
2014-07-26 22:37:18 +00:00
|
|
|
<div class="panel-body">
|
|
|
|
<ul class="list-no-style">
|
|
|
|
{{range .ContextUser.Orgs}}
|
|
|
|
<li>
|
2014-09-14 17:35:22 +00:00
|
|
|
<a href="{{AppRootSubUrl}}/{{.Name}}">
|
2014-07-26 22:37:18 +00:00
|
|
|
<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>
|
2014-07-26 04:24:27 +00:00
|
|
|
</div>
|
2014-07-26 22:37:18 +00:00
|
|
|
{{end}}
|
2014-07-26 04:24:27 +00:00
|
|
|
<div class="panel" id="dashboard-my-mirror">
|
|
|
|
<div class="panel-header">
|
2014-07-27 03:53:16 +00:00
|
|
|
<h4 class="text-bold">{{.i18n.Tr "home.my_mirrors"}}
|
|
|
|
<span class="repo-count label label-gray label-radius">{{.MirrorCount}}</span>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<ul class="list-no-style">
|
|
|
|
{{range .Mirrors}}
|
|
|
|
<li {{if .IsPrivate}}class="private"{{end}}>
|
2014-09-14 17:35:22 +00:00
|
|
|
<a href="{{AppRootSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
|
2014-07-27 03:53:16 +00:00
|
|
|
<i class="octicon octicon-repo-clone"></i>
|
|
|
|
<span class="repo-name">
|
|
|
|
<strong class="repo">{{.Name}}</strong>
|
|
|
|
</span>
|
|
|
|
<span class="right repo-star">
|
2014-08-11 03:11:18 +00:00
|
|
|
<i class="octicon octicon-sync"></i>{{.Interval}}H
|
2014-07-27 03:53:16 +00:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
2014-07-26 04:24:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-08-31 11:36:50 +00:00
|
|
|
{{template "ng/base/footer" .}}
|