Git installation check, show image in single file view, show short SHA1 instead of 40-length string, complete log module
This commit is contained in:
parent
02a81ddb62
commit
5e81383413
16 changed files with 359 additions and 38 deletions
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
<h3 class="org-repo-name"><a href="/{{$.Org.Name}}/{{.Name}}">{{.Name}}</a></h3>
|
||||
<p class="org-repo-description">{{.Description}}</p>
|
||||
<p class="org-repo-update">Updated {{TimeSince .Updated}}</p>
|
||||
<p class="org-repo-update">Updated {{TimeSince .Updated $.Lang}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<a href="#">
|
||||
<button class="btn btn-gray btn-small btn-radius">
|
||||
<i class="octicon octicon-git-branch"></i> Branch :
|
||||
<strong id="repo-branch-current">{{.BranchName}}</strong>
|
||||
<strong id="repo-branch-current">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
|
||||
</button>
|
||||
</a>
|
||||
<div class="drop-down panel">
|
||||
|
@ -87,7 +87,7 @@
|
|||
</ul>
|
||||
<ul class="menu menu-vertical switching-list" id="repo-branch-list">
|
||||
{{range .Branches}}
|
||||
<li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{.}}"><i class="octicon octicon-check"></i>master</a></li>
|
||||
<li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{.}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
<ul class="menu menu-vertical switching-list" id="repo-tag-list">
|
||||
|
@ -137,7 +137,7 @@
|
|||
<a class="radius" href="{{.RepoLink}}/pulls"><i class="octicon octicon-git-pull-request"></i>Pull Requests<span class="num right label label-blue label-radius">{{.Repository.NumOpenPulls}}</span></a>
|
||||
</li>
|
||||
<li class="border-bottom"></li>
|
||||
<li class="head">{{.BranchName}}</li>
|
||||
<li class="head">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</li>
|
||||
<li>
|
||||
<a class="radius" href="{{.RepoLink}}/commits/{{.BranchName}}"><i class="octicon octicon-history"></i>Commits <span class="num right label label-gray label-radius">{{.CommitsCount}}</span></a>
|
||||
</li>
|
||||
|
|
|
@ -15,6 +15,14 @@
|
|||
<div class="{{if .ReadmeExist}}panel-content markdown{{end}} code-view">
|
||||
{{if .ReadmeExist}}
|
||||
{{.FileContent | Str2html}}
|
||||
{{else if not .IsFileText}}
|
||||
<div class="view-raw">
|
||||
{{if .IsImageFile}}
|
||||
<img src="{{.FileLink}}">
|
||||
{{else}}
|
||||
<a href="{{.FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">View Raw</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{else if .FileSize}}
|
||||
<table>
|
||||
<tbody>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue