mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
New UI merge in progress
This commit is contained in:
142
templates/user/dashboard/dashboard.tmpl
Normal file
142
templates/user/dashboard/dashboard.tmpl
Normal file
@@ -0,0 +1,142 @@
|
||||
{{template "ng/base/head" .}}
|
||||
{{template "ng/base/header" .}}
|
||||
{{template "user/dashboard/nav" .}}
|
||||
<div id="dashboard-wrapper">
|
||||
<div id="dashboard" class="container">
|
||||
<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>
|
||||
<div class="content left {{if eq .GetOpType 5}}push-news{{end}}">
|
||||
<p class="text-bold">
|
||||
<a href="/{{.GetActUserName}}">{{.GetActUserName}}</a>
|
||||
{{if eq .GetOpType 1}}
|
||||
{{$.i18n.Tr "action.create_repo" .GetRepoLink .GetRepoLink | Str2html}}
|
||||
{{else if eq .GetOpType 5}}
|
||||
{{$.i18n.Tr "action.commit_repo" .GetRepoLink .GetBranch .GetBranch .GetRepoLink .GetRepoLink | Str2html}}
|
||||
{{else if eq .GetOpType 6}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoLink $index | Str2html}}
|
||||
{{else if eq .GetOpType 10}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .GetRepoLink $index | Str2html}}
|
||||
{{end}}
|
||||
</p>
|
||||
{{if eq .GetOpType 5}}
|
||||
<div class="news-content content">
|
||||
<ul class="list-no-style">
|
||||
{{ $push := ActionContent2Commits .}}
|
||||
{{ $repoLink := .GetRepoLink}}
|
||||
{{range $push.Commits}}
|
||||
<li><img src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="/{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> {{.Message}}</li>
|
||||
{{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>
|
||||
<li class="js-tab-nav" data-tab-target="#dashboard-my-org"><a href="#">{{.i18n.Tr "organization"}}</a></li>
|
||||
<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">
|
||||
<li><a href="/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li>
|
||||
<li><a href="/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li>
|
||||
</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}}
|
||||
<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">
|
||||
<!-- <span class="repo-name-prefix">gogits / </span> -->
|
||||
<strong class="repo">{{.Name}}</strong>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
<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">
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="octicon octicon-repo"></i>
|
||||
<span class="repo-name">
|
||||
<span class="repo-name-prefix">gogits / </span>
|
||||
<strong class="repo">gogs</strong>
|
||||
</span>
|
||||
<span class="right repo-star">
|
||||
<i class="octicon octicon-star"></i>2048
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="octicon octicon-repo"></i>
|
||||
<span class="repo-name">
|
||||
<span class="repo-name-prefix">astaxie / </span>
|
||||
<strong class="repo">beego</strong>
|
||||
</span>
|
||||
<span class="right repo-star">
|
||||
<i class="octicon octicon-star"></i>2301
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="octicon octicon-repo"></i>
|
||||
<span class="repo-name">
|
||||
<span class="repo-name-prefix">gogits / </span>
|
||||
<strong class="repo">scaffold</strong>
|
||||
</span>
|
||||
<span class="right repo-star">
|
||||
<i class="octicon octicon-star"></i>0
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel" id="dashboard-my-org">
|
||||
<div class="panel-header">
|
||||
<h4 class="text-bold">{{.i18n.Tr "home.my_orgs"}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel" id="dashboard-my-mirror">
|
||||
<div class="panel-header">
|
||||
<h4 class="text-bold">{{.i18n.Tr "home.my_mirrors"}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "ng/base/footer" .}}
|
46
templates/user/dashboard/nav.tmpl
Normal file
46
templates/user/dashboard/nav.tmpl
Normal file
@@ -0,0 +1,46 @@
|
||||
<div id="dashboard-header">
|
||||
<ul class="menu menu-line container">
|
||||
<li id="dashboard-selection-menu" class="down drop">
|
||||
<a href="#" class="text-bold radius">
|
||||
<img class="avatar-30" src="{{.ContextUser.AvatarLink}}" alt="user-avatar" />
|
||||
{{.ContextUser.Name}}
|
||||
</a>
|
||||
<div class="drop-down panel panel-radius">
|
||||
<p class="panel-header"><strong>{{.i18n.Tr "home.switch_dashboard_context"}}</strong></p>
|
||||
<ul class="menu menu-vertical switching-list" id="dashboard-switch-menu">
|
||||
<li class="org {{if eq .ContextUser.Id .SignedUser.Id}}checked{{end}}">
|
||||
<a href="/">
|
||||
<i class="octicon octicon-check"></i>
|
||||
<img class="avatar-24" src="{{.SignedUser.AvatarLink}}" alt="user-avatar" />
|
||||
{{.SignedUser.Name}}
|
||||
</a>
|
||||
</li>
|
||||
{{range .Orgs}}
|
||||
<li class="org {{if eq $.ContextUser.Id .Id}}checked{{end}}">
|
||||
<a href="{{.DashboardLink}}">
|
||||
<i class="octicon octicon-check"></i>
|
||||
<img class="avatar-24" src="{{.AvatarLink}}" alt="user-avatar" />
|
||||
{{.Name}}
|
||||
</a>
|
||||
</li>
|
||||
{{end}}
|
||||
<li>
|
||||
<a href="/user/settings/orgs"><i class="octicon octicon-organization"></i>{{.i18n.Tr "manage_org"}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/org/create"><i class="octicon octicon-plus"></i>{{.i18n.Tr "new_org"}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="right">
|
||||
<a {{if $.PageIsIssues}}class="current"{{end}} href="{{.ContextUser.DashboardLink}}issues"><i class="octicon octicon-issue-opened"></i>{{.i18n.Tr "issues"}}</a>
|
||||
</li>
|
||||
<li class="right">
|
||||
<a {{if .PageIsPulls}}class="current"{{end}} href="{{.ContextUser.DashboardLink}}pulls"><i class="octicon octicon-git-pull-request"></i>{{.i18n.Tr "pull_requests"}}</a>
|
||||
</li>
|
||||
<li class="right">
|
||||
<a {{if $.PageIsNews}}class="current"{{end}} href="{{.ContextUser.DashboardLink}}"><i class="octicon octicon-rss"></i>{{.i18n.Tr "news_feed"}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
Reference in New Issue
Block a user