diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-09-19 19:02:40 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-09-19 19:02:40 -0400 |
commit | 6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (patch) | |
tree | 64a9ea617ba1f704139881c3960fa2425dad9018 /templates/user/dashboard | |
parent | 4f74b4e6578be4251af65cd08daa37c884e431a0 (diff) | |
parent | 0055cbd3651ebde0f8b6cc70c9c44de56dc38830 (diff) | |
download | gitea-6a7bd097fe2b3e894830fc3fdb60dde5594b61d6.tar.gz gitea-6a7bd097fe2b3e894830fc3fdb60dde5594b61d6.zip |
Merge pull request #463 from chadoe/urlroot
Allow Gogs to run from a suburl behind a reverse proxy.
Diffstat (limited to 'templates/user/dashboard')
-rw-r--r-- | templates/user/dashboard/dashboard.tmpl | 24 | ||||
-rw-r--r-- | templates/user/dashboard/nav.tmpl | 6 |
2 files changed, 15 insertions, 15 deletions
diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index a9326fa6b9..db838452da 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -12,17 +12,17 @@ </div> <div class="content left {{if eq .GetOpType 5}}push-news{{end}} grid-4-5"> <p class="text-bold"> - <a href="/{{.GetActUserName}}">{{.GetActUserName}}</a> + <a href="{{AppRootSubUrl}}/{{.GetActUserName}}">{{.GetActUserName}}</a> {{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}} </p> {{if eq .GetOpType 5}} @@ -31,7 +31,7 @@ {{ $push := ActionContent2Commits .}} {{ $repoLink := .GetRepoLink}} {{range $push.Commits}} - <li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="/{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text-truncate grid-4-5">{{.Message}}</span></li> + <li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="{{AppRootSubUrl}}/{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text-truncate grid-4-5">{{.Message}}</span></li> {{end}} </ul> </div> @@ -58,9 +58,9 @@ <i class="octicon octicon-plus"></i> </button> <ul class="menu menu-vertical drop-down" id="dashboard-new-repo-menu"> - <li><a href="/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li> - <li><a href="/repo/migrate"><i class="octicon octicon-repo-clone"></i>{{.i18n.Tr "new_migrate"}}</a></li> - <li><a href="/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li> + <li><a href="{{AppRootSubUrl}}/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li> + <li><a href="{{AppRootSubUrl}}/repo/migrate"><i class="octicon octicon-repo-clone"></i>{{.i18n.Tr "new_migrate"}}</a></li> + <li><a href="{{AppRootSubUrl}}/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li> </ul> </li> </ul> @@ -75,7 +75,7 @@ <ul class="list-no-style"> {{range .Repos}} <li {{if .IsPrivate}}class="private"{{end}}> - <a href="/{{$.ContextUser.Name}}/{{.Name}}"> + <a href="{{AppRootSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}"> <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i> <span class="repo-name"> <strong class="repo">{{.Name}}</strong> @@ -125,7 +125,7 @@ <ul class="list-no-style"> {{range .ContextUser.Orgs}} <li> - <a href="/{{.Name}}"> + <a href="{{AppRootSubUrl}}/{{.Name}}"> <i class="octicon octicon-organization"></i> <span class="repo-name"> <strong class="repo">{{.Name}}</strong> @@ -150,7 +150,7 @@ <ul class="list-no-style"> {{range .Mirrors}} <li {{if .IsPrivate}}class="private"{{end}}> - <a href="/{{$.ContextUser.Name}}/{{.Name}}"> + <a href="{{AppRootSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}"> <i class="octicon octicon-repo-clone"></i> <span class="repo-name"> <strong class="repo">{{.Name}}</strong> diff --git a/templates/user/dashboard/nav.tmpl b/templates/user/dashboard/nav.tmpl index c37447d3a6..1fbdc71c8b 100644 --- a/templates/user/dashboard/nav.tmpl +++ b/templates/user/dashboard/nav.tmpl @@ -9,7 +9,7 @@ <p class="panel-header"><strong>{{.i18n.Tr "home.switch_dashboard_context"}}</strong></p> <ul class="menu menu-vertical switching-list" id="dashboard-switch-menu"> <li class="org {{if eq .ContextUser.Id .SignedUser.Id}}checked{{end}}"> - <a href="/"> + <a href="{{AppRootSubUrl}}/"> <i class="octicon octicon-check"></i> <img class="avatar-24" src="{{.SignedUser.AvatarLink}}" alt="user-avatar" /> {{.SignedUser.Name}} @@ -25,10 +25,10 @@ </li> {{end}} <!-- <li> - <a href="/user/settings/orgs"><i class="octicon octicon-organization"></i>{{.i18n.Tr "manage_org"}}</a> + <a href="{{AppRootSubUrl}}/user/settings/orgs"><i class="octicon octicon-organization"></i>{{.i18n.Tr "manage_org"}}</a> </li> --> <li> - <a href="/org/create"><i class="octicon octicon-plus"></i>{{.i18n.Tr "new_org"}}</a> + <a href="{{AppRootSubUrl}}/org/create"><i class="octicon octicon-plus"></i>{{.i18n.Tr "new_org"}}</a> </li> </ul> </div> |