summaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
authorPatrick G <geek1011@users.noreply.github.com>2017-03-15 22:39:38 +0000
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-03-15 23:39:38 +0100
commitefbb895ebe33327630195ac52f10bd3d85bbae00 (patch)
tree988e09097921de93e11149fcdff7b3951ae39e90 /templates/admin
parent03d79983ee40a22039b5fd1a204499977ab87254 (diff)
downloadgitea-efbb895ebe33327630195ac52f10bd3d85bbae00.tar.gz
gitea-efbb895ebe33327630195ac52f10bd3d85bbae00.zip
Cleaner ui for admin, repo settings, and user settings page (#1269) (#1270)
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/auth/edit.tmpl360
-rw-r--r--templates/admin/auth/list.tmpl72
-rw-r--r--templates/admin/auth/new.tmpl362
-rw-r--r--templates/admin/config.tmpl508
-rw-r--r--templates/admin/dashboard.tmpl230
-rw-r--r--templates/admin/monitor.tmpl110
-rw-r--r--templates/admin/navbar.tmpl55
-rw-r--r--templates/admin/notice.tmpl166
-rw-r--r--templates/admin/org/list.tmpl78
-rw-r--r--templates/admin/repo/list.tmpl86
-rw-r--r--templates/admin/user/edit.tmpl210
-rw-r--r--templates/admin/user/list.tmpl98
-rw-r--r--templates/admin/user/new.tmpl106
13 files changed, 1195 insertions, 1246 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl
index 84b62f6e87..ea5104b79f 100644
--- a/templates/admin/auth/edit.tmpl
+++ b/templates/admin/auth/edit.tmpl
@@ -1,199 +1,195 @@
{{template "base/head" .}}
<div class="admin edit authentication">
+ {{template "admin/navbar" .}}
<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" id="auth_type" 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="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
- <label>{{.i18n.Tr "admin.auths.security_protocol"}}</label>
- <div class="ui selection security-protocol dropdown">
- <input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol}}">
- <div class="text">{{$cfg.SecurityProtocolName}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range .SecurityProtocols}}
- <div class="item" data-value="{{.Type}}">{{.Name}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <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="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">
- </div>
- <input class="fake" type="password">
- <div class="field">
- <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
- <input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}">
- <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>
- {{if .Source.IsLDAP}}
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label>
- <input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}>
- </div>
- </div>
- {{end}}
- {{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}}
-
- <!-- OAuth2 -->
- {{if .Source.IsOAuth2}}
- {{ $cfg:=.Source.OAuth2 }}
- <div class="inline required field">
- <label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required>
- <div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range $key, $value := .OAuth2Providers}}
- <div class="item" data-value="{{$key}}">{{$value.DisplayName}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="required field">
- <label for="oauth2_key">{{.i18n.Tr "admin.auths.oauth2_clientID"}}</label>
- <input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required>
- </div>
- <div class="required field">
- <label for="oauth2_secret">{{.i18n.Tr "admin.auths.oauth2_clientSecret"}}</label>
- <input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required>
- </div>
- {{end}}
+ {{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" id="auth_type" 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="inline field {{if not .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}}>
+ <!-- LDAP and DLDAP -->
+ {{if or .Source.IsLDAP .Source.IsDLDAP}}
+ {{ $cfg:=.Source.LDAP }}
+ <div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
+ <label>{{.i18n.Tr "admin.auths.security_protocol"}}</label>
+ <div class="ui selection security-protocol dropdown">
+ <input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol}}">
+ <div class="text">{{$cfg.SecurityProtocolName}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range .SecurityProtocols}}
+ <div class="item" data-value="{{.Type}}">{{.Name}}</div>
+ {{end}}
</div>
</div>
- <div class="has-tls inline field {{if not .HasTLS}}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="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="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">
+ </div>
+ <input class="fake" type="password">
+ <div class="field">
+ <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
+ <input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}">
+ <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>
+ {{if .Source.IsLDAP}}
<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}}>
+ <label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label>
+ <input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}>
</div>
</div>
+ {{end}}
+ {{end}}
- <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>
+ <!-- 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}}
+
+ <!-- OAuth2 -->
+ {{if .Source.IsOAuth2}}
+ {{ $cfg:=.Source.OAuth2 }}
+ <div class="inline required field">
+ <label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
+ <div class="ui selection type dropdown">
+ <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required>
+ <div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range $key, $value := .OAuth2Providers}}
+ <div class="item" data-value="{{$key}}">{{$value.DisplayName}}</div>
+ {{end}}
+ </div>
</div>
- </form>
+ </div>
+ <div class="required field">
+ <label for="oauth2_key">{{.i18n.Tr "admin.auths.oauth2_clientID"}}</label>
+ <input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required>
+ </div>
+ <div class="required field">
+ <label for="oauth2_secret">{{.i18n.Tr "admin.auths.oauth2_clientSecret"}}</label>
+ <input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required>
+ </div>
+ {{end}}
+
+ <div class="inline field {{if not .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="has-tls inline field {{if not .HasTLS}}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>
- </div>
+ </form>
</div>
</div>
</div>
diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl
index 58bdc66b2c..4e8fb1ea82 100644
--- a/templates/admin/auth/list.tmpl
+++ b/templates/admin/auth/list.tmpl
@@ -1,45 +1,41 @@
{{template "base/head" .}}
<div class="admin authentication">
+ {{template "admin/navbar" .}}
<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>
+ {{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>
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl
index 24257a1b65..59990fc37e 100644
--- a/templates/admin/auth/new.tmpl
+++ b/templates/admin/auth/new.tmpl
@@ -1,204 +1,200 @@
{{template "base/head" .}}
<div class="admin new authentication">
+ {{template "admin/navbar" .}}
<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">{{.CurrentTypeName}}</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>
+ {{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">{{.CurrentTypeName}}</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="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
- <label>{{.i18n.Tr "admin.auths.security_protocol"}}</label>
- <div class="ui selection security-protocol dropdown">
- <input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}">
- <div class="text">{{.CurrentSecurityProtocol}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range .SecurityProtocols}}
- <div class="item" data-value="{{.Type}}">{{.Name}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <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 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 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">
+ <!-- LDAP and DLDAP -->
+ <div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}">
+ <div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
+ <label>{{.i18n.Tr "admin.auths.security_protocol"}}</label>
+ <div class="ui selection security-protocol dropdown">
+ <input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}">
+ <div class="text">{{.CurrentSecurityProtocol}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range .SecurityProtocols}}
+ <div class="item" data-value="{{.Type}}">{{.Name}}</div>
+ {{end}}
</div>
</div>
+ </div>
+ <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 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 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>
+ <!-- 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>
-
- <!-- OAuth2 -->
- <div class="oauth2 field {{if not (eq .type 6)}}hide{{end}}">
- <div class="inline required field">
- <label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
- <div class="ui selection type dropdown">
- <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
- <div class="text">{{.oauth2_provider}}</div>
- <i class="dropdown icon"></i>
- <div class="menu">
- {{range $key, $value := .OAuth2Providers}}
- <div class="item" data-value="{{$key}}">{{$value.DisplayName}}</div>
- {{end}}
- </div>
- </div>
- </div>
- <div class="required field">
- <label for="oauth2_key">{{.i18n.Tr "admin.auths.oauth2_clientID"}}</label>
- <input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}">
- </div>
- <div class="required field">
- <label for="oauth2_secret">{{.i18n.Tr "admin.auths.oauth2_clientSecret"}}</label>
- <input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
- </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>
- <div class="ldap field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label>
- <input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
- </div>
- </div>
- <div class="smtp inline field {{if not (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="has-tls inline field {{if not .HasTLS}}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}}>
+ <!-- OAuth2 -->
+ <div class="oauth2 field {{if not (eq .type 6)}}hide{{end}}">
+ <div class="inline required field">
+ <label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
+ <div class="ui selection type dropdown">
+ <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
+ <div class="text">{{.oauth2_provider}}</div>
+ <i class="dropdown icon"></i>
+ <div class="menu">
+ {{range $key, $value := .OAuth2Providers}}
+ <div class="item" data-value="{{$key}}">{{$value.DisplayName}}</div>
+ {{end}}
</div>
</div>
+ </div>
+ <div class="required field">
+ <label for="oauth2_key">{{.i18n.Tr "admin.auths.oauth2_clientID"}}</label>
+ <input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}">
+ </div>
+ <div class="required field">
+ <label for="oauth2_secret">{{.i18n.Tr "admin.auths.oauth2_clientSecret"}}</label>
+ <input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
+ </div>
+ </div>
- <div class="field">
- <button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
- </div>
- </form>
+ <div class="ldap field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label>
+ <input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
+ </div>
+ </div>
+ <div class="smtp inline field {{if not (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="has-tls inline field {{if not .HasTLS}}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>
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.auths.tips"}}
- </h4>
- <div class="ui attached segment">
- <h5>GMail Settings:</h5>
- <p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
- <h5>OAuth GitHub:</h5>
- <p>{{.i18n.Tr "admin.auths.tip.github"}}</p>
+ <div class="field">
+ <button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
</div>
- </div>
+ </form>
+ </div>
+
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.auths.tips"}}
+ </h4>
+ <div class="ui attached segment">
+ <h5>GMail Settings:</h5>
+ <p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
+ <h5>OAuth GitHub:</h5>
+ <p>{{.i18n.Tr "admin.auths.tip.github"}}</p>
</div>
</div>
</div>
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl
index d9403f4145..225c23b97b 100644
--- a/templates/admin/config.tmpl
+++ b/templates/admin/config.tmpl
@@ -1,280 +1,276 @@
{{template "base/head" .}}
<div class="admin config">
+ {{template "admin/navbar" .}}
<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}}{{AppBuiltWith}}</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>
+ {{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}}{{AppBuiltWith}}</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>
+ <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>
+ <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>
+ <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.config.git_version"}}</dt>
- <dd>{{.GitVersion}}</dd>
+ <dt>{{.i18n.Tr "admin.config.git_version"}}</dt>
+ <dd>{{.GitVersion}}</dd>
- <div class="ui divider"></div>
+ <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>
+ <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.ssh_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
- <dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
- {{if not .SSH.Disabled}}
- <dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
- <dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
- <dd>{{.SSH.Domain}}</dd>
- <dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
- <dd>{{.SSH.Port}}</dd>
- <dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
- <dd>{{.SSH.ListenPort}}</dd>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.ssh_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
+ <dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
+ {{if not .SSH.Disabled}}
+ <dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
+ <dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
+ <dd>{{.SSH.Domain}}</dd>
+ <dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
+ <dd>{{.SSH.Port}}</dd>
+ <dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
+ <dd>{{.SSH.ListenPort}}</dd>
- {{if not .SSH.StartBuiltinServer}}
- <dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
- <dd>{{.SSH.RootPath}}</dd>
- <dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
- <dd>{{.SSH.KeyTestPath}}</dd>
- <dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
- <dd>{{.SSH.KeygenPath}}</dd>
- <dt>{{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
- <dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
- {{if .SSH.MinimumKeySizeCheck}}
- <dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
- <dd>{{.SSH.MinimumKeySizes}}</dd>
- {{end}}
- {{end}}
+ {{if not .SSH.StartBuiltinServer}}
+ <dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
+ <dd>{{.SSH.RootPath}}</dd>
+ <dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
+ <dd>{{.SSH.KeyTestPath}}</dd>
+ <dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
+ <dd>{{.SSH.KeygenPath}}</dd>
+ <dt>{{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
+ <dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
+ {{if .SSH.MinimumKeySizeCheck}}
+ <dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
+ <dd>{{.SSH.MinimumKeySizes}}</dd>
{{end}}
- </dl>
- </div>
+ {{end}}
+ {{end}}
+ </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>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
- <dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
- <dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
- <dd><i class="fa fa{{if .DbCfg.SSLMode}}-check{{end}}-square-o"></i> {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
- <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
- <dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}} {{.i18n.Tr "admin.config.db_path_helper"}}</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>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
+ <dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
+ <dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
+ <dd><i class="fa fa{{if .DbCfg.SSLMode}}-check{{end}}-square-o"></i> {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
+ <dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}} {{.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.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>
- <dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
- <dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
- <dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</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.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.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>
+ <dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
+ <dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
+ <dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</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.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>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
- <form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
- {{.CsrfTokenHtml}}
- <div class="inline field ui left">
- <div class="ui input">
- <input type="email" name="email" required>
- </div>
- </div>
- <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
- </form>
- {{end}}
- </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>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
+ <form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="inline field ui left">
+ <div class="ui input">
+ <input type="email" name="email" required>
+ </div>
+ </div>
+ <button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
+ </form>
+ {{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>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- {{if .CacheConn}}
- <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
- <dd><code>{{.CacheConn}}</code></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>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ {{if .CacheConn}}
+ <dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
+ <dd><code>{{.CacheConn}}</code></dd>
+ {{end}}
+ </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><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></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.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><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></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.disable_gravatar"}}</dt>
- <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
- <dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></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.disable_gravatar"}}</dt>
+ <dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
+ <dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
+ </dl>
+ </div>
- <h4 class="ui top attached header">
- {{.i18n.Tr "admin.config.git_config"}}
- </h4>
- <div class="ui attached table segment">
- <dl class="dl-horizontal admin-dl-horizontal">
- <dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
- <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
- <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
- <dd>{{.Git.MaxGitDiffLines}}</dd>
- <dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
- <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
- <dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
- <dd>{{.Git.MaxGitDiffFiles}}</dd>
- <dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
- <dd><code>{{.Git.GCArgs}}</code></dd>
- <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
- <dd>{{.Git.MaxGitDiffLines}}</dd>
- <div class="ui divider"></div>
- <dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
- <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- <dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
- <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- <dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
- <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- <dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
- <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- <dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
- <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
- </dl>
- </div>
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.config.git_config"}}
+ </h4>
+ <div class="ui attached table segment">
+ <dl class="dl-horizontal admin-dl-horizontal">
+ <dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
+ <dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
+ <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
+ <dd>{{.Git.MaxGitDiffLines}}</dd>
+ <dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
+ <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
+ <dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
+ <dd>{{.Git.MaxGitDiffFiles}}</dd>
+ <dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
+ <dd><code>{{.Git.GCArgs}}</code></dd>
+ <dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
+ <dd>{{.Git.MaxGitDiffLines}}</dd>
+ <div class="ui divider"></div>
+ <dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
+ <dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
+ <dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
+ <dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
+ <dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
+ <dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</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 | JsonPrettyPrint}}</pre></dd>
- {{end}}
- </dl>
- </div>
- </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 | JsonPrettyPrint}}</pre></dd>
+ {{end}}
+ </dl>
</div>
</div>
</div>
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index acffdc4314..229cd305b9 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -1,124 +1,120 @@
{{template "base/head" .}}
<div class="admin dashboard">
+ {{template "admin/navbar" .}}
<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_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>
- <tr>
- <td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
- <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=7">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
- </tr>
- </tbody>
- </table>
- </div>
+ {{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_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>
+ <tr>
+ <td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
+ <td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=7">{{.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>
+ <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>
diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl
index d74c885e9e..6cc927d68f 100644
--- a/templates/admin/monitor.tmpl
+++ b/templates/admin/monitor.tmpl
@@ -1,64 +1,60 @@
{{template "base/head" .}}
<div class="admin monitor">
+ {{template "admin/navbar" .}}
<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>
+ {{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>
+ <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>
diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl
index 9fa1721e46..c5ad124157 100644
--- a/templates/admin/navbar.tmpl
+++ b/templates/admin/navbar.tmpl
@@ -1,29 +1,26 @@
-<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>
- </div>
-</div>
+<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
+ <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> \ No newline at end of file
diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl
index 0af7713d30..49e760d2b7 100644
--- a/templates/admin/notice.tmpl
+++ b/templates/admin/notice.tmpl
@@ -1,96 +1,92 @@
{{template "base/head" .}}
<div class="admin notice">
+ {{template "admin/navbar" .}}
<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>
+ {{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="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 class="item select action" data-action="deselect-all">
+ {{.i18n.Tr "admin.notices.deselect_all"}}
</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 class="item select action" data-action="inverse">
+ {{.i18n.Tr "admin.notices.inverse_selection"}}
</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>
- </div>
- {{end}}
- {{end}}
- </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>
diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl
index 244f915c97..f2e258355d 100644
--- a/templates/admin/org/list.tmpl
+++ b/templates/admin/org/list.tmpl
@@ -1,48 +1,44 @@
{{template "base/head" .}}
<div class="admin user">
+ {{template "admin/navbar" .}}
<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 segment">
- {{template "admin/base/search" .}}
- </div>
- <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>
- <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="{{.HomeLink}}">{{.Name}}</a></td>
- <td>{{.NumTeams}}</td>
- <td>{{.NumMembers}}</td>
- <td>{{.NumRepos}}</td>
- <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
- <td><a href="{{AppSubUrl}}/org/{{.Name}}/settings"><i class="fa fa-pencil-square-o"></i></a></td>
- </tr>
- {{end}}
- </tbody>
- </table>
- </div>
-
- {{template "base/paginate" .}}
- </div>
+ {{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 segment">
+ {{template "admin/base/search" .}}
+ </div>
+ <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>
+ <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="{{.HomeLink}}">{{.Name}}</a></td>
+ <td>{{.NumTeams}}</td>
+ <td>{{.NumMembers}}</td>
+ <td>{{.NumRepos}}</td>
+ <td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
+ <td><a href="{{AppSubUrl}}/org/{{.Name}}/settings"><i class="fa fa-pencil-square-o"></i></a></td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
</div>
+
+ {{template "base/paginate" .}}
</div>
</div>
{{template "base/footer" .}}
diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl
index ccc958fe93..ffdbd5bfb8 100644
--- a/templates/admin/repo/list.tmpl
+++ b/templates/admin/repo/list.tmpl
@@ -1,52 +1,48 @@
{{template "base/head" .}}
<div class="admin user">
+ {{template "admin/navbar" .}}
<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.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
- </h4>
- <div class="ui attached segment">
- {{template "admin/base/search" .}}
- </div>
- <div class="ui attached table segment">
- <table class="ui very basic striped table">
- <thead>
- <tr>
- <th>ID</th>
- <th>{{.i18n.Tr "admin.repos.owner"}}</th>
- <th>{{.i18n.Tr "admin.repos.name"}}</th>
- <th>{{.i18n.Tr "admin.repos.private"}}</th>
- <th>{{.i18n.Tr "admin.repos.watches"}}</th>
- <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>
- </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>
- {{end}}
- </tbody>
- </table>
- </div>
-
- {{template "base/paginate" .}}
- </div>
+ {{template "base/alert" .}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
+ </h4>
+ <div class="ui attached segment">
+ {{template "admin/base/search" .}}
+ </div>
+ <div class="ui attached table segment">
+ <table class="ui very basic striped table">
+ <thead>
+ <tr>
+ <th>ID</th>
+ <th>{{.i18n.Tr "admin.repos.owner"}}</th>
+ <th>{{.i18n.Tr "admin.repos.name"}}</th>
+ <th>{{.i18n.Tr "admin.repos.private"}}</th>
+ <th>{{.i18n.Tr "admin.repos.watches"}}</th>
+ <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>
+ </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>
+ {{end}}
+ </tbody>
+ </table>
</div>
+
+ {{template "base/paginate" .}}
</div>
</div>
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl
index 7c97198d53..4feeef302a 100644
--- a/templates/admin/user/edit.tmpl
+++ b/templates/admin/user/edit.tmpl
@@ -1,120 +1,116 @@
{{template "base/head" .}}
<div class="admin edit user">
+ {{template "admin/navbar" .}}
<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 (or (.User.IsLocal) (.User.IsOAuth2))}}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>
+ {{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 (or (.User.IsLocal) (.User.IsOAuth2))}}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 divider"></div>
+ <div class="ui divider"></div>
- <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
- <label for="max_repo_creation">{{.i18n.Tr "admin.users.max_repo_creation"}}</label>
- <input id="max_repo_creation" name="max_repo_creation" type="number" value="{{.User.MaxRepoCreation}}">
- <p class="help">{{.i18n.Tr "admin.users.max_repo_creation_desc"}}</p>
- </div>
+ <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
+ <label for="max_repo_creation">{{.i18n.Tr "admin.users.max_repo_creation"}}</label>
+ <input id="max_repo_creation" name="max_repo_creation" type="number" value="{{.User.MaxRepoCreation}}">
+ <p class="help">{{.i18n.Tr "admin.users.max_repo_creation_desc"}}</p>
+ </div>
- <div class="ui divider"></div>
+ <div class="ui divider"></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.prohibit_login"}}</strong></label>
- <input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}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>
- {{if not .DisableRegularOrgCreation}}
- <div class="inline field">
- <div class="ui checkbox">
- <label><strong>{{.i18n.Tr "admin.users.allow_create_organization"}}</strong></label>
- <input name="allow_create_organization" type="checkbox" {{if .User.CanCreateOrganization}}checked{{end}}>
- </div>
- </div>
- {{end}}
+ <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.prohibit_login"}}</strong></label>
+ <input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}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>
+ {{if not .DisableRegularOrgCreation}}
+ <div class="inline field">
+ <div class="ui checkbox">
+ <label><strong>{{.i18n.Tr "admin.users.allow_create_organization"}}</strong></label>
+ <input name="allow_create_organization" type="checkbox" {{if .User.CanCreateOrganization}}checked{{end}}>
+ </div>
+ </div>
+ {{end}}
- <div class="ui divider"></div>
+ <div class="ui divider"></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 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>
- </div>
+ </form>
</div>
</div>
</div>
diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl
index de361a2030..7e06417013 100644
--- a/templates/admin/user/list.tmpl
+++ b/templates/admin/user/list.tmpl
@@ -1,59 +1,55 @@
{{template "base/head" .}}
<div class="admin user">
+ {{template "admin/navbar" .}}
<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 black tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
- </div>
- </h4>
- <div class="ui attached segment">
- {{template "admin/base/search" .}}
- </div>
- <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.last_login"}}</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>
- {{if .LastLoginUnix}}
- <td><span title="{{DateFmtLong .LastLogin}}">{{DateFmtShort .LastLogin }}</span></td>
- {{else}}
- <td><span>{{$.i18n.Tr "admin.users.never_login"}}</span></td>
- {{end}}
- <td><a href="{{$.Link}}/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
- </tr>
- {{end}}
- </tbody>
- </table>
- </div>
-
- {{template "base/paginate" .}}
+ {{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 black tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
</div>
+ </h4>
+ <div class="ui attached segment">
+ {{template "admin/base/search" .}}
</div>
+ <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.last_login"}}</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>
+ {{if .LastLoginUnix}}
+ <td><span title="{{DateFmtLong .LastLogin}}">{{DateFmtShort .LastLogin }}</span></td>
+ {{else}}
+ <td><span>{{$.i18n.Tr "admin.users.never_login"}}</span></td>
+ {{end}}
+ <td><a href="{{$.Link}}/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
+ </tr>
+ {{end}}
+ </tbody>
+ </table>
+ </div>
+
+ {{template "base/paginate" .}}
</div>
</div>
{{template "base/footer" .}}
diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl
index 9352eaaced..14e1d74292 100644
--- a/templates/admin/user/new.tmpl
+++ b/templates/admin/user/new.tmpl
@@ -1,65 +1,61 @@
{{template "base/head" .}}
<div class="admin new user">
+ {{template "admin/navbar" .}}
<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>
+ {{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 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}}
+ </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="field">
- <button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
+ <!-- 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>
- </form>
+ </div>
+ {{end}}
+
+ <div class="field">
+ <button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
</div>
- </div>
+ </form>
</div>
</div>
</div>