diff options
author | slene <vslene@gmail.com> | 2014-03-28 00:07:22 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-03-28 00:07:22 +0800 |
commit | 677643b812cdc3bce3b7ef7839239b3059376684 (patch) | |
tree | 92c72eb18513b972a0037172891c415c54b7614d /templates/repo | |
parent | c796ed3849e3cd5b28cc8234edc71bbedafbc7da (diff) | |
download | gitea-677643b812cdc3bce3b7ef7839239b3059376684.tar.gz gitea-677643b812cdc3bce3b7ef7839239b3059376684.zip |
fix read commit source
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/commits.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/diff.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/single.tmpl | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index 2f308a108d..efe35936c4 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -27,7 +27,7 @@ {{range $r}} <tr> <td class="author"><img class="avatar" src="{{AvatarLink .Committer.Email}}" alt=""/><a href="/user/{{.Committer.Name}}">{{.Committer.Name}}</a></td> - <td class="sha"><a class="label label-success" href="/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 7}} </a></td> + <td class="sha"><a class="label label-success" href="/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td> <td class="message">{{.Message}} </td> <td class="date">{{TimeSince .Committer.When}}</td> </tr> @@ -37,4 +37,4 @@ </div> </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl index 38f19b36f5..809a4873c3 100644 --- a/templates/repo/diff.tmpl +++ b/templates/repo/diff.tmpl @@ -6,7 +6,7 @@ <div id="source"> <div class="panel panel-info diff-box diff-head-box"> <div class="panel-heading"> - <a class="pull-right btn btn-primary btn-sm" href="#commit-source">Browse Source</a> + <a class="pull-right btn btn-primary btn-sm" href="{{.SourcePath}}">Browse Source</a> <h4>{{.Commit.Message}}</h4> </div> <div class="panel-body"> @@ -57,7 +57,7 @@ </span> <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span> </div> - <a class="btn btn-default btn-sm pull-right" href="#">View File</a> + <a class="btn btn-default btn-sm pull-right" href="{{$.SourcePath}}/{{.Name}}">View File</a> <span class="file">{{.Name}}</span> </div> <div class="panel-body file-body file-code code-view code-diff"> @@ -411,4 +411,4 @@ </div> --> </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl index ed04be0779..4c9406762c 100644 --- a/templates/repo/single.tmpl +++ b/templates/repo/single.tmpl @@ -11,7 +11,7 @@ {{ $n := len .Treenames}} {{if not .IsFile}}<button class="btn btn-default pull-right hidden"><i class="fa fa-plus-square"></i>Add File</button>{{end}} <div class="dropdown branch-switch"> - <a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{.Branchname}} + <a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{if .CommitId}}{{SubStr .CommitId 0 10}}{{else}}{{.Branchname}}{{end}} <b class="caret"></b></a> <ul class="dropdown-menu"> {{range .Branches}} @@ -41,4 +41,4 @@ {{end}} </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} |