summaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
author无闻 <joe2010xtmf@163.com>2014-09-19 19:02:40 -0400
committer无闻 <joe2010xtmf@163.com>2014-09-19 19:02:40 -0400
commit6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (patch)
tree64a9ea617ba1f704139881c3960fa2425dad9018 /templates/admin
parent4f74b4e6578be4251af65cd08daa37c884e431a0 (diff)
parent0055cbd3651ebde0f8b6cc70c9c44de56dc38830 (diff)
downloadgitea-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/admin')
-rw-r--r--templates/admin/auth/edit.tmpl2
-rw-r--r--templates/admin/auth/list.tmpl10
-rw-r--r--templates/admin/auth/new.tmpl2
-rw-r--r--templates/admin/dashboard.tmpl4
-rw-r--r--templates/admin/nav.tmpl14
-rw-r--r--templates/admin/org/list.tmpl6
-rw-r--r--templates/admin/repo/list.tmpl8
-rw-r--r--templates/admin/user/edit.tmpl2
-rw-r--r--templates/admin/user/list.tmpl10
-rw-r--r--templates/admin/user/new.tmpl2
10 files changed, 30 insertions, 30 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl
index 400a4cebe3..4dead7f079 100644
--- a/templates/admin/auth/edit.tmpl
+++ b/templates/admin/auth/edit.tmpl
@@ -12,7 +12,7 @@
<div class="panel-header">
<strong>{{.i18n.Tr "admin.auths.edit"}}</strong>
</div>
- <form class="form form-align panel-body" id="auth-setting-form" action="/admin/auths/{{.Source.Id}}" data-delete-url="/admin/auths/{{.Source.Id}}/delete" method="post">
+ <form class="form form-align panel-body" id="auth-setting-form" action="{{AppRootSubUrl}}/admin/auths/{{.Source.Id}}" data-delete-url="/admin/auths/{{.Source.Id}}/delete" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" value="{{.Source.Id}}" name="id"/>
{{$type := .Source.Type}}
diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl
index 591d2ed4c3..ba10e1d2bf 100644
--- a/templates/admin/auth/list.tmpl
+++ b/templates/admin/auth/list.tmpl
@@ -13,7 +13,7 @@
<strong>{{.i18n.Tr "admin.auths.auth_manage_panel"}}</strong>
</div>
<div class="panel-body admin-panel">
- <a class="btn-blue btn-medium btn-link btn-radius" href="/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
+ <a class="btn-blue btn-medium btn-link btn-radius" href="{{AppRootSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
<div class="admin-table">
<table class="table table-striped">
<thead>
@@ -31,20 +31,20 @@
{{range .Sources}}
<tr>
<td>{{.Id}}</td>
- <td><a href="/admin/auths/{{.Id}}">{{.Name}}</a></td>
+ <td><a href="{{AppRootSubUrl}}/admin/auths/{{.Id}}">{{.Name}}</a></td>
<td>{{.TypeString}}</td>
<td><i class="fa fa{{if .IsActived}}-check{{end}}-square-o"></i></td>
<td>{{DateFormat .Updated "M d, Y"}}</td>
<td>{{DateFormat .Created "M d, Y"}}</td>
- <td><a href="/admin/auths/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
+ <td><a href="{{AppRootSubUrl}}/admin/auths/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
</tr>
{{end}}
</tbody>
</table>
{{if or .LastPageNum .NextPageNum}}
<ul class="pagination">
- {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="/admin/auths?p={{.LastPageNum}}">&laquo; Prev.</a></li>{{end}}
- {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="/admin/auths?p={{.NextPageNum}}">&raquo; Next</a></li>{{end}}
+ {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppRootSubUrl}}/admin/auths?p={{.LastPageNum}}">&laquo; Prev.</a></li>{{end}}
+ {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppRootSubUrl}}/admin/auths?p={{.NextPageNum}}">&raquo; Next</a></li>{{end}}
</ul>
{{end}}
</div>
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl
index 8f9f5ccc01..869eff32da 100644
--- a/templates/admin/auth/new.tmpl
+++ b/templates/admin/auth/new.tmpl
@@ -12,7 +12,7 @@
<div class="panel-header">
<strong>{{.i18n.Tr "admin.auths.new"}}</strong>
</div>
- <form class="form form-align panel-body" id="repo-setting-form" action="/admin/auths/new" method="post">
+ <form class="form form-align panel-body" id="repo-setting-form" action="{{AppRootSubUrl}}/admin/auths/new" method="post">
{{.CsrfTokenHtml}}
<div class="field">
<label class="req">{{.i18n.Tr "admin.auths.auth_type"}}</label>
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index 09e105826a..006966113d 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -34,11 +34,11 @@
<tbody>
<tr>
<td>{{.i18n.Tr "admin.dashboard.clean_unbind_oauth"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppRootSubUrl}}/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
</tr>
<tr>
<td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppRootSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
</tr>
</tbody>
</table>
diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl
index ccb250c250..ae44f4a818 100644
--- a/templates/admin/nav.tmpl
+++ b/templates/admin/nav.tmpl
@@ -2,13 +2,13 @@
<p class="panel-header"><strong>{{.i18n.Tr "admin_panel"}}</strong></p>
<div class="panel-body">
<ul class="menu menu-vertical switching-list grid-1-5 left">
- <li {{if .PageIsAdminDashboard}}class="current"{{end}}><a href="/admin">{{.i18n.Tr "admin.dashboard"}}</a></li>
- <li {{if .PageIsAdminUsers}}class="current"{{end}}><a href="/admin/users">{{.i18n.Tr "admin.users"}}</a></li>
- <li {{if .PageIsAdminOrganizations}}class="current"{{end}}><a href="/admin/orgs">{{.i18n.Tr "admin.organizations"}}</a></li>
- <li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li>
- <li {{if .PageIsAdminAuthentications}}class="current"{{end}}><a href="/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li>
- <li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="/admin/config">{{.i18n.Tr "admin.config"}}</a></li>
- <li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li>
+ <li {{if .PageIsAdminDashboard}}class="current"{{end}}><a href="{{AppRootSubUrl}}/admin">{{.i18n.Tr "admin.dashboard"}}</a></li>
+ <li {{if .PageIsAdminUsers}}class="current"{{end}}><a href="{{AppRootSubUrl}}/admin/users">{{.i18n.Tr "admin.users"}}</a></li>
+ <li {{if .PageIsAdminOrganizations}}class="current"{{end}}><a href="{{AppRootSubUrl}}/admin/orgs">{{.i18n.Tr "admin.organizations"}}</a></li>
+ <li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="{{AppRootSubUrl}}/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li>
+ <li {{if .PageIsAdminAuthentications}}class="current"{{end}}><a href="{{AppRootSubUrl}}/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li>
+ <li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="{{AppRootSubUrl}}/admin/config">{{.i18n.Tr "admin.config"}}</a></li>
+ <li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="{{AppRootSubUrl}}/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li>
</ul>
</div>
</div> \ No newline at end of file
diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl
index ea9167c0c4..f42c2c5315 100644
--- a/templates/admin/org/list.tmpl
+++ b/templates/admin/org/list.tmpl
@@ -30,7 +30,7 @@
{{range .Orgs}}
<tr>
<td>{{.Id}}</td>
- <td><a href="/org/{{.Name}}">{{.Name}}</a></td>
+ <td><a href="{{AppRootSubUrl}}/org/{{.Name}}">{{.Name}}</a></td>
<td>{{.Email}}</td>
<td>{{.NumTeams}}</td>
<td>{{.NumMembers}}</td>
@@ -42,8 +42,8 @@
</table>
{{if or .LastPageNum .NextPageNum}}
<ul class="pagination">
- {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="/admin/orgs?p={{.LastPageNum}}">&laquo; {{.i18n.Tr "admin.prev"}}</a></li>{{end}}
- {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="/admin/orgs?p={{.NextPageNum}}">&raquo; {{.i18n.Tr "admin.next"}}</a></li>{{end}}
+ {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppRootSubUrl}}/admin/orgs?p={{.LastPageNum}}">&laquo; {{.i18n.Tr "admin.prev"}}</a></li>{{end}}
+ {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppRootSubUrl}}/admin/orgs?p={{.NextPageNum}}">&raquo; {{.i18n.Tr "admin.next"}}</a></li>{{end}}
</ul>
{{end}}
</div>
diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl
index 3f35715833..3e7442a6fa 100644
--- a/templates/admin/repo/list.tmpl
+++ b/templates/admin/repo/list.tmpl
@@ -31,8 +31,8 @@
{{range .Repos}}
<tr>
<td>{{.Id}}</td>
- <td><a href="/user/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
- <td><a href="/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
+ <td><a href="{{AppRootSubUrl}}/user/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
+ <td><a href="{{AppRootSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
<td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
<td>{{.NumWatches}}</td>
<td>{{.NumIssues}}</td>
@@ -44,8 +44,8 @@
</table>
{{if or .LastPageNum .NextPageNum}}
<ul class="pagination">
- {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="/admin/repos?p={{.LastPageNum}}">&laquo; Prev.</a></li>{{end}}
- {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="/admin/repos?p={{.NextPageNum}}">&raquo; Next</a></li>{{end}}
+ {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppRootSubUrl}}/admin/repos?p={{.LastPageNum}}">&laquo; Prev.</a></li>{{end}}
+ {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppRootSubUrl}}/admin/repos?p={{.NextPageNum}}">&raquo; Next</a></li>{{end}}
</ul>
{{end}}
</div>
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl
index e88126706e..e9ed7836bd 100644
--- a/templates/admin/user/edit.tmpl
+++ b/templates/admin/user/edit.tmpl
@@ -12,7 +12,7 @@
<div class="panel-header">
<strong>{{.i18n.Tr "admin.users.edit_account"}}</strong>
</div>
- <form class="form form-align panel-body" id="user-profile-form" action="/admin/users/{{.User.Id}}" method="post" data-delete-url="/admin/users/{{.User.Id}}/delete">
+ <form class="form form-align panel-body" id="user-profile-form" action="{{AppRootSubUrl}}/admin/users/{{.User.Id}}" method="post" data-delete-url="/admin/users/{{.User.Id}}/delete">
{{.CsrfTokenHtml}}
<div class="field">
<label class="req">{{.i18n.Tr "admin.users.auth_source"}}</label>
diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl
index 51e6604fac..f85bb6c0da 100644
--- a/templates/admin/user/list.tmpl
+++ b/templates/admin/user/list.tmpl
@@ -13,7 +13,7 @@
<strong>{{.i18n.Tr "admin.users.user_manage_panel"}}</strong>
</div>
<div class="panel-body admin-panel">
- <a class="btn-blue btn-medium btn-link btn-radius" href="/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
+ <a class="btn-blue btn-medium btn-link btn-radius" href="{{AppRootSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
<div class="admin-table">
<table class="table table-striped">
<thead>
@@ -32,21 +32,21 @@
{{range .Users}}
<tr>
<td>{{.Id}}</td>
- <td><a href="/user/{{.Name}}">{{.Name}}</a></td>
+ <td><a href="{{AppRootSubUrl}}/user/{{.Name}}">{{.Name}}</a></td>
<td>{{.Email}}</td>
<td><i class="fa fa{{if .IsActive}}-check{{end}}-square-o"></i></td>
<td><i class="fa fa{{if .IsAdmin}}-check{{end}}-square-o"></i></td>
<td>{{.NumRepos}}</td>
<td>{{DateFormat .Created "M d, Y"}}</td>
- <td><a href="/admin/users/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
+ <td><a href="{{AppRootSubUrl}}/admin/users/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
</tr>
{{end}}
</tbody>
</table>
{{if or .LastPageNum .NextPageNum}}
<ul class="pagination">
- {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="/admin/users?p={{.LastPageNum}}">&laquo; Prev.</a></li>{{end}}
- {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="/admin/users?p={{.NextPageNum}}">&raquo; Next</a></li>{{end}}
+ {{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppRootSubUrl}}/admin/users?p={{.LastPageNum}}">&laquo; Prev.</a></li>{{end}}
+ {{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{AppRootSubUrl}}/admin/users?p={{.NextPageNum}}">&raquo; Next</a></li>{{end}}
</ul>
{{end}}
</div>
diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl
index 0c4ad603ac..db842c6877 100644
--- a/templates/admin/user/new.tmpl
+++ b/templates/admin/user/new.tmpl
@@ -12,7 +12,7 @@
<div class="panel-header">
<strong>{{.i18n.Tr "admin.users.new_account"}}</strong>
</div>
- <form class="form form-align panel-body" id="repo-setting-form" action="/admin/users/new" method="post">
+ <form class="form form-align panel-body" id="repo-setting-form" action="{{AppRootSubUrl}}/admin/users/new" method="post">
{{.CsrfTokenHtml}}
<div class="field">
<label class="req">{{.i18n.Tr "admin.users.auth_source"}}</label>