aboutsummaryrefslogtreecommitdiff
path: root/templates/repo
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-17 13:12:57 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-17 13:12:57 +0800
commitd64a8e8d3aa5f1dc606860c0950a8b7dbebf944c (patch)
tree46d4193e2706989e4bd74c7d2bcae5d365655098 /templates/repo
parentc101471bdfd0a802e66adfb7402dbd980812da30 (diff)
parent0f68930892bc49966769f8931e9a531b37dacb3b (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/single.tmpl22
1 files changed, 12 insertions, 10 deletions
diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl
index b5207d08..4c6c7dd9 100644
--- a/templates/repo/single.tmpl
+++ b/templates/repo/single.tmpl
@@ -5,21 +5,23 @@
<div id="gogs-body" class="container">
<div id="gogs-source">
<div class="source-toolbar">
+ {{ $username := .Username}}
+ {{ $reponame := .Reponame}}
+ {{ $branchname := .Branchname}}
+ {{ $treenames := .Treenames}}
+ {{ $repoLink := .RepositoryLink}}
+ {{ $n := len $treenames}}
<button class="btn btn-default pull-right"><i class="fa fa-plus-square"></i>Add File</button>
<div class="dropdown branch-switch">
- <a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>master&nbsp;&nbsp;
+ <a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{$branchname}}&nbsp;&nbsp;
<b class="caret"></b></a>
<ul class="dropdown-menu">
- <li><a class="current" href="/{{.RepositoryLink}}/tree/master">master</a></li>
- <li><a href="/{{.RepositoryLink}}/tree/develop">develop</a></li>
+ {{range .Branches}}
+ <li><a {{if eq . $branchname}}class="current" {{end}}href="/{{$repoLink}}/tree/{{.}}">{{.}}</a></li>
+ {{end}}
</ul>
</div>
{{$paths := .Paths}}
- {{ $username := .Username}}
- {{ $reponame := .Reponame}}
- {{ $branchname := .Branchname}}
- {{ $treenames := .Treenames}}
- {{ $n := len $treenames}}
{{ $l := Subtract $n 1}}
<ol class="breadcrumb">
<li class="root dir"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li>
@@ -34,10 +36,10 @@
</div>
<div class="panel panel-default info-box">
<div class="panel-heading info-head">
- Merge branch 'release/1.1.1'
+ <a href="/{{$username}}/{{$reponame}}/commit/{{.LatestCommit.SHA}}">{{.LatestCommit.Message}}</a>
</div>
<div class="panel-body info-content">
- slene authored 4 days ago
+ <a href="/user/{{.LatestCommit.Author}}">{{.LatestCommit.Author}}</a> <span class="text-muted">{{TimeSince .LatestCommit.Date}}</span>
</div>
<table class="panel-footer table file-list">
<thead class="hidden">