From 0055cbd3651ebde0f8b6cc70c9c44de56dc38830 Mon Sep 17 00:00:00 2001 From: Martin van Beurden Date: Sun, 14 Sep 2014 19:35:22 +0200 Subject: Allow Gogs to run from a suburl behind a reverse proxy. e.g. http://mydomain.com/gogs/ Conflicts: modules/setting/setting.go Conflicts: templates/repo/release/list.tmpl templates/user/dashboard/dashboard.tmpl Conflicts: routers/repo/setting.go --- templates/user/auth/activate.tmpl | 2 +- templates/user/auth/forgot_passwd.tmpl | 2 +- templates/user/auth/reset_passwd.tmpl | 2 +- templates/user/auth/signin.tmpl | 6 +++--- templates/user/auth/signup.tmpl | 4 ++-- templates/user/dashboard/dashboard.tmpl | 24 ++++++++++++------------ templates/user/dashboard/nav.tmpl | 6 +++--- templates/user/issues.tmpl | 24 ++++++++++++------------ templates/user/profile.tmpl | 2 +- templates/user/settings/delete.tmpl | 2 +- templates/user/settings/nav.tmpl | 10 +++++----- templates/user/settings/password.tmpl | 2 +- templates/user/settings/profile.tmpl | 2 +- templates/user/settings/social.tmpl | 2 +- templates/user/settings/sshkeys.tmpl | 4 ++-- 15 files changed, 47 insertions(+), 47 deletions(-) (limited to 'templates/user') diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl index 6a9e0b0d..554e2b78 100644 --- a/templates/user/auth/activate.tmpl +++ b/templates/user/auth/activate.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}}
-
+ {{.CsrfTokenHtml}}

{{.i18n.Tr "auth.active_your_account"}}

diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl index 3e9f76e9..a1a10093 100644 --- a/templates/user/auth/forgot_passwd.tmpl +++ b/templates/user/auth/forgot_passwd.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}}
- + {{.CsrfTokenHtml}}

{{.i18n.Tr "auth.forgot_password"}}

diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl index 3c9da96b..de2976d6 100644 --- a/templates/user/auth/reset_passwd.tmpl +++ b/templates/user/auth/reset_passwd.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}}
- + {{.CsrfTokenHtml}}

{{.i18n.Tr "auth.reset_password"}}

diff --git a/templates/user/auth/signin.tmpl b/templates/user/auth/signin.tmpl index c2f6ef87..e9ec87cc 100644 --- a/templates/user/auth/signin.tmpl +++ b/templates/user/auth/signin.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}}
- +

{{if .IsSocialLogin}}{{.i18n.Tr "social_sign_in" | Str2html}}{{else}}{{.i18n.Tr "sign_in"}}{{end}}

@@ -24,12 +24,12 @@
     - {{if not .IsSocialLogin}}{{.i18n.Tr "auth.forget_password"}}{{end}} + {{if not .IsSocialLogin}}{{.i18n.Tr "auth.forget_password"}}{{end}}
{{if not .IsSocialLogin}} {{if .OauthEnabled}}
diff --git a/templates/user/auth/signup.tmpl b/templates/user/auth/signup.tmpl index d116ad62..af4c250f 100644 --- a/templates/user/auth/signup.tmpl +++ b/templates/user/auth/signup.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}}
- +

{{if .IsSocialLogin}}{{.i18n.Tr "social_sign_in" | Str2html}}{{else}}{{.i18n.Tr "sign_up"}}{{end}}

@@ -40,7 +40,7 @@
{{end}}
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index a9326fa6..db838452 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -12,17 +12,17 @@

- {{.GetActUserName}} + {{.GetActUserName}} {{if eq .GetOpType 1}} - {{$.i18n.Tr "action.create_repo" .GetRepoLink .GetRepoLink | Str2html}} + {{$.i18n.Tr "action.create_repo" AppRootSubUrl .GetRepoLink .GetRepoLink | Str2html}} {{else if eq .GetOpType 5}} - {{$.i18n.Tr "action.commit_repo" .GetRepoLink .GetBranch .GetBranch .GetRepoLink .GetRepoLink | Str2html}} + {{$.i18n.Tr "action.commit_repo" AppRootSubUrl .GetRepoLink .GetBranch .GetBranch AppRootSubUrl .GetRepoLink .GetRepoLink | Str2html}} {{else if eq .GetOpType 6}} {{ $index := index .GetIssueInfos 0}} - {{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoLink $index | Str2html}} + {{$.i18n.Tr "action.create_issue" AppRootSubUrl .GetRepoLink $index .GetRepoLink $index | Str2html}} {{else if eq .GetOpType 10}} {{ $index := index .GetIssueInfos 0}} - {{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .GetRepoLink $index | Str2html}} + {{$.i18n.Tr "action.comment_issue" AppRootSubUrl .GetRepoLink $index .GetRepoLink $index | Str2html}} {{end}}

