summaryrefslogtreecommitdiffstats
path: root/templates/repo/view_file.tmpl
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-10-29 19:04:25 -0700
committerLunny Xiao <xiaolunwen@gmail.com>2017-10-30 10:04:25 +0800
commit513375c429435ba60a667b219bdfb00e5b760b38 (patch)
tree9f516c8d0ebbdc66808c9017df7db2ff9aa34b57 /templates/repo/view_file.tmpl
parent6e98812ecf4efb6f53d72414ca8f67b14fac6595 (diff)
downloadgitea-513375c429435ba60a667b219bdfb00e5b760b38.tar.gz
gitea-513375c429435ba60a667b219bdfb00e5b760b38.zip
Make URL scheme unambiguous (#2408)
* Make URL scheme unambiguous Redirect old routes to new routes * Fix redirects to new URL scheme, and update template * Fix branches/_new endpoints, and update integration test
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r--templates/repo/view_file.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 52bd6dfb4e..e8319881ff 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -15,9 +15,9 @@
<div class="ui right file-actions">
<div class="ui buttons">
{{if not .IsViewCommit}}
- <a class="ui button" href="{{.RepoLink}}/src/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
+ <a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
{{end}}
- <a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
+ <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>
{{if .Repository.CanEnableEditor}}