mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-26 23:47:19 +00:00
This commit is contained in:
parent
03d79983ee
commit
efbb895ebe
@ -420,6 +420,14 @@ footer .ui.language .menu {
|
||||
background: inherit !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) {
|
||||
overflow: hidden;
|
||||
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
||||
|
@ -411,3 +411,12 @@ footer {
|
||||
background: inherit !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" .}}
|
||||
<div class="admin edit authentication">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.edit"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="id" value="{{.Source.ID}}">
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||
<input type="hidden" id="auth_type" name="type" value="{{.Source.Type}}">
|
||||
<span>{{.Source.TypeName}}</span>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
||||
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
||||
<input id="name" name="name" value="{{.Source.Name}}" autofocus required>
|
||||
</div>
|
||||
|
||||
<!-- LDAP and DLDAP -->
|
||||
{{if or .Source.IsLDAP .Source.IsDLDAP}}
|
||||
{{ $cfg:=.Source.LDAP }}
|
||||
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.auths.security_protocol"}}</label>
|
||||
<div class="ui selection security-protocol dropdown">
|
||||
<input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol}}">
|
||||
<div class="text">{{$cfg.SecurityProtocolName}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .SecurityProtocols}}
|
||||
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
|
||||
<input id="host" name="host" value="{{$cfg.Host}}" placeholder="e.g. mydomain.com" required>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
|
||||
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="e.g. 636" required>
|
||||
</div>
|
||||
{{if .Source.IsLDAP}}
|
||||
<div class="field">
|
||||
<label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
|
||||
<input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="field">
|
||||
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
||||
<input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}">
|
||||
<p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
|
||||
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" required>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Source.IsDLDAP}}
|
||||
<div class="required field">
|
||||
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
||||
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="required field">
|
||||
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
||||
<input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
|
||||
<input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
|
||||
<input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
|
||||
<input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
|
||||
<input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
|
||||
<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required>
|
||||
</div>
|
||||
{{if .Source.IsLDAP}}
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label>
|
||||
<input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
<!-- SMTP -->
|
||||
{{if .Source.IsSMTP}}
|
||||
{{ $cfg:=.Source.SMTP }}
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required>
|
||||
<div class="text">{{$cfg.Auth}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .SMTPAuths}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
|
||||
<input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
|
||||
<input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
|
||||
<input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}">
|
||||
<p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<!-- PAM -->
|
||||
{{if .Source.IsPAM}}
|
||||
{{ $cfg:=.Source.PAM }}
|
||||
<div class="required field">
|
||||
<label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
|
||||
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<!-- OAuth2 -->
|
||||
{{if .Source.IsOAuth2}}
|
||||
{{ $cfg:=.Source.OAuth2 }}
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required>
|
||||
<div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range $key, $value := .OAuth2Providers}}
|
||||
<div class="item" data-value="{{$key}}">{{$value.DisplayName}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="oauth2_key">{{.i18n.Tr "admin.auths.oauth2_clientID"}}</label>
|
||||
<input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="oauth2_secret">{{.i18n.Tr "admin.auths.oauth2_clientSecret"}}</label>
|
||||
<input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.edit"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="id" value="{{.Source.ID}}">
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||
<input type="hidden" id="auth_type" name="type" value="{{.Source.Type}}">
|
||||
<span>{{.Source.TypeName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
|
@ -1,45 +1,41 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin authentication">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
<div class="ui right">
|
||||
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.auths.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.type"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.enabled"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.updated"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Sources}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
|
||||
<td>{{.TypeName}}</td>
|
||||
<td><i class="fa fa{{if .IsActived}}-check{{end}}-square-o"></i></td>
|
||||
<td><span class="poping up" data-content="{{DateFmtLong .Updated}}" data-variation="tiny">{{DateFmtShort .Updated}}</span></td>
|
||||
<td><span class="poping up" data-content="{{DateFmtLong .Created}}" data-variation="tiny">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
<div class="ui right">
|
||||
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.auths.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.type"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.enabled"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.updated"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Sources}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
|
||||
<td>{{.TypeName}}</td>
|
||||
<td><i class="fa fa{{if .IsActived}}-check{{end}}-square-o"></i></td>
|
||||
<td><span class="poping up" data-content="{{DateFmtLong .Updated}}" data-variation="tiny">{{DateFmtShort .Updated}}</span></td>
|
||||
<td><span class="poping up" data-content="{{DateFmtLong .Created}}" data-variation="tiny">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,204 +1,200 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin new authentication">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.new"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
||||
<div class="text">{{.CurrentTypeName}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .AuthSources}}
|
||||
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.new"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
||||
<div class="text">{{.CurrentTypeName}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .AuthSources}}
|
||||
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
||||
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
||||
<input id="name" name="name" value="{{.name}}" autofocus required>
|
||||
</div>
|
||||
|
||||
<!-- LDAP and DLDAP -->
|
||||
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}">
|
||||
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.auths.security_protocol"}}</label>
|
||||
<div class="ui selection security-protocol dropdown">
|
||||
<input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}">
|
||||
<div class="text">{{.CurrentSecurityProtocol}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .SecurityProtocols}}
|
||||
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
|
||||
<input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
|
||||
<input id="port" name="port" value="{{.port}}" placeholder="e.g. 636">
|
||||
</div>
|
||||
<div class="ldap field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
|
||||
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="ldap field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
||||
<input id="bind_password" name="bind_password" type="password" value="{{.bind_password}}">
|
||||
<p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
|
||||
</div>
|
||||
<div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
|
||||
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<div class="dldap required field {{if not (eq .type 5)}}hide{{end}}">
|
||||
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
||||
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
||||
<input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
|
||||
<input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
|
||||
<input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
|
||||
<input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
|
||||
<input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
|
||||
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail">
|
||||
</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>
|
||||
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
||||
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
||||
<input id="name" name="name" value="{{.name}}" autofocus required>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<!-- 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>
|
||||
</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>
|
||||
|
@ -1,280 +1,276 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin config">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.server_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
|
||||
<dd>{{AppName}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
|
||||
<dd>{{AppVer}}{{AppBuiltWith}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
|
||||
<dd>{{.AppUrl}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.domain"}}</dt>
|
||||
<dd>{{.Domain}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
|
||||
<dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.server_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
|
||||
<dd>{{AppName}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
|
||||
<dd>{{AppVer}}{{AppBuiltWith}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
|
||||
<dd>{{.AppUrl}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.domain"}}</dt>
|
||||
<dd>{{.Domain}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
|
||||
<dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
|
||||
<dd>{{.RunUser}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
|
||||
<dd>{{.RunMode}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
|
||||
<dd>{{.RunUser}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
|
||||
<dd>{{.RunMode}}</dd>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<dt>{{.i18n.Tr "admin.config.git_version"}}</dt>
|
||||
<dd>{{.GitVersion}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_version"}}</dt>
|
||||
<dd>{{.GitVersion}}</dd>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
|
||||
<dd>{{.RepoRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
|
||||
<dd>{{.StaticRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
|
||||
<dd>{{.LogRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
|
||||
<dd>{{.ScriptType}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
|
||||
<dd>{{.ReverseProxyAuthUser}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
|
||||
<dd>{{.RepoRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
|
||||
<dd>{{.StaticRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
|
||||
<dd>{{.LogRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
|
||||
<dd>{{.ScriptType}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
|
||||
<dd>{{.ReverseProxyAuthUser}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.ssh_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
|
||||
<dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
|
||||
{{if not .SSH.Disabled}}
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
|
||||
<dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
|
||||
<dd>{{.SSH.Domain}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
|
||||
<dd>{{.SSH.Port}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
|
||||
<dd>{{.SSH.ListenPort}}</dd>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.ssh_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_enabled"}}</dt>
|
||||
<dd><i class="fa fa{{if not .SSH.Disabled}}-check{{end}}-square-o"></i></dd>
|
||||
{{if not .SSH.Disabled}}
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_start_builtin_server"}}</dt>
|
||||
<dd><i class="fa fa{{if .SSH.StartBuiltinServer}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_domain"}}</dt>
|
||||
<dd>{{.SSH.Domain}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_port"}}</dt>
|
||||
<dd>{{.SSH.Port}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_listen_port"}}</dt>
|
||||
<dd>{{.SSH.ListenPort}}</dd>
|
||||
|
||||
{{if not .SSH.StartBuiltinServer}}
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
|
||||
<dd>{{.SSH.RootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
|
||||
<dd>{{.SSH.KeyTestPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
|
||||
<dd>{{.SSH.KeygenPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
|
||||
<dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
|
||||
{{if .SSH.MinimumKeySizeCheck}}
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
|
||||
<dd>{{.SSH.MinimumKeySizes}}</dd>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if not .SSH.StartBuiltinServer}}
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
|
||||
<dd>{{.SSH.RootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
|
||||
<dd>{{.SSH.KeyTestPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
|
||||
<dd>{{.SSH.KeygenPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
|
||||
<dd><i class="fa fa{{if .SSH.MinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
|
||||
{{if .SSH.MinimumKeySizeCheck}}
|
||||
<dt>{{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
|
||||
<dd>{{.SSH.MinimumKeySizes}}</dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.db_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
||||
<dd>{{.DbCfg.Type}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
||||
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
||||
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
||||
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
||||
<dd><i class="fa fa{{if .DbCfg.SSLMode}}-check{{end}}-square-o"></i> {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
||||
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.db_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
||||
<dd>{{.DbCfg.Type}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
||||
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
||||
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
||||
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
||||
<dd><i class="fa fa{{if .DbCfg.SSLMode}}-check{{end}}-square-o"></i> {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
||||
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.service_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
|
||||
{{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
|
||||
<dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
|
||||
<dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
|
||||
<dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
|
||||
<dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.service_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
|
||||
{{/*<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>*/}}
|
||||
<dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.default_keep_email_private"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DefaultKeepEmailPrivate}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.no_reply_address"}}</dt>
|
||||
<dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
|
||||
<dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
|
||||
<dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.webhook_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
|
||||
<dd>{{.Webhook.QueueLength}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
||||
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.webhook_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
|
||||
<dd>{{.Webhook.QueueLength}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
||||
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.mailer_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
|
||||
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
||||
{{if .MailerEnabled}}
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
||||
<dd>{{.Mailer.Name}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
|
||||
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
||||
<dd>{{.Mailer.Host}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
|
||||
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
|
||||
<form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div class="ui input">
|
||||
<input type="email" name="email" required>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
|
||||
</form>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.mailer_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
|
||||
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
||||
{{if .MailerEnabled}}
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
||||
<dd>{{.Mailer.Name}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
|
||||
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
||||
<dd>{{.Mailer.Host}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
|
||||
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd><br>
|
||||
<form class="ui form" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div class="ui input">
|
||||
<input type="email" name="email" required>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button" id="test-mail-btn">{{.i18n.Tr "admin.config.send_test_mail"}}</button>
|
||||
</form>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.cache_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
||||
<dd>{{.CacheAdapter}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
|
||||
<dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
{{if .CacheConn}}
|
||||
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
||||
<dd><code>{{.CacheConn}}</code></dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.cache_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
||||
<dd>{{.CacheAdapter}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
|
||||
<dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
{{if .CacheConn}}
|
||||
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
||||
<dd><code>{{.CacheConn}}</code></dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.session_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
||||
<dd>{{.SessionConfig.Provider}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
||||
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
||||
<dd>{{.SessionConfig.CookieName}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
||||
<dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
|
||||
<dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
|
||||
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
|
||||
<dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.session_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
||||
<dd>{{.SessionConfig.Provider}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
||||
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
||||
<dd>{{.SessionConfig.CookieName}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
||||
<dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
|
||||
<dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
|
||||
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
|
||||
<dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.picture_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.picture_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.git_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
|
||||
<dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffFiles}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
|
||||
<dd><code>{{.Git.GCArgs}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.git_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
|
||||
<dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffFiles}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
|
||||
<dd><code>{{.Git.GCArgs}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.log_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
{{range .Loggers}}
|
||||
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
|
||||
<dd>{{.Mode}}</dd>
|
||||
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
|
||||
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.log_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
{{range .Loggers}}
|
||||
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
|
||||
<dd>{{.Mode}}</dd>
|
||||
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
|
||||
<dd><pre>{{.Config | JsonPrettyPrint}}</pre></dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,124 +1,120 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin dashboard">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.statistic"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>
|
||||
{{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}
|
||||
</p>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.operations"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_repo_archives"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_missing_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=6">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=7">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.statistic"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>
|
||||
{{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}
|
||||
</p>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.operations"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_repo_archives"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_missing_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=6">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=7">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.system_status"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
|
||||
<dd>{{.SysStatus.Uptime}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
|
||||
<dd>{{.SysStatus.NumGoroutine}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MemAllocated}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
|
||||
<dd>{{.SysStatus.MemTotal}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MemSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
|
||||
<dd>{{.SysStatus.Lookups}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemMallocs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemFrees}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
|
||||
<dd>{{.SysStatus.HeapAlloc}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
|
||||
<dd>{{.SysStatus.HeapIdle}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
|
||||
<dd>{{.SysStatus.HeapInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
|
||||
<dd>{{.SysStatus.HeapReleased}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
|
||||
<dd>{{.SysStatus.HeapObjects}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
|
||||
<dd>{{.SysStatus.StackInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.StackSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MSpanInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.BuckHashSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.GCSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.OtherSys}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
|
||||
<dd>{{.SysStatus.NextGC}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
|
||||
<dd>{{.SysStatus.LastGC}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseTotalNs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseNs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
|
||||
<dd>{{.SysStatus.NumGC}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.system_status"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
|
||||
<dd>{{.SysStatus.Uptime}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
|
||||
<dd>{{.SysStatus.NumGoroutine}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MemAllocated}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
|
||||
<dd>{{.SysStatus.MemTotal}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MemSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
|
||||
<dd>{{.SysStatus.Lookups}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemMallocs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemFrees}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
|
||||
<dd>{{.SysStatus.HeapAlloc}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
|
||||
<dd>{{.SysStatus.HeapIdle}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
|
||||
<dd>{{.SysStatus.HeapInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
|
||||
<dd>{{.SysStatus.HeapReleased}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
|
||||
<dd>{{.SysStatus.HeapObjects}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
|
||||
<dd>{{.SysStatus.StackInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.StackSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MSpanInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.BuckHashSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.GCSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.OtherSys}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
|
||||
<dd>{{.SysStatus.NextGC}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
|
||||
<dd>{{.SysStatus.LastGC}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseTotalNs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseNs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
|
||||
<dd>{{.SysStatus.NumGC}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,64 +1,60 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin monitor">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.cron"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.next"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.previous"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Entries}}
|
||||
<tr>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{.Spec}}</td>
|
||||
<td>{{DateFmtLong .Next}}</td>
|
||||
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
||||
<td>{{.ExecTimes}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.cron"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.next"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.previous"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Entries}}
|
||||
<tr>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{.Spec}}</td>
|
||||
<td>{{DateFmtLong .Next}}</td>
|
||||
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
||||
<td>{{.ExecTimes}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.process"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pid</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.desc"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.start"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Processes}}
|
||||
<tr>
|
||||
<td>{{.PID}}</td>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{DateFmtLong .Start}}</td>
|
||||
<td>{{TimeSince .Start $.Lang}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.process"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pid</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.desc"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.start"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Processes}}
|
||||
<tr>
|
||||
<td>{{.PID}}</td>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{DateFmtLong .Start}}</td>
|
||||
<td>{{TimeSince .Start $.Lang}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,29 +1,26 @@
|
||||
<div class="four wide column">
|
||||
<div class="ui vertical menu">
|
||||
<div class="header item">{{.i18n.Tr "admin_panel"}}</div>
|
||||
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||
{{.i18n.Tr "admin.dashboard"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
|
||||
{{.i18n.Tr "admin.users"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
|
||||
{{.i18n.Tr "admin.organizations"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
|
||||
{{.i18n.Tr "admin.repositories"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
||||
{{.i18n.Tr "admin.authentication"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
|
||||
{{.i18n.Tr "admin.config"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
|
||||
{{.i18n.Tr "admin.notices"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
|
||||
{{.i18n.Tr "admin.monitor"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
|
||||
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||
{{.i18n.Tr "admin.dashboard"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
|
||||
{{.i18n.Tr "admin.users"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
|
||||
{{.i18n.Tr "admin.organizations"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
|
||||
{{.i18n.Tr "admin.repositories"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
||||
{{.i18n.Tr "admin.authentication"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
|
||||
{{.i18n.Tr "admin.config"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
|
||||
{{.i18n.Tr "admin.notices"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
|
||||
{{.i18n.Tr "admin.monitor"}}
|
||||
</a>
|
||||
</div>
|
@ -1,96 +1,92 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin notice">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic select selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.notices.type"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.desc"}}</th>
|
||||
<th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Notices}}
|
||||
<tr>
|
||||
<td class="collapsing">
|
||||
<div class="ui fitted checkbox" data-id="{{.ID}}">
|
||||
<input type="checkbox"> <label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td>{{$.i18n.Tr .TrStr}}</td>
|
||||
<td>{{SubStr .Description 0 120}}...</td>
|
||||
<td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
<tfoot class="full-width">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="5">
|
||||
<div class="ui right">
|
||||
<a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
|
||||
</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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic select selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.notices.type"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.desc"}}</th>
|
||||
<th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Notices}}
|
||||
<tr>
|
||||
<td class="collapsing">
|
||||
<div class="ui fitted checkbox" data-id="{{.ID}}">
|
||||
<input type="checkbox"> <label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td>{{$.i18n.Tr .TrStr}}</td>
|
||||
<td>{{SubStr .Description 0 120}}...</td>
|
||||
<td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</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}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,48 +1,44 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin user">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "admin/base/search" .}}
|
||||
</div>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.teams"}}</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.members"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Users}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{.HomeLink}}">{{.Name}}</a></td>
|
||||
<td>{{.NumTeams}}</td>
|
||||
<td>{{.NumMembers}}</td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="{{AppSubUrl}}/org/{{.Name}}/settings"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "admin/base/search" .}}
|
||||
</div>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.teams"}}</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.members"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Users}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{.HomeLink}}">{{.Name}}</a></td>
|
||||
<td>{{.NumTeams}}</td>
|
||||
<td>{{.NumMembers}}</td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="{{AppSubUrl}}/org/{{.Name}}/settings"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
@ -1,52 +1,48 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin user">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "admin/base/search" .}}
|
||||
</div>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.repos.owner"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.private"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.watches"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.stars"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.issues"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Repos}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
|
||||
<td>{{.NumWatches}}</td>
|
||||
<td>{{.NumStars}}</td>
|
||||
<td>{{.NumIssues}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}"><i class="trash icon text red"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "admin/base/search" .}}
|
||||
</div>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.repos.owner"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.private"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.watches"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.stars"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.issues"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Repos}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
|
||||
<td>{{.NumWatches}}</td>
|
||||
<td>{{.NumStars}}</td>
|
||||
<td>{{.NumIssues}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}"><i class="trash icon text red"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,120 +1,116 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin edit user">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.edit_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<span>{{.User.Name}}</span>
|
||||
</div>
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="login_type" name="login_type" value="{{.LoginSource.Type}}-{{.LoginSource.ID}}" required>
|
||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
{{range .Sources}}
|
||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}hide{{end}}">
|
||||
<label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
|
||||
</div>
|
||||
<div class="field {{if .Err_FullName}}error{{end}}">
|
||||
<label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
|
||||
<input id="full_name" name="full_name" value="{{.User.FullName}}">
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}hide{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password">
|
||||
<p class="help">{{.i18n.Tr "admin.users.password_helper"}}</p>
|
||||
</div>
|
||||
<div class="field {{if .Err_Website}}error{{end}}">
|
||||
<label for="website">{{.i18n.Tr "settings.website"}}</label>
|
||||
<input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com">
|
||||
</div>
|
||||
<div class="field {{if .Err_Location}}error{{end}}">
|
||||
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
||||
<input id="location" name="location" value="{{.User.Location}}">
|
||||
</div>
|
||||
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.edit_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<span>{{.User.Name}}</span>
|
||||
</div>
|
||||
</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>
|
||||
|
@ -1,59 +1,55 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin user">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
<div class="ui right">
|
||||
<a class="ui black tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "admin/base/search" .}}
|
||||
</div>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.users.name"}}</th>
|
||||
<th>{{.i18n.Tr "email"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.activated"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.admin"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.last_login"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Users}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><span class="text truncate email">{{.Email}}</span></td>
|
||||
<td><i class="fa fa{{if .IsActive}}-check{{end}}-square-o"></i></td>
|
||||
<td><i class="fa fa{{if .IsAdmin}}-check{{end}}-square-o"></i></td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created }}</span></td>
|
||||
{{if .LastLoginUnix}}
|
||||
<td><span title="{{DateFmtLong .LastLogin}}">{{DateFmtShort .LastLogin }}</span></td>
|
||||
{{else}}
|
||||
<td><span>{{$.i18n.Tr "admin.users.never_login"}}</span></td>
|
||||
{{end}}
|
||||
<td><a href="{{$.Link}}/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
<div class="ui right">
|
||||
<a class="ui black tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "admin/base/search" .}}
|
||||
</div>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.users.name"}}</th>
|
||||
<th>{{.i18n.Tr "email"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.activated"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.admin"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.last_login"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Users}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><span class="text truncate email">{{.Email}}</span></td>
|
||||
<td><i class="fa fa{{if .IsActive}}-check{{end}}-square-o"></i></td>
|
||||
<td><i class="fa fa{{if .IsAdmin}}-check{{end}}-square-o"></i></td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created }}</span></td>
|
||||
{{if .LastLoginUnix}}
|
||||
<td><span title="{{DateFmtLong .LastLogin}}">{{DateFmtShort .LastLogin }}</span></td>
|
||||
{{else}}
|
||||
<td><span>{{$.i18n.Tr "admin.users.never_login"}}</span></td>
|
||||
{{end}}
|
||||
<td><a href="{{$.Link}}/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{template "base/paginate" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
@ -1,65 +1,61 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="admin new user">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.new_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
|
||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
{{range .Sources}}
|
||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.new_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
|
||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
{{range .Sources}}
|
||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
|
||||
<label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input id="login_name" name="login_name" value="{{.login_name}}">
|
||||
</div>
|
||||
<div class="required field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
||||
</div>
|
||||
|
||||
<!-- Send register notify e-mail -->
|
||||
{{if .CanSendEmail}}
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.send_register_notify"}}</strong></label>
|
||||
<input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div 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>
|
||||
|
@ -48,7 +48,7 @@
|
||||
{{end}}
|
||||
{{if not (or .IsBareRepo .IsDiffCompare)}}
|
||||
<div class="ui tabs container">
|
||||
<div class="ui tabular menu navbar">
|
||||
<div class="ui tabular stackable menu navbar">
|
||||
{{if .Repository.EnableUnit $.UnitTypeCode}}
|
||||
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
||||
<i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
||||
|
@ -1,88 +1,84 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository settings edit">
|
||||
{{template "repo/header" .}}
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.default_branch"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<form class="ui hook list form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.default_branch"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<form class="ui hook list form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="default_branch">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "repo.settings.default_branch_desc"}}
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.protected_branch"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui grid padded">
|
||||
<div class="eight wide column">
|
||||
<div class="ui fluid dropdown selection visible" tabindex="0">
|
||||
<select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
|
||||
{{range .LeftBranches}}
|
||||
<option value="">{{$.i18n.Tr "repo.settings.choose_branch"}}</option>
|
||||
<option value="{{.}}">{{.}}</option>
|
||||
{{end}}
|
||||
</select><i class="dropdown icon"></i>
|
||||
<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>
|
||||
{{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 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>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.protected_branch"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui grid padded">
|
||||
<div class="eight wide column">
|
||||
<div class="ui fluid dropdown selection visible" tabindex="0">
|
||||
<select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
|
||||
{{range .LeftBranches}}
|
||||
<option value="">{{$.i18n.Tr "repo.settings.choose_branch"}}</option>
|
||||
<option value="{{.}}">{{.}}</option>
|
||||
{{end}}
|
||||
</select><i class="dropdown icon"></i>
|
||||
<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 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>
|
||||
|
@ -1,58 +1,54 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository settings collaboration">
|
||||
{{template "repo/header" .}}
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||
</h4>
|
||||
<div class="ui attached segment collaborator list">
|
||||
{{range .Collaborators}}
|
||||
<div class="item ui grid">
|
||||
<div class="ui five wide column">
|
||||
<a href="{{AppSubUrl}}/{{.Name}}">
|
||||
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
||||
{{.DisplayName}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui eight wide column">
|
||||
<span class="octicon octicon-shield"></span>
|
||||
<div class="ui inline dropdown">
|
||||
<div class="text">{{$.i18n.Tr .Collaboration.ModeI18nKey}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="access-mode menu" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}">
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||
</h4>
|
||||
<div class="ui attached segment collaborator list">
|
||||
{{range .Collaborators}}
|
||||
<div class="item ui grid">
|
||||
<div class="ui five wide column">
|
||||
<a href="{{AppSubUrl}}/{{.Name}}">
|
||||
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
||||
{{.DisplayName}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui eight wide column">
|
||||
<span class="octicon octicon-shield"></span>
|
||||
<div class="ui inline dropdown">
|
||||
<div class="text">{{$.i18n.Tr .Collaboration.ModeI18nKey}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="access-mode menu" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}">
|
||||
<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>
|
||||
{{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 class="ui bottom attached segment">
|
||||
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div id="search-user-box">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" autofocus required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached segment">
|
||||
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div id="search-user-box">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" autofocus required>
|
||||
</div>
|
||||
<button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
|
||||
</form>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,74 +1,70 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository settings">
|
||||
{{template "repo/header" .}}
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||
<div class="ui right">
|
||||
<div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if .Deploykeys}}
|
||||
<div class="ui key list">
|
||||
{{range .Deploykeys}}
|
||||
<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"{{end}}></i>
|
||||
</div>
|
||||
<div class="one wide column">
|
||||
<i class="mega-octicon octicon-key left"></i>
|
||||
</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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||
<div class="ui right">
|
||||
<div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if .Deploykeys}}
|
||||
<div class="ui key list">
|
||||
{{range .Deploykeys}}
|
||||
<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"{{end}}></i>
|
||||
</div>
|
||||
<div class="one wide column">
|
||||
<i class="mega-octicon octicon-key left"></i>
|
||||
</div>
|
||||
<div class="eleven wide column">
|
||||
<strong>{{.Name}}</strong>
|
||||
<div class="print meta">
|
||||
{{.Fingerprint}}
|
||||
</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>
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.settings.no_deploy_keys"}}
|
||||
{{end}}
|
||||
</div>
|
||||
<br>
|
||||
<div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel">
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.add_deploy_key"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
{{.i18n.Tr "repo.settings.deploy_key_desc"}}
|
||||
</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>
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.settings.no_deploy_keys"}}
|
||||
{{end}}
|
||||
</div>
|
||||
<br>
|
||||
<div {{if not .HasError}}class="hide"{{end}} id="add-deploy-key-panel">
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.add_deploy_key"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
{{.i18n.Tr "repo.settings.deploy_key_desc"}}
|
||||
</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>
|
||||
|
@ -1,35 +1,31 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository settings edit githook">
|
||||
{{template "repo/header" .}}
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{with .Hook}}
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
|
||||
<span>{{.Name}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{with .Hook}}
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
|
||||
<span>{{.Name}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<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">
|
||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,28 +1,24 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository settings githooks">
|
||||
{{template "repo/header" .}}
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<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>
|
||||
|
@ -1,43 +1,41 @@
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
<div class="ui right">
|
||||
<div class="ui floating1 jump dropdown">
|
||||
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
||||
<img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gitea
|
||||
</a>
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
|
||||
<img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
|
||||
</a>
|
||||
</div>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
<div class="ui right">
|
||||
<div class="ui floating1 jump dropdown">
|
||||
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
||||
<img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gitea
|
||||
</a>
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
|
||||
<img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui hook list">
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui hook list">
|
||||
<div class="item">
|
||||
{{.Description | Str2html}}
|
||||
</div>
|
||||
{{range .Webhooks}}
|
||||
<div class="item">
|
||||
{{.Description | Str2html}}
|
||||
</div>
|
||||
{{range .Webhooks}}
|
||||
<div class="item">
|
||||
{{if eq .LastStatus 1}}
|
||||
<span class="text green"><i class="octicon octicon-check"></i></span>
|
||||
{{else if eq .LastStatus 2}}
|
||||
<span class="text red"><i class="octicon octicon-alert"></i></span>
|
||||
{{else}}
|
||||
<span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
|
||||
{{end}}
|
||||
<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>
|
||||
{{if eq .LastStatus 1}}
|
||||
<span class="text green"><i class="octicon octicon-check"></i></span>
|
||||
{{else if eq .LastStatus 2}}
|
||||
<span class="text red"><i class="octicon octicon-alert"></i></span>
|
||||
{{else}}
|
||||
<span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
|
||||
{{end}}
|
||||
<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>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,29 +1,25 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository settings new webhook">
|
||||
{{template "repo/header" .}}
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||
<div class="ui right">
|
||||
{{if eq .HookType "gogs"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
||||
{{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" .}}
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||
<div class="ui right">
|
||||
{{if eq .HookType "gogs"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
||||
{{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>
|
||||
{{template "base/footer" .}}
|
||||
|
@ -1,11 +1,9 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository settings webhooks">
|
||||
{{template "repo/header" .}}
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
{{template "repo/settings/hook_list" .}}
|
||||
</div>
|
||||
{{template "repo/settings/hook_list" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
@ -1,27 +1,24 @@
|
||||
<div class="four wide column">
|
||||
<div class="ui vertical menu">
|
||||
<div class="header item">{{.i18n.Tr "repo.settings"}}</div>
|
||||
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||
{{.i18n.Tr "repo.settings.options"}}
|
||||
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
|
||||
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||
{{.i18n.Tr "repo.settings.options"}}
|
||||
</a>
|
||||
<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 class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
|
||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||
{{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>
|
||||
{{if not .Repository.IsBare}}
|
||||
<a class="{{if .PageIsSettingsBranches}}active{{end}} item" href="{{.RepoLink}}/settings/branches">
|
||||
{{.i18n.Tr "repo.settings.branches"}}
|
||||
</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>
|
||||
{{end}}
|
||||
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
|
||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||
</a>
|
||||
</div>
|
||||
|
@ -1,256 +1,252 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository settings options">
|
||||
{{template "repo/header" .}}
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.basic_settings"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="update">
|
||||
<div class="required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.basic_settings"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="update">
|
||||
<div class="required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.Repository.Name}}" data-repo-name="{{.Repository.Name}}" autofocus required>
|
||||
</div>
|
||||
{{if not .Repository.IsFork}}
|
||||
<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>
|
||||
{{if not .Repository.IsFork}}
|
||||
<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>
|
||||
{{end}}
|
||||
<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>
|
||||
{{end}}
|
||||
<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>
|
||||
|
||||
{{if .Repository.IsMirror}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.mirror_settings"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" method="post">
|
||||
{{.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 class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{if .Repository.IsMirror}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.mirror_settings"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" method="post">
|
||||
{{.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 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 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>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
{{if .Repository.CanEnablePulls}}
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<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 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}}
|
||||
|
||||
<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 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 class="ui divider"></div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{if .IsRepositoryOwner}}
|
||||
<h4 class="ui top attached warning header">
|
||||
{{.i18n.Tr "repo.settings.danger_zone"}}
|
||||
</h4>
|
||||
<div class="ui attached warning table danger segment">
|
||||
{{if .Repository.IsMirror}}
|
||||
<div class="item">
|
||||
<div class="ui right">
|
||||
<button class="ui basic red show-modal button" data-modal="#convert-repo-modal">{{.i18n.Tr "repo.settings.convert"}}</button>
|
||||
</div>
|
||||
<div>
|
||||
<h5>{{.i18n.Tr "repo.settings.convert"}}</h5>
|
||||
<p>{{.i18n.Tr "repo.settings.convert_desc"}}</p>
|
||||
</div>
|
||||
{{if .IsRepositoryOwner}}
|
||||
<h4 class="ui top attached warning header">
|
||||
{{.i18n.Tr "repo.settings.danger_zone"}}
|
||||
</h4>
|
||||
<div class="ui attached warning table danger segment">
|
||||
{{if .Repository.IsMirror}}
|
||||
<div class="item">
|
||||
<div class="ui right">
|
||||
<button class="ui basic red show-modal button" data-modal="#convert-repo-modal">{{.i18n.Tr "repo.settings.convert"}}</button>
|
||||
</div>
|
||||
<div>
|
||||
<h5>{{.i18n.Tr "repo.settings.convert"}}</h5>
|
||||
<p>{{.i18n.Tr "repo.settings.convert_desc"}}</p>
|
||||
</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 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>
|
||||
<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>
|
||||
<h5>{{.i18n.Tr "repo.settings.wiki_delete"}}</h5>
|
||||
<p>{{.i18n.Tr "repo.settings.wiki_delete_desc"}}</p>
|
||||
</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>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,35 +1,31 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings account_link">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_account_links"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_account_links"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<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>
|
||||
|
@ -1,63 +1,59 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_access_token"}}
|
||||
<div class="ui right">
|
||||
<div class="ui blue tiny show-panel button" data-panel="#add-access-token-panel">{{.i18n.Tr "settings.generate_new_token"}}</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.tokens_desc"}}
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_access_token"}}
|
||||
<div class="ui right">
|
||||
<div class="ui blue tiny show-panel button" data-panel="#add-access-token-panel">{{.i18n.Tr "settings.generate_new_token"}}</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.tokens_desc"}}
|
||||
</div>
|
||||
{{range .Tokens}}
|
||||
<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>
|
||||
{{range .Tokens}}
|
||||
<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 class="one wide column">
|
||||
<i class="fa fa-send fa-2x left"></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 class="one wide column">
|
||||
<i class="fa fa-send fa-2x left"></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>
|
||||
{{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"}}
|
||||
</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>
|
||||
</form>
|
||||
</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>
|
||||
|
@ -1,49 +1,45 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings avatar">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.avatar"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.avatar"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
|
||||
<form class="ui form" action="{{.Link}}" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{if not DisableGravatar}}
|
||||
<div class="inline field">
|
||||
<div class="ui radio checkbox">
|
||||
<input name="source" value="lookup" type="radio" {{if not .SignedUser.UseCustomAvatar}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "settings.lookup_avatar_by_mail"}}</label>
|
||||
</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>
|
||||
<form class="ui form" action="{{.Link}}" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{if not DisableGravatar}}
|
||||
<div class="inline field">
|
||||
<div class="ui radio checkbox">
|
||||
<input name="source" value="lookup" type="radio" {{if not .SignedUser.UseCustomAvatar}}checked{{end}}>
|
||||
<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>
|
||||
|
@ -1,33 +1,29 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings delete">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached warning header">
|
||||
{{.i18n.Tr "settings.delete_account"}}
|
||||
</h4>
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached warning header">
|
||||
{{.i18n.Tr "settings.delete_account"}}
|
||||
</h4>
|
||||
<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>
|
||||
|
@ -1,59 +1,55 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings emails">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_emails"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui email list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.email_desc"}}
|
||||
</div>
|
||||
{{range .Emails}}
|
||||
<div class="item ui grid">
|
||||
<div class="column">
|
||||
<strong>{{.Email}}</strong>
|
||||
{{if .IsPrimary}}<span class="text red">{{$.i18n.Tr "settings.primary"}}</span>{{end}}
|
||||
{{if not .IsPrimary}}
|
||||
<div class="ui right">
|
||||
<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}}
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_emails"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui email list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.email_desc"}}
|
||||
</div>
|
||||
{{range .Emails}}
|
||||
<div class="item ui grid">
|
||||
<div class="column">
|
||||
<strong>{{.Email}}</strong>
|
||||
{{if .IsPrimary}}<span class="text red">{{$.i18n.Tr "settings.primary"}}</span>{{end}}
|
||||
{{if not .IsPrimary}}
|
||||
<div class="ui right">
|
||||
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</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>
|
||||
{{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>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "settings.add_email"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</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>
|
||||
|
||||
|
@ -1,32 +1,29 @@
|
||||
<div class="four wide column">
|
||||
<div class="ui vertical menu">
|
||||
<div class="header item">{{.i18n.Tr "settings"}}</div>
|
||||
<a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||
{{.i18n.Tr "settings.profile"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsAvatar}}active{{end}} item" href="{{AppSubUrl}}/user/settings/avatar">
|
||||
{{.i18n.Tr "settings.avatar"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsPassword}}active{{end}} item" href="{{AppSubUrl}}/user/settings/password">
|
||||
{{.i18n.Tr "settings.password"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsEmails}}active{{end}} item" href="{{AppSubUrl}}/user/settings/email">
|
||||
{{.i18n.Tr "settings.emails"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsSSHKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/ssh">
|
||||
{{.i18n.Tr "settings.ssh_keys"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
|
||||
{{.i18n.Tr "settings.applications"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsTwofa}}active{{end}} item" href="{{AppSubUrl}}/user/settings/two_factor">
|
||||
{{.i18n.Tr "settings.twofa"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsAccountLink}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account_link">
|
||||
{{.i18n.Tr "settings.account_link"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete">
|
||||
{{.i18n.Tr "settings.delete"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
|
||||
<a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||
{{.i18n.Tr "settings.profile"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsAvatar}}active{{end}} item" href="{{AppSubUrl}}/user/settings/avatar">
|
||||
{{.i18n.Tr "settings.avatar"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsPassword}}active{{end}} item" href="{{AppSubUrl}}/user/settings/password">
|
||||
{{.i18n.Tr "settings.password"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsEmails}}active{{end}} item" href="{{AppSubUrl}}/user/settings/email">
|
||||
{{.i18n.Tr "settings.emails"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsSSHKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/ssh">
|
||||
{{.i18n.Tr "settings.ssh_keys"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
|
||||
{{.i18n.Tr "settings.applications"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsTwofa}}active{{end}} item" href="{{AppSubUrl}}/user/settings/two_factor">
|
||||
{{.i18n.Tr "settings.twofa"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsAccountLink}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account_link">
|
||||
{{.i18n.Tr "settings.account_link"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{AppSubUrl}}/user/settings/delete">
|
||||
{{.i18n.Tr "settings.delete"}}
|
||||
</a>
|
||||
</div>
|
@ -1,44 +1,40 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings password">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.change_password"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}}
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{if .SignedUser.IsPasswordSet}}
|
||||
<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}}
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.change_password"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}}
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{if .SignedUser.IsPasswordSet}}
|
||||
<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>
|
||||
</div>
|
||||
|
@ -1,54 +1,50 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings profile">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.public_profile"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.profile_desc"}}</p>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||
<label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
|
||||
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if not .SignedUser.IsLocal}}disabled{{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>
|
||||
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.public_profile"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.profile_desc"}}</p>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||
<label for="username">{{.i18n.Tr "username"}}<span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span></label>
|
||||
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if not .SignedUser.IsLocal}}disabled{{end}}>
|
||||
{{if not .SignedUser.IsLocal}}
|
||||
<p class="help text blue">{{$.i18n.Tr "settings.password_username_disabled"}}</p>
|
||||
{{end}}
|
||||
</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>
|
||||
|
@ -1,70 +1,66 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings sshkeys">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_ssh_keys"}}
|
||||
<div class="ui right">
|
||||
<div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.ssh_desc"}}
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.manage_ssh_keys"}}
|
||||
<div class="ui right">
|
||||
<div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui key list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "settings.ssh_desc"}}
|
||||
</div>
|
||||
{{range .Keys}}
|
||||
<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>
|
||||
{{range .Keys}}
|
||||
<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 class="one wide column">
|
||||
<i class="mega-octicon octicon-key left"></i>
|
||||
</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 class="one wide column">
|
||||
<i class="mega-octicon octicon-key left"></i>
|
||||
</div>
|
||||
<div class="eleven wide column">
|
||||
<strong>{{.Name}}</strong>
|
||||
<div class="print meta">
|
||||
{{.Fingerprint}}
|
||||
</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 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 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"}}
|
||||
</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>
|
||||
</form>
|
||||
</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>
|
||||
|
@ -1,35 +1,31 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings delete">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.twofa"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.twofa_desc"}}</p>
|
||||
{{if .TwofaEnrolled}}
|
||||
<p>{{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
|
||||
<form class="ui form" action="{{.Link}}/regenerate_scratch" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<p>{{.i18n.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
||||
<button class="ui blue button">{{$.i18n.Tr "settings.twofa_scratch_token_regenerate"}}</button>
|
||||
</form>
|
||||
<form class="ui form" action="{{.Link}}/disable" method="post" enctype="multipart/form-data" id="disable-form">
|
||||
{{.CsrfTokenHtml}}
|
||||
<p>{{.i18n.Tr "settings.twofa_disable_note"}}</p>
|
||||
<div class="ui red button delete-button" data-type="form" data-form="#disable-form">{{$.i18n.Tr "settings.twofa_disable"}}</div>
|
||||
</form>
|
||||
{{else}}
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.twofa"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.twofa_desc"}}</p>
|
||||
{{if .TwofaEnrolled}}
|
||||
<p>{{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
|
||||
<form class="ui form" action="{{.Link}}/regenerate_scratch" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<p>{{.i18n.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
||||
<button class="ui blue button">{{$.i18n.Tr "settings.twofa_scratch_token_regenerate"}}</button>
|
||||
</form>
|
||||
<form class="ui form" action="{{.Link}}/disable" method="post" enctype="multipart/form-data" id="disable-form">
|
||||
{{.CsrfTokenHtml}}
|
||||
<p>{{.i18n.Tr "settings.twofa_disable_note"}}</p>
|
||||
<div class="ui red button delete-button" data-type="form" data-form="#disable-form">{{$.i18n.Tr "settings.twofa_disable"}}</div>
|
||||
</form>
|
||||
{{else}}
|
||||
<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>
|
||||
|
@ -1,31 +1,27 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="user settings delete">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "user/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.twofa_enroll"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.scan_this_image"}}</p>
|
||||
<img src="{{.QrUri}}" alt="{{.TwofaSecret}}">
|
||||
<p>{{.i18n.Tr "settings.or_enter_secret" .TwofaSecret}}
|
||||
<p>{{.i18n.Tr "settings.then_enter_passcode"}}
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<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>
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "settings.twofa_enroll"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "settings.scan_this_image"}}</p>
|
||||
<img src="{{.QrUri}}" alt="{{.TwofaSecret}}">
|
||||
<p>{{.i18n.Tr "settings.or_enter_secret" .TwofaSecret}}
|
||||
<p>{{.i18n.Tr "settings.then_enter_passcode"}}
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<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>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">{{.i18n.Tr "auth.verify"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user