{{if eq .GetOpType 5}} @@ -31,7 +31,7 @@ {{ $push := ActionContent2Commits .}} {{ $repoLink := .GetRepoLink}} {{range $push.Commits}} -
  • {{ShortSha .Sha1}} {{.Message}}
  • +
  • {{ShortSha .Sha1}} {{.Message}}
  • {{end}}
    @@ -58,9 +58,9 @@ @@ -75,7 +75,7 @@
    diff --git a/templates/user/issues.tmpl b/templates/user/issues.tmpl index 93e798aa..19b0526c 100644 --- a/templates/user/issues.tmpl +++ b/templates/user/issues.tmpl @@ -3,10 +3,10 @@

    Your Issues

    @@ -17,30 +17,30 @@
    {{range .Issues}}{{if .}}
    #{{.Index}} -
    {{.Name}}
    +
    {{.Name}}

    - {{.Poster.Name}} + {{.Poster.Name}} {{TimeSince .Created $.Lang}} {{.NumComments}}

    diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index fe4e32f7..1b51a871 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -66,7 +66,7 @@
  • {{.NumForks}}

    - {{.Name}}{{if .IsPrivate}} Private{{end}} + {{.Name}}{{if .IsPrivate}} Private{{end}}

    {{.Description}}

    Last updated {{TimeSince .Updated $.Lang}}
    diff --git a/templates/user/settings/delete.tmpl b/templates/user/settings/delete.tmpl index 9bfc287d..78574ba1 100644 --- a/templates/user/settings/delete.tmpl +++ b/templates/user/settings/delete.tmpl @@ -11,7 +11,7 @@

    {{.i18n.Tr "settings.delete_account"}}

    {{.i18n.Tr "settings.delete_prompt" | Str2html}} - + {{.CsrfTokenHtml}}

    diff --git a/templates/user/settings/nav.tmpl b/templates/user/settings/nav.tmpl index d6d20dee..52fc83e1 100644 --- a/templates/user/settings/nav.tmpl +++ b/templates/user/settings/nav.tmpl @@ -2,11 +2,11 @@

    {{.i18n.Tr "settings"}}

    \ No newline at end of file diff --git a/templates/user/settings/password.tmpl b/templates/user/settings/password.tmpl index 44e087af..ccafd3ed 100644 --- a/templates/user/settings/password.tmpl +++ b/templates/user/settings/password.tmpl @@ -9,7 +9,7 @@

    {{.i18n.Tr "settings.change_password"}}

    - + {{.CsrfTokenHtml}}

    diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 663d8bdb..e344fb9a 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -11,7 +11,7 @@

    {{.i18n.Tr "settings.public_profile"}}
    - + {{.CsrfTokenHtml}}
    {{.i18n.Tr "settings.profile_desc"}}
    diff --git a/templates/user/settings/social.tmpl b/templates/user/settings/social.tmpl index bcbc1fc5..a2585922 100644 --- a/templates/user/settings/social.tmpl +++ b/templates/user/settings/social.tmpl @@ -20,7 +20,7 @@

    {{.Identity}}

    {{$.i18n.Tr "settings.add_on"}} {{DateFormat .Created "M d, Y"}} — {{$.i18n.Tr "settings.last_used"}} {{DateFormat .Updated "M d, Y"}}

    - {{$.i18n.Tr "settings.unbind"}} + {{$.i18n.Tr "settings.unbind"}}
  • {{end}} diff --git a/templates/user/settings/sshkeys.tmpl b/templates/user/settings/sshkeys.tmpl index 3db0f54b..2d186121 100644 --- a/templates/user/settings/sshkeys.tmpl +++ b/templates/user/settings/sshkeys.tmpl @@ -23,7 +23,7 @@

    {{.Fingerprint}}

    {{$.i18n.Tr "settings.add_on"}} {{DateFormat .Created "M d, Y"}} — {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} {{DateFormat .Updated "M d, Y"}}{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}

    - + {{$.CsrfTokenHtml}} @@ -35,7 +35,7 @@

    {{.i18n.Tr "settings.ssh_helper" | Str2html}}


    - + {{.CsrfTokenHtml}}

    {{.i18n.Tr "settings.add_new_key"}}

    -- cgit v1.2.3