diff options
author | Martin van Beurden <chadoe@gmail.com> | 2014-09-14 19:35:22 +0200 |
---|---|---|
committer | Martin van Beurden <chadoe@gmail.com> | 2014-09-18 20:50:48 +0200 |
commit | 0055cbd3651ebde0f8b6cc70c9c44de56dc38830 (patch) | |
tree | 64a9ea617ba1f704139881c3960fa2425dad9018 /templates/org | |
parent | 4f74b4e6578be4251af65cd08daa37c884e431a0 (diff) | |
download | gitea-0055cbd3651ebde0f8b6cc70c9c44de56dc38830.tar.gz gitea-0055cbd3651ebde0f8b6cc70c9c44de56dc38830.zip |
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
Diffstat (limited to 'templates/org')
-rw-r--r-- | templates/org/base/header.tmpl | 2 | ||||
-rw-r--r-- | templates/org/create.tmpl | 4 | ||||
-rw-r--r-- | templates/org/home.tmpl | 16 | ||||
-rw-r--r-- | templates/org/member/members.tmpl | 2 | ||||
-rw-r--r-- | templates/org/new.tmpl | 4 | ||||
-rw-r--r-- | templates/org/settings/delete.tmpl | 2 | ||||
-rw-r--r-- | templates/org/settings/nav.tmpl | 6 | ||||
-rw-r--r-- | templates/org/settings/options.tmpl | 2 | ||||
-rw-r--r-- | templates/org/team/members.tmpl | 2 | ||||
-rw-r--r-- | templates/org/team/repositories.tmpl | 2 | ||||
-rw-r--r-- | templates/org/team/teams.tmpl | 2 |
11 files changed, 22 insertions, 22 deletions
diff --git a/templates/org/base/header.tmpl b/templates/org/base/header.tmpl index 8566d0a3c5..ef5f4d044e 100644 --- a/templates/org/base/header.tmpl +++ b/templates/org/base/header.tmpl @@ -1,6 +1,6 @@ <div class="org-header" id="org-header"> <div class="container"> - <a class="text-black left" href="/org/{{.Org.LowerName}}"> + <a class="text-black left" href="{{AppRootSubUrl}}/org/{{.Org.LowerName}}"> <img class="avatar-48 left" src="{{.Org.AvatarLink}}?s=100"> <span class="org-name">{{.Org.FullName}}</span> </a> diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl index 820cf7e756..ce0cdb3191 100644 --- a/templates/org/create.tmpl +++ b/templates/org/create.tmpl @@ -1,7 +1,7 @@ {{template "ng/base/head" .}} {{template "ng/base/header" .}} <div id="sign-wrapper"> - <form class="form-align form panel sign-panel sign-form container panel-radius" id="sign-up-form" action="/org/create" method="post"> + <form class="form-align form panel sign-panel sign-form container panel-radius" id="sign-up-form" action="{{AppRootSubUrl}}/org/create" method="post"> {{.CsrfTokenHtml}} <div class="panel-header"> <h2>{{.i18n.Tr "new_org"}}</h2> @@ -23,7 +23,7 @@ <div class="field"> <span class="form-label"></span> <button class="btn btn-large btn-blue btn-radius">{{.i18n.Tr "org.create_org"}}</button> - <a class="btn btn-small btn-gray btn-radius" id="repo-create-cancel" href="/"><strong>{{.i18n.Tr "cancel"}}</strong></a> + <a class="btn btn-small btn-gray btn-radius" id="repo-create-cancel" href="{{AppRootSubUrl}}/"><strong>{{.i18n.Tr "cancel"}}</strong></a> </div> </div> </form> diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 6f3078de50..f8e6eb6b63 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -22,7 +22,7 @@ <div id="org-home-repo-list" class="left grid-2-3"> <div class="clear"> {{if .IsOrganizationOwner}} - <a class="btn btn-green btn-large btn-link btn-radius right" href="/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a> + <a class="btn btn-green btn-large btn-link btn-radius right" href="{{AppRootSubUrl}}/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a> {{end}} </div> <div id="org-repo-list"> @@ -33,7 +33,7 @@ <li><i class="octicon octicon-star"></i> {{.NumStars}}</li> <li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li> </ul> - <h2><a href="/{{$.Org.Name}}/{{.Name}}">{{.Name}}</a></h2> + <h2><a href="{{AppRootSubUrl}}/{{$.Org.Name}}/{{.Name}}">{{.Name}}</a></h2> <p class="org-repo-description">{{.Description}}</p> <p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p> </div> @@ -46,20 +46,20 @@ <div class="panel panel-radius"> <div class="panel-header"> {{if $isMember}} - <a class="text-grey right" href="/org/{{.Org.LowerName}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a> + <a class="text-grey right" href="{{AppRootSubUrl}}/org/{{.Org.LowerName}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a> {{end}} <strong>{{.i18n.Tr "org.people"}}</strong> </div> <div class="panel-body member-avatar-group"> {{range .Members}} {{if or $isMember (.IsPublicMember $.Org.Id)}} - <a href="/{{.Name}}" title="{{.Name}}"><img src="{{.AvatarLink}}"></a> + <a href="{{AppRootSubUrl}}/{{.Name}}" title="{{.Name}}"><img src="{{.AvatarLink}}"></a> {{end}} {{end}} </div> {{if .IsOrganizationOwner}} <div class="panel-footer"> - <a class="btn btn-medium btn-blue btn-link btn-radius" href="/org/{{.Org.LowerName}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a> + <a class="btn btn-medium btn-blue btn-link btn-radius" href="{{AppRootSubUrl}}/org/{{.Org.LowerName}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a> </div> {{end}} </div> @@ -67,14 +67,14 @@ <br> <div class="panel panel-radius"> <div class="panel-header"> - <a class="text-grey right" href="/org/{{.Org.LowerName}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a> + <a class="text-grey right" href="{{AppRootSubUrl}}/org/{{.Org.LowerName}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a> <strong>{{.i18n.Tr "org.teams"}}</strong> </div> <div class="panel-body" id="org-home-team-list"> <ul> {{range .Teams}} <li> - <a class="text-black" href="/org/{{$.Org.LowerName}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a> + <a class="text-black" href="{{AppRootSubUrl}}/org/{{$.Org.LowerName}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a> <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} ยท {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p> </li> {{end}} @@ -82,7 +82,7 @@ </div> {{if .IsOrganizationOwner}} <div class="panel-footer"> - <a class="btn btn-medium btn-blue btn-link btn-radius" href="/org/{{$.Org.LowerName}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a> + <a class="btn btn-medium btn-blue btn-link btn-radius" href="{{AppRootSubUrl}}/org/{{$.Org.LowerName}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a> </div> {{end}} </div> diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 1c530982fb..eb4b9b7fc7 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -14,7 +14,7 @@ {{range .Members}} <div class="org-member-item"> <img class="avatar-48 left" src="{{.AvatarLink}}?s=100"> - <a class="text-black" href="/{{.Name}}"><span class="member-name"><strong>{{.FullName}}</strong>({{.Name}})</span></a> + <a class="text-black" href="{{AppRootSubUrl}}/{{.Name}}"><span class="member-name"><strong>{{.FullName}}</strong>({{.Name}})</span></a> <ul class="grid-6-12 right"> <li class="grid-1-3"> {{ $isPublic := .IsPublicMember $.Org.Id}} diff --git a/templates/org/new.tmpl b/templates/org/new.tmpl index 870f3982d8..eb5fd9a30d 100644 --- a/templates/org/new.tmpl +++ b/templates/org/new.tmpl @@ -1,7 +1,7 @@ {{template "base/head" .}} {{template "base/navbar" .}} <div class="container" id="body"> - <form action="/org/create" method="post" class="form-horizontal card" id="org-create"> + <form action="{{AppRootSubUrl}}/org/create" method="post" class="form-horizontal card" id="org-create"> {{.CsrfTokenHtml}} <h3>Create New Organization</h3> {{template "base/alert" .}} @@ -24,7 +24,7 @@ <div class="form-group"> <div class="col-md-offset-2 col-md-8"> <button type="submit" class="btn btn-lg btn-primary">Create An Organization</button> - <a href="/" class="text-danger">Cancel</a> + <a href="{{AppRootSubUrl}}/" class="text-danger">Cancel</a> </div> </div> </form> diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl index ea9853d919..938fdd647b 100644 --- a/templates/org/settings/delete.tmpl +++ b/templates/org/settings/delete.tmpl @@ -12,7 +12,7 @@ <p class="panel-header"><strong>{{.i18n.Tr "org.settings.delete_account"}}</strong></p> <div class="panel-body panel-content"> <span class="alert alert-red alert-radius block"><i class="octicon octicon-alert"></i>{{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</span> - <form action="/org/{{.Org.LowerName}}/settings/delete" method="post"> + <form action="{{AppRootSubUrl}}/org/{{.Org.LowerName}}/settings/delete" method="post"> {{.CsrfTokenHtml}} <p class="field"> <span class="form-label"></span> diff --git a/templates/org/settings/nav.tmpl b/templates/org/settings/nav.tmpl index 954893c6c2..63cb6f08b1 100644 --- a/templates/org/settings/nav.tmpl +++ b/templates/org/settings/nav.tmpl @@ -4,9 +4,9 @@ </div> <div class="panel-body"> <ul class="menu menu-vertical switching-list grid-1-5 left"> - <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="/org/{{.Org.LowerName}}/settings">{{.i18n.Tr "org.settings.options"}}</a></li> - <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="/org/{{.Org.LowerName}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li> - <li {{if .PageIsSettingsDelete}}class="current"{{end}}><a href="/org/{{.Org.LowerName}}/settings/delete">{{.i18n.Tr "org.settings.delete"}}</a></li> + <li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{AppRootSubUrl}}/org/{{.Org.LowerName}}/settings">{{.i18n.Tr "org.settings.options"}}</a></li> + <li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{AppRootSubUrl}}/org/{{.Org.LowerName}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li> + <li {{if .PageIsSettingsDelete}}class="current"{{end}}><a href="{{AppRootSubUrl}}/org/{{.Org.LowerName}}/settings/delete">{{.i18n.Tr "org.settings.delete"}}</a></li> </ul> </div> </div> diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl index 14ea1b349d..0949219389 100644 --- a/templates/org/settings/options.tmpl +++ b/templates/org/settings/options.tmpl @@ -12,7 +12,7 @@ <div class="panel-header"> <strong>{{.i18n.Tr "org.settings.options"}}</strong> </div> - <form class="form form-align panel-body" id="org-setting-form" action="/org/{{.Org.LowerName}}/settings" method="post"> + <form class="form form-align panel-body" id="org-setting-form" action="{{AppRootSubUrl}}/org/{{.Org.LowerName}}/settings" method="post"> {{.CsrfTokenHtml}} <input type="hidden" name="action" value="update"> <div class="field"> diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index d3176be152..ad9b30ed3a 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -30,7 +30,7 @@ {{if $.IsOrganizationOwner}} <a class="btn btn-small btn-red btn-radius right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a> {{end}} - <a class="member" href="/{{.Name}}"> + <a class="member" href="{{AppRootSubUrl}}/{{.Name}}"> <img alt="{{.Name}}" class="pull-left avatar" src="{{.AvatarLink}}"> <strong>{{.FullName}}</strong> ({{.Name}}) </a> diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 0a3f771068..f7ff97d8c6 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -30,7 +30,7 @@ {{if $canAddRemove}} <a class="btn btn-small btn-red btn-radius right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/remove?repoid={{.Id}}">{{$.i18n.Tr "org.teams.remove_repo"}}</a> {{end}} - <a class="member" href="/{{$.Org.Name}}/{{.Name}}"> + <a class="member" href="{{AppRootSubUrl}}/{{$.Org.Name}}/{{.Name}}"> <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i> <strong>{{$.Org.Name}}/{{.Name}}</strong> </a> diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 9c47cb5a41..6440807f43 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -25,7 +25,7 @@ {{if .NumMembers}} <div class="panel-body member-avatar-group"> {{range .Members}} - <a href="/{{.Name}}" title="{{.Name}}"> + <a href="{{AppRootSubUrl}}/{{.Name}}" title="{{.Name}}"> <img src="{{.AvatarLink}}"> </a> {{end}} |