aboutsummaryrefslogtreecommitdiff
path: root/templates/repo/view_file.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/view_file.tmpl')
1 files changed, 7 insertions, 2 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index d33cc950..274c7df2 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -12,7 +12,12 @@
<strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span>
{{end}}
{{if not .ReadmeInList}}
- <a class="right" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{.TreeName}}">
+ {{if not .IsCommit}}
+ <a class="right" href="{{.RepoLink}}/src/{{.CommitId}}/{{EscapePound .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}}/{{EscapePound .TreeName}}">
<button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_history"}}</button>
</a>
<a class="right" href="{{EscapePound .FileLink}}">
@@ -42,4 +47,4 @@
</table>
{{end}}
</div>
-</div> \ No newline at end of file
+</div>