summaryrefslogtreecommitdiffstats
path: root/templates/repo/view_file.tmpl
diff options
context:
space:
mode:
authorAndrzej Ressel <jereksel@gmail.com>2019-04-20 04:47:00 +0200
committertechknowlogick <matti@mdranta.net>2019-04-19 22:47:00 -0400
commit469d9b7d9ac3714a146d8e745618641dbe03fafa (patch)
tree7c29b6eddde19222196702d1c47919e4b4a9394d /templates/repo/view_file.tmpl
parentb9d1fb6de32613ada3869d2a9692cb078ed48534 (diff)
downloadgitea-469d9b7d9ac3714a146d8e745618641dbe03fafa.tar.gz
gitea-469d9b7d9ac3714a146d8e745618641dbe03fafa.zip
Add option to blame files (#5721)
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r--templates/repo/view_file.tmpl3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 07d1075b13..a6d47b15d6 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -21,6 +21,9 @@
{{if not .IsViewCommit}}
<a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
{{end}}
+ {{if .IsTextFile}}
+ <a class="ui button" href="{{.RepoLink}}/blame/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.blame"}}</a>
+ {{end}}
<a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
<a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
</div>