summaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
authorAdam Strzelecki <ono@java.pl>2015-12-07 23:30:52 +0100
committerAdam Strzelecki <ono@java.pl>2015-12-08 00:57:46 +0100
commitda2585c11e11023ffa7a8c69d21c6fecac520a8e (patch)
tree1c2a575dfc00e0e78f47c497a6d9347b3edeca9a /templates/admin
parentdd8a06a397e26c46639eba1313102560dfa49c95 (diff)
downloadgitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.tar.gz
gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.zip
Indent all templates with tabs
This commit improves templates readability, since all of them use consistent indent with all template command blocks indented too. 1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks such as {{if}} {{with}} 2. Cleans all trailing white-space 3. Adds trailing last line-break to each file
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/auth/edit.tmpl304
-rw-r--r--templates/admin/auth/list.tmpl82
-rw-r--r--templates/admin/auth/new.tmpl296
-rw-r--r--templates/admin/config.tmpl374
-rw-r--r--templates/admin/dashboard.tmpl234
-rw-r--r--templates/admin/monitor.tmpl122
-rw-r--r--templates/admin/nav.tmpl28
-rw-r--r--templates/admin/navbar.tmpl50
-rw-r--r--templates/admin/notice.tmpl192
-rw-r--r--templates/admin/org/list.tmpl106
-rw-r--r--templates/admin/repo/list.tmpl94
-rw-r--r--templates/admin/user/edit.tmpl188
-rw-r--r--templates/admin/user/list.tmpl132
-rw-r--r--templates/admin/user/new.tmpl122
14 files changed, 1162 insertions, 1162 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl
index e1d1d7660a..5c99af3a38 100644
--- a/templates/admin/auth/edit.tmpl
+++ b/templates/admin/auth/edit.tmpl
@@ -1,164 +1,164 @@
{{template "base/head" .}}
<div class="admin edit authentication">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.auths.edit"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <input type="hidden" name="id" value="{{.Source.ID}}">
- <div class="inline field">
- <label>{{$.i18n.Tr "admin.auths.auth_type"}}</label>
- <input type="hidden" name="type" value="{{.Source.Type}}">
- <span>{{.Source.TypeName}}</span>
- </div>
- <div class="required inline field {{if .Err_Name}}error{{end}}">
- <label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
- <input id="name" name="name" value="{{.Source.Name}}" autofocus required>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.auths.edit"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="id" value="{{.Source.ID}}">
+ <div class="inline field">
+ <label>{{$.i18n.Tr "admin.auths.auth_type"}}</label>
+ <input type="hidden" name="type" value="{{.Source.Type}}">
+ <span>{{.Source.TypeName}}</span>
+ </div>
+ <div class="required inline field {{if .Err_Name}}error{{end}}">
+ <label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
+ <input id="name" name="name" value="{{.Source.Name}}" autofocus required>
+ </div>
- <!-- LDAP and DLDAP -->
- {{if or .Source.IsLDAP .Source.IsDLDAP}}
- {{ $cfg:=.Source.LDAP }}
- <div class="required field">
- <label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
- <input id="host" name="host" value="{{$cfg.Host}}" placeholder="e.g. mydomain.com" required>
- </div>
- <div class="required field">
- <label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
- <input id="port" name="port" value="{{$cfg.Port}}" placeholder="e.g. 636" required>
- </div>
- {{if .Source.IsLDAP}}
- <div class="required field">
- <label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
- <input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com" required>
- </div>
- <input class="fake" type="password">
- <div class="required field">
- <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
- <input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}" required>
- <p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
- </div>
- <div class="required field">
- <label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
- <input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" required>
- </div>
- {{end}}
- {{if .Source.IsDLDAP}}
- <div class="required field">
- <label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
- <input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required>
- </div>
- {{end}}
- <div class="required field">
- <label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
- <input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))" required>
- </div>
- <div class="field">
- <label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
- <input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}">
- </div>
- <div class="field">
- <label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
- <input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
- </div>
- <div class="field">
- <label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
- <input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}">
- </div>
- <div class="field">
- <label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
- <input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}">
- </div>
- <div class="required field">
- <label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
- <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required>
- </div>
- {{end}}
+ <!-- LDAP and DLDAP -->
+ {{if or .Source.IsLDAP .Source.IsDLDAP}}
+ {{ $cfg:=.Source.LDAP }}
+ <div class="required field">
+ <label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
+ <input id="host" name="host" value="{{$cfg.Host}}" placeholder="e.g. mydomain.com" required>
+ </div>
+ <div class="required field">
+ <label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
+ <input id="port" name="port" value="{{$cfg.Port}}" placeholder="e.g. 636" required>
+ </div>
+ {{if .Source.IsLDAP}}
+ <div class="required field">
+ <label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
+ <input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com" required>
+ </div>
+ <input class="fake" type="password">
+ <div class="required field">
+ <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
+ <input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}" required>
+ <p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
+ </div>
+ <div class="required field">
+ <label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
+ <input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" required>
+ </div>
+ {{end}}
+ {{if .Source.IsDLDAP}}
+ <div class="required field">
+ <label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
+ <input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required>
+ </div>
+ {{end}}
+ <div class="required field">
+ <label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
+ <input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))" required>
+ </div>
+ <div class="field">
+ <label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
+ <input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}">
+ </div>
+ <div class="field">
+ <label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
+ <input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
+ </div>
+ <div class="field">
+ <label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
+ <input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}">
+ </div>
+ <div class="field">
+ <label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
+ <input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}">
+ </div>
+ <div class="required field">
+ <label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
+ <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required>
+ </div>
+ {{end}}
- <!-- SMTP -->
- {{if .Source.IsSMTP}}
- {{ $cfg:=.Source.SMTP }}
- <div class="inline required field">
- <label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required>
- <div class="text">{{$cfg.Auth}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range .SMTPAuths}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="required field">
- <label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
- <input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required>
- </div>
- <div class="required field">
- <label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
- <input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required>
- </div>
- <div class="field">
- <label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
- <input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}">
- <p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
- </div>
- {{end}}
+ <!-- SMTP -->
+ {{if .Source.IsSMTP}}
+ {{ $cfg:=.Source.SMTP }}
+ <div class="inline required field">
+ <label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
+ <div class="ui selection type dropdown">
+ <input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required>
+ <div class="text">{{$cfg.Auth}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range .SMTPAuths}}
+ <div class="item" data-value="{{.}}">{{.}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ <div class="required field">
+ <label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
+ <input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required>
+ </div>
+ <div class="required field">
+ <label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
+ <input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required>
+ </div>
+ <div class="field">
+ <label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
+ <input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}">
+ <p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
+ </div>
+ {{end}}
- <!-- PAM -->
- {{if .Source.IsPAM}}
- {{ $cfg:=.Source.PAM }}
- <div class="required field">
- <label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
- <input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
- </div>
- {{end}}
+ <!-- PAM -->
+ {{if .Source.IsPAM}}
+ {{ $cfg:=.Source.PAM }}
+ <div class="required field">
+ <label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
+ <input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
+ </div>
+ {{end}}
- <div class="inline field {{if not (or (or .Source.IsLDAP .Source.IsDLDAP) .Source.IsSMTP)}}hide{{end}}">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
- <input name="tls" type="checkbox" {{if .Source.UseTLS}}checked{{end}}>
- </div>
- </div>
- <div class="inline field {{if not (or (or .Source.IsLDAP .Source.IsDLDAP) .Source.IsSMTP)}}hide{{end}}">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
- <input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
- </div>
- </div>
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
- <input name="is_active" type="checkbox" {{if .Source.IsActived}}checked{{end}}>
- </div>
- </div>
+ <div class="inline field {{if not (or (or .Source.IsLDAP .Source.IsDLDAP) .Source.IsSMTP)}}hide{{end}}">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
+ <input name="tls" type="checkbox" {{if .Source.UseTLS}}checked{{end}}>
+ </div>
+ </div>
+ <div class="inline field {{if not (or (or .Source.IsLDAP .Source.IsDLDAP) .Source.IsSMTP)}}hide{{end}}">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
+ <input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
+ <input name="is_active" type="checkbox" {{if .Source.IsActived}}checked{{end}}>
+ </div>
+ </div>
- <div class="field">
- <button class="ui green button">{{.i18n.Tr "admin.auths.update"}}</button>
- <div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.i18n.Tr "admin.auths.delete"}}</div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
+ <div class="field">
+ <button class="ui green button">{{.i18n.Tr "admin.auths.update"}}</button>
+ <div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.i18n.Tr "admin.auths.delete"}}</div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "admin.auths.delete_auth_title"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "admin.auths.delete_auth_desc"}}</p>
- </div>
- {{template "base/delete_modal_actions" .}}
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "admin.auths.delete_auth_title"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "admin.auths.delete_auth_desc"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
</div>
{{template "base/footer" .}}
diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl
index 72e32c6f2b..58bdc66b2c 100644
--- a/templates/admin/auth/list.tmpl
+++ b/templates/admin/auth/list.tmpl
@@ -1,46 +1,46 @@
{{template "base/head" .}}
<div class="admin authentication">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
- <div class="ui right">
- <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
- </div>
- </h4>
- <div class="ui attached table segment">
- <table class="ui very basic striped table">
- <thead>
- <tr>
- <th>ID</th>
- <th>{{.i18n.Tr "admin.auths.name"}}</th>
- <th>{{.i18n.Tr "admin.auths.type"}}</th>
- <th>{{.i18n.Tr "admin.auths.enabled"}}</th>
- <th>{{.i18n.Tr "admin.auths.updated"}}</th>
- <th>{{.i18n.Tr "admin.users.created"}}</th>
- <th>{{.i18n.Tr "admin.users.edit"}}</th>
- </tr>
- </thead>
- <tbody>
- {{range .Sources}}
- <tr>
- <td>{{.ID}}</td>
- <td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
- <td>{{.TypeName}}</td>
- <td><i class="fa fa{{if .IsActived}}-check{{end}}-square-o"></i></td>
- <td><span class="poping up" data-content="{{DateFmtLong .Updated}}" data-variation="tiny">{{DateFmtShort .Updated}}</span></td>
- <td><span class="poping up" data-content="{{DateFmtLong .Created}}" data-variation="tiny">{{DateFmtShort .Created}}</span></td>
- <td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
- </tr>
- {{end}}
- </tbody>
- </table>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
+ <div class="ui right">
+ <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
+ </div>
+ </h4>
+ <div class="ui attached table segment">
+ <table class="ui very basic striped table">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>{{.i18n.Tr "admin.auths.name"}}</th>
+ <th>{{.i18n.Tr "admin.auths.type"}}</th>
+ <th>{{.i18n.Tr "admin.auths.enabled"}}</th>
+ <th>{{.i18n.Tr "admin.auths.updated"}}</th>
+ <th>{{.i18n.Tr "admin.users.created"}}</th>
+ <th>{{.i18n.Tr "admin.users.edit"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range .Sources}}
+ <tr>
+ <td>{{.ID}}</td>
+ <td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
+ <td>{{.TypeName}}</td>
+ <td><i class="fa fa{{if .IsActived}}-check{{end}}-square-o"></i></td>
+ <td><span class="poping up" data-content="{{DateFmtLong .Updated}}" data-variation="tiny">{{DateFmtShort .Updated}}</span></td>
+ <td><span class="poping up" data-content="{{DateFmtLong .Created}}" data-variation="tiny">{{DateFmtShort .Created}}</span></td>
+ <td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
</div>
</div>
- </div>
- </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl
index 448a4ab64a..481d0c6829 100644
--- a/templates/admin/auth/new.tmpl
+++ b/templates/admin/auth/new.tmpl
@@ -1,159 +1,159 @@
{{template "base/head" .}}
<div class="admin new authentication">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.auths.new"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <!-- Types and name -->
- <div class="inline required field {{if .Err_Type}}error{{end}}">
- <label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="auth_type" name="type" value="{{.type}}">
- <div class="text">{{.CurTypeName}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range .AuthSources}}
- <div class="item" data-value="{{.Type}}">{{.Name}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="required inline field {{if .Err_Name}}error{{end}}">
- <label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
- <input id="name" name="name" value="{{.name}}" autofocus required>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.auths.new"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <!-- Types and name -->
+ <div class="inline required field {{if .Err_Type}}error{{end}}">
+ <label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
+ <div class="ui selection type dropdown">
+ <input type="hidden" id="auth_type" name="type" value="{{.type}}">
+ <div class="text">{{.CurTypeName}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range .AuthSources}}
+ <div class="item" data-value="{{.Type}}">{{.Name}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ <div class="required inline field {{if .Err_Name}}error{{end}}">
+ <label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
+ <input id="name" name="name" value="{{.name}}" autofocus required>
+ </div>
- <!-- LDAP and DLDAP -->
- <div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}">
- <div class="required field">
- <label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
- <input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com">
- </div>
- <div class="required field">
- <label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
- <input id="port" name="port" value="{{.port}}" placeholder="e.g. 636">
- </div>
- <div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
- <label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
- <input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com">
- </div>
- <input class="fake" type="password">
- <div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
- <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
- <input id="bind_password" name="bind_password" type="password" value="{{.bind_password}}">
- <p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
- </div>
- <div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
- <label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
- <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com">
- </div>
- <div class="dldap required field {{if not (eq .type 5)}}hide{{end}}">
- <label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
- <input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com">
- </div>
- <div class="required field">
- <label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
- <input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))">
- </div>
- <div class="field">
- <label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
- <input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
- </div>
- <div class="field">
- <label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
- <input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
- </div>
- <div class="field">
- <label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
- <input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
- </div>
- <div class="field">
- <label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
- <input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
- </div>
- <div class="required field">
- <label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
- <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail">
- </div>
- </div>
+ <!-- LDAP and DLDAP -->
+ <div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}">
+ <div class="required field">
+ <label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
+ <input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com">
+ </div>
+ <div class="required field">
+ <label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
+ <input id="port" name="port" value="{{.port}}" placeholder="e.g. 636">
+ </div>
+ <div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
+ <label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
+ <input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com">
+ </div>
+ <input class="fake" type="password">
+ <div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
+ <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
+ <input id="bind_password" name="bind_password" type="password" value="{{.bind_password}}">
+ <p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
+ </div>
+ <div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
+ <label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
+ <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com">
+ </div>
+ <div class="dldap required field {{if not (eq .type 5)}}hide{{end}}">
+ <label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
+ <input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com">
+ </div>
+ <div class="required field">
+ <label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
+ <input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))">
+ </div>
+ <div class="field">
+ <label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
+ <input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
+ </div>
+ <div class="field">
+ <label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
+ <input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
+ </div>
+ <div class="field">
+ <label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
+ <input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
+ </div>
+ <div class="field">
+ <label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
+ <input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
+ </div>
+ <div class="required field">
+ <label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
+ <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail">
+ </div>
+ </div>
- <!-- SMTP -->
- <div class="smtp field {{if not (eq .type 3)}}hide{{end}}">
- <div class="inline required field">
- <label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}">
- <div class="text">{{.smtp_auth}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range .SMTPAuths}}
- <div class="item" data-value="{{.}}">{{.}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="required field">
- <label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
- <input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
- </div>
- <div class="required field">
- <label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
- <input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
- </div>
- <div class="field">
- <label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
- <input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}">
- <p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
- </div>
- </div>
+ <!-- SMTP -->
+ <div class="smtp field {{if not (eq .type 3)}}hide{{end}}">
+ <div class="inline required field">
+ <label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
+ <div class="ui selection type dropdown">
+ <input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}">
+ <div class="text">{{.smtp_auth}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range .SMTPAuths}}
+ <div class="item" data-value="{{.}}">{{.}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ <div class="required field">
+ <label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
+ <input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
+ </div>
+ <div class="required field">
+ <label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
+ <input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
+ </div>
+ <div class="field">
+ <label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
+ <input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}">
+ <p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
+ </div>
+ </div>
- <!-- PAM -->
- <div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
- <label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
- <input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
- </div>
+ <!-- PAM -->
+ <div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
+ <label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
+ <input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
+ </div>
- <div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
- <input name="tls" type="checkbox" {{if .tls}}checked{{end}}>
- </div>
- </div>
- <div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
- <input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
- </div>
- </div>
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
- <input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
- </div>
- </div>
+ <div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
+ <input name="tls" type="checkbox" {{if .tls}}checked{{end}}>
+ </div>
+ </div>
+ <div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
+ <input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
+ <input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
+ </div>
+ </div>
- <div class="field">
- <button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
- </div>
- </form>
- </div>
+ <div class="field">
+ <button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
+ </div>
+ </form>
+ </div>
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.auths.tips"}}
- </h4>
- <div class="ui attached segment">
- <h5>GMail Setting:</h5>
- <p>Host: smtp.gmail.com, Post: 587, Enable TLS Encryption: true</p>
- </div>
- </div>
- </div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.auths.tips"}}
+ </h4>
+ <div class="ui attached segment">
+ <h5>GMail Setting:</h5>
+ <p>Host: smtp.gmail.com, Post: 587, Enable TLS Encryption: true</p>
+ </div>
+ </div>
+ </div>
</div>
</div>
{{template "base/footer" .}}
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl
index 1a4efa8f1c..0738f18b0c 100644
--- a/templates/admin/config.tmpl
+++ b/templates/admin/config.tmpl
@@ -1,190 +1,190 @@
{{template "base/head" .}}
<div class="admin monitor">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.server_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
- <dd>{{AppName}}</dd>
- <dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
- <dd>{{AppVer}}</dd>
- <dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
- <dd>{{.AppUrl}}</dd>
- <dt>{{.i18n.Tr "admin.config.domain"}}</dt>
- <dd>{{.Domain}}</dd>
- <dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
- <dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
- <dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
- <dd>{{.RunUser}}</dd>
- <dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
- <dd>{{.RunMode}}</dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
- <dd>{{.RepoRootPath}}</dd>
- <dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
- <dd>{{.StaticRootPath}}</dd>
- <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
- <dd>{{.LogRootPath}}</dd>
- <dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
- <dd>{{.ScriptType}}</dd>
- <dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
- <dd>{{.ReverseProxyAuthUser}}</dd>
- </dl>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.db_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
- <dd>{{.DbCfg.Type}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
- <dd>{{.DbCfg.Host}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
- <dd>{{.DbCfg.Name}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
- <dd>{{.DbCfg.User}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
- <dd>{{.DbCfg.SSLMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
- <dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
- </dl>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.service_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
- <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
- <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
- <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
- <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.enable_cache_avatar"}}</dt>
- <dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
- <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
- <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
- <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
- <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
- <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
- <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
- </dl>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.webhook_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
- <dd>{{.Webhook.QueueLength}}</dd>
- <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
- <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
- <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
- </dl>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.mailer_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
- <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
- {{if .MailerEnabled}}<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
- <dd>{{.Mailer.Name}}</dd>
- <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
- <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
- <dd>{{.Mailer.Host}}</dd>
- <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
- <dd>{{.Mailer.User}}</dd>{{end}}
- </dl>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.cache_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
- <dd>{{.CacheAdapter}}</dd>
- <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
- <dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
- <dd><pre>{{.CacheConn}}</pre></dd>
- </dl>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.session_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
- <dd>{{.SessionConfig.Provider}}</dd>
- <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
- <dd><pre>{{.SessionConfig.ProviderConfig}}</pre></dd>
- <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
- <dd>{{.SessionConfig.CookieName}}</dd>
- <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
- <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
- <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
- <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
- <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- </dl>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.picture_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.picture_service"}}</dt>
- <dd>{{.PictureService}}</dd>
- <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
- <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
- </dl>
- </div>
-
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.log_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- {{range .Loggers}}
- <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
- <dd>{{.Mode}}</dd>
- <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
- <dd><pre>{{.Config}}</pre></dd>
- {{end}}
- </dl>
- </div>
- </div>
- </div>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.server_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
+ <dd>{{AppName}}</dd>
+ <dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
+ <dd>{{AppVer}}</dd>
+ <dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
+ <dd>{{.AppUrl}}</dd>
+ <dt>{{.i18n.Tr "admin.config.domain"}}</dt>
+ <dd>{{.Domain}}</dd>
+ <dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
+ <dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
+ <dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
+ <dd>{{.RunUser}}</dd>
+ <dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
+ <dd>{{.RunMode}}</dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
+ <dd>{{.RepoRootPath}}</dd>
+ <dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
+ <dd>{{.StaticRootPath}}</dd>
+ <dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
+ <dd>{{.LogRootPath}}</dd>
+ <dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
+ <dd>{{.ScriptType}}</dd>
+ <dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
+ <dd>{{.ReverseProxyAuthUser}}</dd>
+ </dl>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.db_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
+ <dd>{{.DbCfg.Type}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
+ <dd>{{.DbCfg.Host}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
+ <dd>{{.DbCfg.Name}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
+ <dd>{{.DbCfg.User}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
+ <dd>{{.DbCfg.SSLMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
+ <dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
+ </dl>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.service_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
+ <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
+ <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
+ <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
+ <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.enable_cache_avatar"}}</dt>
+ <dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
+ <dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
+ <dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
+ <dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
+ <dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
+ <dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
+ </dl>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.webhook_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
+ <dd>{{.Webhook.QueueLength}}</dd>
+ <dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
+ <dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
+ <dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
+ </dl>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.mailer_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
+ <dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
+ {{if .MailerEnabled}}<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
+ <dd>{{.Mailer.Name}}</dd>
+ <dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
+ <dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
+ <dd>{{.Mailer.Host}}</dd>
+ <dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
+ <dd>{{.Mailer.User}}</dd>{{end}}
+ </dl>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.cache_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
+ <dd>{{.CacheAdapter}}</dd>
+ <dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
+ <dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
+ <dd><pre>{{.CacheConn}}</pre></dd>
+ </dl>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.session_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
+ <dd>{{.SessionConfig.Provider}}</dd>
+ <dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
+ <dd><pre>{{.SessionConfig.ProviderConfig}}</pre></dd>
+ <dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
+ <dd>{{.SessionConfig.CookieName}}</dd>
+ <dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
+ <dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
+ <dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
+ <dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
+ <dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ </dl>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.picture_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.picture_service"}}</dt>
+ <dd>{{.PictureService}}</dd>
+ <dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
+ <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
+ </dl>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.log_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ {{range .Loggers}}
+ <dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
+ <dd>{{.Mode}}</dd>
+ <dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
+ <dd><pre>{{.Config}}</pre></dd>
+ {{end}}
+ </dl>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index 769375ecb8..8a0eedc21c 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -1,121 +1,121 @@
{{template "base/head" .}}
<div class="admin dashboard">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.dashboard.statistic"}}
- </h4>
- <div class="ui attached segment">
- <p>
- {{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}
- </p>
- </div>
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.dashboard.operations"}}
- </h4>
- <div class="ui attached table segment">
- <table class="ui very basic table">
- <tbody>
- <tr>
- <td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
- </tr>
- <tr>
- <td>{{.i18n.Tr "admin.dashboard.delete_repo_archives"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
- </tr>
- <tr>
- <td>{{.i18n.Tr "admin.dashboard.delete_missing_repos"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
- </tr>
- <tr>
- <td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
- </tr>
- <tr>
- <td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
- </tr>
- <tr>
- <td>{{.i18n.Tr "admin.dashboard.resync_all_update_hooks"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=6">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
- </tr>
- </tbody>
- </table>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.dashboard.statistic"}}
+ </h4>
+ <div class="ui attached segment">
+ <p>
+ {{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}
+ </p>
+ </div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.dashboard.operations"}}
+ </h4>
+ <div class="ui attached table segment">
+ <table class="ui very basic table">
+ <tbody>
+ <tr>
+ <td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ </tr>
+ <tr>
+ <td>{{.i18n.Tr "admin.dashboard.delete_repo_archives"}}</td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ </tr>
+ <tr>
+ <td>{{.i18n.Tr "admin.dashboard.delete_missing_repos"}}</td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ </tr>
+ <tr>
+ <td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ </tr>
+ <tr>
+ <td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ </tr>
+ <tr>
+ <td>{{.i18n.Tr "admin.dashboard.resync_all_update_hooks"}}</td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=6">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.dashboard.system_status"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
- <dd>{{.SysStatus.Uptime}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
- <dd>{{.SysStatus.NumGoroutine}}</dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
- <dd>{{.SysStatus.MemAllocated}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
- <dd>{{.SysStatus.MemTotal}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
- <dd>{{.SysStatus.MemSys}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
- <dd>{{.SysStatus.Lookups}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
- <dd>{{.SysStatus.MemMallocs}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
- <dd>{{.SysStatus.MemFrees}}</dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
- <dd>{{.SysStatus.HeapAlloc}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
- <dd>{{.SysStatus.HeapSys}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
- <dd>{{.SysStatus.HeapIdle}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
- <dd>{{.SysStatus.HeapInuse}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
- <dd>{{.SysStatus.HeapReleased}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
- <dd>{{.SysStatus.HeapObjects}}</dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
- <dd>{{.SysStatus.StackInuse}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
- <dd>{{.SysStatus.StackSys}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
- <dd>{{.SysStatus.MSpanInuse}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
- <dd>{{.SysStatus.HeapSys}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
- <dd>{{.SysStatus.MCacheInuse}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
- <dd>{{.SysStatus.MCacheSys}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
- <dd>{{.SysStatus.BuckHashSys}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
- <dd>{{.SysStatus.GCSys}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
- <dd>{{.SysStatus.OtherSys}}</dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
- <dd>{{.SysStatus.NextGC}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
- <dd>{{.SysStatus.LastGC}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
- <dd>{{.SysStatus.PauseTotalNs}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
- <dd>{{.SysStatus.PauseNs}}</dd>
- <dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
- <dd>{{.SysStatus.NumGC}}</dd>
- </dl>
- </div>
- </div>
- </div>
- </div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.dashboard.system_status"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
+ <dd>{{.SysStatus.Uptime}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
+ <dd>{{.SysStatus.NumGoroutine}}</dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
+ <dd>{{.SysStatus.MemAllocated}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
+ <dd>{{.SysStatus.MemTotal}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
+ <dd>{{.SysStatus.MemSys}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
+ <dd>{{.SysStatus.Lookups}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
+ <dd>{{.SysStatus.MemMallocs}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
+ <dd>{{.SysStatus.MemFrees}}</dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
+ <dd>{{.SysStatus.HeapAlloc}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
+ <dd>{{.SysStatus.HeapSys}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
+ <dd>{{.SysStatus.HeapIdle}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
+ <dd>{{.SysStatus.HeapInuse}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
+ <dd>{{.SysStatus.HeapReleased}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
+ <dd>{{.SysStatus.HeapObjects}}</dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
+ <dd>{{.SysStatus.StackInuse}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
+ <dd>{{.SysStatus.StackSys}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
+ <dd>{{.SysStatus.MSpanInuse}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
+ <dd>{{.SysStatus.HeapSys}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
+ <dd>{{.SysStatus.MCacheInuse}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
+ <dd>{{.SysStatus.MCacheSys}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
+ <dd>{{.SysStatus.BuckHashSys}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
+ <dd>{{.SysStatus.GCSys}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
+ <dd>{{.SysStatus.OtherSys}}</dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
+ <dd>{{.SysStatus.NextGC}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
+ <dd>{{.SysStatus.LastGC}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
+ <dd>{{.SysStatus.PauseTotalNs}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
+ <dd>{{.SysStatus.PauseNs}}</dd>
+ <dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
+ <dd>{{.SysStatus.NumGC}}</dd>
+ </dl>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl
index 8092082563..fa87078cc3 100644
--- a/templates/admin/monitor.tmpl
+++ b/templates/admin/monitor.tmpl
@@ -1,65 +1,65 @@
{{template "base/head" .}}
<div class="admin monitor">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.monitor.cron"}}
- </h4>
- <div class="ui attached table segment">
- <table class="ui very basic striped table">
- <thead>
- <tr>
- <th>{{.i18n.Tr "admin.monitor.name"}}</th>
- <th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
- <th>{{.i18n.Tr "admin.monitor.next"}}</th>
- <th>{{.i18n.Tr "admin.monitor.previous"}}</th>
- <th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
- </tr>
- </thead>
- <tbody>
- {{range .Entries}}
- <tr>
- <td>{{.Description}}</td>
- <td>{{.Spec}}</td>
- <td>{{DateFmtLong .Next}}</td>
- <td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
- <td>{{.ExecTimes}}</td>
- </tr>
- {{end}}
- </tbody>
- </table>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.monitor.cron"}}
+ </h4>
+ <div class="ui attached table segment">
+ <table class="ui very basic striped table">
+ <thead>
+ <tr>
+ <th>{{.i18n.Tr "admin.monitor.name"}}</th>
+ <th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
+ <th>{{.i18n.Tr "admin.monitor.next"}}</th>
+ <th>{{.i18n.Tr "admin.monitor.previous"}}</th>
+ <th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range .Entries}}
+ <tr>
+ <td>{{.Description}}</td>
+ <td>{{.Spec}}</td>
+ <td>{{DateFmtLong .Next}}</td>
+ <td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
+ <td>{{.ExecTimes}}</td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
+ </div>
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.monitor.process"}}
- </h4>
- <div class="ui attached table segment">
- <table class="ui very basic striped table">
- <thead>
- <tr>
- <th>Pid</th>
- <th>{{.i18n.Tr "admin.monitor.desc"}}</th>
- <th>{{.i18n.Tr "admin.monitor.start"}}</th>
- <th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
- </tr>
- </thead>
- <tbody>
- {{range .Processes}}
- <tr>
- <td>{{.Pid}}</td>
- <td>{{.Description}}</td>
- <td>{{DateFmtLong .Start}}</td>
- <td>{{TimeSince .Start $.Lang}}</td>
- </tr>
- {{end}}
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.monitor.process"}}
+ </h4>
+ <div class="ui attached table segment">
+ <table class="ui very basic striped table">
+ <thead>
+ <tr>
+ <th>Pid</th>
+ <th>{{.i18n.Tr "admin.monitor.desc"}}</th>
+ <th>{{.i18n.Tr "admin.monitor.start"}}</th>
+ <th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range .Processes}}
+ <tr>
+ <td>{{.Pid}}</td>
+ <td>{{.Description}}</td>
+ <td>{{DateFmtLong .Start}}</td>
+ <td>{{TimeSince .Start $.Lang}}</td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl
index 49c4b72cf0..7129ee11ed 100644
--- a/templates/admin/nav.tmpl
+++ b/templates/admin/nav.tmpl
@@ -1,15 +1,15 @@
<div id="setting-menu" class="grid-1-5 panel panel-radius left">
- <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="{{AppSubUrl}}/admin">{{.i18n.Tr "admin.dashboard"}}</a></li>
- <li {{if .PageIsAdminUsers}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/users">{{.i18n.Tr "admin.users"}}</a></li>
- <li {{if .PageIsAdminOrganizations}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/orgs">{{.i18n.Tr "admin.organizations"}}</a></li>
- <li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li>
- <li {{if .PageIsAdminAuthentications}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li>
- <li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/config">{{.i18n.Tr "admin.config"}}</a></li>
- <li {{if .PageIsAdminNotices}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/notices">{{.i18n.Tr "admin.notices"}}</a></li>
- <li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li>
- </ul>
- </div>
-</div> \ No newline at end of file
+ <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="{{AppSubUrl}}/admin">{{.i18n.Tr "admin.dashboard"}}</a></li>
+ <li {{if .PageIsAdminUsers}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/users">{{.i18n.Tr "admin.users"}}</a></li>
+ <li {{if .PageIsAdminOrganizations}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/orgs">{{.i18n.Tr "admin.organizations"}}</a></li>
+ <li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li>
+ <li {{if .PageIsAdminAuthentications}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li>
+ <li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/config">{{.i18n.Tr "admin.config"}}</a></li>
+ <li {{if .PageIsAdminNotices}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/notices">{{.i18n.Tr "admin.notices"}}</a></li>
+ <li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li>
+ </ul>
+ </div>
+</div>
diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl
index e85fa24fbf..9fa1721e46 100644
--- a/templates/admin/navbar.tmpl
+++ b/templates/admin/navbar.tmpl
@@ -1,29 +1,29 @@
<div class="four wide column">
<div class="ui vertical menu">
<div class="header item">{{.i18n.Tr "admin_panel"}}</div>
- <a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
- {{.i18n.Tr "admin.dashboard"}}
- </a>
- <a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
- {{.i18n.Tr "admin.users"}}
- </a>
- <a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
- {{.i18n.Tr "admin.organizations"}}
- </a>
- <a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
- {{.i18n.Tr "admin.repositories"}}
- </a>
- <a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
- {{.i18n.Tr "admin.authentication"}}
- </a>
- <a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
- {{.i18n.Tr "admin.config"}}
- </a>
- <a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
- {{.i18n.Tr "admin.notices"}}
- </a>
- <a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
- {{.i18n.Tr "admin.monitor"}}
- </a>
+ <a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
+ {{.i18n.Tr "admin.dashboard"}}
+ </a>
+ <a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
+ {{.i18n.Tr "admin.users"}}
+ </a>
+ <a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
+ {{.i18n.Tr "admin.organizations"}}
+ </a>
+ <a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
+ {{.i18n.Tr "admin.repositories"}}
+ </a>
+ <a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
+ {{.i18n.Tr "admin.authentication"}}
+ </a>
+ <a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
+ {{.i18n.Tr "admin.config"}}
+ </a>
+ <a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
+ {{.i18n.Tr "admin.notices"}}
+ </a>
+ <a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
+ {{.i18n.Tr "admin.monitor"}}
+ </a>
</div>
-</div> \ No newline at end of file
+</div>
diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl
index 3321dd1469..0af7713d30 100644
--- a/templates/admin/notice.tmpl
+++ b/templates/admin/notice.tmpl
@@ -1,104 +1,104 @@
{{template "base/head" .}}
<div class="admin notice">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
- </h4>
- <div class="ui attached table segment">
- <table class="ui very basic select selectable table">
- <thead>
- <tr>
- <th></th>
- <th>ID</th>
- <th>{{.i18n.Tr "admin.notices.type"}}</th>
- <th>{{.i18n.Tr "admin.notices.desc"}}</th>
- <th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
- <th>{{.i18n.Tr "admin.notices.op"}}</th>
- </tr>
- </thead>
- <tbody>
- {{range .Notices}}
- <tr>
- <td class="collapsing">
- <div class="ui fitted checkbox" data-id="{{.ID}}">
- <input type="checkbox"> <label></label>
- </div>
- </td>
- <td>{{.ID}}</td>
- <td>{{$.i18n.Tr .TrStr}}</td>
- <td>{{SubStr .Description 0 120}}...</td>
- <td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
- <td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
- </tr>
- {{end}}
- </tbody>
- <tfoot class="full-width">
- <tr>
- <th></th>
- <th colspan="5">
- <div class="ui right">
- <a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
- </div>
- <div class="ui floating upward dropdown small button">
- <span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>
- <div class="menu">
- <div class="item select action" data-action="select-all">
- {{.i18n.Tr "admin.notices.select_all"}}
- </div>
- <div class="item select action" data-action="deselect-all">
- {{.i18n.Tr "admin.notices.deselect_all"}}
- </div>
- <div class="item select action" data-action="inverse">
- {{.i18n.Tr "admin.notices.inverse_selection"}}
- </div>
- </div>
- </div>
- <div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
- {{.i18n.Tr "admin.notices.delete_selected"}}
- </div>
- </th>
- </tr>
- </tfoot>
- </table>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
+ </h4>
+ <div class="ui attached table segment">
+ <table class="ui very basic select selectable table">
+ <thead>
+ <tr>
+ <th></th>
+ <th>ID</th>
+ <th>{{.i18n.Tr "admin.notices.type"}}</th>
+ <th>{{.i18n.Tr "admin.notices.desc"}}</th>
+ <th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
+ <th>{{.i18n.Tr "admin.notices.op"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range .Notices}}
+ <tr>
+ <td class="collapsing">
+ <div class="ui fitted checkbox" data-id="{{.ID}}">
+ <input type="checkbox"> <label></label>
+ </div>
+ </td>
+ <td>{{.ID}}</td>
+ <td>{{$.i18n.Tr .TrStr}}</td>
+ <td>{{SubStr .Description 0 120}}...</td>
+ <td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
+ <td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
+ </tr>
+ {{end}}
+ </tbody>
+ <tfoot class="full-width">
+ <tr>
+ <th></th>
+ <th colspan="5">
+ <div class="ui right">
+ <a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
+ </div>
+ <div class="ui floating upward dropdown small button">
+ <span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>
+ <div class="menu">
+ <div class="item select action" data-action="select-all">
+ {{.i18n.Tr "admin.notices.select_all"}}
+ </div>
+ <div class="item select action" data-action="deselect-all">
+ {{.i18n.Tr "admin.notices.deselect_all"}}
+ </div>
+ <div class="item select action" data-action="inverse">
+ {{.i18n.Tr "admin.notices.inverse_selection"}}
+ </div>
+ </div>
+ </div>
+ <div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
+ {{.i18n.Tr "admin.notices.delete_selected"}}
+ </div>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+ </div>
- {{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="center page buttons">
- <div class="ui borderless pagination menu">
- <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
- <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
- </a>
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
- </a>
- <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
- </div>
- </div>
- {{end}}
- {{end}}
- </div>
- </div>
- </div>
+ {{with .Page}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
+ </a>
+ <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
+ </div>
+ </div>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ </div>
</div>
<div class="ui modal" id="detail-modal">
- <i class="close icon"></i>
- <div class="header">{{$.i18n.Tr "admin.notices.view_detail_header"}}</div>
- <div class="content">
- <p></p>
- </div>
+ <i class="close icon"></i>
+ <div class="header">{{$.i18n.Tr "admin.notices.view_detail_header"}}</div>
+ <div class="content">
+ <p></p>
+ </div>
</div>
{{template "base/footer" .}}
diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl
index bc4610b6d6..890ceed3a2 100644
--- a/templates/admin/org/list.tmpl
+++ b/templates/admin/org/list.tmpl
@@ -1,65 +1,65 @@
{{template "base/head" .}}
<div class="admin user">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
- </h4>
- <div class="ui attached table segment">
- <table class="ui very basic striped table">
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
+ </h4>
+ <div class="ui attached table segment">
+ <table class="ui very basic striped table">
<thead>
- <tr>
- <th>ID</th>
- <th>{{.i18n.Tr "admin.orgs.name"}}</th>
- <th>{{.i18n.Tr "admin.orgs.teams"}}</th>
- <th>{{.i18n.Tr "admin.orgs.members"}}</th>
- <th>{{.i18n.Tr "admin.users.repos"}}</th>
+ <tr>
+ <th>ID</th>
+ <th>{{.i18n.Tr "admin.orgs.name"}}</th>
+ <th>{{.i18n.Tr "admin.orgs.teams"}}</th>
+ <th>{{.i18n.Tr "admin.orgs.members"}}</th>
+ <th>{{.i18n.Tr "admin.users.repos"}}</th>
<th>{{.i18n.Tr "admin.users.created"}}</th>
- </tr>
+ </tr>
</thead>
<tbody>
- {{range .Orgs}}
- <tr>
- <td>{{.Id}}</td>
- <td><a href="{{.HomeLink}}">{{.Name}}</a></td>
- <td>{{.NumTeams}}</td>
- <td>{{.NumMembers}}</td>
- <td>{{.NumRepos}}</td>
- <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
- </tr>
- {{end}}
+ {{range .Orgs}}
+ <tr>
+ <td>{{.Id}}</td>
+ <td><a href="{{.HomeLink}}">{{.Name}}</a></td>
+ <td>{{.NumTeams}}</td>
+ <td>{{.NumMembers}}</td>
+ <td>{{.NumRepos}}</td>
+ <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
+ </tr>
+ {{end}}
</tbody>
- </table>
+ </table>
</div>
{{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="center page buttons">
- <div class="ui borderless pagination menu">
- <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
- <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
- </a>
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
- </a>
- <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
- </div>
- </div>
- {{end}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
+ </a>
+ <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
+ </div>
+ </div>
+ {{end}}
{{end}}
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl
index f8ccecf66c..cbbc91f80e 100644
--- a/templates/admin/repo/list.tmpl
+++ b/templates/admin/repo/list.tmpl
@@ -6,7 +6,7 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
+ {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
</h4>
<div class="ui attached table segment">
<table class="ui very basic striped table">
@@ -20,49 +20,49 @@
<th>{{.i18n.Tr "admin.repos.stars"}}</th>
<th>{{.i18n.Tr "admin.repos.issues"}}</th>
<th>{{.i18n.Tr "admin.users.created"}}</th>
- <th>{{.i18n.Tr "admin.notices.op"}}</th>
+ <th>{{.i18n.Tr "admin.notices.op"}}</th>
</tr>
</thead>
<tbody>
{{range .Repos}}
- <tr>
- <td>{{.ID}}</td>
- <td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
- <td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
- <td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
- <td>{{.NumWatches}}</td>
- <td>{{.NumStars}}</td>
- <td>{{.NumIssues}}</td>
- <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
- <td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}"><i class="trash icon text red"></i></a></td>
- </tr>
+ <tr>
+ <td>{{.ID}}</td>
+ <td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
+ <td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
+ <td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
+ <td>{{.NumWatches}}</td>
+ <td>{{.NumStars}}</td>
+ <td>{{.NumIssues}}</td>
+ <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
+ <td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}"><i class="trash icon text red"></i></a></td>
+ </tr>
{{end}}
</tbody>
</table>
</div>
{{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="center page buttons">
- <div class="ui borderless pagination menu">
- <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
- <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
- </a>
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
- </a>
- <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
- </div>
- </div>
- {{end}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
+ </a>
+ <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
+ </div>
+ </div>
+ {{end}}
{{end}}
</div>
</div>
@@ -70,17 +70,17 @@
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "repo.settings.delete"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
- <p>{{.i18n.Tr "repo.settings.delete_notices_2"}}</p>
- <p>{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}</p>
- <p>{{.i18n.Tr "repo.settings.delete_notices_fork_2"}}</p>
- <p>{{.i18n.Tr "repo.settings.delete_notices_fork_3"}}</p>
- </div>
- {{template "base/delete_modal_actions" .}}
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "repo.settings.delete"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
+ <p>{{.i18n.Tr "repo.settings.delete_notices_2"}}</p>
+ <p>{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}</p>
+ <p>{{.i18n.Tr "repo.settings.delete_notices_fork_2"}}</p>
+ <p>{{.i18n.Tr "repo.settings.delete_notices_fork_3"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl
index 6f30f05c9f..b7f95e36db 100644
--- a/templates/admin/user/edit.tmpl
+++ b/templates/admin/user/edit.tmpl
@@ -1,106 +1,106 @@
{{template "base/head" .}}
<div class="admin edit user">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.users.edit_account"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <div class="inline field {{if .Err_UserName}}error{{end}}">
- <label for="user_name">{{.i18n.Tr "username"}}</label>
- <span>{{.User.Name}}</span>
- </div>
- <!-- Types and name -->
- <div class="inline required field {{if .Err_LoginType}}error{{end}}">
- <label>{{.i18n.Tr "admin.users.auth_source"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="login_type" name="login_type" value="{{.LoginSource.Type}}-{{.LoginSource.ID}}" required>
- <div class="text">{{.i18n.Tr "admin.users.local"}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- <div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
- {{range .Sources}}
- <div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}hide{{end}}">
- <label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
- <input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
- </div>
- <div class="field {{if .Err_FullName}}error{{end}}">
- <label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
- <input id="full_name" name="full_name" value="{{.User.FullName}}">
- </div>
- <div class="required field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "email"}}</label>
- <input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
- </div>
- <input class="fake" type="password">
- <div class="local field {{if .Err_Password}}error{{end}} {{if not (eq .User.LoginSource 0)}}hide{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
- <input id="password" name="password" type="password">
- <p class="help">{{.i18n.Tr "admin.users.password_helper"}}</p>
- </div>
- <div class="field {{if .Err_Website}}error{{end}}">
- <label for="website">{{.i18n.Tr "settings.website"}}</label>
- <input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com">
- </div>
- <div class="field {{if .Err_Location}}error{{end}}">
- <label for="location">{{.i18n.Tr "settings.location"}}</label>
- <input id="location" name="location" value="{{.User.Location}}">
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.users.edit_account"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="inline field {{if .Err_UserName}}error{{end}}">
+ <label for="user_name">{{.i18n.Tr "username"}}</label>
+ <span>{{.User.Name}}</span>
+ </div>
+ <!-- Types and name -->
+ <div class="inline required field {{if .Err_LoginType}}error{{end}}">
+ <label>{{.i18n.Tr "admin.users.auth_source"}}</label>
+ <div class="ui selection type dropdown">
+ <input type="hidden" id="login_type" name="login_type" value="{{.LoginSource.Type}}-{{.LoginSource.ID}}" required>
+ <div class="text">{{.i18n.Tr "admin.users.local"}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ <div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
+ {{range .Sources}}
+ <div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}hide{{end}}">
+ <label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
+ <input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
+ </div>
+ <div class="field {{if .Err_FullName}}error{{end}}">
+ <label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
+ <input id="full_name" name="full_name" value="{{.User.FullName}}">
+ </div>
+ <div class="required field {{if .Err_Email}}error{{end}}">
+ <label for="email">{{.i18n.Tr "email"}}</label>
+ <input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
+ </div>
+ <input class="fake" type="password">
+ <div class="local field {{if .Err_Password}}error{{end}} {{if not (eq .User.LoginSource 0)}}hide{{end}}">
+ <label for="password">{{.i18n.Tr "password"}}</label>
+ <input id="password" name="password" type="password">
+ <p class="help">{{.i18n.Tr "admin.users.password_helper"}}</p>
+ </div>
+ <div class="field {{if .Err_Website}}error{{end}}">
+ <label for="website">{{.i18n.Tr "settings.website"}}</label>
+ <input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com">
+ </div>
+ <div class="field {{if .Err_Location}}error{{end}}">
+ <label for="location">{{.i18n.Tr "settings.location"}}</label>
+ <input id="location" name="location" value="{{.User.Location}}">
+ </div>
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.users.is_activated"}}</strong></label>
- <input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}>
- </div>
- </div>
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.users.is_admin"}}</strong></label>
- <input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}>
- </div>
- </div>
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong></label>
- <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}}>
- </div>
- </div>
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.users.allow_import_local"}}</strong></label>
- <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}}>
- </div>
- </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.users.is_activated"}}</strong></label>
+ <input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.users.is_admin"}}</strong></label>
+ <input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong></label>
+ <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}}>
+ </div>
+ </div>
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.users.allow_import_local"}}</strong></label>
+ <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}}>
+ </div>
+ </div>
- <div class="field">
- <button class="ui green button">{{.i18n.Tr "admin.users.update_profile"}}</button>
- <div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.User.Id}}">{{.i18n.Tr "admin.users.delete_account"}}</div>
- </div>
- </form>
- </div>
+ <div class="field">
+ <button class="ui green button">{{.i18n.Tr "admin.users.update_profile"}}</button>
+ <div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.User.Id}}">{{.i18n.Tr "admin.users.delete_account"}}</div>
+ </div>
+ </form>
+ </div>
</div>
</div>
</div>
</div>
<div class="ui small basic delete modal">
- <div class="ui icon header">
- <i class="trash icon"></i>
- {{.i18n.Tr "settings.delete_account_title"}}
- </div>
- <div class="content">
- <p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
- </div>
- {{template "base/delete_modal_actions" .}}
+ <div class="ui icon header">
+ <i class="trash icon"></i>
+ {{.i18n.Tr "settings.delete_account_title"}}
+ </div>
+ <div class="content">
+ <p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
+ </div>
+ {{template "base/delete_modal_actions" .}}
</div>
{{template "base/footer" .}}
diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl
index 2e23c9ec68..25ef4feac1 100644
--- a/templates/admin/user/list.tmpl
+++ b/templates/admin/user/list.tmpl
@@ -1,72 +1,72 @@
{{template "base/head" .}}
<div class="admin user">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
- <div class="ui right">
- <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
- </div>
- </h4>
- <div class="ui attached table segment">
- <table class="ui very basic striped table">
- <thead>
- <tr>
- <th>ID</th>
- <th>{{.i18n.Tr "admin.users.name"}}</th>
- <th>{{.i18n.Tr "email"}}</th>
- <th>{{.i18n.Tr "admin.users.activated"}}</th>
- <th>{{.i18n.Tr "admin.users.admin"}}</th>
- <th>{{.i18n.Tr "admin.users.repos"}}</th>
- <th>{{.i18n.Tr "admin.users.created"}}</th>
- <th>{{.i18n.Tr "admin.users.edit"}}</th>
- </tr>
- </thead>
- <tbody>
- {{range .Users}}
- <tr>
- <td>{{.Id}}</td>
- <td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
- <td><span class="text truncate email">{{.Email}}</span></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><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created }}</span></td>
- <td><a href="{{AppSubUrl}}/admin/users/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
- </tr>
- {{end}}
- </tbody>
- </table>
- </div>
-
- {{with .Page}}
- {{if gt .TotalPages 1}}
- <div class="center page buttons">
- <div class="ui borderless pagination menu">
- <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
- <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
- <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
- </a>
- {{range .Pages}}
- {{if eq .Num -1}}
- <a class="disabled item">...</a>
- {{else}}
- <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
- {{end}}
- {{end}}
- <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
- {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
- </a>
- <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
+ <div class="ui right">
+ <a class="ui blue tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
</div>
+ </h4>
+ <div class="ui attached table segment">
+ <table class="ui very basic striped table">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>{{.i18n.Tr "admin.users.name"}}</th>
+ <th>{{.i18n.Tr "email"}}</th>
+ <th>{{.i18n.Tr "admin.users.activated"}}</th>
+ <th>{{.i18n.Tr "admin.users.admin"}}</th>
+ <th>{{.i18n.Tr "admin.users.repos"}}</th>
+ <th>{{.i18n.Tr "admin.users.created"}}</th>
+ <th>{{.i18n.Tr "admin.users.edit"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range .Users}}
+ <tr>
+ <td>{{.Id}}</td>
+ <td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
+ <td><span class="text truncate email">{{.Email}}</span></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><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created }}</span></td>
+ <td><a href="{{AppSubUrl}}/admin/users/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
</div>
+
+ {{with .Page}}
+ {{if gt .TotalPages 1}}
+ <div class="center page buttons">
+ <div class="ui borderless pagination menu">
+ <a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
+ <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
+ <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
+ </a>
+ {{range .Pages}}
+ {{if eq .Num -1}}
+ <a class="disabled item">...</a>
+ {{else}}
+ <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
+ {{end}}
+ {{end}}
+ <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
+ {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
+ </a>
+ <a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
+ </div>
+ </div>
+ {{end}}
{{end}}
- {{end}}
- </div>
- </div>
- </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}
diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl
index 34630ececa..9352eaaced 100644
--- a/templates/admin/user/new.tmpl
+++ b/templates/admin/user/new.tmpl
@@ -1,66 +1,66 @@
{{template "base/head" .}}
<div class="admin new user">
- <div class="ui container">
- <div class="ui grid">
- {{template "admin/navbar" .}}
- <div class="twelve wide column content">
- {{template "base/alert" .}}
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.users.new_account"}}
- </h4>
- <div class="ui attached segment">
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <!-- Types and name -->
- <div class="inline required field {{if .Err_LoginType}}error{{end}}">
- <label>{{.i18n.Tr "admin.users.auth_source"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
- <div class="text">{{.i18n.Tr "admin.users.local"}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- <div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
- {{range .Sources}}
- <div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
- <label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
- <input id="login_name" name="login_name" value="{{.login_name}}">
- </div>
- <div class="required field {{if .Err_UserName}}error{{end}}">
- <label for="user_name">{{.i18n.Tr "username"}}</label>
- <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
- </div>
- <div class="required field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "email"}}</label>
- <input id="email" name="email" type="email" value="{{.email}}" required>
- </div>
- <input class="fake" type="password">
- <div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
- <input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
- </div>
+ <div class="ui container">
+ <div class="ui grid">
+ {{template "admin/navbar" .}}
+ <div class="twelve wide column content">
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.users.new_account"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <!-- Types and name -->
+ <div class="inline required field {{if .Err_LoginType}}error{{end}}">
+ <label>{{.i18n.Tr "admin.users.auth_source"}}</label>
+ <div class="ui selection type dropdown">
+ <input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
+ <div class="text">{{.i18n.Tr "admin.users.local"}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ <div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
+ {{range .Sources}}
+ <div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
+ <label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
+ <input id="login_name" name="login_name" value="{{.login_name}}">
+ </div>
+ <div class="required field {{if .Err_UserName}}error{{end}}">
+ <label for="user_name">{{.i18n.Tr "username"}}</label>
+ <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
+ </div>
+ <div class="required field {{if .Err_Email}}error{{end}}">
+ <label for="email">{{.i18n.Tr "email"}}</label>
+ <input id="email" name="email" type="email" value="{{.email}}" required>
+ </div>
+ <input class="fake" type="password">
+ <div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
+ <label for="password">{{.i18n.Tr "password"}}</label>
+ <input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
+ </div>
- <!-- Send register notify e-mail -->
- {{if .CanSendEmail}}
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.users.send_register_notify"}}</strong></label>
- <input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
- </div>
- </div>
- {{end}}
+ <!-- Send register notify e-mail -->
+ {{if .CanSendEmail}}
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.users.send_register_notify"}}</strong></label>
+ <input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
+ </div>
+ </div>
+ {{end}}
- <div class="field">
- <button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
+ <div class="field">
+ <button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
-{{template "base/footer" .}} \ No newline at end of file
+{{template "base/footer" .}}