aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp A. Beckmann <pab@pabnet.de>2020-02-25 16:58:37 +0100
committerGitHub <noreply@github.com>2020-02-25 09:58:37 -0600
commitbab6e1ed87ba9abd23bff6f0d886de5ddb1a1a99 (patch)
treeba9ce6f640ccbdd9e294737d183dc9eab6dd89a2
parent85e6a1267c634b0316b159874e6e4e18c267c7fb (diff)
downloadgitea-bab6e1ed87ba9abd23bff6f0d886de5ddb1a1a99.tar.gz
gitea-bab6e1ed87ba9abd23bff6f0d886de5ddb1a1a99.zip
Fixed wrong AppSubUrl in multiple templates (#10447)
* Fixed wrong AppSubUrl in OAuth2 app edit page * Replaced all other occurrences of $.AppSubURL for support of sub-paths
-rw-r--r--templates/explore/code.tmpl2
-rw-r--r--templates/repo/settings/lfs_locks.tmpl2
-rw-r--r--templates/user/settings/applications_oauth2_edit.tmpl4
3 files changed, 4 insertions, 4 deletions
diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl
index eb7da976b8..418d669fe9 100644
--- a/templates/explore/code.tmpl
+++ b/templates/explore/code.tmpl
@@ -18,7 +18,7 @@
</h3>
<div>
{{range $term := .SearchResultLanguages}}
- <a class="ui {{if eq $.Language $term.Language}}primary {{end}}basic label" href="{{$.AppSubURL}}/explore/code?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}">
+ <a class="ui {{if eq $.Language $term.Language}}primary {{end}}basic label" href="{{AppSubUrl}}/explore/code?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}">
<i class="color-icon" style="background-color: {{$term.Color}}"></i>
{{$term.Language}}
<div class="detail">{{$term.Count}}</div>
diff --git a/templates/repo/settings/lfs_locks.tmpl b/templates/repo/settings/lfs_locks.tmpl
index 4830fb2542..bb6d55a709 100644
--- a/templates/repo/settings/lfs_locks.tmpl
+++ b/templates/repo/settings/lfs_locks.tmpl
@@ -34,7 +34,7 @@
{{end}}
</td>
<td>
- <a href="{{$.AppSubUrl}}/{{$lock.Owner.Name}}">
+ <a href="{{AppSubUrl}}/{{$lock.Owner.Name}}">
<img class="ui avatar image" src="{{$lock.Owner.RelAvatarLink}}">
{{$lock.Owner.DisplayName}}
</a>
diff --git a/templates/user/settings/applications_oauth2_edit.tmpl b/templates/user/settings/applications_oauth2_edit.tmpl
index d1b0beb60a..c978ad5c2c 100644
--- a/templates/user/settings/applications_oauth2_edit.tmpl
+++ b/templates/user/settings/applications_oauth2_edit.tmpl
@@ -30,14 +30,14 @@
<div class="item">
<!-- TODO add regenerate secret functionality */ -->
{{.i18n.Tr "settings.oauth2_regenerate_secret_hint"}}
- <form class="ui form ignore-dirty" action="{{$.AppSubURL}}/user/settings/applications/oauth2/{{.App.ID}}/regenerate_secret" method="post">
+ <form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/applications/oauth2/{{.App.ID}}/regenerate_secret" method="post">
{{.CsrfTokenHtml}}
<a href="#" onclick="event.target.parentNode.submit()">{{.i18n.Tr "settings.oauth2_regenerate_secret"}}</a>
</form>
</div>
</div>
<div class="ui attached bottom segment">
- <form class="ui form ignore-dirty" action="{{$.AppSubURL}}/user/settings/applications/oauth2/{{.App.ID}}" method="post">
+ <form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/applications/oauth2/{{.App.ID}}" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_AppName}}error{{end}}">
<label for="application-name">{{.i18n.Tr "settings.oauth2_application_name"}}</label>