This commit is contained in:
parent
03d79983ee
commit
efbb895ebe
37 changed files with 2131 additions and 2243 deletions
|
@ -420,6 +420,14 @@ footer .ui.language .menu {
|
||||||
background: inherit !important;
|
background: inherit !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
.ui.menu.new-menu {
|
||||||
|
justify-content: center !important;
|
||||||
|
padding-top: 15px !important;
|
||||||
|
margin-top: -15px !important;
|
||||||
|
margin-bottom: 15px !important;
|
||||||
|
background-color: #FAFAFA !important;
|
||||||
|
border-width: 1px !important;
|
||||||
|
}
|
||||||
.markdown:not(code) {
|
.markdown:not(code) {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
||||||
|
|
|
@ -411,3 +411,12 @@ footer {
|
||||||
background: inherit !important;
|
background: inherit !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui.menu.new-menu {
|
||||||
|
justify-content: center !important;
|
||||||
|
padding-top: 15px !important;
|
||||||
|
margin-top: -15px !important;
|
||||||
|
margin-bottom: 15px !important;
|
||||||
|
background-color: #FAFAFA !important;
|
||||||
|
border-width: 1px !important;
|
||||||
|
}
|
||||||
|
|
|
@ -1,199 +1,195 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin edit authentication">
|
<div class="admin edit authentication">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.auths.edit"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "admin.auths.edit"}}
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
</h4>
|
{{.CsrfTokenHtml}}
|
||||||
<div class="ui attached segment">
|
<input type="hidden" name="id" value="{{.Source.ID}}">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<div class="inline field">
|
||||||
{{.CsrfTokenHtml}}
|
<label>{{$.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||||
<input type="hidden" name="id" value="{{.Source.ID}}">
|
<input type="hidden" id="auth_type" name="type" value="{{.Source.Type}}">
|
||||||
<div class="inline field">
|
<span>{{.Source.TypeName}}</span>
|
||||||
<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}}
|
|
||||||
|
|
||||||
<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>
|
|
||||||
</form>
|
|
||||||
</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="{{.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}}
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,45 +1,41 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin authentication">
|
<div class="admin authentication">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||||
{{template "base/alert" .}}
|
<div class="ui right">
|
||||||
<h4 class="ui top attached header">
|
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
|
||||||
{{.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>
|
||||||
|
</h4>
|
||||||
|
<div class="ui attached table segment">
|
||||||
|
<table class="ui very basic striped table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>{{.i18n.Tr "admin.auths.name"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.auths.type"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.auths.enabled"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.auths.updated"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{range .Sources}}
|
||||||
|
<tr>
|
||||||
|
<td>{{.ID}}</td>
|
||||||
|
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
|
||||||
|
<td>{{.TypeName}}</td>
|
||||||
|
<td><i class="fa fa{{if .IsActived}}-check{{end}}-square-o"></i></td>
|
||||||
|
<td><span class="poping up" data-content="{{DateFmtLong .Updated}}" data-variation="tiny">{{DateFmtShort .Updated}}</span></td>
|
||||||
|
<td><span class="poping up" data-content="{{DateFmtLong .Created}}" data-variation="tiny">{{DateFmtShort .Created}}</span></td>
|
||||||
|
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,204 +1,200 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin new authentication">
|
<div class="admin new authentication">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.auths.new"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "admin.auths.new"}}
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
</h4>
|
{{.CsrfTokenHtml}}
|
||||||
<div class="ui attached segment">
|
<!-- Types and name -->
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
||||||
{{.CsrfTokenHtml}}
|
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||||
<!-- Types and name -->
|
<div class="ui selection type dropdown">
|
||||||
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
||||||
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
<div class="text">{{.CurrentTypeName}}</div>
|
||||||
<div class="ui selection type dropdown">
|
<i class="dropdown icon"></i>
|
||||||
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
<div class="menu">
|
||||||
<div class="text">{{.CurrentTypeName}}</div>
|
{{range .AuthSources}}
|
||||||
<i class="dropdown icon"></i>
|
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
||||||
<div class="menu">
|
{{end}}
|
||||||
{{range .AuthSources}}
|
|
||||||
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
</div>
|
||||||
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
</div>
|
||||||
<input id="name" name="name" value="{{.name}}" autofocus required>
|
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
||||||
</div>
|
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
||||||
|
<input id="name" name="name" value="{{.name}}" autofocus required>
|
||||||
<!-- 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>
|
|
||||||
</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>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<!-- LDAP and DLDAP -->
|
||||||
{{.i18n.Tr "admin.auths.tips"}}
|
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}">
|
||||||
</h4>
|
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
||||||
<div class="ui attached segment">
|
<label>{{.i18n.Tr "admin.auths.security_protocol"}}</label>
|
||||||
<h5>GMail Settings:</h5>
|
<div class="ui selection security-protocol dropdown">
|
||||||
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
|
<input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}">
|
||||||
<h5>OAuth GitHub:</h5>
|
<div class="text">{{.CurrentSecurityProtocol}}</div>
|
||||||
<p>{{.i18n.Tr "admin.auths.tip.github"}}</p>
|
<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>
|
</div>
|
||||||
</div>
|
|
||||||
|
<!-- SMTP -->
|
||||||
|
<div class="smtp field {{if not (eq .type 3)}}hide{{end}}">
|
||||||
|
<div class="inline required field">
|
||||||
|
<label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
|
||||||
|
<div class="ui selection type dropdown">
|
||||||
|
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}">
|
||||||
|
<div class="text">{{.smtp_auth}}</div>
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
<div class="menu">
|
||||||
|
{{range .SMTPAuths}}
|
||||||
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="required field">
|
||||||
|
<label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
|
||||||
|
<input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
|
||||||
|
</div>
|
||||||
|
<div class="required field">
|
||||||
|
<label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
|
||||||
|
<input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
|
||||||
|
<input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}">
|
||||||
|
<p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- PAM -->
|
||||||
|
<div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
|
||||||
|
<label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
|
||||||
|
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 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="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>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="ui top attached header">
|
||||||
|
{{.i18n.Tr "admin.auths.tips"}}
|
||||||
|
</h4>
|
||||||
|
<div class="ui attached segment">
|
||||||
|
<h5>GMail 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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,280 +1,276 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin config">
|
<div class="admin config">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.config.server_config"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached table segment">
|
||||||
{{.i18n.Tr "admin.config.server_config"}}
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
</h4>
|
<dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
|
||||||
<div class="ui attached table segment">
|
<dd>{{AppName}}</dd>
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
|
||||||
<dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
|
<dd>{{AppVer}}{{AppBuiltWith}}</dd>
|
||||||
<dd>{{AppName}}</dd>
|
<dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
|
||||||
<dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
|
<dd>{{.AppUrl}}</dd>
|
||||||
<dd>{{AppVer}}{{AppBuiltWith}}</dd>
|
<dt>{{.i18n.Tr "admin.config.domain"}}</dt>
|
||||||
<dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
|
<dd>{{.Domain}}</dd>
|
||||||
<dd>{{.AppUrl}}</dd>
|
<dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
|
||||||
<dt>{{.i18n.Tr "admin.config.domain"}}</dt>
|
<dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd>{{.Domain}}</dd>
|
<dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
|
||||||
<dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
|
<dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
|
||||||
<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>
|
<dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
|
||||||
<dd>{{.RunUser}}</dd>
|
<dd>{{.RunUser}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
|
||||||
<dd>{{.RunMode}}</dd>
|
<dd>{{.RunMode}}</dd>
|
||||||
|
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
<dt>{{.i18n.Tr "admin.config.git_version"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_version"}}</dt>
|
||||||
<dd>{{.GitVersion}}</dd>
|
<dd>{{.GitVersion}}</dd>
|
||||||
|
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
|
||||||
<dd>{{.RepoRootPath}}</dd>
|
<dd>{{.RepoRootPath}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
|
||||||
<dd>{{.StaticRootPath}}</dd>
|
<dd>{{.StaticRootPath}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
|
||||||
<dd>{{.LogRootPath}}</dd>
|
<dd>{{.LogRootPath}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
|
||||||
<dd>{{.ScriptType}}</dd>
|
<dd>{{.ScriptType}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
|
||||||
<dd>{{.ReverseProxyAuthUser}}</dd>
|
<dd>{{.ReverseProxyAuthUser}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.ssh_config"}}
|
{{.i18n.Tr "admin.config.ssh_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
|
||||||
<dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
|
||||||
{{if not .SSH.Disabled}}
|
{{if not .SSH.Disabled}}
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
|
||||||
<dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
|
||||||
<dd>{{.SSH.Domain}}</dd>
|
<dd>{{.SSH.Domain}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
|
||||||
<dd>{{.SSH.Port}}</dd>
|
<dd>{{.SSH.Port}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
|
||||||
<dd>{{.SSH.ListenPort}}</dd>
|
<dd>{{.SSH.ListenPort}}</dd>
|
||||||
|
|
||||||
{{if not .SSH.StartBuiltinServer}}
|
{{if not .SSH.StartBuiltinServer}}
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
|
||||||
<dd>{{.SSH.RootPath}}</dd>
|
<dd>{{.SSH.RootPath}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
|
||||||
<dd>{{.SSH.KeyTestPath}}</dd>
|
<dd>{{.SSH.KeyTestPath}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
|
||||||
<dd>{{.SSH.KeygenPath}}</dd>
|
<dd>{{.SSH.KeygenPath}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
|
<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>
|
<dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
|
||||||
{{if .SSH.MinimumKeySizeCheck}}
|
{{if .SSH.MinimumKeySizeCheck}}
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
|
||||||
<dd>{{.SSH.MinimumKeySizes}}</dd>
|
<dd>{{.SSH.MinimumKeySizes}}</dd>
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</dl>
|
{{end}}
|
||||||
</div>
|
{{end}}
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.db_config"}}
|
{{.i18n.Tr "admin.config.db_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
||||||
<dd>{{.DbCfg.Type}}</dd>
|
<dd>{{.DbCfg.Type}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
||||||
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
|
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
||||||
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
|
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
||||||
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
|
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
<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>
|
<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>
|
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
||||||
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.service_config"}}
|
{{.i18n.Tr "admin.config.service_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
|
||||||
{{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
|
{{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
|
<dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
|
||||||
<dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
|
||||||
<dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
|
<dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
|
||||||
<dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
<dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
|
||||||
<dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
<dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.webhook_config"}}
|
{{.i18n.Tr "admin.config.webhook_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
|
||||||
<dd>{{.Webhook.QueueLength}}</dd>
|
<dd>{{.Webhook.QueueLength}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
||||||
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.mailer_config"}}
|
{{.i18n.Tr "admin.config.mailer_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
|
||||||
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
||||||
{{if .MailerEnabled}}
|
{{if .MailerEnabled}}
|
||||||
<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
||||||
<dd>{{.Mailer.Name}}</dd>
|
<dd>{{.Mailer.Name}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
||||||
<dd>{{.Mailer.Host}}</dd>
|
<dd>{{.Mailer.Host}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
|
||||||
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
|
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
|
||||||
<form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
<form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="inline field ui left">
|
<div class="inline field ui left">
|
||||||
<div class="ui input">
|
<div class="ui input">
|
||||||
<input type="email" name="email" required>
|
<input type="email" name="email" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
|
<button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
|
||||||
</form>
|
</form>
|
||||||
{{end}}
|
{{end}}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.cache_config"}}
|
{{.i18n.Tr "admin.config.cache_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
||||||
<dd>{{.CacheAdapter}}</dd>
|
<dd>{{.CacheAdapter}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
|
||||||
<dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
{{if .CacheConn}}
|
{{if .CacheConn}}
|
||||||
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
||||||
<dd><code>{{.CacheConn}}</code></dd>
|
<dd><code>{{.CacheConn}}</code></dd>
|
||||||
{{end}}
|
{{end}}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.session_config"}}
|
{{.i18n.Tr "admin.config.session_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
||||||
<dd>{{.SessionConfig.Provider}}</dd>
|
<dd>{{.SessionConfig.Provider}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
||||||
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
|
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
||||||
<dd>{{.SessionConfig.CookieName}}</dd>
|
<dd>{{.SessionConfig.CookieName}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
||||||
<dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
|
||||||
<dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
|
||||||
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
|
||||||
<dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.picture_config"}}
|
{{.i18n.Tr "admin.config.picture_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
|
||||||
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
|
||||||
<dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.git_config"}}
|
{{.i18n.Tr "admin.config.git_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
||||||
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
|
||||||
<dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
|
<dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
|
||||||
<dd>{{.Git.MaxGitDiffFiles}}</dd>
|
<dd>{{.Git.MaxGitDiffFiles}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
|
||||||
<dd><code>{{.Git.GCArgs}}</code></dd>
|
<dd><code>{{.Git.GCArgs}}</code></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
||||||
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
|
||||||
<dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
|
||||||
<dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
|
||||||
<dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
|
||||||
<dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
|
||||||
<dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
<dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.config.log_config"}}
|
{{.i18n.Tr "admin.config.log_config"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
{{range .Loggers}}
|
{{range .Loggers}}
|
||||||
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
|
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
|
||||||
<dd>{{.Mode}}</dd>
|
<dd>{{.Mode}}</dd>
|
||||||
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
|
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
|
||||||
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
|
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
|
||||||
{{end}}
|
{{end}}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,124 +1,120 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin dashboard">
|
<div class="admin dashboard">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.dashboard.statistic"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "admin.dashboard.statistic"}}
|
<p>
|
||||||
</h4>
|
{{.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}}
|
||||||
<div class="ui attached segment">
|
</p>
|
||||||
<p>
|
</div>
|
||||||
{{.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}}
|
<h4 class="ui top attached header">
|
||||||
</p>
|
{{.i18n.Tr "admin.dashboard.operations"}}
|
||||||
</div>
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached table segment">
|
||||||
{{.i18n.Tr "admin.dashboard.operations"}}
|
<table class="ui very basic table">
|
||||||
</h4>
|
<tbody>
|
||||||
<div class="ui attached table segment">
|
<tr>
|
||||||
<table class="ui very basic table">
|
<td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
|
||||||
<tbody>
|
<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_inactivate_accounts"}}</td>
|
<tr>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td>{{.i18n.Tr "admin.dashboard.delete_repo_archives"}}</td>
|
||||||
</tr>
|
<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_repo_archives"}}</td>
|
<tr>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td>{{.i18n.Tr "admin.dashboard.delete_missing_repos"}}</td>
|
||||||
</tr>
|
<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.delete_missing_repos"}}</td>
|
<tr>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
|
||||||
</tr>
|
<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.git_gc_repos"}}</td>
|
<tr>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
|
||||||
</tr>
|
<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_sshkeys"}}</td>
|
<tr>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
|
||||||
</tr>
|
<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.resync_all_hooks"}}</td>
|
<tr>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=6">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
<td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
|
||||||
</tr>
|
<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>
|
</tr>
|
||||||
<td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
|
</tbody>
|
||||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=7">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
</table>
|
||||||
</tr>
|
</div>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.dashboard.system_status"}}
|
{{.i18n.Tr "admin.dashboard.system_status"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
|
||||||
<dd>{{.SysStatus.Uptime}}</dd>
|
<dd>{{.SysStatus.Uptime}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
|
||||||
<dd>{{.SysStatus.NumGoroutine}}</dd>
|
<dd>{{.SysStatus.NumGoroutine}}</dd>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
|
||||||
<dd>{{.SysStatus.MemAllocated}}</dd>
|
<dd>{{.SysStatus.MemAllocated}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
|
||||||
<dd>{{.SysStatus.MemTotal}}</dd>
|
<dd>{{.SysStatus.MemTotal}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
|
||||||
<dd>{{.SysStatus.MemSys}}</dd>
|
<dd>{{.SysStatus.MemSys}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
|
||||||
<dd>{{.SysStatus.Lookups}}</dd>
|
<dd>{{.SysStatus.Lookups}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
|
||||||
<dd>{{.SysStatus.MemMallocs}}</dd>
|
<dd>{{.SysStatus.MemMallocs}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
|
||||||
<dd>{{.SysStatus.MemFrees}}</dd>
|
<dd>{{.SysStatus.MemFrees}}</dd>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
|
||||||
<dd>{{.SysStatus.HeapAlloc}}</dd>
|
<dd>{{.SysStatus.HeapAlloc}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
|
||||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
|
||||||
<dd>{{.SysStatus.HeapIdle}}</dd>
|
<dd>{{.SysStatus.HeapIdle}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
|
||||||
<dd>{{.SysStatus.HeapInuse}}</dd>
|
<dd>{{.SysStatus.HeapInuse}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
|
||||||
<dd>{{.SysStatus.HeapReleased}}</dd>
|
<dd>{{.SysStatus.HeapReleased}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
|
||||||
<dd>{{.SysStatus.HeapObjects}}</dd>
|
<dd>{{.SysStatus.HeapObjects}}</dd>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
|
||||||
<dd>{{.SysStatus.StackInuse}}</dd>
|
<dd>{{.SysStatus.StackInuse}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
|
||||||
<dd>{{.SysStatus.StackSys}}</dd>
|
<dd>{{.SysStatus.StackSys}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
|
||||||
<dd>{{.SysStatus.MSpanInuse}}</dd>
|
<dd>{{.SysStatus.MSpanInuse}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
|
||||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
|
||||||
<dd>{{.SysStatus.MCacheInuse}}</dd>
|
<dd>{{.SysStatus.MCacheInuse}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
|
||||||
<dd>{{.SysStatus.MCacheSys}}</dd>
|
<dd>{{.SysStatus.MCacheSys}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
|
||||||
<dd>{{.SysStatus.BuckHashSys}}</dd>
|
<dd>{{.SysStatus.BuckHashSys}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
|
||||||
<dd>{{.SysStatus.GCSys}}</dd>
|
<dd>{{.SysStatus.GCSys}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
|
||||||
<dd>{{.SysStatus.OtherSys}}</dd>
|
<dd>{{.SysStatus.OtherSys}}</dd>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
|
||||||
<dd>{{.SysStatus.NextGC}}</dd>
|
<dd>{{.SysStatus.NextGC}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
|
||||||
<dd>{{.SysStatus.LastGC}}</dd>
|
<dd>{{.SysStatus.LastGC}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
|
||||||
<dd>{{.SysStatus.PauseTotalNs}}</dd>
|
<dd>{{.SysStatus.PauseTotalNs}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
|
||||||
<dd>{{.SysStatus.PauseNs}}</dd>
|
<dd>{{.SysStatus.PauseNs}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
|
<dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
|
||||||
<dd>{{.SysStatus.NumGC}}</dd>
|
<dd>{{.SysStatus.NumGC}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,64 +1,60 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin monitor">
|
<div class="admin monitor">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.monitor.cron"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached table segment">
|
||||||
{{.i18n.Tr "admin.monitor.cron"}}
|
<table class="ui very basic striped table">
|
||||||
</h4>
|
<thead>
|
||||||
<div class="ui attached table segment">
|
<tr>
|
||||||
<table class="ui very basic striped table">
|
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
||||||
<thead>
|
<th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
|
||||||
<tr>
|
<th>{{.i18n.Tr "admin.monitor.next"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
<th>{{.i18n.Tr "admin.monitor.previous"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
|
<th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.monitor.next"}}</th>
|
</tr>
|
||||||
<th>{{.i18n.Tr "admin.monitor.previous"}}</th>
|
</thead>
|
||||||
<th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
|
<tbody>
|
||||||
</tr>
|
{{range .Entries}}
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<td>{{.Description}}</td>
|
||||||
{{range .Entries}}
|
<td>{{.Spec}}</td>
|
||||||
<tr>
|
<td>{{DateFmtLong .Next}}</td>
|
||||||
<td>{{.Description}}</td>
|
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
||||||
<td>{{.Spec}}</td>
|
<td>{{.ExecTimes}}</td>
|
||||||
<td>{{DateFmtLong .Next}}</td>
|
</tr>
|
||||||
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
{{end}}
|
||||||
<td>{{.ExecTimes}}</td>
|
</tbody>
|
||||||
</tr>
|
</table>
|
||||||
{{end}}
|
</div>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "admin.monitor.process"}}
|
{{.i18n.Tr "admin.monitor.process"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<table class="ui very basic striped table">
|
<table class="ui very basic striped table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Pid</th>
|
<th>Pid</th>
|
||||||
<th>{{.i18n.Tr "admin.monitor.desc"}}</th>
|
<th>{{.i18n.Tr "admin.monitor.desc"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.monitor.start"}}</th>
|
<th>{{.i18n.Tr "admin.monitor.start"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
|
<th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{range .Processes}}
|
{{range .Processes}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{.PID}}</td>
|
<td>{{.PID}}</td>
|
||||||
<td>{{.Description}}</td>
|
<td>{{.Description}}</td>
|
||||||
<td>{{DateFmtLong .Start}}</td>
|
<td>{{DateFmtLong .Start}}</td>
|
||||||
<td>{{TimeSince .Start $.Lang}}</td>
|
<td>{{TimeSince .Start $.Lang}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,29 +1,26 @@
|
||||||
<div class="four wide column">
|
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
|
||||||
<div class="ui vertical menu">
|
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||||
<div class="header item">{{.i18n.Tr "admin_panel"}}</div>
|
{{.i18n.Tr "admin.dashboard"}}
|
||||||
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
</a>
|
||||||
{{.i18n.Tr "admin.dashboard"}}
|
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
|
||||||
</a>
|
{{.i18n.Tr "admin.users"}}
|
||||||
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
|
</a>
|
||||||
{{.i18n.Tr "admin.users"}}
|
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
|
||||||
</a>
|
{{.i18n.Tr "admin.organizations"}}
|
||||||
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
|
</a>
|
||||||
{{.i18n.Tr "admin.organizations"}}
|
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
|
||||||
</a>
|
{{.i18n.Tr "admin.repositories"}}
|
||||||
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
|
</a>
|
||||||
{{.i18n.Tr "admin.repositories"}}
|
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
||||||
</a>
|
{{.i18n.Tr "admin.authentication"}}
|
||||||
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
</a>
|
||||||
{{.i18n.Tr "admin.authentication"}}
|
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
|
||||||
</a>
|
{{.i18n.Tr "admin.config"}}
|
||||||
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
|
</a>
|
||||||
{{.i18n.Tr "admin.config"}}
|
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
|
||||||
</a>
|
{{.i18n.Tr "admin.notices"}}
|
||||||
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
|
</a>
|
||||||
{{.i18n.Tr "admin.notices"}}
|
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
|
||||||
</a>
|
{{.i18n.Tr "admin.monitor"}}
|
||||||
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
|
</a>
|
||||||
{{.i18n.Tr "admin.monitor"}}
|
</div>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,96 +1,92 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin notice">
|
<div class="admin notice">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached table segment">
|
||||||
{{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
|
<table class="ui very basic select selectable table">
|
||||||
</h4>
|
<thead>
|
||||||
<div class="ui attached table segment">
|
<tr>
|
||||||
<table class="ui very basic select selectable table">
|
<th></th>
|
||||||
<thead>
|
<th>ID</th>
|
||||||
<tr>
|
<th>{{.i18n.Tr "admin.notices.type"}}</th>
|
||||||
<th></th>
|
<th>{{.i18n.Tr "admin.notices.desc"}}</th>
|
||||||
<th>ID</th>
|
<th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.notices.type"}}</th>
|
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||||
<th>{{.i18n.Tr "admin.notices.desc"}}</th>
|
</tr>
|
||||||
<th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
|
</thead>
|
||||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
<tbody>
|
||||||
</tr>
|
{{range .Notices}}
|
||||||
</thead>
|
<tr>
|
||||||
<tbody>
|
<td class="collapsing">
|
||||||
{{range .Notices}}
|
<div class="ui fitted checkbox" data-id="{{.ID}}">
|
||||||
<tr>
|
<input type="checkbox"> <label></label>
|
||||||
<td class="collapsing">
|
</div>
|
||||||
<div class="ui fitted checkbox" data-id="{{.ID}}">
|
</td>
|
||||||
<input type="checkbox"> <label></label>
|
<td>{{.ID}}</td>
|
||||||
</div>
|
<td>{{$.i18n.Tr .TrStr}}</td>
|
||||||
</td>
|
<td>{{SubStr .Description 0 120}}...</td>
|
||||||
<td>{{.ID}}</td>
|
<td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
|
||||||
<td>{{$.i18n.Tr .TrStr}}</td>
|
<td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
|
||||||
<td>{{SubStr .Description 0 120}}...</td>
|
</tr>
|
||||||
<td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
|
|
||||||
<td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
<tfoot class="full-width">
|
|
||||||
<tr>
|
|
||||||
<th></th>
|
|
||||||
<th colspan="5">
|
|
||||||
<div class="ui right">
|
|
||||||
<a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
|
|
||||||
</div>
|
|
||||||
<div class="ui floating upward dropdown small button">
|
|
||||||
<span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>
|
|
||||||
<div class="menu">
|
|
||||||
<div class="item select action" data-action="select-all">
|
|
||||||
{{.i18n.Tr "admin.notices.select_all"}}
|
|
||||||
</div>
|
|
||||||
<div class="item select action" data-action="deselect-all">
|
|
||||||
{{.i18n.Tr "admin.notices.deselect_all"}}
|
|
||||||
</div>
|
|
||||||
<div class="item select action" data-action="inverse">
|
|
||||||
{{.i18n.Tr "admin.notices.inverse_selection"}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
|
|
||||||
{{.i18n.Tr "admin.notices.delete_selected"}}
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{with .Page}}
|
|
||||||
{{if gt .TotalPages 1}}
|
|
||||||
<div class="center page buttons">
|
|
||||||
<div class="ui borderless pagination menu">
|
|
||||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
|
||||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
|
||||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
|
||||||
</a>
|
|
||||||
{{range .Pages}}
|
|
||||||
{{if eq .Num -1}}
|
|
||||||
<a class="disabled item">...</a>
|
|
||||||
{{else}}
|
|
||||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
|
||||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
|
||||||
</a>
|
|
||||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
</tbody>
|
||||||
</div>
|
<tfoot class="full-width">
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th colspan="5">
|
||||||
|
<div class="ui right">
|
||||||
|
<a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
|
||||||
|
</div>
|
||||||
|
<div class="ui floating upward dropdown small button">
|
||||||
|
<span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>
|
||||||
|
<div class="menu">
|
||||||
|
<div class="item select action" data-action="select-all">
|
||||||
|
{{.i18n.Tr "admin.notices.select_all"}}
|
||||||
|
</div>
|
||||||
|
<div class="item select action" data-action="deselect-all">
|
||||||
|
{{.i18n.Tr "admin.notices.deselect_all"}}
|
||||||
|
</div>
|
||||||
|
<div class="item select action" data-action="inverse">
|
||||||
|
{{.i18n.Tr "admin.notices.inverse_selection"}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
|
||||||
|
{{.i18n.Tr "admin.notices.delete_selected"}}
|
||||||
|
</div>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{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"}} <i class="icon right arrow"></i>
|
||||||
|
</a>
|
||||||
|
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,48 +1,44 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin user">
|
<div class="admin user">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
{{template "admin/base/search" .}}
|
||||||
</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>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|
|
@ -1,52 +1,48 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin user">
|
<div class="admin user">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
{{template "admin/base/search" .}}
|
||||||
</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>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,120 +1,116 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin edit user">
|
<div class="admin edit user">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.users.edit_account"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "admin.users.edit_account"}}
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
</h4>
|
{{.CsrfTokenHtml}}
|
||||||
<div class="ui attached segment">
|
<div class="inline field {{if .Err_UserName}}error{{end}}">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||||
{{.CsrfTokenHtml}}
|
<span>{{.User.Name}}</span>
|
||||||
<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="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="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="field">
|
|
||||||
<button class="ui green button">{{.i18n.Tr "admin.users.update_profile"}}</button>
|
|
||||||
<div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.User.ID}}">{{.i18n.Tr "admin.users.delete_account"}}</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- 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="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="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="field">
|
||||||
|
<button class="ui green button">{{.i18n.Tr "admin.users.update_profile"}}</button>
|
||||||
|
<div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.User.ID}}">{{.i18n.Tr "admin.users.delete_account"}}</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,59 +1,55 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin user">
|
<div class="admin user">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||||
{{template "base/alert" .}}
|
<div class="ui right">
|
||||||
<h4 class="ui top attached header">
|
<a class="ui black tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
|
||||||
{{.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>
|
||||||
|
</h4>
|
||||||
|
<div class="ui attached segment">
|
||||||
|
{{template "admin/base/search" .}}
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|
|
@ -1,65 +1,61 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="admin new user">
|
<div class="admin new user">
|
||||||
|
{{template "admin/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "admin/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "admin.users.new_account"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "admin.users.new_account"}}
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
</h4>
|
{{.CsrfTokenHtml}}
|
||||||
<div class="ui attached segment">
|
<!-- Types and name -->
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||||
{{.CsrfTokenHtml}}
|
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||||
<!-- Types and name -->
|
<div class="ui selection type dropdown">
|
||||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
|
||||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||||
<div class="ui selection type dropdown">
|
<i class="dropdown icon"></i>
|
||||||
<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
|
<div class="menu">
|
||||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||||
<i class="dropdown icon"></i>
|
{{range .Sources}}
|
||||||
<div class="menu">
|
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
{{end}}
|
||||||
{{range .Sources}}
|
|
||||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
|
</div>
|
||||||
<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 class="field">
|
|
||||||
<button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
|
||||||
|
<label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||||
|
<input id="login_name" name="login_name" value="{{.login_name}}">
|
||||||
|
</div>
|
||||||
|
<div class="required field {{if .Err_UserName}}error{{end}}">
|
||||||
|
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||||
|
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
|
||||||
|
</div>
|
||||||
|
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||||
|
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||||
|
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||||
|
</div>
|
||||||
|
<input class="fake" type="password">
|
||||||
|
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
|
||||||
|
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||||
|
<input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Send register notify e-mail -->
|
||||||
|
{{if .CanSendEmail}}
|
||||||
|
<div class="inline field">
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<label><strong>{{.i18n.Tr "admin.users.send_register_notify"}}</strong></label>
|
||||||
|
<input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not (or .IsBareRepo .IsDiffCompare)}}
|
{{if not (or .IsBareRepo .IsDiffCompare)}}
|
||||||
<div class="ui tabs container">
|
<div class="ui tabs container">
|
||||||
<div class="ui tabular menu navbar">
|
<div class="ui tabular stackable menu navbar">
|
||||||
{{if .Repository.EnableUnit $.UnitTypeCode}}
|
{{if .Repository.EnableUnit $.UnitTypeCode}}
|
||||||
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
||||||
<i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
<i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
||||||
|
|
|
@ -1,88 +1,84 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository settings edit">
|
<div class="repository settings edit">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "repo.default_branch"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached table segment">
|
||||||
{{.i18n.Tr "repo.default_branch"}}
|
<form class="ui hook list form" action="{{.Link}}" method="post">
|
||||||
</h4>
|
{{.CsrfTokenHtml}}
|
||||||
<div class="ui attached table segment">
|
<input type="hidden" name="action" value="default_branch">
|
||||||
<form class="ui hook list form" action="{{.Link}}" method="post">
|
<div class="item">
|
||||||
{{.CsrfTokenHtml}}
|
{{.i18n.Tr "repo.settings.default_branch_desc"}}
|
||||||
<input type="hidden" name="action" value="default_branch">
|
|
||||||
<div class="item">
|
|
||||||
{{.i18n.Tr "repo.settings.default_branch_desc"}}
|
|
||||||
</div>
|
|
||||||
{{if not .Repository.IsBare}}
|
|
||||||
<div class="ui grid padded">
|
|
||||||
<div class="eight wide column">
|
|
||||||
<div class="ui fluid dropdown selection visible" tabindex="0">
|
|
||||||
<select name="branch">
|
|
||||||
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
|
|
||||||
{{range .Branches}}
|
|
||||||
<option value="{{.}}">{{.}}</option>
|
|
||||||
{{end}}
|
|
||||||
</select><i class="dropdown icon"></i>
|
|
||||||
<div class="default text">{{.Repository.DefaultBranch}}</div>
|
|
||||||
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
|
||||||
{{range .Branches}}
|
|
||||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="item field">
|
|
||||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if not .Repository.IsBare}}
|
||||||
<h4 class="ui top attached header">
|
<div class="ui grid padded">
|
||||||
{{.i18n.Tr "repo.settings.protected_branch"}}
|
<div class="eight wide column">
|
||||||
</h4>
|
<div class="ui fluid dropdown selection visible" tabindex="0">
|
||||||
<div class="ui attached table segment">
|
<select name="branch">
|
||||||
<div class="ui grid padded">
|
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
|
||||||
<div class="eight wide column">
|
{{range .Branches}}
|
||||||
<div class="ui fluid dropdown selection visible" tabindex="0">
|
<option value="{{.}}">{{.}}</option>
|
||||||
<select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
|
{{end}}
|
||||||
{{range .LeftBranches}}
|
</select><i class="dropdown icon"></i>
|
||||||
<option value="">{{$.i18n.Tr "repo.settings.choose_branch"}}</option>
|
<div class="default text">{{.Repository.DefaultBranch}}</div>
|
||||||
<option value="{{.}}">{{.}}</option>
|
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
||||||
{{end}}
|
{{range .Branches}}
|
||||||
</select><i class="dropdown icon"></i>
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||||
<div class="default text">{{.i18n.Tr "repo.settings.choose_branch"}}</div>
|
{{end}}
|
||||||
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
|
||||||
{{range .LeftBranches}}
|
|
||||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="item field">
|
||||||
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="ui grid padded">
|
<h4 class="ui top attached header">
|
||||||
<div class="sixteen wide column">
|
{{.i18n.Tr "repo.settings.protected_branch"}}
|
||||||
<table class="ui single line table padded">
|
</h4>
|
||||||
<tbody>
|
<div class="ui attached table segment">
|
||||||
{{range .ProtectedBranches}}
|
<div class="ui grid padded">
|
||||||
<tr>
|
<div class="eight wide column">
|
||||||
<td><div class="ui large label">{{.BranchName}}</div></td>
|
<div class="ui fluid dropdown selection visible" tabindex="0">
|
||||||
<td class="right aligned"><button class="rm ui red button" data-url="{{$.Repository.Link}}/settings/branches?action=protected_branch&id={{.ID}}" data-val="{{.BranchName}}">Delete</button></td>
|
<select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
|
||||||
</tr>
|
{{range .LeftBranches}}
|
||||||
{{else}}
|
<option value="">{{$.i18n.Tr "repo.settings.choose_branch"}}</option>
|
||||||
<tr class="center aligned"><td>{{.i18n.Tr "repo.settings.no_protected_branch"}}</td></tr>
|
<option value="{{.}}">{{.}}</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
</tbody>
|
</select><i class="dropdown icon"></i>
|
||||||
</table>
|
<div class="default text">{{.i18n.Tr "repo.settings.choose_branch"}}</div>
|
||||||
|
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
|
||||||
|
{{range .LeftBranches}}
|
||||||
|
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="ui grid padded">
|
||||||
|
<div class="sixteen wide column">
|
||||||
|
<table class="ui single line table padded">
|
||||||
|
<tbody>
|
||||||
|
{{range .ProtectedBranches}}
|
||||||
|
<tr>
|
||||||
|
<td><div class="ui large label">{{.BranchName}}</div></td>
|
||||||
|
<td class="right aligned"><button class="rm ui red button" data-url="{{$.Repository.Link}}/settings/branches?action=protected_branch&id={{.ID}}" data-val="{{.BranchName}}">Delete</button></td>
|
||||||
|
</tr>
|
||||||
|
{{else}}
|
||||||
|
<tr class="center aligned"><td>{{.i18n.Tr "repo.settings.no_protected_branch"}}</td></tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,58 +1,54 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository settings collaboration">
|
<div class="repository settings collaboration">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment collaborator list">
|
||||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
{{range .Collaborators}}
|
||||||
</h4>
|
<div class="item ui grid">
|
||||||
<div class="ui attached segment collaborator list">
|
<div class="ui five wide column">
|
||||||
{{range .Collaborators}}
|
<a href="{{AppSubUrl}}/{{.Name}}">
|
||||||
<div class="item ui grid">
|
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
||||||
<div class="ui five wide column">
|
{{.DisplayName}}
|
||||||
<a href="{{AppSubUrl}}/{{.Name}}">
|
</a>
|
||||||
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
</div>
|
||||||
{{.DisplayName}}
|
<div class="ui eight wide column">
|
||||||
</a>
|
<span class="octicon octicon-shield"></span>
|
||||||
</div>
|
<div class="ui inline dropdown">
|
||||||
<div class="ui eight wide column">
|
<div class="text">{{$.i18n.Tr .Collaboration.ModeI18nKey}}</div>
|
||||||
<span class="octicon octicon-shield"></span>
|
<i class="dropdown icon"></i>
|
||||||
<div class="ui inline dropdown">
|
<div class="access-mode menu" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}">
|
||||||
<div class="text">{{$.i18n.Tr .Collaboration.ModeI18nKey}}</div>
|
<div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.admin"}}" data-value="3">{{$.i18n.Tr "repo.settings.collaboration.admin"}}</div>
|
||||||
<i class="dropdown icon"></i>
|
<div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.write"}}" data-value="2">{{$.i18n.Tr "repo.settings.collaboration.write"}}</div>
|
||||||
<div class="access-mode menu" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}">
|
<div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.read"}}" data-value="1">{{$.i18n.Tr "repo.settings.collaboration.read"}}</div>
|
||||||
<div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.admin"}}" data-value="3">{{$.i18n.Tr "repo.settings.collaboration.admin"}}</div>
|
|
||||||
<div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.write"}}" data-value="2">{{$.i18n.Tr "repo.settings.collaboration.write"}}</div>
|
|
||||||
<div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.read"}}" data-value="1">{{$.i18n.Tr "repo.settings.collaboration.read"}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui two wide column">
|
|
||||||
<button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
|
||||||
{{$.i18n.Tr "repo.settings.delete_collaborator"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
</div>
|
||||||
|
<div class="ui two wide column">
|
||||||
|
<button class="ui red tiny button inline text-thin delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||||
|
{{$.i18n.Tr "repo.settings.delete_collaborator"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui bottom attached segment">
|
{{end}}
|
||||||
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
|
</div>
|
||||||
{{.CsrfTokenHtml}}
|
<div class="ui bottom attached segment">
|
||||||
<div class="inline field ui left">
|
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
|
||||||
<div id="search-user-box">
|
{{.CsrfTokenHtml}}
|
||||||
<div class="ui input">
|
<div class="inline field ui left">
|
||||||
<input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" autofocus required>
|
<div id="search-user-box">
|
||||||
</div>
|
<div class="ui input">
|
||||||
<div class="ui segment results hide"></div>
|
<input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" autofocus required>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
|
<div class="ui segment results hide"></div>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,74 +1,70 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository settings">
|
<div class="repository settings">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||||
{{template "base/alert" .}}
|
<div class="ui right">
|
||||||
<h4 class="ui top attached header">
|
<div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
|
||||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
</div>
|
||||||
<div class="ui right">
|
</h4>
|
||||||
<div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
|
<div class="ui attached segment">
|
||||||
</div>
|
{{if .Deploykeys}}
|
||||||
</h4>
|
<div class="ui key list">
|
||||||
<div class="ui attached segment">
|
{{range .Deploykeys}}
|
||||||
{{if .Deploykeys}}
|
<div class="item ui grid">
|
||||||
<div class="ui key list">
|
<div class="one wide column">
|
||||||
{{range .Deploykeys}}
|
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i>
|
||||||
<div class="item ui grid">
|
</div>
|
||||||
<div class="one wide column">
|
<div class="one wide column">
|
||||||
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i>
|
<i class="mega-octicon octicon-key left"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="one wide column">
|
<div class="eleven wide column">
|
||||||
<i class="mega-octicon octicon-key left"></i>
|
<strong>{{.Name}}</strong>
|
||||||
</div>
|
<div class="print meta">
|
||||||
<div class="eleven wide column">
|
{{.Fingerprint}}
|
||||||
<strong>{{.Name}}</strong>
|
|
||||||
<div class="print meta">
|
|
||||||
{{.Fingerprint}}
|
|
||||||
</div>
|
|
||||||
<div class="activity meta">
|
|
||||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="two wide column">
|
|
||||||
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
|
||||||
{{$.i18n.Tr "settings.delete_key"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
<div class="activity meta">
|
||||||
|
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="two wide column">
|
||||||
|
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||||
|
{{$.i18n.Tr "settings.delete_key"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
|
||||||
{{.i18n.Tr "repo.settings.no_deploy_keys"}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<br>
|
{{else}}
|
||||||
<div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel">
|
{{.i18n.Tr "repo.settings.no_deploy_keys"}}
|
||||||
<h4 class="ui top attached header">
|
{{end}}
|
||||||
{{.i18n.Tr "repo.settings.add_deploy_key"}}
|
</div>
|
||||||
</h4>
|
<br>
|
||||||
<div class="ui attached segment">
|
<div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<h4 class="ui top attached header">
|
||||||
{{.CsrfTokenHtml}}
|
{{.i18n.Tr "repo.settings.add_deploy_key"}}
|
||||||
<div class="field">
|
</h4>
|
||||||
{{.i18n.Tr "repo.settings.deploy_key_desc"}}
|
<div class="ui attached segment">
|
||||||
</div>
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
<div class="field {{if .Err_Title}}error{{end}}">
|
{{.CsrfTokenHtml}}
|
||||||
<label for="title">{{.i18n.Tr "repo.settings.title"}}</label>
|
<div class="field">
|
||||||
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
|
{{.i18n.Tr "repo.settings.deploy_key_desc"}}
|
||||||
</div>
|
|
||||||
<div class="field {{if .Err_Content}}error{{end}}">
|
|
||||||
<label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
|
|
||||||
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
|
|
||||||
</div>
|
|
||||||
<button class="ui green button">
|
|
||||||
{{.i18n.Tr "repo.settings.add_deploy_key"}}
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="field {{if .Err_Title}}error{{end}}">
|
||||||
|
<label for="title">{{.i18n.Tr "repo.settings.title"}}</label>
|
||||||
|
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
|
||||||
|
</div>
|
||||||
|
<div class="field {{if .Err_Content}}error{{end}}">
|
||||||
|
<label for="content">{{.i18n.Tr "repo.settings.deploy_key_content"}}</label>
|
||||||
|
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
|
||||||
|
</div>
|
||||||
|
<button class="ui green button">
|
||||||
|
{{.i18n.Tr "repo.settings.add_deploy_key"}}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,35 +1,31 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository settings edit githook">
|
<div class="repository settings edit githook">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "repo.settings.githooks"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "repo.settings.githooks"}}
|
<p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p>
|
||||||
</h4>
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
<div class="ui attached segment">
|
{{.CsrfTokenHtml}}
|
||||||
<p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p>
|
{{with .Hook}}
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<div class="inline field">
|
||||||
{{.CsrfTokenHtml}}
|
<label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
|
||||||
{{with .Hook}}
|
<span>{{.Name}}</span>
|
||||||
<div class="inline field">
|
</div>
|
||||||
<label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
|
<div class="field">
|
||||||
<span>{{.Name}}</span>
|
<label for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
|
||||||
</div>
|
<textarea id="content" name="content" rows="20" wrap="off" autofocus>{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
||||||
<div class="field">
|
</div>
|
||||||
<label for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
|
|
||||||
<textarea id="content" name="content" rows="20" wrap="off" autofocus>{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,28 +1,24 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository settings githooks">
|
<div class="repository settings githooks">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "repo.settings.githooks"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached table segment">
|
||||||
{{.i18n.Tr "repo.settings.githooks"}}
|
<div class="ui hook list">
|
||||||
</h4>
|
<div class="item">
|
||||||
<div class="ui attached table segment">
|
{{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}
|
||||||
<div class="ui hook list">
|
|
||||||
<div class="item">
|
|
||||||
{{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}
|
|
||||||
</div>
|
|
||||||
{{range .Hooks}}
|
|
||||||
<div class="item">
|
|
||||||
<span class="text {{if .IsActive}}green{{else}}grey{{end}}"><i class="octicon octicon-primitive-dot"></i></span>
|
|
||||||
<span>{{.Name}}</span>
|
|
||||||
<a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}"><i class="fa fa-pencil"></i></a>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
{{range .Hooks}}
|
||||||
|
<div class="item">
|
||||||
|
<span class="text {{if .IsActive}}green{{else}}grey{{end}}"><i class="octicon octicon-primitive-dot"></i></span>
|
||||||
|
<span>{{.Name}}</span>
|
||||||
|
<a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}"><i class="fa fa-pencil"></i></a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,43 +1,41 @@
|
||||||
<div class="twelve wide column content">
|
{{template "base/alert" .}}
|
||||||
{{template "base/alert" .}}
|
<h4 class="ui top attached header">
|
||||||
<h4 class="ui top attached header">
|
{{.i18n.Tr "repo.settings.hooks"}}
|
||||||
{{.i18n.Tr "repo.settings.hooks"}}
|
<div class="ui right">
|
||||||
<div class="ui right">
|
<div class="ui floating1 jump dropdown">
|
||||||
<div class="ui floating1 jump dropdown">
|
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
||||||
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
<div class="menu">
|
||||||
<div class="menu">
|
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
||||||
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
<img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gitea
|
||||||
<img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gitea
|
</a>
|
||||||
</a>
|
<a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
|
||||||
<a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
|
<img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
|
||||||
<img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
|
</a>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</h4>
|
</div>
|
||||||
<div class="ui attached table segment">
|
</h4>
|
||||||
<div class="ui hook list">
|
<div class="ui attached table segment">
|
||||||
|
<div class="ui hook list">
|
||||||
|
<div class="item">
|
||||||
|
{{.Description | Str2html}}
|
||||||
|
</div>
|
||||||
|
{{range .Webhooks}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
{{.Description | Str2html}}
|
{{if eq .LastStatus 1}}
|
||||||
</div>
|
<span class="text green"><i class="octicon octicon-check"></i></span>
|
||||||
{{range .Webhooks}}
|
{{else if eq .LastStatus 2}}
|
||||||
<div class="item">
|
<span class="text red"><i class="octicon octicon-alert"></i></span>
|
||||||
{{if eq .LastStatus 1}}
|
{{else}}
|
||||||
<span class="text green"><i class="octicon octicon-check"></i></span>
|
<span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
|
||||||
{{else if eq .LastStatus 2}}
|
{{end}}
|
||||||
<span class="text red"><i class="octicon octicon-alert"></i></span>
|
<a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
|
||||||
{{else}}
|
<div class="ui right">
|
||||||
<span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
|
<span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
|
||||||
{{end}}
|
<span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
|
||||||
<a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
|
|
||||||
<div class="ui right">
|
|
||||||
<span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
|
|
||||||
<span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
</div>
|
||||||
</div>
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,25 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository settings new webhook">
|
<div class="repository settings new webhook">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||||
{{template "base/alert" .}}
|
<div class="ui right">
|
||||||
<h4 class="ui top attached header">
|
{{if eq .HookType "gogs"}}
|
||||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
||||||
<div class="ui right">
|
{{else if eq .HookType "slack"}}
|
||||||
{{if eq .HookType "gogs"}}
|
<img class="img-13" src="{{AppSubUrl}}/img/slack.png">
|
||||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
{{end}}
|
||||||
{{else if eq .HookType "slack"}}
|
|
||||||
<img class="img-13" src="{{AppSubUrl}}/img/slack.png">
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</h4>
|
|
||||||
<div class="ui attached segment">
|
|
||||||
{{template "repo/settings/hook_gogs" .}}
|
|
||||||
{{template "repo/settings/hook_slack" .}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{template "repo/settings/hook_history" .}}
|
|
||||||
</div>
|
</div>
|
||||||
|
</h4>
|
||||||
|
<div class="ui attached segment">
|
||||||
|
{{template "repo/settings/hook_gogs" .}}
|
||||||
|
{{template "repo/settings/hook_slack" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{template "repo/settings/hook_history" .}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository settings webhooks">
|
<div class="repository settings webhooks">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "repo/settings/hook_list" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
|
||||||
{{template "repo/settings/hook_list" .}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|
|
@ -1,27 +1,24 @@
|
||||||
<div class="four wide column">
|
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
|
||||||
<div class="ui vertical menu">
|
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||||
<div class="header item">{{.i18n.Tr "repo.settings"}}</div>
|
{{.i18n.Tr "repo.settings.options"}}
|
||||||
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
|
</a>
|
||||||
{{.i18n.Tr "repo.settings.options"}}
|
<a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
|
||||||
|
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||||
|
</a>
|
||||||
|
{{if not .Repository.IsBare}}
|
||||||
|
<a class="{{if .PageIsSettingsBranches}}active{{end}} item" href="{{.RepoLink}}/settings/branches">
|
||||||
|
{{.i18n.Tr "repo.settings.branches"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
|
{{end}}
|
||||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
|
||||||
|
{{.i18n.Tr "repo.settings.hooks"}}
|
||||||
|
</a>
|
||||||
|
{{if .SignedUser.CanEditGitHook}}
|
||||||
|
<a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
|
||||||
|
{{.i18n.Tr "repo.settings.githooks"}}
|
||||||
</a>
|
</a>
|
||||||
{{if not .Repository.IsBare}}
|
{{end}}
|
||||||
<a class="{{if .PageIsSettingsBranches}}active{{end}} item" href="{{.RepoLink}}/settings/branches">
|
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
|
||||||
{{.i18n.Tr "repo.settings.branches"}}
|
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
|
||||||
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
|
|
||||||
{{.i18n.Tr "repo.settings.hooks"}}
|
|
||||||
</a>
|
|
||||||
{{if .SignedUser.CanEditGitHook}}
|
|
||||||
<a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
|
|
||||||
{{.i18n.Tr "repo.settings.githooks"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
|
|
||||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,256 +1,252 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository settings options">
|
<div class="repository settings options">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{template "repo/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "repo/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "repo.settings.basic_settings"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "repo.settings.basic_settings"}}
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
</h4>
|
{{.CsrfTokenHtml}}
|
||||||
<div class="ui attached segment">
|
<input type="hidden" name="action" value="update">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<div class="required field {{if .Err_RepoName}}error{{end}}">
|
||||||
{{.CsrfTokenHtml}}
|
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||||
<input type="hidden" name="action" value="update">
|
<input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
|
||||||
<div class="required field {{if .Err_RepoName}}error{{end}}">
|
</div>
|
||||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
{{if not .Repository.IsFork}}
|
||||||
<input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
|
<div class="inline field">
|
||||||
|
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}} {{if .Repository.NumForks}}<span class="text red">{{.i18n.Tr "repo.visiblity_fork_helper"}}</span>{{end}}</label>
|
||||||
</div>
|
</div>
|
||||||
{{if not .Repository.IsFork}}
|
</div>
|
||||||
<div class="inline field">
|
{{end}}
|
||||||
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
<div class="field {{if .Err_Description}}error{{end}}">
|
||||||
<div class="ui checkbox">
|
<label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label>
|
||||||
<input name="private" type="checkbox" {{if .Repository.IsPrivate}}checked{{end}}>
|
<textarea id="description" name="description" rows="2">{{.Repository.Description}}</textarea>
|
||||||
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}} {{if .Repository.NumForks}}<span class="text red">{{.i18n.Tr "repo.visiblity_fork_helper"}}</span>{{end}}</label>
|
</div>
|
||||||
</div>
|
<div class="field {{if .Err_Website}}error{{end}}">
|
||||||
</div>
|
<label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
|
||||||
{{end}}
|
<input id="website" name="website" type="url" value="{{.Repository.Website}}">
|
||||||
<div class="field {{if .Err_Description}}error{{end}}">
|
|
||||||
<label for="description">{{$.i18n.Tr "repo.repo_desc"}}</label>
|
|
||||||
<textarea id="description" name="description" rows="2">{{.Repository.Description}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="field {{if .Err_Website}}error{{end}}">
|
|
||||||
<label for="website">{{.i18n.Tr "repo.settings.site"}}</label>
|
|
||||||
<input id="website" name="website" type="url" value="{{.Repository.Website}}">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if .Repository.IsMirror}}
|
<div class="field">
|
||||||
<h4 class="ui top attached header">
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||||
{{.i18n.Tr "repo.settings.mirror_settings"}}
|
</div>
|
||||||
</h4>
|
</form>
|
||||||
<div class="ui attached segment">
|
</div>
|
||||||
<form class="ui form" method="post">
|
|
||||||
{{.CsrfTokenHtml}}
|
{{if .Repository.IsMirror}}
|
||||||
<input type="hidden" name="action" value="mirror">
|
<h4 class="ui top attached header">
|
||||||
<div class="inline field {{if .Err_EnablePrune}}error{{end}}">
|
{{.i18n.Tr "repo.settings.mirror_settings"}}
|
||||||
<label>{{.i18n.Tr "repo.mirror_prune"}}</label>
|
</h4>
|
||||||
<div class="ui checkbox">
|
<div class="ui attached segment">
|
||||||
<input id="enable_prune" name="enable_prune" type="checkbox" {{if .MirrorEnablePrune}}checked{{end}}>
|
<form class="ui form" method="post">
|
||||||
<label>{{.i18n.Tr "repo.mirror_prune_desc"}}</label>
|
{{.CsrfTokenHtml}}
|
||||||
|
<input type="hidden" name="action" value="mirror">
|
||||||
|
<div class="inline field {{if .Err_EnablePrune}}error{{end}}">
|
||||||
|
<label>{{.i18n.Tr "repo.mirror_prune"}}</label>
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input id="enable_prune" name="enable_prune" type="checkbox" {{if .MirrorEnablePrune}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "repo.mirror_prune_desc"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inline field {{if .Err_Interval}}error{{end}}">
|
||||||
|
<label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
|
||||||
|
<input id="interval" name="interval" type="number" value="{{.MirrorInterval}}">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="mirror_address">{{.i18n.Tr "repo.mirror_address"}}</label>
|
||||||
|
<input id="mirror_address" name="mirror_address" value="{{.Mirror.FullAddress}}" required>
|
||||||
|
<p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
|
<form class="ui form" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<input type="hidden" name="action" value="mirror-sync">
|
||||||
|
<div class="inline field">
|
||||||
|
<label>{{.i18n.Tr "repo.mirror_last_synced"}}</label>
|
||||||
|
<span>{{.Mirror.Updated}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<button class="ui blue button">{{$.i18n.Tr "repo.settings.sync_mirror"}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
<h4 class="ui top attached header">
|
||||||
|
{{.i18n.Tr "repo.settings.advanced_settings"}}
|
||||||
|
</h4>
|
||||||
|
<div class="ui attached segment">
|
||||||
|
<form class="ui form" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<input type="hidden" name="action" value="advanced">
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<label>{{.i18n.Tr "repo.wiki"}}</label>
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if or (.Repository.EnableUnit $.UnitTypeWiki) (.Repository.EnableUnit $.UnitTypeExternalWiki)}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.wiki_desc"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field {{if not (.Repository.EnableUnit $.UnitTypeWiki)}}disabled{{end}}" id="wiki_box">
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.EnableUnit $.UnitTypeExternalWiki)}}checked{{end}}/>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.use_internal_wiki"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.EnableUnit $.UnitTypeExternalWiki}}checked{{end}}/>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.use_external_wiki"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field {{if not (.Repository.EnableUnit $.UnitTypeExternalWiki)}}disabled{{end}}" id="external_wiki_box">
|
||||||
|
<label for="external_wiki_url">{{.i18n.Tr "repo.settings.external_wiki_url"}}</label>
|
||||||
|
<input id="external_wiki_url" name="external_wiki_url" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}">
|
||||||
|
<p class="help">{{.i18n.Tr "repo.settings.external_wiki_url_desc"}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<label>{{.i18n.Tr "repo.issues"}}</label>
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if or (.Repository.EnableUnit $.UnitTypeIssues) (.Repository.EnableUnit $.UnitTypeExternalTracker)}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.issues_desc"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field {{if not (.Repository.EnableUnit $.UnitTypeIssues)}}disabled{{end}}" id="issue_box">
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-target="#external_issue_box" {{if not (.Repository.EnableUnit $.UnitTypeExternalTracker)}}checked{{end}}/>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.use_internal_issue_tracker"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-target="#external_issue_box" {{if .Repository.EnableUnit $.UnitTypeExternalTracker}}checked{{end}}/>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.use_external_issue_tracker"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field {{if not (.Repository.EnableUnit $.UnitTypeExternalTracker)}}disabled{{end}}" id="external_issue_box">
|
||||||
|
<div class="field">
|
||||||
|
<label for="external_tracker_url">{{.i18n.Tr "repo.settings.external_tracker_url"}}</label>
|
||||||
|
<input id="external_tracker_url" name="external_tracker_url" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerURL}}">
|
||||||
|
<p class="help">{{.i18n.Tr "repo.settings.external_tracker_url_desc"}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
|
||||||
|
<input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
|
||||||
|
<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="inline fields">
|
||||||
|
<label for="issue_style">{{.i18n.Tr "repo.settings.tracker_issue_style"}}</label>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
{{$externalTracker := (.Repository.MustGetUnit $.UnitTypeExternalTracker)}}
|
||||||
|
{{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}}
|
||||||
|
<input class="hidden" tabindex="0" name="tracker_issue_style" type="radio" value="numeric" {{if $externalTrackerStyle}}{{if eq $externalTrackerStyle "numeric"}}checked=""{{end}}{{end}}/>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.tracker_issue_style.numeric"}} <span class="ui light grey text">(#1234)</span></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field {{if .Err_Interval}}error{{end}}">
|
|
||||||
<label for="interval">{{.i18n.Tr "repo.mirror_interval"}}</label>
|
|
||||||
<input id="interval" name="interval" type="number" value="{{.MirrorInterval}}">
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="mirror_address">{{.i18n.Tr "repo.mirror_address"}}</label>
|
<div class="ui radio checkbox">
|
||||||
<input id="mirror_address" name="mirror_address" value="{{.Mirror.FullAddress}}" required>
|
<input class="hidden" tabindex="0" name="tracker_issue_style" type="radio" value="alphanumeric" {{if $externalTrackerStyle}}{{if eq $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle "alphanumeric"}}checked=""{{end}}{{end}} />
|
||||||
<p class="help">{{.i18n.Tr "repo.mirror_address_desc"}}</p>
|
<label>{{.i18n.Tr "repo.settings.tracker_issue_style.alphanumeric"}} <span class="ui light grey text">(ABC-123, DEFG-234)</span></label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
{{if .Repository.CanEnablePulls}}
|
||||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
<div class="ui divider"></div>
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="ui divider"></div>
|
<div class="inline field">
|
||||||
|
<label>{{.i18n.Tr "repo.pulls"}}</label>
|
||||||
<form class="ui form" method="post">
|
<div class="ui checkbox">
|
||||||
{{.CsrfTokenHtml}}
|
<input name="enable_pulls" type="checkbox" {{if .Repository.EnableUnit $.UnitTypePullRequests}}checked{{end}}>
|
||||||
<input type="hidden" name="action" value="mirror-sync">
|
<label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
|
||||||
<div class="inline field">
|
</div>
|
||||||
<label>{{.i18n.Tr "repo.mirror_last_synced"}}</label>
|
|
||||||
<span>{{.Mirror.Updated}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<button class="ui blue button">{{$.i18n.Tr "repo.settings.sync_mirror"}}</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<h4 class="ui top attached header">
|
<div class="ui divider"></div>
|
||||||
{{.i18n.Tr "repo.settings.advanced_settings"}}
|
<div class="field">
|
||||||
</h4>
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||||
<div class="ui attached segment">
|
|
||||||
<form class="ui form" method="post">
|
|
||||||
{{.CsrfTokenHtml}}
|
|
||||||
<input type="hidden" name="action" value="advanced">
|
|
||||||
|
|
||||||
<div class="inline field">
|
|
||||||
<label>{{.i18n.Tr "repo.wiki"}}</label>
|
|
||||||
<div class="ui checkbox">
|
|
||||||
<input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if or (.Repository.EnableUnit $.UnitTypeWiki) (.Repository.EnableUnit $.UnitTypeExternalWiki)}}checked{{end}}>
|
|
||||||
<label>{{.i18n.Tr "repo.settings.wiki_desc"}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="field {{if not (.Repository.EnableUnit $.UnitTypeWiki)}}disabled{{end}}" id="wiki_box">
|
|
||||||
<div class="field">
|
|
||||||
<div class="ui radio checkbox">
|
|
||||||
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.EnableUnit $.UnitTypeExternalWiki)}}checked{{end}}/>
|
|
||||||
<label>{{.i18n.Tr "repo.settings.use_internal_wiki"}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<div class="ui radio checkbox">
|
|
||||||
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.EnableUnit $.UnitTypeExternalWiki}}checked{{end}}/>
|
|
||||||
<label>{{.i18n.Tr "repo.settings.use_external_wiki"}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="field {{if not (.Repository.EnableUnit $.UnitTypeExternalWiki)}}disabled{{end}}" id="external_wiki_box">
|
|
||||||
<label for="external_wiki_url">{{.i18n.Tr "repo.settings.external_wiki_url"}}</label>
|
|
||||||
<input id="external_wiki_url" name="external_wiki_url" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalWiki).ExternalWikiConfig.ExternalWikiURL}}">
|
|
||||||
<p class="help">{{.i18n.Tr "repo.settings.external_wiki_url_desc"}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ui divider"></div>
|
|
||||||
|
|
||||||
<div class="inline field">
|
|
||||||
<label>{{.i18n.Tr "repo.issues"}}</label>
|
|
||||||
<div class="ui checkbox">
|
|
||||||
<input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if or (.Repository.EnableUnit $.UnitTypeIssues) (.Repository.EnableUnit $.UnitTypeExternalTracker)}}checked{{end}}>
|
|
||||||
<label>{{.i18n.Tr "repo.settings.issues_desc"}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="field {{if not (.Repository.EnableUnit $.UnitTypeIssues)}}disabled{{end}}" id="issue_box">
|
|
||||||
<div class="field">
|
|
||||||
<div class="ui radio checkbox">
|
|
||||||
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-target="#external_issue_box" {{if not (.Repository.EnableUnit $.UnitTypeExternalTracker)}}checked{{end}}/>
|
|
||||||
<label>{{.i18n.Tr "repo.settings.use_internal_issue_tracker"}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<div class="ui radio checkbox">
|
|
||||||
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-target="#external_issue_box" {{if .Repository.EnableUnit $.UnitTypeExternalTracker}}checked{{end}}/>
|
|
||||||
<label>{{.i18n.Tr "repo.settings.use_external_issue_tracker"}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="field {{if not (.Repository.EnableUnit $.UnitTypeExternalTracker)}}disabled{{end}}" id="external_issue_box">
|
|
||||||
<div class="field">
|
|
||||||
<label for="external_tracker_url">{{.i18n.Tr "repo.settings.external_tracker_url"}}</label>
|
|
||||||
<input id="external_tracker_url" name="external_tracker_url" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerURL}}">
|
|
||||||
<p class="help">{{.i18n.Tr "repo.settings.external_tracker_url_desc"}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
|
|
||||||
<input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
|
|
||||||
<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="inline fields">
|
|
||||||
<label for="issue_style">{{.i18n.Tr "repo.settings.tracker_issue_style"}}</label>
|
|
||||||
<div class="field">
|
|
||||||
<div class="ui radio checkbox">
|
|
||||||
{{$externalTracker := (.Repository.MustGetUnit $.UnitTypeExternalTracker)}}
|
|
||||||
{{$externalTrackerStyle := $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle}}
|
|
||||||
<input class="hidden" tabindex="0" name="tracker_issue_style" type="radio" value="numeric" {{if $externalTrackerStyle}}{{if eq $externalTrackerStyle "numeric"}}checked=""{{end}}{{end}}/>
|
|
||||||
<label>{{.i18n.Tr "repo.settings.tracker_issue_style.numeric"}} <span class="ui light grey text">(#1234)</span></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<div class="ui radio checkbox">
|
|
||||||
<input class="hidden" tabindex="0" name="tracker_issue_style" type="radio" value="alphanumeric" {{if $externalTrackerStyle}}{{if eq $externalTracker.ExternalTrackerConfig.ExternalTrackerStyle "alphanumeric"}}checked=""{{end}}{{end}} />
|
|
||||||
<label>{{.i18n.Tr "repo.settings.tracker_issue_style.alphanumeric"}} <span class="ui light grey text">(ABC-123, DEFG-234)</span></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{if .Repository.CanEnablePulls}}
|
|
||||||
<div class="ui divider"></div>
|
|
||||||
|
|
||||||
<div class="inline field">
|
|
||||||
<label>{{.i18n.Tr "repo.pulls"}}</label>
|
|
||||||
<div class="ui checkbox">
|
|
||||||
<input name="enable_pulls" type="checkbox" {{if .Repository.EnableUnit $.UnitTypePullRequests}}checked{{end}}>
|
|
||||||
<label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="ui divider"></div>
|
|
||||||
<div class="field">
|
|
||||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{if .IsRepositoryOwner}}
|
{{if .IsRepositoryOwner}}
|
||||||
<h4 class="ui top attached warning header">
|
<h4 class="ui top attached warning header">
|
||||||
{{.i18n.Tr "repo.settings.danger_zone"}}
|
{{.i18n.Tr "repo.settings.danger_zone"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached warning table danger segment">
|
<div class="ui attached warning table danger segment">
|
||||||
{{if .Repository.IsMirror}}
|
{{if .Repository.IsMirror}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
<button class="ui basic red show-modal button" data-modal="#convert-repo-modal">{{.i18n.Tr "repo.settings.convert"}}</button>
|
<button class="ui basic red show-modal button" data-modal="#convert-repo-modal">{{.i18n.Tr "repo.settings.convert"}}</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h5>{{.i18n.Tr "repo.settings.convert"}}</h5>
|
<h5>{{.i18n.Tr "repo.settings.convert"}}</h5>
|
||||||
<p>{{.i18n.Tr "repo.settings.convert_desc"}}</p>
|
<p>{{.i18n.Tr "repo.settings.convert_desc"}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
{{end}}
|
||||||
|
<div class="item">
|
||||||
|
<div class="ui right">
|
||||||
|
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h5>{{.i18n.Tr "repo.settings.transfer"}}</h5>
|
||||||
|
<p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{if .Repository.EnableUnit $.UnitTypeWiki}}
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
|
<div class="item">
|
||||||
|
<div class="ui right">
|
||||||
|
<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.i18n.Tr "repo.settings.wiki_delete"}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
<div class="ui divider"></div>
|
<h5>{{.i18n.Tr "repo.settings.wiki_delete"}}</h5>
|
||||||
{{end}}
|
<p>{{.i18n.Tr "repo.settings.wiki_delete_desc"}}</p>
|
||||||
<div class="item">
|
|
||||||
<div class="ui right">
|
|
||||||
<button class="ui basic red show-modal button" data-modal="#transfer-repo-modal">{{.i18n.Tr "repo.settings.transfer"}}</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h5>{{.i18n.Tr "repo.settings.transfer"}}</h5>
|
|
||||||
<p>{{.i18n.Tr "repo.settings.transfer_desc"}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{if .Repository.EnableUnit $.UnitTypeWiki}}
|
|
||||||
<div class="ui divider"></div>
|
|
||||||
|
|
||||||
<div class="item">
|
|
||||||
<div class="ui right">
|
|
||||||
<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.i18n.Tr "repo.settings.wiki_delete"}}</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h5>{{.i18n.Tr "repo.settings.wiki_delete"}}</h5>
|
|
||||||
<p>{{.i18n.Tr "repo.settings.wiki_delete_desc"}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="ui divider"></div>
|
|
||||||
|
|
||||||
<div class="item">
|
|
||||||
<div class="ui right">
|
|
||||||
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.i18n.Tr "repo.settings.delete"}}</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h5>{{.i18n.Tr "repo.settings.delete"}}</h5>
|
|
||||||
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
|
<div class="item">
|
||||||
|
<div class="ui right">
|
||||||
|
<button class="ui basic red show-modal button" data-modal="#delete-repo-modal">{{.i18n.Tr "repo.settings.delete"}}</button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h5>{{.i18n.Tr "repo.settings.delete"}}</h5>
|
||||||
|
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,31 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings account_link">
|
<div class="user settings account_link">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.manage_account_links"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "settings.manage_account_links"}}
|
<div class="ui key list">
|
||||||
</h4>
|
<div class="item">
|
||||||
<div class="ui attached segment">
|
{{.i18n.Tr "settings.manage_account_links_desc"}}
|
||||||
<div class="ui key list">
|
|
||||||
<div class="item">
|
|
||||||
{{.i18n.Tr "settings.manage_account_links_desc"}}
|
|
||||||
</div>
|
|
||||||
{{if .AccountLinks}}
|
|
||||||
{{range $loginSource, $provider := .AccountLinks}}
|
|
||||||
<div class="item ui grid">
|
|
||||||
<div class="column">
|
|
||||||
<strong>{{$provider}}</strong>
|
|
||||||
{{if $loginSource.IsActived}}<span class="text red">{{$.i18n.Tr "settings.active"}}</span>{{end}}
|
|
||||||
<div class="ui right">
|
|
||||||
<button class="ui red tiny button delete-button" data-url="{{$.Link}}" data-id="{{$loginSource.ID}}">
|
|
||||||
{{$.i18n.Tr "settings.delete_key"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
{{if .AccountLinks}}
|
||||||
|
{{range $loginSource, $provider := .AccountLinks}}
|
||||||
|
<div class="item ui grid">
|
||||||
|
<div class="column">
|
||||||
|
<strong>{{$provider}}</strong>
|
||||||
|
{{if $loginSource.IsActived}}<span class="text red">{{$.i18n.Tr "settings.active"}}</span>{{end}}
|
||||||
|
<div class="ui right">
|
||||||
|
<button class="ui red tiny button delete-button" data-url="{{$.Link}}" data-id="{{$loginSource.ID}}">
|
||||||
|
{{$.i18n.Tr "settings.delete_key"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,63 +1,59 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings">
|
<div class="user settings">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.manage_access_token"}}
|
||||||
{{template "base/alert" .}}
|
<div class="ui right">
|
||||||
<h4 class="ui top attached header">
|
<div class="ui blue tiny show-panel button" data-panel="#add-access-token-panel">{{.i18n.Tr "settings.generate_new_token"}}</div>
|
||||||
{{.i18n.Tr "settings.manage_access_token"}}
|
</div>
|
||||||
<div class="ui right">
|
</h4>
|
||||||
<div class="ui blue tiny show-panel button" data-panel="#add-access-token-panel">{{.i18n.Tr "settings.generate_new_token"}}</div>
|
<div class="ui attached segment">
|
||||||
</div>
|
<div class="ui key list">
|
||||||
</h4>
|
<div class="item">
|
||||||
<div class="ui attached segment">
|
{{.i18n.Tr "settings.tokens_desc"}}
|
||||||
<div class="ui key list">
|
</div>
|
||||||
<div class="item">
|
{{range .Tokens}}
|
||||||
{{.i18n.Tr "settings.tokens_desc"}}
|
<div class="item ui grid">
|
||||||
|
<div class="one wide column">
|
||||||
|
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
|
||||||
</div>
|
</div>
|
||||||
{{range .Tokens}}
|
<div class="one wide column">
|
||||||
<div class="item ui grid">
|
<i class="fa fa-send fa-2x left"></i>
|
||||||
<div class="one wide column">
|
</div>
|
||||||
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
|
<div class="eleven wide column">
|
||||||
</div>
|
<strong>{{.Name}}</strong>
|
||||||
<div class="one wide column">
|
<div class="activity meta">
|
||||||
<i class="fa fa-send fa-2x left"></i>
|
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
||||||
</div>
|
|
||||||
<div class="eleven wide column">
|
|
||||||
<strong>{{.Name}}</strong>
|
|
||||||
<div class="activity meta">
|
|
||||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="two wide column">
|
|
||||||
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
|
||||||
{{$.i18n.Tr "settings.delete_token"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
</div>
|
||||||
</div>
|
<div class="two wide column">
|
||||||
</div>
|
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||||
<br>
|
{{$.i18n.Tr "settings.delete_token"}}
|
||||||
<div {{if not .HasError}}class="hide"{{end}} id="add-access-token-panel">
|
|
||||||
<h4 class="ui top attached header">
|
|
||||||
{{.i18n.Tr "settings.generate_new_token"}}
|
|
||||||
</h4>
|
|
||||||
<div class="ui attached segment">
|
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
|
||||||
{{.CsrfTokenHtml}}
|
|
||||||
<p>{{.i18n.Tr "settings.new_token_desc"}}</p>
|
|
||||||
<div class="field {{if .Err_Name}}error{{end}}">
|
|
||||||
<label for="name">{{.i18n.Tr "settings.token_name"}}</label>
|
|
||||||
<input id="name" name="name" value="{{.name}}" autofocus required>
|
|
||||||
</div>
|
|
||||||
<button class="ui green button">
|
|
||||||
{{.i18n.Tr "settings.generate_token"}}
|
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div {{if not .HasError}}class="hide"{{end}} id="add-access-token-panel">
|
||||||
|
<h4 class="ui top attached header">
|
||||||
|
{{.i18n.Tr "settings.generate_new_token"}}
|
||||||
|
</h4>
|
||||||
|
<div class="ui attached segment">
|
||||||
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<p>{{.i18n.Tr "settings.new_token_desc"}}</p>
|
||||||
|
<div class="field {{if .Err_Name}}error{{end}}">
|
||||||
|
<label for="name">{{.i18n.Tr "settings.token_name"}}</label>
|
||||||
|
<input id="name" name="name" value="{{.name}}" autofocus required>
|
||||||
|
</div>
|
||||||
|
<button class="ui green button">
|
||||||
|
{{.i18n.Tr "settings.generate_token"}}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,49 +1,45 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings avatar">
|
<div class="user settings avatar">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.avatar"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "settings.avatar"}}
|
|
||||||
</h4>
|
|
||||||
<div class="ui attached segment">
|
|
||||||
|
|
||||||
<form class="ui form" action="{{.Link}}" method="post" enctype="multipart/form-data">
|
<form class="ui form" action="{{.Link}}" method="post" enctype="multipart/form-data">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
{{if not DisableGravatar}}
|
{{if not DisableGravatar}}
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input name="source" value="lookup" type="radio" {{if not .SignedUser.UseCustomAvatar}}checked{{end}}>
|
<input name="source" value="lookup" type="radio" {{if not .SignedUser.UseCustomAvatar}}checked{{end}}>
|
||||||
<label>{{.i18n.Tr "settings.lookup_avatar_by_mail"}}</label>
|
<label>{{.i18n.Tr "settings.lookup_avatar_by_mail"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="field {{if .Err_Gravatar}}error{{end}}">
|
|
||||||
<label for="gravatar">Avatar {{.i18n.Tr "email"}}</label>
|
|
||||||
<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="inline field">
|
|
||||||
<div class="ui radio checkbox">
|
|
||||||
<input name="source" value="local" type="radio" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
|
|
||||||
<label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="inline field">
|
|
||||||
<label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
|
||||||
<input name="avatar" type="file" >
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
|
|
||||||
<a class="ui red button delete-post" data-request-url="{{.Link}}/delete" data-done-url="{{.Link}}">{{$.i18n.Tr "settings.delete_current_avatar"}}</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="field {{if .Err_Gravatar}}error{{end}}">
|
||||||
|
<label for="gravatar">Avatar {{.i18n.Tr "email"}}</label>
|
||||||
|
<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input name="source" value="local" type="radio" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
||||||
|
<input name="avatar" type="file" >
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
|
||||||
|
<a class="ui red button delete-post" data-request-url="{{.Link}}/delete" data-done-url="{{.Link}}">{{$.i18n.Tr "settings.delete_current_avatar"}}</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,33 +1,29 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings delete">
|
<div class="user settings delete">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached warning header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.delete_account"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached warning header">
|
<div class="ui attached warning segment">
|
||||||
{{.i18n.Tr "settings.delete_account"}}
|
<div class="ui red message">
|
||||||
</h4>
|
<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p>
|
||||||
<div class="ui attached warning segment">
|
|
||||||
<div class="ui red message">
|
|
||||||
<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p>
|
|
||||||
</div>
|
|
||||||
<form class="ui form" id="delete-form" action="{{.Link}}" method="post">
|
|
||||||
{{.CsrfTokenHtml}}
|
|
||||||
<input class="fake" type="password">
|
|
||||||
<div class="inline required field {{if .Err_Password}}error{{end}}">
|
|
||||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
|
||||||
<input id="password" name="password" type="password" autofocus required>
|
|
||||||
</div>
|
|
||||||
<div class="ui red button delete-button" data-type="form" data-form="#delete-form">
|
|
||||||
{{.i18n.Tr "settings.confirm_delete_account"}}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<form class="ui form" id="delete-form" action="{{.Link}}" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<input class="fake" type="password">
|
||||||
|
<div class="inline required field {{if .Err_Password}}error{{end}}">
|
||||||
|
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||||
|
<input id="password" name="password" type="password" autofocus required>
|
||||||
|
</div>
|
||||||
|
<div class="ui red button delete-button" data-type="form" data-form="#delete-form">
|
||||||
|
{{.i18n.Tr "settings.confirm_delete_account"}}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,59 +1,55 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings emails">
|
<div class="user settings emails">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.manage_emails"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "settings.manage_emails"}}
|
<div class="ui email list">
|
||||||
</h4>
|
<div class="item">
|
||||||
<div class="ui attached segment">
|
{{.i18n.Tr "settings.email_desc"}}
|
||||||
<div class="ui email list">
|
</div>
|
||||||
<div class="item">
|
{{range .Emails}}
|
||||||
{{.i18n.Tr "settings.email_desc"}}
|
<div class="item ui grid">
|
||||||
</div>
|
<div class="column">
|
||||||
{{range .Emails}}
|
<strong>{{.Email}}</strong>
|
||||||
<div class="item ui grid">
|
{{if .IsPrimary}}<span class="text red">{{$.i18n.Tr "settings.primary"}}</span>{{end}}
|
||||||
<div class="column">
|
{{if not .IsPrimary}}
|
||||||
<strong>{{.Email}}</strong>
|
<div class="ui right">
|
||||||
{{if .IsPrimary}}<span class="text red">{{$.i18n.Tr "settings.primary"}}</span>{{end}}
|
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||||
{{if not .IsPrimary}}
|
{{$.i18n.Tr "settings.delete_key"}}
|
||||||
<div class="ui right">
|
</button>
|
||||||
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
|
||||||
{{$.i18n.Tr "settings.delete_key"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
{{if .IsActivated}}
|
|
||||||
<div class="ui right">
|
|
||||||
<form action="{{$.Link}}" method="post">
|
|
||||||
{{$.CsrfTokenHtml}}
|
|
||||||
<input name="_method" type="hidden" value="PRIMARY">
|
|
||||||
<input name="id" type="hidden" value="{{.ID}}">
|
|
||||||
<button class="ui green tiny button">{{$.i18n.Tr "settings.primary_email"}}</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{if .IsActivated}}
|
||||||
{{end}}
|
<div class="ui right">
|
||||||
</div>
|
<form action="{{$.Link}}" method="post">
|
||||||
</div>
|
{{$.CsrfTokenHtml}}
|
||||||
<div class="ui attached bottom segment">
|
<input name="_method" type="hidden" value="PRIMARY">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<input name="id" type="hidden" value="{{.ID}}">
|
||||||
{{.CsrfTokenHtml}}
|
<button class="ui green tiny button">{{$.i18n.Tr "settings.primary_email"}}</button>
|
||||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
</form>
|
||||||
<label for="email">{{.i18n.Tr "settings.add_new_email"}}</label>
|
</div>
|
||||||
<input id="email" name="email" type="email" autofocus required>
|
{{end}}
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<button class="ui green button">
|
</div>
|
||||||
{{.i18n.Tr "settings.add_email"}}
|
{{end}}
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ui attached bottom segment">
|
||||||
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||||
|
<label for="email">{{.i18n.Tr "settings.add_new_email"}}</label>
|
||||||
|
<input id="email" name="email" type="email" autofocus required>
|
||||||
|
</div>
|
||||||
|
<button class="ui green button">
|
||||||
|
{{.i18n.Tr "settings.add_email"}}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,29 @@
|
||||||
<div class="four wide column">
|
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
|
||||||
<div class="ui vertical menu">
|
<a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||||
<div class="header item">{{.i18n.Tr "settings"}}</div>
|
{{.i18n.Tr "settings.profile"}}
|
||||||
<a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
</a>
|
||||||
{{.i18n.Tr "settings.profile"}}
|
<a class="{{if .PageIsSettingsAvatar}}active{{end}} item" href="{{AppSubUrl}}/user/settings/avatar">
|
||||||
</a>
|
{{.i18n.Tr "settings.avatar"}}
|
||||||
<a class="{{if .PageIsSettingsAvatar}}active{{end}} item" href="{{AppSubUrl}}/user/settings/avatar">
|
</a>
|
||||||
{{.i18n.Tr "settings.avatar"}}
|
<a class="{{if .PageIsSettingsPassword}}active{{end}} item" href="{{AppSubUrl}}/user/settings/password">
|
||||||
</a>
|
{{.i18n.Tr "settings.password"}}
|
||||||
<a class="{{if .PageIsSettingsPassword}}active{{end}} item" href="{{AppSubUrl}}/user/settings/password">
|
</a>
|
||||||
{{.i18n.Tr "settings.password"}}
|
<a class="{{if .PageIsSettingsEmails}}active{{end}} item" href="{{AppSubUrl}}/user/settings/email">
|
||||||
</a>
|
{{.i18n.Tr "settings.emails"}}
|
||||||
<a class="{{if .PageIsSettingsEmails}}active{{end}} item" href="{{AppSubUrl}}/user/settings/email">
|
</a>
|
||||||
{{.i18n.Tr "settings.emails"}}
|
<a class="{{if .PageIsSettingsSSHKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/ssh">
|
||||||
</a>
|
{{.i18n.Tr "settings.ssh_keys"}}
|
||||||
<a class="{{if .PageIsSettingsSSHKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/ssh">
|
</a>
|
||||||
{{.i18n.Tr "settings.ssh_keys"}}
|
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
|
||||||
</a>
|
{{.i18n.Tr "settings.applications"}}
|
||||||
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
|
</a>
|
||||||
{{.i18n.Tr "settings.applications"}}
|
<a class="{{if .PageIsSettingsTwofa}}active{{end}} item" href="{{AppSubUrl}}/user/settings/two_factor">
|
||||||
</a>
|
{{.i18n.Tr "settings.twofa"}}
|
||||||
<a class="{{if .PageIsSettingsTwofa}}active{{end}} item" href="{{AppSubUrl}}/user/settings/two_factor">
|
</a>
|
||||||
{{.i18n.Tr "settings.twofa"}}
|
<a class="{{if .PageIsSettingsAccountLink}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account_link">
|
||||||
</a>
|
{{.i18n.Tr "settings.account_link"}}
|
||||||
<a class="{{if .PageIsSettingsAccountLink}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account_link">
|
</a>
|
||||||
{{.i18n.Tr "settings.account_link"}}
|
<a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete">
|
||||||
</a>
|
{{.i18n.Tr "settings.delete"}}
|
||||||
<a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete">
|
</a>
|
||||||
{{.i18n.Tr "settings.delete"}}
|
</div>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,44 +1,40 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings password">
|
<div class="user settings password">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.change_password"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "settings.change_password"}}
|
{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}}
|
||||||
</h4>
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
<div class="ui attached segment">
|
{{.CsrfTokenHtml}}
|
||||||
{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}}
|
{{if .SignedUser.IsPasswordSet}}
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<div class="required field {{if .Err_OldPassword}}error{{end}}">
|
||||||
{{.CsrfTokenHtml}}
|
<label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
|
||||||
{{if .SignedUser.IsPasswordSet}}
|
<input id="old_password" name="old_password" type="password" autocomplete="off" autofocus required>
|
||||||
<div class="required field {{if .Err_OldPassword}}error{{end}}">
|
|
||||||
<label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
|
|
||||||
<input id="old_password" name="old_password" type="password" autocomplete="off" autofocus required>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
|
||||||
<label for="password">{{.i18n.Tr "settings.new_password"}}</label>
|
|
||||||
<input id="password" name="password" type="password" autocomplete="off" required>
|
|
||||||
</div>
|
|
||||||
<div class="required field {{if .Err_Password}}error{{end}}">
|
|
||||||
<label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
|
|
||||||
<input id="retype" name="retype" type="password" autocomplete="off" required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
|
|
||||||
<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
{{else}}
|
|
||||||
<div class="ui info message">
|
|
||||||
<p class="text left">{{$.i18n.Tr "settings.password_change_disabled"}}</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||||
|
<label for="password">{{.i18n.Tr "settings.new_password"}}</label>
|
||||||
|
<input id="password" name="password" type="password" autocomplete="off" required>
|
||||||
|
</div>
|
||||||
|
<div class="required field {{if .Err_Password}}error{{end}}">
|
||||||
|
<label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
|
||||||
|
<input id="retype" name="retype" type="password" autocomplete="off" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
|
||||||
|
<a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{{else}}
|
||||||
|
<div class="ui info message">
|
||||||
|
<p class="text left">{{$.i18n.Tr "settings.password_change_disabled"}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,54 +1,50 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings profile">
|
<div class="user settings profile">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.public_profile"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "settings.public_profile"}}
|
<p>{{.i18n.Tr "settings.profile_desc"}}</p>
|
||||||
</h4>
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
<div class="ui attached segment">
|
{{.CsrfTokenHtml}}
|
||||||
<p>{{.i18n.Tr "settings.profile_desc"}}</p>
|
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
|
||||||
{{.CsrfTokenHtml}}
|
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if not .SignedUser.IsLocal}}disabled{{end}}>
|
||||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
{{if not .SignedUser.IsLocal}}
|
||||||
<label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
|
<p class="help text blue">{{$.i18n.Tr "settings.password_username_disabled"}}</p>
|
||||||
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if not .SignedUser.IsLocal}}disabled{{end}}>
|
{{end}}
|
||||||
{{if not .SignedUser.IsLocal}}
|
|
||||||
<p class="help text blue">{{$.i18n.Tr "settings.password_username_disabled"}}</p>
|
|
||||||
{{end}}
|
|
||||||
</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="{{.SignedUser.FullName}}">
|
|
||||||
</div>
|
|
||||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
|
||||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
|
||||||
<input id="email" name="email" value="{{.SignedUser.Email}}">
|
|
||||||
</div>
|
|
||||||
<div class="inline field">
|
|
||||||
<div class="ui checkbox" id="keep-email-private">
|
|
||||||
<label class="poping up" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label>
|
|
||||||
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
|
|
||||||
</div>
|
|
||||||
</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="{{.SignedUser.Website}}">
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
|
||||||
<input id="location" name="location" value="{{.SignedUser.Location}}">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</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="{{.SignedUser.FullName}}">
|
||||||
|
</div>
|
||||||
|
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||||
|
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||||
|
<input id="email" name="email" value="{{.SignedUser.Email}}">
|
||||||
|
</div>
|
||||||
|
<div class="inline field">
|
||||||
|
<div class="ui checkbox" id="keep-email-private">
|
||||||
|
<label class="poping up" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label>
|
||||||
|
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
|
||||||
|
</div>
|
||||||
|
</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="{{.SignedUser.Website}}">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
||||||
|
<input id="location" name="location" value="{{.SignedUser.Location}}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,70 +1,66 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings sshkeys">
|
<div class="user settings sshkeys">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.manage_ssh_keys"}}
|
||||||
{{template "base/alert" .}}
|
<div class="ui right">
|
||||||
<h4 class="ui top attached header">
|
<div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
|
||||||
{{.i18n.Tr "settings.manage_ssh_keys"}}
|
</div>
|
||||||
<div class="ui right">
|
</h4>
|
||||||
<div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
|
<div class="ui attached segment">
|
||||||
</div>
|
<div class="ui key list">
|
||||||
</h4>
|
<div class="item">
|
||||||
<div class="ui attached segment">
|
{{.i18n.Tr "settings.ssh_desc"}}
|
||||||
<div class="ui key list">
|
</div>
|
||||||
<div class="item">
|
{{range .Keys}}
|
||||||
{{.i18n.Tr "settings.ssh_desc"}}
|
<div class="item ui grid">
|
||||||
|
<div class="one wide column">
|
||||||
|
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
|
||||||
</div>
|
</div>
|
||||||
{{range .Keys}}
|
<div class="one wide column">
|
||||||
<div class="item ui grid">
|
<i class="mega-octicon octicon-key left"></i>
|
||||||
<div class="one wide column">
|
</div>
|
||||||
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
|
<div class="eleven wide column">
|
||||||
</div>
|
<strong>{{.Name}}</strong>
|
||||||
<div class="one wide column">
|
<div class="print meta">
|
||||||
<i class="mega-octicon octicon-key left"></i>
|
{{.Fingerprint}}
|
||||||
</div>
|
|
||||||
<div class="eleven wide column">
|
|
||||||
<strong>{{.Name}}</strong>
|
|
||||||
<div class="print meta">
|
|
||||||
{{.Fingerprint}}
|
|
||||||
</div>
|
|
||||||
<div class="activity meta">
|
|
||||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="two wide column">
|
|
||||||
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
|
||||||
{{$.i18n.Tr "settings.delete_key"}}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
<div class="activity meta">
|
||||||
</div>
|
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
|
|
||||||
<div {{if not .HasError}}class="hide"{{end}} id="add-ssh-key-panel">
|
|
||||||
<h4 class="ui top attached header">
|
|
||||||
{{.i18n.Tr "settings.add_new_key"}}
|
|
||||||
</h4>
|
|
||||||
<div class="ui attached segment">
|
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
|
||||||
{{.CsrfTokenHtml}}
|
|
||||||
<div class="field {{if .Err_Title}}error{{end}}">
|
|
||||||
<label for="title">{{.i18n.Tr "settings.key_name"}}</label>
|
|
||||||
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="field {{if .Err_Content}}error{{end}}">
|
</div>
|
||||||
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
|
<div class="two wide column">
|
||||||
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
|
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||||
</div>
|
{{$.i18n.Tr "settings.delete_key"}}
|
||||||
<button class="ui green button">
|
|
||||||
{{.i18n.Tr "settings.add_key"}}
|
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
|
||||||
|
<div {{if not .HasError}}class="hide"{{end}} id="add-ssh-key-panel">
|
||||||
|
<h4 class="ui top attached header">
|
||||||
|
{{.i18n.Tr "settings.add_new_key"}}
|
||||||
|
</h4>
|
||||||
|
<div class="ui attached segment">
|
||||||
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<div class="field {{if .Err_Title}}error{{end}}">
|
||||||
|
<label for="title">{{.i18n.Tr "settings.key_name"}}</label>
|
||||||
|
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
|
||||||
|
</div>
|
||||||
|
<div class="field {{if .Err_Content}}error{{end}}">
|
||||||
|
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
|
||||||
|
<textarea id="ssh-key-content" name="content" required>{{.content}}</textarea>
|
||||||
|
</div>
|
||||||
|
<button class="ui green button">
|
||||||
|
{{.i18n.Tr "settings.add_key"}}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,35 +1,31 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings delete">
|
<div class="user settings delete">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.twofa"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "settings.twofa"}}
|
<p>{{.i18n.Tr "settings.twofa_desc"}}</p>
|
||||||
</h4>
|
{{if .TwofaEnrolled}}
|
||||||
<div class="ui attached segment">
|
<p>{{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
|
||||||
<p>{{.i18n.Tr "settings.twofa_desc"}}</p>
|
<form class="ui form" action="{{.Link}}/regenerate_scratch" method="post" enctype="multipart/form-data">
|
||||||
{{if .TwofaEnrolled}}
|
{{.CsrfTokenHtml}}
|
||||||
<p>{{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
|
<p>{{.i18n.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
||||||
<form class="ui form" action="{{.Link}}/regenerate_scratch" method="post" enctype="multipart/form-data">
|
<button class="ui blue button">{{$.i18n.Tr "settings.twofa_scratch_token_regenerate"}}</button>
|
||||||
{{.CsrfTokenHtml}}
|
</form>
|
||||||
<p>{{.i18n.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
<form class="ui form" action="{{.Link}}/disable" method="post" enctype="multipart/form-data" id="disable-form">
|
||||||
<button class="ui blue button">{{$.i18n.Tr "settings.twofa_scratch_token_regenerate"}}</button>
|
{{.CsrfTokenHtml}}
|
||||||
</form>
|
<p>{{.i18n.Tr "settings.twofa_disable_note"}}</p>
|
||||||
<form class="ui form" action="{{.Link}}/disable" method="post" enctype="multipart/form-data" id="disable-form">
|
<div class="ui red button delete-button" data-type="form" data-form="#disable-form">{{$.i18n.Tr "settings.twofa_disable"}}</div>
|
||||||
{{.CsrfTokenHtml}}
|
</form>
|
||||||
<p>{{.i18n.Tr "settings.twofa_disable_note"}}</p>
|
{{else}}
|
||||||
<div class="ui red button delete-button" data-type="form" data-form="#disable-form">{{$.i18n.Tr "settings.twofa_disable"}}</div>
|
<p>{{.i18n.Tr "settings.twofa_not_enrolled"}}</p>
|
||||||
</form>
|
<div class="inline field">
|
||||||
{{else}}
|
<a class="ui green button" href="{{.Link}}/enroll">{{$.i18n.Tr "settings.twofa_enroll"}}</a>
|
||||||
<p>{{.i18n.Tr "settings.twofa_not_enrolled"}}</p>
|
|
||||||
<div class="inline field">
|
|
||||||
<a class="ui green button" href="{{.Link}}/enroll">{{$.i18n.Tr "settings.twofa_enroll"}}</a>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,31 +1,27 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user settings delete">
|
<div class="user settings delete">
|
||||||
|
{{template "user/settings/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
{{template "base/alert" .}}
|
||||||
{{template "user/settings/navbar" .}}
|
<h4 class="ui top attached header">
|
||||||
<div class="twelve wide column content">
|
{{.i18n.Tr "settings.twofa_enroll"}}
|
||||||
{{template "base/alert" .}}
|
</h4>
|
||||||
<h4 class="ui top attached header">
|
<div class="ui attached segment">
|
||||||
{{.i18n.Tr "settings.twofa_enroll"}}
|
<p>{{.i18n.Tr "settings.scan_this_image"}}</p>
|
||||||
</h4>
|
<img src="{{.QrUri}}" alt="{{.TwofaSecret}}">
|
||||||
<div class="ui attached segment">
|
<p>{{.i18n.Tr "settings.or_enter_secret" .TwofaSecret}}
|
||||||
<p>{{.i18n.Tr "settings.scan_this_image"}}</p>
|
<p>{{.i18n.Tr "settings.then_enter_passcode"}}
|
||||||
<img src="{{.QrUri}}" alt="{{.TwofaSecret}}">
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
<p>{{.i18n.Tr "settings.or_enter_secret" .TwofaSecret}}
|
{{.CsrfTokenHtml}}
|
||||||
<p>{{.i18n.Tr "settings.then_enter_passcode"}}
|
<div class="inline required field {{if .Err_Passcode}}error{{end}}">
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<label for="passcode">{{.i18n.Tr "passcode"}}</label>
|
||||||
{{.CsrfTokenHtml}}
|
<input id="passcode" name="passcode" autofocus required>
|
||||||
<div class="inline required field {{if .Err_Passcode}}error{{end}}">
|
|
||||||
<label for="passcode">{{.i18n.Tr "passcode"}}</label>
|
|
||||||
<input id="passcode" name="passcode" autofocus required>
|
|
||||||
</div>
|
|
||||||
<div class="inline field">
|
|
||||||
<label></label>
|
|
||||||
<button class="ui green button">{{.i18n.Tr "auth.verify"}}</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="inline field">
|
||||||
|
<label></label>
|
||||||
|
<button class="ui green button">{{.i18n.Tr "auth.verify"}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue