summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
author无闻 <u@gogs.io>2015-07-25 00:32:11 +0800
committer无闻 <u@gogs.io>2015-07-25 00:32:11 +0800
commite69f09f50ee79c08de700f7bb00b91323cac2bc8 (patch)
tree27a8b5c86e2657ea13a47e09e54d1d23ead8886f /templates/repo
parent6272986192b47e56862c0d64c0a3c63e9a5e9fea (diff)
parent562ad02a6da7323b3ec5e2b0259ee1f17935d5f6 (diff)
downloadgitea-e69f09f50ee79c08de700f7bb00b91323cac2bc8.tar.gz
gitea-e69f09f50ee79c08de700f7bb00b91323cac2bc8.zip
Merge pull request #1275 from jstasiak/develop
Add file permalink button
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/view_file.tmpl5
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index d33cc95023..4d11170bd0 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -12,6 +12,11 @@
<strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span>
{{end}}
{{if not .ReadmeInList}}
+ {{if not .IsCommit}}
+ <a class="right" href="{{.RepoLink}}/src/{{.CommitId}}/{{.TreeName}}">
+ <button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_permalink"}}</button>
+ </a>
+ {{end}}
<a class="right" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{.TreeName}}">
<button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_history"}}</button>
</a>