1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 08:34:26 +00:00

Always use ctx.Locale.Tr inside templates (#27231)

This commit is contained in:
delvh 2023-09-25 10:56:50 +02:00 committed by GitHub
parent e6d8b14620
commit 7960ba7e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
305 changed files with 3810 additions and 3810 deletions

View File

@ -1,7 +1,7 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "settings.applications"}} {{ctx.Locale.Tr "settings.applications"}}
</h4> </h4>
{{template "user/settings/applications_oauth2_list" .}} {{template "user/settings/applications_oauth2_list" .}}
</div> </div>

View File

@ -1,7 +1,7 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit authentication")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.auths.edit"}} {{ctx.Locale.Tr "admin.auths.edit"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
@ -9,12 +9,12 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="id" value="{{.Source.ID}}"> <input type="hidden" name="id" value="{{.Source.ID}}">
<div class="inline field"> <div class="inline field">
<label>{{$.locale.Tr "admin.auths.auth_type"}}</label> <label>{{ctx.Locale.Tr "admin.auths.auth_type"}}</label>
<input type="hidden" id="auth_type" name="type" value="{{.Source.Type.Int}}"> <input type="hidden" id="auth_type" name="type" value="{{.Source.Type.Int}}">
<span>{{.Source.TypeName}}</span> <span>{{.Source.TypeName}}</span>
</div> </div>
<div class="required inline field {{if .Err_Name}}error{{end}}"> <div class="required inline field {{if .Err_Name}}error{{end}}">
<label for="auth_name">{{.locale.Tr "admin.auths.auth_name"}}</label> <label for="auth_name">{{ctx.Locale.Tr "admin.auths.auth_name"}}</label>
<input id="auth_name" name="name" value="{{.Source.Name}}" autofocus required> <input id="auth_name" name="name" value="{{.Source.Name}}" autofocus required>
</div> </div>
@ -22,7 +22,7 @@
{{if or .Source.IsLDAP .Source.IsDLDAP}} {{if or .Source.IsLDAP .Source.IsDLDAP}}
{{$cfg:=.Source.Cfg}} {{$cfg:=.Source.Cfg}}
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}"> <div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
<label>{{.locale.Tr "admin.auths.security_protocol"}}</label> <label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
<div class="ui selection security-protocol dropdown"> <div class="ui selection security-protocol dropdown">
<input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol.Int}}"> <input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol.Int}}">
<div class="text">{{$cfg.SecurityProtocolName}}</div> <div class="text">{{$cfg.SecurityProtocolName}}</div>
@ -35,107 +35,107 @@
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label for="host">{{.locale.Tr "admin.auths.host"}}</label> <label for="host">{{ctx.Locale.Tr "admin.auths.host"}}</label>
<input id="host" name="host" value="{{$cfg.Host}}" placeholder="mydomain.com" required> <input id="host" name="host" value="{{$cfg.Host}}" placeholder="mydomain.com" required>
</div> </div>
<div class="required field"> <div class="required field">
<label for="port">{{.locale.Tr "admin.auths.port"}}</label> <label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required> <input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required>
</div> </div>
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> <div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}> <input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
</div> </div>
</div> </div>
{{if .Source.IsLDAP}} {{if .Source.IsLDAP}}
<div class="field"> <div class="field">
<label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> <label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
<input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="cn=Search,dc=mydomain,dc=com"> <input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="cn=Search,dc=mydomain,dc=com">
</div> </div>
<div class="field"> <div class="field">
<label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> <label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
<input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}"> <input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}">
</div> </div>
{{end}} {{end}}
<div class="{{if .Source.IsLDAP}}required{{end}} field"> <div class="{{if .Source.IsLDAP}}required{{end}} field">
<label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> <label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}> <input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}>
</div> </div>
{{if .Source.IsDLDAP}} {{if .Source.IsDLDAP}}
<div class="required field"> <div class="required field">
<label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> <label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com" required> <input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com" required>
</div> </div>
{{end}} {{end}}
<div class="required field"> <div class="required field">
<label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> <label for="filter">{{ctx.Locale.Tr "admin.auths.filter"}}</label>
<input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required> <input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required>
</div> </div>
<div class="field"> <div class="field">
<label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> <label for="admin_filter">{{ctx.Locale.Tr "admin.auths.admin_filter"}}</label>
<input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}"> <input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}">
</div> </div>
<div class="field"> <div class="field">
<label for="restricted_filter">{{.locale.Tr "admin.auths.restricted_filter"}}</label> <label for="restricted_filter">{{ctx.Locale.Tr "admin.auths.restricted_filter"}}</label>
<input id="restricted_filter" name="restricted_filter" value="{{$cfg.RestrictedFilter}}"> <input id="restricted_filter" name="restricted_filter" value="{{$cfg.RestrictedFilter}}">
<p class="help">{{.locale.Tr "admin.auths.restricted_filter_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_username">{{.locale.Tr "admin.auths.attribute_username"}}</label> <label for="attribute_username">{{ctx.Locale.Tr "admin.auths.attribute_username"}}</label>
<input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.locale.Tr "admin.auths.attribute_username_placeholder"}}"> <input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{ctx.Locale.Tr "admin.auths.attribute_username_placeholder"}}">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_name">{{.locale.Tr "admin.auths.attribute_name"}}</label> <label for="attribute_name">{{ctx.Locale.Tr "admin.auths.attribute_name"}}</label>
<input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}"> <input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_surname">{{.locale.Tr "admin.auths.attribute_surname"}}</label> <label for="attribute_surname">{{ctx.Locale.Tr "admin.auths.attribute_surname"}}</label>
<input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}"> <input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}">
</div> </div>
<div class="required field"> <div class="required field">
<label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> <label for="attribute_mail">{{ctx.Locale.Tr "admin.auths.attribute_mail"}}</label>
<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="mail" required> <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="mail" required>
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> <label for="attribute_ssh_public_key">{{ctx.Locale.Tr "admin.auths.attribute_ssh_public_key"}}</label>
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="SshPublicKey"> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="SshPublicKey">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> <label for="attribute_avatar">{{ctx.Locale.Tr "admin.auths.attribute_avatar"}}</label>
<input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto"> <input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto">
</div> </div>
<!-- ldap group begin --> <!-- ldap group begin -->
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label>
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}> <input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}>
</div> </div>
</div> </div>
<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}"> <div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}">
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.group_search_base"}}</label> <label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com"> <input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> <label>{{ctx.Locale.Tr "admin.auths.group_attribute_list_users"}}</label>
<input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="memberUid"> <input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="memberUid">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> <label>{{ctx.Locale.Tr "admin.auths.user_attribute_in_group"}}</label>
<input name="user_uid" value="{{$cfg.UserUID}}" placeholder="uid"> <input name="user_uid" value="{{$cfg.UserUID}}" placeholder="uid">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> <label>{{ctx.Locale.Tr "admin.auths.verify_group_membership"}}</label>
<input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="(|(cn=gitea_users)(cn=admins))"> <input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> <label>{{ctx.Locale.Tr "admin.auths.map_group_to_team"}}</label>
<textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> <textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea>
</div> </div>
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> <label>{{ctx.Locale.Tr "admin.auths.map_group_to_team_removal"}}</label>
<input name="group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}> <input name="group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}>
</div> </div>
</div> </div>
@ -144,31 +144,31 @@
{{if .Source.IsLDAP}} {{if .Source.IsLDAP}}
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="use_paged_search"><strong>{{.locale.Tr "admin.auths.use_paged_search"}}</strong></label> <label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
<input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}> <input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}>
</div> </div>
</div> </div>
<div class="field required search-page-size{{if not $cfg.UsePagedSearch}} gt-hidden{{end}}"> <div class="field required search-page-size{{if not $cfg.UsePagedSearch}} gt-hidden{{end}}">
<label for="search_page_size">{{.locale.Tr "admin.auths.search_page_size"}}</label> <label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
<input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}"> <input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}">
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.attributes_in_bind"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.attributes_in_bind"}}</strong></label>
<input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}> <input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}>
</div> </div>
</div> </div>
{{end}} {{end}}
<div class="optional field"> <div class="optional field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="allow_deactivate_all"><strong>{{.locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label> <label for="allow_deactivate_all"><strong>{{ctx.Locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label>
<input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if $cfg.AllowDeactivateAll}}checked{{end}}> <input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if $cfg.AllowDeactivateAll}}checked{{end}}>
</div> </div>
</div> </div>
@ -178,7 +178,7 @@
{{if .Source.IsSMTP}} {{if .Source.IsSMTP}}
{{$cfg:=.Source.Cfg}} {{$cfg:=.Source.Cfg}}
<div class="inline required field"> <div class="inline required field">
<label>{{.locale.Tr "admin.auths.smtp_auth"}}</label> <label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required> <input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required>
<div class="text">{{$cfg.Auth}}</div> <div class="text">{{$cfg.Auth}}</div>
@ -191,47 +191,47 @@
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label for="smtp_host">{{.locale.Tr "admin.auths.smtphost"}}</label> <label for="smtp_host">{{ctx.Locale.Tr "admin.auths.smtphost"}}</label>
<input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required> <input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required>
</div> </div>
<div class="required field"> <div class="required field">
<label for="smtp_port">{{.locale.Tr "admin.auths.smtpport"}}</label> <label for="smtp_port">{{ctx.Locale.Tr "admin.auths.smtpport"}}</label>
<input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required> <input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required>
</div> </div>
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="force_smtps"><strong>{{.locale.Tr "admin.auths.force_smtps"}}</strong></label> <label for="force_smtps"><strong>{{ctx.Locale.Tr "admin.auths.force_smtps"}}</strong></label>
<input id="force_smtps" name="force_smtps" type="checkbox" {{if $cfg.ForceSMTPS}}checked{{end}}> <input id="force_smtps" name="force_smtps" type="checkbox" {{if $cfg.ForceSMTPS}}checked{{end}}>
</div> </div>
<p class="help">{{.locale.Tr "admin.auths.force_smtps_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p>
</div> </div>
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> <div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
<input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}> <input name="skip_verify" type="checkbox" {{if $cfg.SkipVerify}}checked{{end}}>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label for="helo_hostname">{{.locale.Tr "admin.auths.helo_hostname"}}</label> <label for="helo_hostname">{{ctx.Locale.Tr "admin.auths.helo_hostname"}}</label>
<input id="helo_hostname" name="helo_hostname" value="{{$cfg.HeloHostname}}"> <input id="helo_hostname" name="helo_hostname" value="{{$cfg.HeloHostname}}">
<p class="help">{{.locale.Tr "admin.auths.helo_hostname_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.helo_hostname_helper"}}</p>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="disable_helo"><strong>{{.locale.Tr "admin.auths.disable_helo"}}</strong></label> <label for="disable_helo"><strong>{{ctx.Locale.Tr "admin.auths.disable_helo"}}</strong></label>
<input id="disable_helo" name="disable_helo" type="checkbox" {{if $cfg.DisableHelo}}checked{{end}}> <input id="disable_helo" name="disable_helo" type="checkbox" {{if $cfg.DisableHelo}}checked{{end}}>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label for="allowed_domains">{{.locale.Tr "admin.auths.allowed_domains"}}</label> <label for="allowed_domains">{{ctx.Locale.Tr "admin.auths.allowed_domains"}}</label>
<input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}"> <input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}">
<p class="help">{{.locale.Tr "admin.auths.allowed_domains_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.allowed_domains_helper"}}</p>
</div> </div>
<div class="optional field"> <div class="optional field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div> </div>
</div> </div>
{{end}} {{end}}
@ -240,18 +240,18 @@
{{if .Source.IsPAM}} {{if .Source.IsPAM}}
{{$cfg:=.Source.Cfg}} {{$cfg:=.Source.Cfg}}
<div class="required field"> <div class="required field">
<label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label> <label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required> <input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
</div> </div>
<div class="field"> <div class="field">
<label for="pam_email_domain">{{.locale.Tr "admin.auths.pam_email_domain"}}</label> <label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
<input id="pam_email_domain" name="pam_email_domain" value="{{$cfg.EmailDomain}}"> <input id="pam_email_domain" name="pam_email_domain" value="{{$cfg.EmailDomain}}">
</div> </div>
<div class="optional field"> <div class="optional field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div> </div>
</div> </div>
{{end}} {{end}}
@ -260,7 +260,7 @@
{{if .Source.IsOAuth2}} {{if .Source.IsOAuth2}}
{{$cfg:=.Source.Cfg}} {{$cfg:=.Source.Cfg}}
<div class="inline required field"> <div class="inline required field">
<label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label> <label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required> <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required>
<div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div> <div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div>
@ -273,52 +273,52 @@
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label for="oauth2_key">{{.locale.Tr "admin.auths.oauth2_clientID"}}</label> <label for="oauth2_key">{{ctx.Locale.Tr "admin.auths.oauth2_clientID"}}</label>
<input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required> <input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required>
</div> </div>
<div class="required field"> <div class="required field">
<label for="oauth2_secret">{{.locale.Tr "admin.auths.oauth2_clientSecret"}}</label> <label for="oauth2_secret">{{ctx.Locale.Tr "admin.auths.oauth2_clientSecret"}}</label>
<input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required> <input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required>
</div> </div>
<div class="optional field"> <div class="optional field">
<label for="oauth2_icon_url">{{.locale.Tr "admin.auths.oauth2_icon_url"}}</label> <label for="oauth2_icon_url">{{ctx.Locale.Tr "admin.auths.oauth2_icon_url"}}</label>
<input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}"> <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}">
</div> </div>
<div class="open_id_connect_auto_discovery_url required field"> <div class="open_id_connect_auto_discovery_url required field">
<label for="open_id_connect_auto_discovery_url">{{.locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> <label for="open_id_connect_auto_discovery_url">{{ctx.Locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{$cfg.OpenIDConnectAutoDiscoveryURL}}"> <input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{$cfg.OpenIDConnectAutoDiscoveryURL}}">
</div> </div>
<div class="optional field"> <div class="optional field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div> </div>
</div> </div>
<div class="oauth2_use_custom_url inline field"> <div class="oauth2_use_custom_url inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label>
<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox" {{if $cfg.CustomURLMapping}}checked{{end}}> <input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox" {{if $cfg.CustomURLMapping}}checked{{end}}>
</div> </div>
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_auth_url required field"> <div class="oauth2_use_custom_url_field oauth2_auth_url required field">
<label for="oauth2_auth_url">{{.locale.Tr "admin.auths.oauth2_authURL"}}</label> <label for="oauth2_auth_url">{{ctx.Locale.Tr "admin.auths.oauth2_authURL"}}</label>
<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.AuthURL}}{{end}}"> <input id="oauth2_auth_url" name="oauth2_auth_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.AuthURL}}{{end}}">
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_token_url required field"> <div class="oauth2_use_custom_url_field oauth2_token_url required field">
<label for="oauth2_token_url">{{.locale.Tr "admin.auths.oauth2_tokenURL"}}</label> <label for="oauth2_token_url">{{ctx.Locale.Tr "admin.auths.oauth2_tokenURL"}}</label>
<input id="oauth2_token_url" name="oauth2_token_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.TokenURL}}{{end}}"> <input id="oauth2_token_url" name="oauth2_token_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.TokenURL}}{{end}}">
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_profile_url required field"> <div class="oauth2_use_custom_url_field oauth2_profile_url required field">
<label for="oauth2_profile_url">{{.locale.Tr "admin.auths.oauth2_profileURL"}}</label> <label for="oauth2_profile_url">{{ctx.Locale.Tr "admin.auths.oauth2_profileURL"}}</label>
<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.ProfileURL}}{{end}}"> <input id="oauth2_profile_url" name="oauth2_profile_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.ProfileURL}}{{end}}">
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_email_url required field"> <div class="oauth2_use_custom_url_field oauth2_email_url required field">
<label for="oauth2_email_url">{{.locale.Tr "admin.auths.oauth2_emailURL"}}</label> <label for="oauth2_email_url">{{ctx.Locale.Tr "admin.auths.oauth2_emailURL"}}</label>
<input id="oauth2_email_url" name="oauth2_email_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.EmailURL}}{{end}}"> <input id="oauth2_email_url" name="oauth2_email_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.EmailURL}}{{end}}">
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_tenant required field"> <div class="oauth2_use_custom_url_field oauth2_tenant required field">
<label for="oauth2_tenant">{{.locale.Tr "admin.auths.oauth2_tenant"}}</label> <label for="oauth2_tenant">{{ctx.Locale.Tr "admin.auths.oauth2_tenant"}}</label>
<input id="oauth2_tenant" name="oauth2_tenant" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.Tenant}}{{end}}"> <input id="oauth2_tenant" name="oauth2_tenant" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.Tenant}}{{end}}">
</div> </div>
@ -332,37 +332,37 @@
{{end}}{{end}} {{end}}{{end}}
<div class="field"> <div class="field">
<label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label> <label for="oauth2_scopes">{{ctx.Locale.Tr "admin.auths.oauth2_scopes"}}</label>
<input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{StringUtils.Join $cfg.Scopes ","}}{{end}}"> <input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{StringUtils.Join $cfg.Scopes ","}}{{end}}">
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label> <label for="oauth2_required_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{$cfg.RequiredClaimName}}"> <input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{$cfg.RequiredClaimName}}">
<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_required_claim_value">{{.locale.Tr "admin.auths.oauth2_required_claim_value"}}</label> <label for="oauth2_required_claim_value">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value"}}</label>
<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{$cfg.RequiredClaimValue}}"> <input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{$cfg.RequiredClaimValue}}">
<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_group_claim_name">{{.locale.Tr "admin.auths.oauth2_group_claim_name"}}</label> <label for="oauth2_group_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_group_claim_name"}}</label>
<input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{$cfg.GroupClaimName}}"> <input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{$cfg.GroupClaimName}}">
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_admin_group">{{.locale.Tr "admin.auths.oauth2_admin_group"}}</label> <label for="oauth2_admin_group">{{ctx.Locale.Tr "admin.auths.oauth2_admin_group"}}</label>
<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{$cfg.AdminGroup}}"> <input id="oauth2_admin_group" name="oauth2_admin_group" value="{{$cfg.AdminGroup}}">
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_restricted_group">{{.locale.Tr "admin.auths.oauth2_restricted_group"}}</label> <label for="oauth2_restricted_group">{{ctx.Locale.Tr "admin.auths.oauth2_restricted_group"}}</label>
<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{$cfg.RestrictedGroup}}"> <input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{$cfg.RestrictedGroup}}">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label> <label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
<textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> <textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea>
</div> </div>
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label> <label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
<input name="oauth2_group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}> <input name="oauth2_group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}>
</div> </div>
{{end}} {{end}}
@ -372,32 +372,32 @@
{{$cfg:=.Source.Cfg}} {{$cfg:=.Source.Cfg}}
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="sspi_auto_create_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label> <label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
<input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if $cfg.AutoCreateUsers}}checked{{end}}> <input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if $cfg.AutoCreateUsers}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="sspi_auto_activate_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label> <label for="sspi_auto_activate_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label>
<input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if $cfg.AutoActivateUsers}}checked{{end}}> <input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if $cfg.AutoActivateUsers}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="sspi_strip_domain_names"><strong>{{.locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label> <label for="sspi_strip_domain_names"><strong>{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label>
<input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if $cfg.StripDomainNames}}checked{{end}}> <input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if $cfg.StripDomainNames}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p>
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label for="sspi_separator_replacement">{{.locale.Tr "admin.auths.sspi_separator_replacement"}}</label> <label for="sspi_separator_replacement">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement"}}</label>
<input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{$cfg.SeparatorReplacement}}" required> <input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{$cfg.SeparatorReplacement}}" required>
<p class="help">{{.locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="sspi_default_language">{{.locale.Tr "admin.auths.sspi_default_language"}}</label> <label for="sspi_default_language">{{ctx.Locale.Tr "admin.auths.sspi_default_language"}}</label>
<div class="ui language selection dropdown" id="sspi_default_language"> <div class="ui language selection dropdown" id="sspi_default_language">
<input name="sspi_default_language" type="hidden" value="{{$cfg.DefaultLanguage}}"> <input name="sspi_default_language" type="hidden" value="{{$cfg.DefaultLanguage}}">
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
@ -409,50 +409,50 @@
{{end}} {{end}}
</div> </div>
</div> </div>
<p class="help">{{.locale.Tr "admin.auths.sspi_default_language_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_default_language_helper"}}</p>
</div> </div>
{{end}} {{end}}
{{if .Source.IsLDAP}} {{if .Source.IsLDAP}}
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.syncenabled"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
<input name="is_sync_enabled" type="checkbox" {{if .Source.IsSyncEnabled}}checked{{end}}> <input name="is_sync_enabled" type="checkbox" {{if .Source.IsSyncEnabled}}checked{{end}}>
</div> </div>
</div> </div>
{{end}} {{end}}
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.activated"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.activated"}}</strong></label>
<input name="is_active" type="checkbox" {{if .Source.IsActive}}checked{{end}}> <input name="is_active" type="checkbox" {{if .Source.IsActive}}checked{{end}}>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<button class="ui primary button">{{.locale.Tr "admin.auths.update"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "admin.auths.update"}}</button>
<button class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.locale.Tr "admin.auths.delete"}}</button> <button class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{ctx.Locale.Tr "admin.auths.delete"}}</button>
</div> </div>
</form> </form>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.auths.tips"}} {{ctx.Locale.Tr "admin.auths.tips"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<h5>GMail Settings:</h5> <h5>GMail Settings:</h5>
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p> <p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
<h5 class="oauth2">{{.locale.Tr "admin.auths.tips.oauth2.general"}}:</h5> <h5 class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:</h5>
<p class="oauth2">{{.locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p> <p class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p>
</div> </div>
</div> </div>
<div class="ui g-modal-confirm delete modal"> <div class="ui g-modal-confirm delete modal">
<div class="header"> <div class="header">
{{svg "octicon-trash"}} {{svg "octicon-trash"}}
{{.locale.Tr "admin.auths.delete_auth_title"}} {{ctx.Locale.Tr "admin.auths.delete_auth_title"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{.locale.Tr "admin.auths.delete_auth_desc"}}</p> <p>{{ctx.Locale.Tr "admin.auths.delete_auth_desc"}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -1,9 +1,9 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin authentication")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin authentication")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.auths.auth_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) {{ctx.Locale.Tr "admin.auths.auth_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right"> <div class="ui right">
<a class="ui primary tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.locale.Tr "admin.auths.new"}}</a> <a class="ui primary tiny button" href="{{AppSubUrl}}/admin/auths/new">{{ctx.Locale.Tr "admin.auths.new"}}</a>
</div> </div>
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
@ -11,12 +11,12 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>{{.locale.Tr "admin.auths.name"}}</th> <th>{{ctx.Locale.Tr "admin.auths.name"}}</th>
<th>{{.locale.Tr "admin.auths.type"}}</th> <th>{{ctx.Locale.Tr "admin.auths.type"}}</th>
<th>{{.locale.Tr "admin.auths.enabled"}}</th> <th>{{ctx.Locale.Tr "admin.auths.enabled"}}</th>
<th>{{.locale.Tr "admin.auths.updated"}}</th> <th>{{ctx.Locale.Tr "admin.auths.updated"}}</th>
<th>{{.locale.Tr "admin.users.created"}}</th> <th>{{ctx.Locale.Tr "admin.users.created"}}</th>
<th>{{.locale.Tr "admin.users.edit"}}</th> <th>{{ctx.Locale.Tr "admin.users.edit"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,7 +1,7 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new authentication")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new authentication")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.auths.new"}} {{ctx.Locale.Tr "admin.auths.new"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
@ -9,7 +9,7 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<!-- Types and name --> <!-- Types and name -->
<div class="inline required field {{if .Err_Type}}error{{end}}"> <div class="inline required field {{if .Err_Type}}error{{end}}">
<label>{{.locale.Tr "admin.auths.auth_type"}}</label> <label>{{ctx.Locale.Tr "admin.auths.auth_type"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="auth_type" name="type" value="{{.type}}"> <input type="hidden" id="auth_type" name="type" value="{{.type}}">
<div class="text">{{.CurrentTypeName}}</div> <div class="text">{{.CurrentTypeName}}</div>
@ -22,7 +22,7 @@
</div> </div>
</div> </div>
<div class="required inline field {{if .Err_Name}}error{{end}}"> <div class="required inline field {{if .Err_Name}}error{{end}}">
<label for="auth_name">{{.locale.Tr "admin.auths.auth_name"}}</label> <label for="auth_name">{{ctx.Locale.Tr "admin.auths.auth_name"}}</label>
<input id="auth_name" name="name" value="{{.name}}" autofocus required> <input id="auth_name" name="name" value="{{.name}}" autofocus required>
</div> </div>
@ -34,16 +34,16 @@
<!-- PAM --> <!-- PAM -->
<div class="pam required field {{if not (eq .type 4)}}gt-hidden{{end}}"> <div class="pam required field {{if not (eq .type 4)}}gt-hidden{{end}}">
<label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label> <label for="pam_service_name">{{ctx.Locale.Tr "admin.auths.pam_service_name"}}</label>
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}"> <input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}">
<label for="pam_email_domain">{{.locale.Tr "admin.auths.pam_email_domain"}}</label> <label for="pam_email_domain">{{ctx.Locale.Tr "admin.auths.pam_email_domain"}}</label>
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}"> <input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
</div> </div>
<div class="pam optional field {{if not (eq .type 4)}}gt-hidden{{end}}"> <div class="pam optional field {{if not (eq .type 4)}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div> </div>
</div> </div>
@ -55,67 +55,67 @@
<div class="ldap field"> <div class="ldap field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.attributes_in_bind"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.attributes_in_bind"}}</strong></label>
<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}> <input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}>
</div> </div>
</div> </div>
<div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}"> <div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.syncenabled"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.syncenabled"}}</strong></label>
<input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}> <input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.activated"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.activated"}}</strong></label>
<input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}> <input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<button class="ui primary button">{{.locale.Tr "admin.auths.new"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "admin.auths.new"}}</button>
</div> </div>
</form> </form>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.auths.tips"}} {{ctx.Locale.Tr "admin.auths.tips"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<h5>GMail Settings:</h5> <h5>GMail Settings:</h5>
<p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p> <p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p>
<h5 class="oauth2">{{.locale.Tr "admin.auths.tips.oauth2.general"}}:</h5> <h5 class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general"}}:</h5>
<p class="oauth2">{{.locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p> <p class="oauth2">{{ctx.Locale.Tr "admin.auths.tips.oauth2.general.tip"}} <b id="oauth2-callback-url"></b></p>
<h5 class="ui top attached header">{{.locale.Tr "admin.auths.tip.oauth2_provider"}}</h5> <h5 class="ui top attached header">{{ctx.Locale.Tr "admin.auths.tip.oauth2_provider"}}</h5>
<div class="ui attached segment"> <div class="ui attached segment">
<li>Bitbucket</li> <li>Bitbucket</li>
<span>{{.locale.Tr "admin.auths.tip.bitbucket"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.bitbucket"}}</span>
<li>Dropbox</li> <li>Dropbox</li>
<span>{{.locale.Tr "admin.auths.tip.dropbox"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.dropbox"}}</span>
<li>Facebook</li> <li>Facebook</li>
<span>{{.locale.Tr "admin.auths.tip.facebook"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.facebook"}}</span>
<li>GitHub</li> <li>GitHub</li>
<span>{{.locale.Tr "admin.auths.tip.github"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.github"}}</span>
<li>GitLab</li> <li>GitLab</li>
<span>{{.locale.Tr "admin.auths.tip.gitlab"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.gitlab"}}</span>
<li>Google</li> <li>Google</li>
<span>{{.locale.Tr "admin.auths.tip.google_plus"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.google_plus"}}</span>
<li>OpenID Connect</li> <li>OpenID Connect</li>
<span>{{.locale.Tr "admin.auths.tip.openid_connect"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.openid_connect"}}</span>
<li>Twitter</li> <li>Twitter</li>
<span>{{.locale.Tr "admin.auths.tip.twitter"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.twitter"}}</span>
<li>Discord</li> <li>Discord</li>
<span>{{.locale.Tr "admin.auths.tip.discord"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.discord"}}</span>
<li>Gitea</li> <li>Gitea</li>
<span>{{.locale.Tr "admin.auths.tip.gitea"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.gitea"}}</span>
<li>Nextcloud</li> <li>Nextcloud</li>
<span>{{.locale.Tr "admin.auths.tip.nextcloud"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.nextcloud"}}</span>
<li>Yandex</li> <li>Yandex</li>
<span>{{.locale.Tr "admin.auths.tip.yandex"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.yandex"}}</span>
<li>Mastodon</li> <li>Mastodon</li>
<span>{{.locale.Tr "admin.auths.tip.mastodon"}}</span> <span>{{ctx.Locale.Tr "admin.auths.tip.mastodon"}}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}gt-hidden{{end}}"> <div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}gt-hidden{{end}}">
<div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}"> <div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}">
<label>{{.locale.Tr "admin.auths.security_protocol"}}</label> <label>{{ctx.Locale.Tr "admin.auths.security_protocol"}}</label>
<div class="ui selection security-protocol dropdown"> <div class="ui selection security-protocol dropdown">
<input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}"> <input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}">
<div class="text">{{.CurrentSecurityProtocol}}</div> <div class="text">{{.CurrentSecurityProtocol}}</div>
@ -13,103 +13,103 @@
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label for="host">{{.locale.Tr "admin.auths.host"}}</label> <label for="host">{{ctx.Locale.Tr "admin.auths.host"}}</label>
<input id="host" name="host" value="{{.host}}" placeholder="mydomain.com"> <input id="host" name="host" value="{{.host}}" placeholder="mydomain.com">
</div> </div>
<div class="required field"> <div class="required field">
<label for="port">{{.locale.Tr "admin.auths.port"}}</label> <label for="port">{{ctx.Locale.Tr "admin.auths.port"}}</label>
<input id="port" name="port" value="{{.port}}" placeholder="636"> <input id="port" name="port" value="{{.port}}" placeholder="636">
</div> </div>
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> <div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}> <input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
</div> </div>
</div> </div>
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}"> <div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
<label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> <label for="bind_dn">{{ctx.Locale.Tr "admin.auths.bind_dn"}}</label>
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com"> <input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
</div> </div>
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}"> <div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
<label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> <label for="bind_password">{{ctx.Locale.Tr "admin.auths.bind_password"}}</label>
<input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}"> <input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}">
</div> </div>
<div class="binddnrequired {{if (eq .type 2)}}required{{end}} field"> <div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
<label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> <label for="user_base">{{ctx.Locale.Tr "admin.auths.user_base"}}</label>
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com"> <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
</div> </div>
<div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}"> <div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}">
<label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> <label for="user_dn">{{ctx.Locale.Tr "admin.auths.user_dn"}}</label>
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com"> <input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
</div> </div>
<div class="required field"> <div class="required field">
<label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> <label for="filter">{{ctx.Locale.Tr "admin.auths.filter"}}</label>
<input id="filter" name="filter" value="{{.filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))"> <input id="filter" name="filter" value="{{.filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))">
</div> </div>
<div class="field"> <div class="field">
<label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> <label for="admin_filter">{{ctx.Locale.Tr "admin.auths.admin_filter"}}</label>
<input id="admin_filter" name="admin_filter" value="{{.admin_filter}}"> <input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
</div> </div>
<div class="field"> <div class="field">
<label for="restricted_filter">{{.locale.Tr "admin.auths.restricted_filter"}}</label> <label for="restricted_filter">{{ctx.Locale.Tr "admin.auths.restricted_filter"}}</label>
<input id="restricted_filter" name="restricted_filter" value="{{.restricted_filter}}"> <input id="restricted_filter" name="restricted_filter" value="{{.restricted_filter}}">
<p class="help">{{.locale.Tr "admin.auths.restricted_filter_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.restricted_filter_helper"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_username">{{.locale.Tr "admin.auths.attribute_username"}}</label> <label for="attribute_username">{{ctx.Locale.Tr "admin.auths.attribute_username"}}</label>
<input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.locale.Tr "admin.auths.attribute_username_placeholder"}}"> <input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{ctx.Locale.Tr "admin.auths.attribute_username_placeholder"}}">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_name">{{.locale.Tr "admin.auths.attribute_name"}}</label> <label for="attribute_name">{{ctx.Locale.Tr "admin.auths.attribute_name"}}</label>
<input id="attribute_name" name="attribute_name" value="{{.attribute_name}}"> <input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_surname">{{.locale.Tr "admin.auths.attribute_surname"}}</label> <label for="attribute_surname">{{ctx.Locale.Tr "admin.auths.attribute_surname"}}</label>
<input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}"> <input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
</div> </div>
<div class="required field"> <div class="required field">
<label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> <label for="attribute_mail">{{ctx.Locale.Tr "admin.auths.attribute_mail"}}</label>
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="mail"> <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="mail">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> <label for="attribute_ssh_public_key">{{ctx.Locale.Tr "admin.auths.attribute_ssh_public_key"}}</label>
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="SshPublicKey"> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="SshPublicKey">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> <label for="attribute_avatar">{{ctx.Locale.Tr "admin.auths.attribute_avatar"}}</label>
<input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="jpegPhoto"> <input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="jpegPhoto">
</div> </div>
<!-- ldap group begin --> <!-- ldap group begin -->
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label>
<input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if .groups_enabled}}checked{{end}}> <input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if .groups_enabled}}checked{{end}}>
</div> </div>
</div> </div>
<div id="ldap-group-options" class="ui segment secondary"> <div id="ldap-group-options" class="ui segment secondary">
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.group_search_base"}}</label> <label>{{ctx.Locale.Tr "admin.auths.group_search_base"}}</label>
<input name="group_dn" value="{{.group_dn}}" placeholder="ou=group,dc=mydomain,dc=com"> <input name="group_dn" value="{{.group_dn}}" placeholder="ou=group,dc=mydomain,dc=com">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> <label>{{ctx.Locale.Tr "admin.auths.group_attribute_list_users"}}</label>
<input name="group_member_uid" value="{{.group_member_uid}}" placeholder="memberUid"> <input name="group_member_uid" value="{{.group_member_uid}}" placeholder="memberUid">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> <label>{{ctx.Locale.Tr "admin.auths.user_attribute_in_group"}}</label>
<input name="user_uid" value="{{.user_uid}}" placeholder="uid"> <input name="user_uid" value="{{.user_uid}}" placeholder="uid">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> <label>{{ctx.Locale.Tr "admin.auths.verify_group_membership"}}</label>
<input name="group_filter" value="{{.group_filter}}" placeholder="(|(cn=gitea_users)(cn=admins))"> <input name="group_filter" value="{{.group_filter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> <label>{{ctx.Locale.Tr "admin.auths.map_group_to_team"}}</label>
<textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.group_team_map}}</textarea> <textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.group_team_map}}</textarea>
</div> </div>
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> <label>{{ctx.Locale.Tr "admin.auths.map_group_to_team_removal"}}</label>
<input name="group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}> <input name="group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}>
</div> </div>
</div> </div>
@ -117,24 +117,24 @@
<div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}"> <div class="ldap inline field {{if not (eq .type 2)}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="use_paged_search"><strong>{{.locale.Tr "admin.auths.use_paged_search"}}</strong></label> <label for="use_paged_search"><strong>{{ctx.Locale.Tr "admin.auths.use_paged_search"}}</strong></label>
<input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}> <input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}>
</div> </div>
</div> </div>
<div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}gt-hidden{{end}}"> <div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}gt-hidden{{end}}">
<label for="search_page_size">{{.locale.Tr "admin.auths.search_page_size"}}</label> <label for="search_page_size">{{ctx.Locale.Tr "admin.auths.search_page_size"}}</label>
<input id="search_page_size" name="search_page_size" value="{{.search_page_size}}"> <input id="search_page_size" name="search_page_size" value="{{.search_page_size}}">
</div> </div>
<div class="optional field"> <div class="optional field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="allow_deactivate_all"><strong>{{.locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label> <label for="allow_deactivate_all"><strong>{{ctx.Locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label>
<input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if .allow_deactivate_all}}checked{{end}}> <input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if .allow_deactivate_all}}checked{{end}}>
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
<div class="oauth2 field {{if not (eq .type 6)}}gt-hidden{{end}}"> <div class="oauth2 field {{if not (eq .type 6)}}gt-hidden{{end}}">
<div class="inline required field"> <div class="inline required field">
<label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label> <label>{{ctx.Locale.Tr "admin.auths.oauth2_provider"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}"> <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
<div class="text">{{.oauth2_provider}}</div> <div class="text">{{.oauth2_provider}}</div>
@ -13,53 +13,53 @@
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label for="oauth2_key">{{.locale.Tr "admin.auths.oauth2_clientID"}}</label> <label for="oauth2_key">{{ctx.Locale.Tr "admin.auths.oauth2_clientID"}}</label>
<input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}"> <input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}">
</div> </div>
<div class="required field"> <div class="required field">
<label for="oauth2_secret">{{.locale.Tr "admin.auths.oauth2_clientSecret"}}</label> <label for="oauth2_secret">{{ctx.Locale.Tr "admin.auths.oauth2_clientSecret"}}</label>
<input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}"> <input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
</div> </div>
<div class="optional field"> <div class="optional field">
<label for="oauth2_icon_url">{{.locale.Tr "admin.auths.oauth2_icon_url"}}</label> <label for="oauth2_icon_url">{{ctx.Locale.Tr "admin.auths.oauth2_icon_url"}}</label>
<input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}"> <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}">
</div> </div>
<div class="open_id_connect_auto_discovery_url required field{{if .Err_DiscoveryURL}} error{{end}}"> <div class="open_id_connect_auto_discovery_url required field{{if .Err_DiscoveryURL}} error{{end}}">
<label for="open_id_connect_auto_discovery_url">{{.locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> <label for="open_id_connect_auto_discovery_url">{{ctx.Locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}"> <input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}">
</div> </div>
<div class="optional field"> <div class="optional field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div> </div>
</div> </div>
<div class="oauth2_use_custom_url inline field"> <div class="oauth2_use_custom_url inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label>
<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox"> <input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox">
</div> </div>
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_auth_url required field"> <div class="oauth2_use_custom_url_field oauth2_auth_url required field">
<label for="oauth2_auth_url">{{.locale.Tr "admin.auths.oauth2_authURL"}}</label> <label for="oauth2_auth_url">{{ctx.Locale.Tr "admin.auths.oauth2_authURL"}}</label>
<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{.oauth2_auth_url}}"> <input id="oauth2_auth_url" name="oauth2_auth_url" value="{{.oauth2_auth_url}}">
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_token_url required field"> <div class="oauth2_use_custom_url_field oauth2_token_url required field">
<label for="oauth2_token_url">{{.locale.Tr "admin.auths.oauth2_tokenURL"}}</label> <label for="oauth2_token_url">{{ctx.Locale.Tr "admin.auths.oauth2_tokenURL"}}</label>
<input id="oauth2_token_url" name="oauth2_token_url" value="{{.oauth2_token_url}}"> <input id="oauth2_token_url" name="oauth2_token_url" value="{{.oauth2_token_url}}">
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_profile_url required field"> <div class="oauth2_use_custom_url_field oauth2_profile_url required field">
<label for="oauth2_profile_url">{{.locale.Tr "admin.auths.oauth2_profileURL"}}</label> <label for="oauth2_profile_url">{{ctx.Locale.Tr "admin.auths.oauth2_profileURL"}}</label>
<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{.oauth2_profile_url}}"> <input id="oauth2_profile_url" name="oauth2_profile_url" value="{{.oauth2_profile_url}}">
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_email_url required field"> <div class="oauth2_use_custom_url_field oauth2_email_url required field">
<label for="oauth2_email_url">{{.locale.Tr "admin.auths.oauth2_emailURL"}}</label> <label for="oauth2_email_url">{{ctx.Locale.Tr "admin.auths.oauth2_emailURL"}}</label>
<input id="oauth2_email_url" name="oauth2_email_url" value="{{.oauth2_email_url}}"> <input id="oauth2_email_url" name="oauth2_email_url" value="{{.oauth2_email_url}}">
</div> </div>
<div class="oauth2_use_custom_url_field oauth2_tenant required field"> <div class="oauth2_use_custom_url_field oauth2_tenant required field">
<label for="oauth2_tenant">{{.locale.Tr "admin.auths.oauth2_tenant"}}</label> <label for="oauth2_tenant">{{ctx.Locale.Tr "admin.auths.oauth2_tenant"}}</label>
<input id="oauth2_tenant" name="oauth2_tenant" value="{{.oauth2_tenant}}"> <input id="oauth2_tenant" name="oauth2_tenant" value="{{.oauth2_tenant}}">
</div> </div>
@ -73,37 +73,37 @@
{{end}}{{end}} {{end}}{{end}}
<div class="field"> <div class="field">
<label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label> <label for="oauth2_scopes">{{ctx.Locale.Tr "admin.auths.oauth2_scopes"}}</label>
<input id="oauth2_scopes" name="oauth2_scopes" value="{{.oauth2_scopes}}"> <input id="oauth2_scopes" name="oauth2_scopes" value="{{.oauth2_scopes}}">
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label> <label for="oauth2_required_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{.oauth2_required_claim_name}}"> <input id="oauth2_required_claim_name" name="oauth2_required_claim_name" value="{{.oauth2_required_claim_name}}">
<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_required_claim_value">{{.locale.Tr "admin.auths.oauth2_required_claim_value"}}</label> <label for="oauth2_required_claim_value">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value"}}</label>
<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{.oauth2_required_claim_value}}"> <input id="oauth2_required_claim_value" name="oauth2_required_claim_value" value="{{.oauth2_required_claim_value}}">
<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_group_claim_name">{{.locale.Tr "admin.auths.oauth2_group_claim_name"}}</label> <label for="oauth2_group_claim_name">{{ctx.Locale.Tr "admin.auths.oauth2_group_claim_name"}}</label>
<input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{.oauth2_group_claim_name}}"> <input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{.oauth2_group_claim_name}}">
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_admin_group">{{.locale.Tr "admin.auths.oauth2_admin_group"}}</label> <label for="oauth2_admin_group">{{ctx.Locale.Tr "admin.auths.oauth2_admin_group"}}</label>
<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{.oauth2_admin_group}}"> <input id="oauth2_admin_group" name="oauth2_admin_group" value="{{.oauth2_admin_group}}">
</div> </div>
<div class="field"> <div class="field">
<label for="oauth2_restricted_group">{{.locale.Tr "admin.auths.oauth2_restricted_group"}}</label> <label for="oauth2_restricted_group">{{ctx.Locale.Tr "admin.auths.oauth2_restricted_group"}}</label>
<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{.oauth2_restricted_group}}"> <input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{.oauth2_restricted_group}}">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label> <label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
<textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.oauth2_group_team_map}}</textarea> <textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.oauth2_group_team_map}}</textarea>
</div> </div>
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label> <label>{{ctx.Locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
<input name="oauth2_group_team_map_removal" type="checkbox" {{if .oauth2_group_team_map_removal}}checked{{end}}> <input name="oauth2_group_team_map_removal" type="checkbox" {{if .oauth2_group_team_map_removal}}checked{{end}}>
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
<div class="smtp field {{if not (eq .type 3)}}gt-hidden{{end}}"> <div class="smtp field {{if not (eq .type 3)}}gt-hidden{{end}}">
<div class="inline required field"> <div class="inline required field">
<label>{{.locale.Tr "admin.auths.smtp_auth"}}</label> <label>{{ctx.Locale.Tr "admin.auths.smtp_auth"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}"> <input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}">
<div class="text">{{.smtp_auth}}</div> <div class="text">{{.smtp_auth}}</div>
@ -13,47 +13,47 @@
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label for="smtp_host">{{.locale.Tr "admin.auths.smtphost"}}</label> <label for="smtp_host">{{ctx.Locale.Tr "admin.auths.smtphost"}}</label>
<input id="smtp_host" name="smtp_host" value="{{.smtp_host}}"> <input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
</div> </div>
<div class="required field"> <div class="required field">
<label for="smtp_port">{{.locale.Tr "admin.auths.smtpport"}}</label> <label for="smtp_port">{{ctx.Locale.Tr "admin.auths.smtpport"}}</label>
<input id="smtp_port" name="smtp_port" value="{{.smtp_port}}"> <input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="force_smtps"><strong>{{.locale.Tr "admin.auths.force_smtps"}}</strong></label> <label for="force_smtps"><strong>{{ctx.Locale.Tr "admin.auths.force_smtps"}}</strong></label>
<input id="force_smtps" name="force_smtps" type="checkbox" {{if .force_smtps}}checked{{end}}> <input id="force_smtps" name="force_smtps" type="checkbox" {{if .force_smtps}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.force_smtps_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.force_smtps_helper"}}</p>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.auths.skip_tls_verify"}}</strong></label>
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}> <input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label for="helo_hostname">{{.locale.Tr "admin.auths.helo_hostname"}}</label> <label for="helo_hostname">{{ctx.Locale.Tr "admin.auths.helo_hostname"}}</label>
<input id="helo_hostname" name="helo_hostname" value="{{.helo_hostname}}"> <input id="helo_hostname" name="helo_hostname" value="{{.helo_hostname}}">
<p class="help">{{.locale.Tr "admin.auths.helo_hostname_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.helo_hostname_helper"}}</p>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="disable_helo"><strong>{{.locale.Tr "admin.auths.disable_helo"}}</strong></label> <label for="disable_helo"><strong>{{ctx.Locale.Tr "admin.auths.disable_helo"}}</strong></label>
<input id="disable_helo" name="disable_helo" type="checkbox" {{if .disable_helo}}checked{{end}}> <input id="disable_helo" name="disable_helo" type="checkbox" {{if .disable_helo}}checked{{end}}>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label for="allowed_domains">{{.locale.Tr "admin.auths.allowed_domains"}}</label> <label for="allowed_domains">{{ctx.Locale.Tr "admin.auths.allowed_domains"}}</label>
<input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}"> <input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}">
<p class="help">{{.locale.Tr "admin.auths.allowed_domains_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.allowed_domains_helper"}}</p>
</div> </div>
<div class="optional field"> <div class="optional field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <label for="skip_local_two_fa"><strong>{{ctx.Locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,32 +1,32 @@
<div class="sspi field {{if not (eq .type 7)}}gt-hidden{{end}}"> <div class="sspi field {{if not (eq .type 7)}}gt-hidden{{end}}">
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="sspi_auto_create_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label> <label for="sspi_auto_create_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label>
<input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if .SSPIAutoCreateUsers}}checked{{end}}> <input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if .SSPIAutoCreateUsers}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="sspi_auto_activate_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label> <label for="sspi_auto_activate_users"><strong>{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label>
<input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if .SSPIAutoActivateUsers}}checked{{end}}> <input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if .SSPIAutoActivateUsers}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="sspi_strip_domain_names"><strong>{{.locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label> <label for="sspi_strip_domain_names"><strong>{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label>
<input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if .SSPIStripDomainNames}}checked{{end}}> <input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if .SSPIStripDomainNames}}checked{{end}}>
<p class="help">{{.locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p>
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label for="sspi_separator_replacement">{{.locale.Tr "admin.auths.sspi_separator_replacement"}}</label> <label for="sspi_separator_replacement">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement"}}</label>
<input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{.SSPISeparatorReplacement}}"> <input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{.SSPISeparatorReplacement}}">
<p class="help">{{.locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="sspi_default_language">{{.locale.Tr "admin.auths.sspi_default_language"}}</label> <label for="sspi_default_language">{{ctx.Locale.Tr "admin.auths.sspi_default_language"}}</label>
<div class="ui language selection dropdown" id="sspi_default_language"> <div class="ui language selection dropdown" id="sspi_default_language">
<input name="sspi_default_language" type="hidden" value="{{.SSPIDefaultLanguage}}"> <input name="sspi_default_language" type="hidden" value="{{.SSPIDefaultLanguage}}">
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
@ -38,6 +38,6 @@
{{end}} {{end}}
</div> </div>
</div> </div>
<p class="help">{{.locale.Tr "admin.auths.sspi_default_language_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.auths.sspi_default_language_helper"}}</p>
</div> </div>
</div> </div>

View File

@ -2,22 +2,22 @@
<form class="ui form ignore-dirty gt-f1"> <form class="ui form ignore-dirty gt-f1">
<div class="ui fluid action input"> <div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<!-- Sort --> <!-- Sort -->
<div class="ui dropdown type jump item gt-mr-0"> <div class="ui dropdown type jump item gt-mr-0">
<span class="text"> <span class="text">
{{.locale.Tr "repo.issues.filter_sort"}} {{ctx.Locale.Tr "repo.issues.filter_sort"}}
</span> </span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a> <a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a> <a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}">{{.locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> <a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}">{{.locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> <a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a> <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a> <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,82 +1,82 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin config")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.server_config"}} {{ctx.Locale.Tr "admin.config.server_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.app_name"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.app_name"}}</dt>
<dd>{{AppName}}</dd> <dd>{{AppName}}</dd>
<dt>{{.locale.Tr "admin.config.app_ver"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.app_ver"}}</dt>
<dd>{{AppVer}}{{.AppBuiltWith}}</dd> <dd>{{AppVer}}{{.AppBuiltWith}}</dd>
<dt>{{.locale.Tr "admin.config.custom_conf"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.custom_conf"}}</dt>
<dd>{{.CustomConf}}</dd> <dd>{{.CustomConf}}</dd>
<dt>{{.locale.Tr "admin.config.app_url"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.app_url"}}</dt>
<dd>{{.AppUrl}}</dd> <dd>{{.AppUrl}}</dd>
<dt>{{.locale.Tr "admin.config.domain"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.domain"}}</dt>
<dd>{{.Domain}}</dd> <dd>{{.Domain}}</dd>
<dt>{{.locale.Tr "admin.config.offline_mode"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.offline_mode"}}</dt>
<dd>{{if .OfflineMode}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .OfflineMode}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.disable_router_log"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.disable_router_log"}}</dt>
<dd>{{if .DisableRouterLog}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .DisableRouterLog}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.config.run_user"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.run_user"}}</dt>
<dd>{{.RunUser}}</dd> <dd>{{.RunUser}}</dd>
<dt>{{.locale.Tr "admin.config.run_mode"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.run_mode"}}</dt>
<dd>{{.RunMode}}</dd> <dd>{{.RunMode}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.config.git_version"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_version"}}</dt>
<dd>{{.GitVersion}}</dd> <dd>{{.GitVersion}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.config.app_data_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.app_data_path"}}</dt>
<dd>{{.AppDataPath}}</dd> <dd>{{.AppDataPath}}</dd>
<dt>{{.locale.Tr "admin.config.repo_root_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.repo_root_path"}}</dt>
<dd>{{.RepoRootPath}}</dd> <dd>{{.RepoRootPath}}</dd>
<dt>{{.locale.Tr "admin.config.custom_file_root_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.custom_file_root_path"}}</dt>
<dd>{{.CustomRootPath}}</dd> <dd>{{.CustomRootPath}}</dd>
<dt>{{.locale.Tr "admin.config.log_file_root_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.log_file_root_path"}}</dt>
<dd>{{.LogRootPath}}</dd> <dd>{{.LogRootPath}}</dd>
<dt>{{.locale.Tr "admin.config.script_type"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.script_type"}}</dt>
<dd>{{.ScriptType}}</dd> <dd>{{.ScriptType}}</dd>
<dt>{{.locale.Tr "admin.config.reverse_auth_user"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.reverse_auth_user"}}</dt>
<dd>{{.ReverseProxyAuthUser}}</dd> <dd>{{.ReverseProxyAuthUser}}</dd>
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.ssh_config"}} {{ctx.Locale.Tr "admin.config.ssh_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.ssh_enabled"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_enabled"}}</dt>
<dd>{{if not .SSH.Disabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if not .SSH.Disabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
{{if not .SSH.Disabled}} {{if not .SSH.Disabled}}
<dt>{{.locale.Tr "admin.config.ssh_start_builtin_server"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_start_builtin_server"}}</dt>
<dd>{{if .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.ssh_domain"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_domain"}}</dt>
<dd>{{.SSH.Domain}}</dd> <dd>{{.SSH.Domain}}</dd>
<dt>{{.locale.Tr "admin.config.ssh_port"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_port"}}</dt>
<dd>{{.SSH.Port}}</dd> <dd>{{.SSH.Port}}</dd>
<dt>{{.locale.Tr "admin.config.ssh_listen_port"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_listen_port"}}</dt>
<dd>{{.SSH.ListenPort}}</dd> <dd>{{.SSH.ListenPort}}</dd>
{{if not .SSH.StartBuiltinServer}} {{if not .SSH.StartBuiltinServer}}
<dt>{{.locale.Tr "admin.config.ssh_root_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_root_path"}}</dt>
<dd>{{.SSH.RootPath}}</dd> <dd>{{.SSH.RootPath}}</dd>
<dt>{{.locale.Tr "admin.config.ssh_key_test_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_key_test_path"}}</dt>
<dd>{{.SSH.KeyTestPath}}</dd> <dd>{{.SSH.KeyTestPath}}</dd>
<dt>{{.locale.Tr "admin.config.ssh_keygen_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_keygen_path"}}</dt>
<dd>{{.SSH.KeygenPath}}</dd> <dd>{{.SSH.KeygenPath}}</dd>
<dt>{{.locale.Tr "admin.config.ssh_minimum_key_size_check"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_minimum_key_size_check"}}</dt>
<dd>{{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
{{if .SSH.MinimumKeySizeCheck}} {{if .SSH.MinimumKeySizeCheck}}
<dt>{{.locale.Tr "admin.config.ssh_minimum_key_sizes"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.ssh_minimum_key_sizes"}}</dt>
<dd>{{.SSH.MinimumKeySizes}}</dd> <dd>{{.SSH.MinimumKeySizes}}</dd>
{{end}} {{end}}
{{end}} {{end}}
@ -85,160 +85,160 @@
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.lfs_config"}} {{ctx.Locale.Tr "admin.config.lfs_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.lfs_enabled"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.lfs_enabled"}}</dt>
<dd>{{if .LFS.StartServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .LFS.StartServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
{{if .LFS.StartServer}} {{if .LFS.StartServer}}
<dt>{{.locale.Tr "admin.config.lfs_content_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.lfs_content_path"}}</dt>
<dd>{{JsonUtils.EncodeToString .LFS.Storage.ToShadowCopy}}</dd> <dd>{{JsonUtils.EncodeToString .LFS.Storage.ToShadowCopy}}</dd>
<dt>{{.locale.Tr "admin.config.lfs_http_auth_expiry"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.lfs_http_auth_expiry"}}</dt>
<dd>{{.LFS.HTTPAuthExpiry}}</dd> <dd>{{.LFS.HTTPAuthExpiry}}</dd>
{{end}} {{end}}
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.db_config"}} {{ctx.Locale.Tr "admin.config.db_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.db_type"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.db_type"}}</dt>
<dd>{{.DbCfg.Type}}</dd> <dd>{{.DbCfg.Type}}</dd>
{{if not (eq .DbCfg.Type "sqlite3")}} {{if not (eq .DbCfg.Type "sqlite3")}}
<dt>{{.locale.Tr "admin.config.db_host"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.db_host"}}</dt>
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd> <dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
<dt>{{.locale.Tr "admin.config.db_name"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.db_name"}}</dt>
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd> <dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
<dt>{{.locale.Tr "admin.config.db_user"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.db_user"}}</dt>
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd> <dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
{{end}} {{end}}
{{if eq .DbCfg.Type "postgres"}} {{if eq .DbCfg.Type "postgres"}}
<dt>{{.locale.Tr "admin.config.db_schema"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.db_schema"}}</dt>
<dd>{{if .DbCfg.Schema}}{{.DbCfg.Schema}}{{else}}-{{end}}</dd> <dd>{{if .DbCfg.Schema}}{{.DbCfg.Schema}}{{else}}-{{end}}</dd>
<dt>{{.locale.Tr "admin.config.db_ssl_mode"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.db_ssl_mode"}}</dt>
<dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd> <dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd>
{{end}} {{end}}
{{if eq .DbCfg.Type "sqlite3"}} {{if eq .DbCfg.Type "sqlite3"}}
<dt>{{.locale.Tr "admin.config.db_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.db_path"}}</dt>
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd> <dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd>
{{end}} {{end}}
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.service_config"}} {{ctx.Locale.Tr "admin.config.service_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.register_email_confirm"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.register_email_confirm"}}</dt>
<dd>{{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.disable_register"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.disable_register"}}</dt>
<dd>{{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.allow_only_internal_registration"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.allow_only_internal_registration"}}</dt>
<dd>{{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.allow_only_external_registration"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.allow_only_external_registration"}}</dt>
<dd>{{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.show_registration_button"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.show_registration_button"}}</dt>
<dd>{{if .Service.ShowRegistrationButton}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.ShowRegistrationButton}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.enable_openid_signup"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.enable_openid_signup"}}</dt>
<dd>{{if .Service.EnableOpenIDSignUp}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.EnableOpenIDSignUp}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.enable_openid_signin"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.enable_openid_signin"}}</dt>
<dd>{{if .Service.EnableOpenIDSignIn}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.EnableOpenIDSignIn}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.require_sign_in_view"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.require_sign_in_view"}}</dt>
<dd>{{if .Service.RequireSignInView}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.RequireSignInView}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.mail_notify"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mail_notify"}}</dt>
<dd>{{if .Service.EnableNotifyMail}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.EnableNotifyMail}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.disable_key_size_check"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.disable_key_size_check"}}</dt>
<dd>{{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.enable_captcha"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.enable_captcha"}}</dt>
<dd>{{if .Service.EnableCaptcha}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.EnableCaptcha}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.default_keep_email_private"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.default_keep_email_private"}}</dt>
<dd>{{if .Service.DefaultKeepEmailPrivate}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.DefaultKeepEmailPrivate}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.default_allow_create_organization"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.default_allow_create_organization"}}</dt>
<dd>{{if .Service.DefaultAllowCreateOrganization}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.DefaultAllowCreateOrganization}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.enable_timetracking"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.enable_timetracking"}}</dt>
<dd>{{if .Service.EnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.EnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
{{if .Service.EnableTimetracking}} {{if .Service.EnableTimetracking}}
<dt>{{.locale.Tr "admin.config.default_enable_timetracking"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.default_enable_timetracking"}}</dt>
<dd>{{if .Service.DefaultEnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.DefaultEnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}</dt>
<dd>{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.DefaultAllowOnlyContributorsToTrackTime}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
{{end}} {{end}}
<dt>{{.locale.Tr "admin.config.default_visibility_organization"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.default_visibility_organization"}}</dt>
<dd>{{.Service.DefaultOrgVisibility}}</dd> <dd>{{.Service.DefaultOrgVisibility}}</dd>
<dt>{{.locale.Tr "admin.config.no_reply_address"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.no_reply_address"}}</dt>
<dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd> <dd>{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}</dd>
<dt>{{.locale.Tr "admin.config.default_enable_dependencies"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.default_enable_dependencies"}}</dt>
<dd>{{if .Service.DefaultEnableDependencies}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Service.DefaultEnableDependencies}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.config.active_code_lives"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.active_code_lives"}}</dt>
<dd>{{.Service.ActiveCodeLives}} {{.locale.Tr "tool.raw_minutes"}}</dd> <dd>{{.Service.ActiveCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}</dd>
<dt>{{.locale.Tr "admin.config.reset_password_code_lives"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.reset_password_code_lives"}}</dt>
<dd>{{.Service.ResetPwdCodeLives}} {{.locale.Tr "tool.raw_minutes"}}</dd> <dd>{{.Service.ResetPwdCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}</dd>
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.webhook_config"}} {{ctx.Locale.Tr "admin.config.webhook_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.queue_length"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.queue_length"}}</dt>
<dd>{{.Webhook.QueueLength}}</dd> <dd>{{.Webhook.QueueLength}}</dd>
<dt>{{.locale.Tr "admin.config.deliver_timeout"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.deliver_timeout"}}</dt>
<dd>{{.Webhook.DeliverTimeout}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.Webhook.DeliverTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
<dt>{{.locale.Tr "admin.config.skip_tls_verify"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.skip_tls_verify"}}</dt>
<dd>{{if .Webhook.SkipTLSVerify}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Webhook.SkipTLSVerify}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.mailer_config"}} {{ctx.Locale.Tr "admin.config.mailer_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.mailer_enabled"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_enabled"}}</dt>
<dd>{{if .MailerEnabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .MailerEnabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
{{if .MailerEnabled}} {{if .MailerEnabled}}
<dt>{{.locale.Tr "admin.config.mailer_name"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_name"}}</dt>
<dd>{{.Mailer.Name}}</dd> <dd>{{.Mailer.Name}}</dd>
{{if eq .Mailer.Protocol "sendmail"}} {{if eq .Mailer.Protocol "sendmail"}}
<dt>{{.locale.Tr "admin.config.mailer_use_sendmail"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_use_sendmail"}}</dt>
<dd>{{svg "octicon-check"}}</dd> <dd>{{svg "octicon-check"}}</dd>
<dt>{{.locale.Tr "admin.config.mailer_sendmail_path"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_path"}}</dt>
<dd>{{.Mailer.SendmailPath}}</dd> <dd>{{.Mailer.SendmailPath}}</dd>
<dt>{{.locale.Tr "admin.config.mailer_sendmail_args"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_args"}}</dt>
<dd>{{.Mailer.SendmailArgs}}</dd> <dd>{{.Mailer.SendmailArgs}}</dd>
<dt>{{.locale.Tr "admin.config.mailer_sendmail_timeout"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_sendmail_timeout"}}</dt>
<dd>{{.Mailer.SendmailTimeout}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.Mailer.SendmailTimeout}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
{{else if eq .Mailer.Protocol "dummy"}} {{else if eq .Mailer.Protocol "dummy"}}
<dt>{{.locale.Tr "admin.config.mailer_use_dummy"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_use_dummy"}}</dt>
<dd>{{svg "octicon-check"}}</dd> <dd>{{svg "octicon-check"}}</dd>
{{else}}{{/* SMTP family */}} {{else}}{{/* SMTP family */}}
<dt>{{.locale.Tr "admin.config.mailer_protocol"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_protocol"}}</dt>
<dd>{{.Mailer.Protocol}}</dd> <dd>{{.Mailer.Protocol}}</dd>
<dt>{{.locale.Tr "admin.config.mailer_enable_helo"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_enable_helo"}}</dt>
<dd>{{if .Mailer.EnableHelo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Mailer.EnableHelo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.mailer_smtp_addr"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_smtp_addr"}}</dt>
<dd>{{.Mailer.SMTPAddr}}</dd> <dd>{{.Mailer.SMTPAddr}}</dd>
<dt>{{.locale.Tr "admin.config.mailer_smtp_port"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_smtp_port"}}</dt>
<dd>{{.Mailer.SMTPPort}}</dd> <dd>{{.Mailer.SMTPPort}}</dd>
{{end}} {{end}}
<dt>{{.locale.Tr "admin.config.mailer_user"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.mailer_user"}}</dt>
<dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd> <dd>{{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt class="gt-py-2">{{.locale.Tr "admin.config.send_test_mail"}}</dt> <dt class="gt-py-2">{{ctx.Locale.Tr "admin.config.send_test_mail"}}</dt>
<dd> <dd>
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post"> <form class="ui form ignore-dirty" action="{{AppSubUrl}}/admin/config/test_mail" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="ui tiny input"> <div class="ui tiny input">
<input type="email" name="email" placeholder="{{.locale.Tr "admin.config.test_email_placeholder"}}" size="29" required> <input type="email" name="email" placeholder="{{ctx.Locale.Tr "admin.config.test_email_placeholder"}}" size="29" required>
</div> </div>
<button class="ui tiny primary button">{{.locale.Tr "admin.config.send_test_mail_submit"}}</button> <button class="ui tiny primary button">{{ctx.Locale.Tr "admin.config.send_test_mail_submit"}}</button>
</form> </form>
</dd> </dd>
{{end}} {{end}}
@ -246,118 +246,118 @@
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.cache_config"}} {{ctx.Locale.Tr "admin.config.cache_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.cache_adapter"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.cache_adapter"}}</dt>
<dd>{{.CacheAdapter}}</dd> <dd>{{.CacheAdapter}}</dd>
{{if eq .CacheAdapter "memory"}} {{if eq .CacheAdapter "memory"}}
<dt>{{.locale.Tr "admin.config.cache_interval"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.cache_interval"}}</dt>
<dd>{{.CacheInterval}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.CacheInterval}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
{{end}} {{end}}
{{if .CacheConn}} {{if .CacheConn}}
<dt>{{.locale.Tr "admin.config.cache_conn"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.cache_conn"}}</dt>
<dd><code>{{.CacheConn}}</code></dd> <dd><code>{{.CacheConn}}</code></dd>
<dt>{{.locale.Tr "admin.config.cache_item_ttl"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.cache_item_ttl"}}</dt>
<dd><code>{{.CacheItemTTL}}</code></dd> <dd><code>{{.CacheItemTTL}}</code></dd>
{{end}} {{end}}
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.session_config"}} {{ctx.Locale.Tr "admin.config.session_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.session_provider"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.session_provider"}}</dt>
<dd>{{.SessionConfig.Provider}}</dd> <dd>{{.SessionConfig.Provider}}</dd>
<dt>{{.locale.Tr "admin.config.provider_config"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.provider_config"}}</dt>
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd> <dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
<dt>{{.locale.Tr "admin.config.cookie_name"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.cookie_name"}}</dt>
<dd>{{.SessionConfig.CookieName}}</dd> <dd>{{.SessionConfig.CookieName}}</dd>
<dt>{{.locale.Tr "admin.config.gc_interval_time"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.gc_interval_time"}}</dt>
<dd>{{.SessionConfig.Gclifetime}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.SessionConfig.Gclifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
<dt>{{.locale.Tr "admin.config.session_life_time"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.session_life_time"}}</dt>
<dd>{{.SessionConfig.Maxlifetime}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.SessionConfig.Maxlifetime}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
<dt>{{.locale.Tr "admin.config.https_only"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.https_only"}}</dt>
<dd>{{if .SessionConfig.Secure}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .SessionConfig.Secure}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.picture_config"}} {{ctx.Locale.Tr "admin.config.picture_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.disable_gravatar"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.disable_gravatar"}}</dt>
<dd> <dd>
<div class="ui toggle checkbox"> <div class="ui toggle checkbox">
<input type="checkbox" name="picture.disable_gravatar" version="{{.SystemSettings.GetVersion "picture.disable_gravatar"}}"{{if .SystemSettings.GetBool "picture.disable_gravatar"}} checked{{end}} title="{{.locale.Tr "admin.config.disable_gravatar"}}"> <input type="checkbox" name="picture.disable_gravatar" version="{{.SystemSettings.GetVersion "picture.disable_gravatar"}}"{{if .SystemSettings.GetBool "picture.disable_gravatar"}} checked{{end}} title="{{ctx.Locale.Tr "admin.config.disable_gravatar"}}">
</div> </div>
</dd> </dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.config.enable_federated_avatar"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.enable_federated_avatar"}}</dt>
<dd> <dd>
<div class="ui toggle checkbox"> <div class="ui toggle checkbox">
<input type="checkbox" name="picture.enable_federated_avatar" version="{{.SystemSettings.GetVersion "picture.enable_federated_avatar"}}"{{if .SystemSettings.GetBool "picture.enable_federated_avatar"}} checked{{end}} title="{{.locale.Tr "admin.config.enable_federated_avatar"}}"> <input type="checkbox" name="picture.enable_federated_avatar" version="{{.SystemSettings.GetVersion "picture.enable_federated_avatar"}}"{{if .SystemSettings.GetBool "picture.enable_federated_avatar"}} checked{{end}} title="{{ctx.Locale.Tr "admin.config.enable_federated_avatar"}}">
</div> </div>
</dd> </dd>
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.git_config"}} {{ctx.Locale.Tr "admin.config.git_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.config.git_disable_diff_highlight"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_disable_diff_highlight"}}</dt>
<dd>{{if .Git.DisableDiffHighlight}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if .Git.DisableDiffHighlight}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
<dt>{{.locale.Tr "admin.config.git_max_diff_lines"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_max_diff_lines"}}</dt>
<dd>{{.Git.MaxGitDiffLines}}</dd> <dd>{{.Git.MaxGitDiffLines}}</dd>
<dt>{{.locale.Tr "admin.config.git_max_diff_line_characters"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_max_diff_line_characters"}}</dt>
<dd>{{.Git.MaxGitDiffLineCharacters}}</dd> <dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
<dt>{{.locale.Tr "admin.config.git_max_diff_files"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_max_diff_files"}}</dt>
<dd>{{.Git.MaxGitDiffFiles}}</dd> <dd>{{.Git.MaxGitDiffFiles}}</dd>
<dt>{{.locale.Tr "admin.config.git_gc_args"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_gc_args"}}</dt>
<dd><code>{{.Git.GCArgs}}</code></dd> <dd><code>{{.Git.GCArgs}}</code></dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.config.git_migrate_timeout"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_migrate_timeout"}}</dt>
<dd>{{.Git.Timeout.Migrate}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.Git.Timeout.Migrate}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
<dt>{{.locale.Tr "admin.config.git_mirror_timeout"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_mirror_timeout"}}</dt>
<dd>{{.Git.Timeout.Mirror}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.Git.Timeout.Mirror}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
<dt>{{.locale.Tr "admin.config.git_clone_timeout"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_clone_timeout"}}</dt>
<dd>{{.Git.Timeout.Clone}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.Git.Timeout.Clone}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
<dt>{{.locale.Tr "admin.config.git_pull_timeout"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_pull_timeout"}}</dt>
<dd>{{.Git.Timeout.Pull}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.Git.Timeout.Pull}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
<dt>{{.locale.Tr "admin.config.git_gc_timeout"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.git_gc_timeout"}}</dt>
<dd>{{.Git.Timeout.GC}} {{.locale.Tr "tool.raw_seconds"}}</dd> <dd>{{.Git.Timeout.GC}} {{ctx.Locale.Tr "tool.raw_seconds"}}</dd>
</dl> </dl>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.config.log_config"}} {{ctx.Locale.Tr "admin.config.log_config"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
{{if .Loggers.xorm.IsEnabled}} {{if .Loggers.xorm.IsEnabled}}
<dt>{{$.locale.Tr "admin.config.xorm_log_sql"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.xorm_log_sql"}}</dt>
<dd>{{if $.LogSQL}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd> <dd>{{if $.LogSQL}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</dd>
{{end}} {{end}}
{{if .Loggers.access.IsEnabled}} {{if .Loggers.access.IsEnabled}}
<dt>{{$.locale.Tr "admin.config.access_log_template"}}</dt> <dt>{{ctx.Locale.Tr "admin.config.access_log_template"}}</dt>
<dd><code>{{$.AccessLogTemplate}}</code></dd> <dd><code>{{$.AccessLogTemplate}}</code></dd>
{{end}} {{end}}
{{range $loggerName, $loggerDetail := .Loggers}} {{range $loggerName, $loggerDetail := .Loggers}}
<dt>{{$.locale.Tr "admin.config.logger_name_fmt" $loggerName}}</dt> <dt>{{ctx.Locale.Tr "admin.config.logger_name_fmt" $loggerName}}</dt>
{{if $loggerDetail.IsEnabled}} {{if $loggerDetail.IsEnabled}}
<dd><pre class="gt-m-0">{{$loggerDetail.EventWriters | JsonUtils.EncodeToString | JsonUtils.PrettyIndent}}</pre></dd> <dd><pre class="gt-m-0">{{$loggerDetail.EventWriters | JsonUtils.EncodeToString | JsonUtils.PrettyIndent}}</pre></dd>
{{else}} {{else}}
<dd>{{$.locale.Tr "admin.config.disabled_logger"}}</dd> <dd>{{ctx.Locale.Tr "admin.config.disabled_logger"}}</dd>
{{end}} {{end}}
{{end}} {{end}}
</dl> </dl>

View File

@ -1,7 +1,7 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.monitor.cron"}} {{ctx.Locale.Tr "admin.monitor.cron"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<form method="post" action="{{AppSubUrl}}/admin"> <form method="post" action="{{AppSubUrl}}/admin">
@ -9,19 +9,19 @@
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th>{{.locale.Tr "admin.monitor.name"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.name"}}</th>
<th>{{.locale.Tr "admin.monitor.schedule"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.schedule"}}</th>
<th>{{.locale.Tr "admin.monitor.next"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.next"}}</th>
<th>{{.locale.Tr "admin.monitor.previous"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.previous"}}</th>
<th>{{.locale.Tr "admin.monitor.execute_times"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.execute_times"}}</th>
<th>{{.locale.Tr "admin.monitor.last_execution_result"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.last_execution_result"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{range .Entries}} {{range .Entries}}
<tr> <tr>
<td><button type="submit" class="ui primary button" name="op" value="{{.Name}}" title="{{$.locale.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-triangle-right"}}</button></td> <td><button type="submit" class="ui primary button" name="op" value="{{.Name}}" title="{{ctx.Locale.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-triangle-right"}}</button></td>
<td>{{$.locale.Tr (printf "admin.dashboard.%s" .Name)}}</td> <td>{{ctx.Locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
<td>{{.Spec}}</td> <td>{{.Spec}}</td>
<td>{{DateTime "full" .Next}}</td> <td>{{DateTime "full" .Next}}</td>
<td>{{if gt .Prev.Year 1}}{{DateTime "full" .Prev}}{{else}}-{{end}}</td> <td>{{if gt .Prev.Year 1}}{{DateTime "full" .Prev}}{{else}}-{{end}}</td>

View File

@ -2,11 +2,11 @@
<div class="admin-setting-content"> <div class="admin-setting-content">
{{if .NeedUpdate}} {{if .NeedUpdate}}
<div class="ui negative message flash-error"> <div class="ui negative message flash-error">
<p>{{(.locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}</p> <p>{{(ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}</p>
</div> </div>
{{end}} {{end}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.dashboard.operations"}} {{ctx.Locale.Tr "admin.dashboard.operations"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<form method="post" action="{{AppSubUrl}}/admin"> <form method="post" action="{{AppSubUrl}}/admin">
@ -14,56 +14,56 @@
<table class="ui very basic table gt-mt-0 gt-px-4"> <table class="ui very basic table gt-mt-0 gt-px-4">
<tbody> <tbody>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.delete_inactive_accounts"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.delete_inactive_accounts"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_inactive_accounts">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_inactive_accounts">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.delete_repo_archives"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.delete_repo_archives"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_repo_archives">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_repo_archives">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.delete_missing_repos"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.delete_missing_repos"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_missing_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_missing_repos">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.git_gc_repos"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.git_gc_repos"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
{{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}} {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.resync_all_sshkeys"}}<br> <td>{{ctx.Locale.Tr "admin.dashboard.resync_all_sshkeys"}}<br>
{{.locale.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td> {{ctx.Locale.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.resync_all_sshprincipals"}}<br> <td>{{ctx.Locale.Tr "admin.dashboard.resync_all_sshprincipals"}}<br>
{{.locale.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td> {{ctx.Locale.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
{{end}} {{end}}
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.resync_all_hooks"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.resync_all_hooks"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.reinit_missing_repos"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.reinit_missing_repos"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="reinit_missing_repos">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="reinit_missing_repos">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.sync_external_users"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.sync_external_users"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_external_users">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_external_users">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.repo_health_check"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.repo_health_check"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="repo_health_check">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="repo_health_check">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.delete_generated_repository_avatars"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.delete_generated_repository_avatars"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_generated_repository_avatars">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="delete_generated_repository_avatars">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.sync_repo_branches"}}</td> <td>{{ctx.Locale.Tr "admin.dashboard.sync_repo_branches"}}</td>
<td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_repo_branches">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td class="text right"><button type="submit" class="ui primary button" name="op" value="sync_repo_branches">{{svg "octicon-play"}} {{ctx.Locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -71,69 +71,69 @@
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.dashboard.system_status"}} {{ctx.Locale.Tr "admin.dashboard.system_status"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<dl class="admin-dl-horizontal"> <dl class="admin-dl-horizontal">
<dt>{{.locale.Tr "admin.dashboard.server_uptime"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.server_uptime"}}</dt>
<dd><relative-time format="duration" datetime="{{.SysStatus.StartTime}}">{{.SysStatus.StartTime}}</relative-time></dd> <dd><relative-time format="duration" datetime="{{.SysStatus.StartTime}}">{{.SysStatus.StartTime}}</relative-time></dd>
<dt>{{.locale.Tr "admin.dashboard.current_goroutine"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.current_goroutine"}}</dt>
<dd>{{.SysStatus.NumGoroutine}}</dd> <dd>{{.SysStatus.NumGoroutine}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.dashboard.current_memory_usage"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.current_memory_usage"}}</dt>
<dd>{{.SysStatus.MemAllocated}}</dd> <dd>{{.SysStatus.MemAllocated}}</dd>
<dt>{{.locale.Tr "admin.dashboard.total_memory_allocated"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.total_memory_allocated"}}</dt>
<dd>{{.SysStatus.MemTotal}}</dd> <dd>{{.SysStatus.MemTotal}}</dd>
<dt>{{.locale.Tr "admin.dashboard.memory_obtained"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.memory_obtained"}}</dt>
<dd>{{.SysStatus.MemSys}}</dd> <dd>{{.SysStatus.MemSys}}</dd>
<dt>{{.locale.Tr "admin.dashboard.pointer_lookup_times"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
<dd>{{.SysStatus.Lookups}}</dd> <dd>{{.SysStatus.Lookups}}</dd>
<dt>{{.locale.Tr "admin.dashboard.memory_allocate_times"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.memory_allocate_times"}}</dt>
<dd>{{.SysStatus.MemMallocs}}</dd> <dd>{{.SysStatus.MemMallocs}}</dd>
<dt>{{.locale.Tr "admin.dashboard.memory_free_times"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.memory_free_times"}}</dt>
<dd>{{.SysStatus.MemFrees}}</dd> <dd>{{.SysStatus.MemFrees}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.dashboard.current_heap_usage"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.current_heap_usage"}}</dt>
<dd>{{.SysStatus.HeapAlloc}}</dd> <dd>{{.SysStatus.HeapAlloc}}</dd>
<dt>{{.locale.Tr "admin.dashboard.heap_memory_obtained"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
<dd>{{.SysStatus.HeapSys}}</dd> <dd>{{.SysStatus.HeapSys}}</dd>
<dt>{{.locale.Tr "admin.dashboard.heap_memory_idle"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.heap_memory_idle"}}</dt>
<dd>{{.SysStatus.HeapIdle}}</dd> <dd>{{.SysStatus.HeapIdle}}</dd>
<dt>{{.locale.Tr "admin.dashboard.heap_memory_in_use"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
<dd>{{.SysStatus.HeapInuse}}</dd> <dd>{{.SysStatus.HeapInuse}}</dd>
<dt>{{.locale.Tr "admin.dashboard.heap_memory_released"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.heap_memory_released"}}</dt>
<dd>{{.SysStatus.HeapReleased}}</dd> <dd>{{.SysStatus.HeapReleased}}</dd>
<dt>{{.locale.Tr "admin.dashboard.heap_objects"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.heap_objects"}}</dt>
<dd>{{.SysStatus.HeapObjects}}</dd> <dd>{{.SysStatus.HeapObjects}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
<dd>{{.SysStatus.StackInuse}}</dd> <dd>{{.SysStatus.StackInuse}}</dd>
<dt>{{.locale.Tr "admin.dashboard.stack_memory_obtained"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
<dd>{{.SysStatus.StackSys}}</dd> <dd>{{.SysStatus.StackSys}}</dd>
<dt>{{.locale.Tr "admin.dashboard.mspan_structures_usage"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
<dd>{{.SysStatus.MSpanInuse}}</dd> <dd>{{.SysStatus.MSpanInuse}}</dd>
<dt>{{.locale.Tr "admin.dashboard.mspan_structures_obtained"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
<dd>{{.SysStatus.MSpanSys}}</dd> <dd>{{.SysStatus.MSpanSys}}</dd>
<dt>{{.locale.Tr "admin.dashboard.mcache_structures_usage"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
<dd>{{.SysStatus.MCacheInuse}}</dd> <dd>{{.SysStatus.MCacheInuse}}</dd>
<dt>{{.locale.Tr "admin.dashboard.mcache_structures_obtained"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
<dd>{{.SysStatus.MCacheSys}}</dd> <dd>{{.SysStatus.MCacheSys}}</dd>
<dt>{{.locale.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
<dd>{{.SysStatus.BuckHashSys}}</dd> <dd>{{.SysStatus.BuckHashSys}}</dd>
<dt>{{.locale.Tr "admin.dashboard.gc_metadata_obtained"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
<dd>{{.SysStatus.GCSys}}</dd> <dd>{{.SysStatus.GCSys}}</dd>
<dt>{{.locale.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
<dd>{{.SysStatus.OtherSys}}</dd> <dd>{{.SysStatus.OtherSys}}</dd>
<div class="divider"></div> <div class="divider"></div>
<dt>{{.locale.Tr "admin.dashboard.next_gc_recycle"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.next_gc_recycle"}}</dt>
<dd>{{.SysStatus.NextGC}}</dd> <dd>{{.SysStatus.NextGC}}</dd>
<dt>{{.locale.Tr "admin.dashboard.last_gc_time"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.last_gc_time"}}</dt>
<dd>{{.SysStatus.LastGC}}</dd> <dd>{{.SysStatus.LastGC}}</dd>
<dt>{{.locale.Tr "admin.dashboard.total_gc_pause"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.total_gc_pause"}}</dt>
<dd>{{.SysStatus.PauseTotalNs}}</dd> <dd>{{.SysStatus.PauseTotalNs}}</dd>
<dt>{{.locale.Tr "admin.dashboard.last_gc_pause"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.last_gc_pause"}}</dt>
<dd>{{.SysStatus.PauseNs}}</dd> <dd>{{.SysStatus.PauseNs}}</dd>
<dt>{{.locale.Tr "admin.dashboard.gc_times"}}</dt> <dt>{{ctx.Locale.Tr "admin.dashboard.gc_times"}}</dt>
<dd>{{.SysStatus.NumGC}}</dd> <dd>{{.SysStatus.NumGC}}</dd>
</dl> </dl>
</div> </div>

View File

@ -1,27 +1,27 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.emails.email_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) {{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui secondary filter menu gt-ac gt-mx-0"> <div class="ui secondary filter menu gt-ac gt-mx-0">
<form class="ui form ignore-dirty gt-f1"> <form class="ui form ignore-dirty gt-f1">
<div class="ui fluid action input"> <div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<!-- Sort --> <!-- Sort -->
<div class="ui dropdown type jump item gt-mr-0"> <div class="ui dropdown type jump item gt-mr-0">
<span class="text"> <span class="text">
{{.locale.Tr "repo.issues.filter_sort"}} {{ctx.Locale.Tr "repo.issues.filter_sort"}}
</span> </span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<a class="{{if or (eq .SortType "email") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=email&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.email"}}</a> <a class="{{if or (eq .SortType "email") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=email&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.email"}}</a>
<a class="{{if eq .SortType "reverseemail"}}active {{end}}item" href="{{$.Link}}?sort=reverseemail&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.email_reverse"}}</a> <a class="{{if eq .SortType "reverseemail"}}active {{end}}item" href="{{$.Link}}?sort=reverseemail&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.email_reverse"}}</a>
<a class="{{if eq .SortType "username"}}active {{end}}item" href="{{$.Link}}?sort=username&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.name"}}</a> <a class="{{if eq .SortType "username"}}active {{end}}item" href="{{$.Link}}?sort=username&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.name"}}</a>
<a class="{{if eq .SortType "reverseusername"}}active {{end}}item" href="{{$.Link}}?sort=reverseusername&q={{$.Keyword}}">{{.locale.Tr "admin.emails.filter_sort.name_reverse"}}</a> <a class="{{if eq .SortType "reverseusername"}}active {{end}}item" href="{{$.Link}}?sort=reverseusername&q={{$.Keyword}}">{{ctx.Locale.Tr "admin.emails.filter_sort.name_reverse"}}</a>
</div> </div>
</div> </div>
</div> </div>
@ -31,16 +31,16 @@
<thead> <thead>
<tr> <tr>
<th data-sortt-asc="username" data-sortt-desc="reverseusername"> <th data-sortt-asc="username" data-sortt-desc="reverseusername">
{{.locale.Tr "admin.users.name"}} {{ctx.Locale.Tr "admin.users.name"}}
{{SortArrow "username" "reverseusername" $.SortType false}} {{SortArrow "username" "reverseusername" $.SortType false}}
</th> </th>
<th>{{.locale.Tr "admin.users.full_name"}}</th> <th>{{ctx.Locale.Tr "admin.users.full_name"}}</th>
<th data-sortt-asc="email" data-sortt-desc="reverseemail" data-sortt-default="true"> <th data-sortt-asc="email" data-sortt-desc="reverseemail" data-sortt-default="true">
{{.locale.Tr "email"}} {{ctx.Locale.Tr "email"}}
{{SortArrow "email" "reverseemail" $.SortType true}} {{SortArrow "email" "reverseemail" $.SortType true}}
</th> </th>
<th>{{.locale.Tr "admin.emails.primary"}}</th> <th>{{ctx.Locale.Tr "admin.emails.primary"}}</th>
<th>{{.locale.Tr "admin.emails.activated"}}</th> <th>{{ctx.Locale.Tr "admin.emails.activated"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -72,10 +72,10 @@
<div class="ui g-modal-confirm modal" id="change-email-modal"> <div class="ui g-modal-confirm modal" id="change-email-modal">
<div class="header"> <div class="header">
{{.locale.Tr "admin.emails.change_email_header"}} {{ctx.Locale.Tr "admin.emails.change_email_header"}}
</div> </div>
<div class="content"> <div class="content">
<p class="center">{{.locale.Tr "admin.emails.change_email_text"}}</p> <p class="center">{{ctx.Locale.Tr "admin.emails.change_email_text"}}</p>
<form class="ui form" id="email-action-form" action="{{AppSubUrl}}/admin/emails/activate" method="post"> <form class="ui form" id="email-action-form" action="{{AppSubUrl}}/admin/emails/activate" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}

View File

@ -1,12 +1,12 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin settings new webhook")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin settings new webhook")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
{{$CustomHeaderTitle := .locale.Tr "admin.defaulthooks.update_webhook"}} {{$CustomHeaderTitle := ctx.Locale.Tr "admin.defaulthooks.update_webhook"}}
{{if .PageIsAdminDefaultHooksNew}} {{if .PageIsAdminDefaultHooksNew}}
{{$CustomHeaderTitle = .locale.Tr "admin.defaulthooks.add_webhook"}} {{$CustomHeaderTitle = ctx.Locale.Tr "admin.defaulthooks.add_webhook"}}
{{else if .PageIsAdminSystemHooksNew}} {{else if .PageIsAdminSystemHooksNew}}
{{$CustomHeaderTitle = .locale.Tr "admin.systemhooks.add_webhook"}} {{$CustomHeaderTitle = ctx.Locale.Tr "admin.systemhooks.add_webhook"}}
{{else if .Webhook.IsSystemWebhook}} {{else if .Webhook.IsSystemWebhook}}
{{$CustomHeaderTitle = .locale.Tr "admin.systemhooks.update_webhook"}} {{$CustomHeaderTitle = ctx.Locale.Tr "admin.systemhooks.update_webhook"}}
{{end}} {{end}}
{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
</div> </div>

View File

@ -1,94 +1,94 @@
<div class="flex-container-nav"> <div class="flex-container-nav">
<div class="ui fluid vertical menu"> <div class="ui fluid vertical menu">
<div class="header item">{{.locale.Tr "admin.settings"}}</div> <div class="header item">{{ctx.Locale.Tr "admin.settings"}}</div>
<a class="{{if .PageIsAdminDashboard}}active {{end}}item" href="{{AppSubUrl}}/admin"> <a class="{{if .PageIsAdminDashboard}}active {{end}}item" href="{{AppSubUrl}}/admin">
{{.locale.Tr "admin.dashboard"}} {{ctx.Locale.Tr "admin.dashboard"}}
</a> </a>
<details class="item toggleable-item" {{if or .PageIsAdminUsers .PageIsAdminEmails .PageIsAdminOrganizations .PageIsAdminAuthentications}}open{{end}}> <details class="item toggleable-item" {{if or .PageIsAdminUsers .PageIsAdminEmails .PageIsAdminOrganizations .PageIsAdminAuthentications}}open{{end}}>
<summary>{{.locale.Tr "admin.identity_access"}}</summary> <summary>{{ctx.Locale.Tr "admin.identity_access"}}</summary>
<div class="menu"> <div class="menu">
<a class="{{if .PageIsAdminAuthentications}}active {{end}}item" href="{{AppSubUrl}}/admin/auths"> <a class="{{if .PageIsAdminAuthentications}}active {{end}}item" href="{{AppSubUrl}}/admin/auths">
{{.locale.Tr "admin.authentication"}} {{ctx.Locale.Tr "admin.authentication"}}
</a> </a>
<a class="{{if .PageIsAdminOrganizations}}active {{end}}item" href="{{AppSubUrl}}/admin/orgs"> <a class="{{if .PageIsAdminOrganizations}}active {{end}}item" href="{{AppSubUrl}}/admin/orgs">
{{.locale.Tr "admin.organizations"}} {{ctx.Locale.Tr "admin.organizations"}}
</a> </a>
<a class="{{if .PageIsAdminUsers}}active {{end}}item" href="{{AppSubUrl}}/admin/users"> <a class="{{if .PageIsAdminUsers}}active {{end}}item" href="{{AppSubUrl}}/admin/users">
{{.locale.Tr "admin.users"}} {{ctx.Locale.Tr "admin.users"}}
</a> </a>
<a class="{{if .PageIsAdminEmails}}active {{end}}item" href="{{AppSubUrl}}/admin/emails"> <a class="{{if .PageIsAdminEmails}}active {{end}}item" href="{{AppSubUrl}}/admin/emails">
{{.locale.Tr "admin.emails"}} {{ctx.Locale.Tr "admin.emails"}}
</a> </a>
</div> </div>
</details> </details>
<details class="item toggleable-item" {{if or .PageIsAdminRepositories (and .EnablePackages .PageIsAdminPackages)}}open{{end}}> <details class="item toggleable-item" {{if or .PageIsAdminRepositories (and .EnablePackages .PageIsAdminPackages)}}open{{end}}>
<summary>{{.locale.Tr "admin.assets"}}</summary> <summary>{{ctx.Locale.Tr "admin.assets"}}</summary>
<div class="menu"> <div class="menu">
{{if .EnablePackages}} {{if .EnablePackages}}
<a class="{{if .PageIsAdminPackages}}active {{end}}item" href="{{AppSubUrl}}/admin/packages"> <a class="{{if .PageIsAdminPackages}}active {{end}}item" href="{{AppSubUrl}}/admin/packages">
{{.locale.Tr "packages.title"}} {{ctx.Locale.Tr "packages.title"}}
</a> </a>
{{end}} {{end}}
<a class="{{if .PageIsAdminRepositories}}active {{end}}item" href="{{AppSubUrl}}/admin/repos"> <a class="{{if .PageIsAdminRepositories}}active {{end}}item" href="{{AppSubUrl}}/admin/repos">
{{.locale.Tr "admin.repositories"}} {{ctx.Locale.Tr "admin.repositories"}}
</a> </a>
</div> </div>
</details> </details>
<!-- Webhooks and OAuth can be both disabled here, so add this if statement to display different ui --> <!-- Webhooks and OAuth can be both disabled here, so add this if statement to display different ui -->
{{if and (not DisableWebhooks) .EnableOAuth2}} {{if and (not DisableWebhooks) .EnableOAuth2}}
<details class="item toggleable-item" {{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks .PageIsAdminApplications}}open{{end}}> <details class="item toggleable-item" {{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks .PageIsAdminApplications}}open{{end}}>
<summary>{{.locale.Tr "admin.integrations"}}</summary> <summary>{{ctx.Locale.Tr "admin.integrations"}}</summary>
<div class="menu"> <div class="menu">
<a class="{{if .PageIsAdminApplications}}active {{end}}item" href="{{AppSubUrl}}/admin/applications"> <a class="{{if .PageIsAdminApplications}}active {{end}}item" href="{{AppSubUrl}}/admin/applications">
{{.locale.Tr "settings.applications"}} {{ctx.Locale.Tr "settings.applications"}}
</a> </a>
<a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active {{end}}item" href="{{AppSubUrl}}/admin/hooks"> <a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active {{end}}item" href="{{AppSubUrl}}/admin/hooks">
{{.locale.Tr "admin.hooks"}} {{ctx.Locale.Tr "admin.hooks"}}
</a> </a>
</div> </div>
</details> </details>
{{else}} {{else}}
{{if not DisableWebhooks}} {{if not DisableWebhooks}}
<a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active {{end}}item" href="{{AppSubUrl}}/admin/hooks"> <a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active {{end}}item" href="{{AppSubUrl}}/admin/hooks">
{{.locale.Tr "admin.hooks"}} {{ctx.Locale.Tr "admin.hooks"}}
</a> </a>
{{end}} {{end}}
{{if .EnableOAuth2}} {{if .EnableOAuth2}}
<a class="{{if .PageIsAdminApplications}}active {{end}}item" href="{{AppSubUrl}}/admin/applications"> <a class="{{if .PageIsAdminApplications}}active {{end}}item" href="{{AppSubUrl}}/admin/applications">
{{.locale.Tr "settings.applications"}} {{ctx.Locale.Tr "settings.applications"}}
</a> </a>
{{end}} {{end}}
{{end}} {{end}}
{{if .EnableActions}} {{if .EnableActions}}
<details class="item toggleable-item" {{if .PageIsSharedSettingsRunners}}open{{end}}> <details class="item toggleable-item" {{if .PageIsSharedSettingsRunners}}open{{end}}>
<summary>{{.locale.Tr "actions.actions"}}</summary> <summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
<div class="menu"> <div class="menu">
<a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{AppSubUrl}}/admin/actions/runners"> <a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{AppSubUrl}}/admin/actions/runners">
{{.locale.Tr "actions.runners"}} {{ctx.Locale.Tr "actions.runners"}}
</a> </a>
</div> </div>
</details> </details>
{{end}} {{end}}
<a class="{{if .PageIsAdminConfig}}active {{end}}item" href="{{AppSubUrl}}/admin/config"> <a class="{{if .PageIsAdminConfig}}active {{end}}item" href="{{AppSubUrl}}/admin/config">
{{.locale.Tr "admin.config"}} {{ctx.Locale.Tr "admin.config"}}
</a> </a>
<a class="{{if .PageIsAdminNotices}}active {{end}}item" href="{{AppSubUrl}}/admin/notices"> <a class="{{if .PageIsAdminNotices}}active {{end}}item" href="{{AppSubUrl}}/admin/notices">
{{.locale.Tr "admin.notices"}} {{ctx.Locale.Tr "admin.notices"}}
</a> </a>
<details class="item toggleable-item" {{if or .PageIsAdminMonitorStats .PageIsAdminMonitorCron .PageIsAdminMonitorQueue .PageIsAdminMonitorStacktrace}}open{{end}}> <details class="item toggleable-item" {{if or .PageIsAdminMonitorStats .PageIsAdminMonitorCron .PageIsAdminMonitorQueue .PageIsAdminMonitorStacktrace}}open{{end}}>
<summary>{{.locale.Tr "admin.monitor"}}</summary> <summary>{{ctx.Locale.Tr "admin.monitor"}}</summary>
<div class="menu"> <div class="menu">
<a class="{{if .PageIsAdminMonitorStats}}active {{end}}item" href="{{AppSubUrl}}/admin/monitor/stats"> <a class="{{if .PageIsAdminMonitorStats}}active {{end}}item" href="{{AppSubUrl}}/admin/monitor/stats">
{{.locale.Tr "admin.monitor.stats"}} {{ctx.Locale.Tr "admin.monitor.stats"}}
</a> </a>
<a class="{{if .PageIsAdminMonitorCron}}active {{end}}item" href="{{AppSubUrl}}/admin/monitor/cron"> <a class="{{if .PageIsAdminMonitorCron}}active {{end}}item" href="{{AppSubUrl}}/admin/monitor/cron">
{{.locale.Tr "admin.monitor.cron"}} {{ctx.Locale.Tr "admin.monitor.cron"}}
</a> </a>
<a class="{{if .PageIsAdminMonitorQueue}}active {{end}}item" href="{{AppSubUrl}}/admin/monitor/queue"> <a class="{{if .PageIsAdminMonitorQueue}}active {{end}}item" href="{{AppSubUrl}}/admin/monitor/queue">
{{.locale.Tr "admin.monitor.queues"}} {{ctx.Locale.Tr "admin.monitor.queues"}}
</a> </a>
<a class="{{if .PageIsAdminMonitorStacktrace}}active {{end}}item" href="{{AppSubUrl}}/admin/monitor/stacktrace"> <a class="{{if .PageIsAdminMonitorStacktrace}}active {{end}}item" href="{{AppSubUrl}}/admin/monitor/stacktrace">
{{.locale.Tr "admin.monitor.stacktrace"}} {{ctx.Locale.Tr "admin.monitor.stacktrace"}}
</a> </a>
</div> </div>
</details> </details>

View File

@ -1,17 +1,17 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin notice")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin notice")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.notices.system_notice_list"}} ({{.locale.Tr "admin.total" .Total}}) {{ctx.Locale.Tr "admin.notices.system_notice_list"}} ({{.locale.Tr "admin.total" .Total}})
</h4> </h4>
<table class="ui attached segment select selectable striped table unstackable g-table-auto-ellipsis"> <table class="ui attached segment select selectable striped table unstackable g-table-auto-ellipsis">
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th>ID</th> <th>ID</th>
<th>{{.locale.Tr "admin.notices.type"}}</th> <th>{{ctx.Locale.Tr "admin.notices.type"}}</th>
<th>{{.locale.Tr "admin.notices.desc"}}</th> <th>{{ctx.Locale.Tr "admin.notices.desc"}}</th>
<th>{{.locale.Tr "admin.users.created"}}</th> <th>{{ctx.Locale.Tr "admin.users.created"}}</th>
<th>{{.locale.Tr "admin.notices.op"}}</th> <th>{{ctx.Locale.Tr "admin.notices.op"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -19,7 +19,7 @@
<tr> <tr>
<td><div class="ui checkbox gt-df" data-id="{{.ID}}"><input type="checkbox"></div></td> <td><div class="ui checkbox gt-df" data-id="{{.ID}}"><input type="checkbox"></div></td>
<td>{{.ID}}</td> <td>{{.ID}}</td>
<td>{{$.locale.Tr .TrStr}}</td> <td>{{ctx.Locale.Tr .TrStr}}</td>
<td class="view-detail auto-ellipsis" style="width: 80%;"><span class="notice-description">{{.Description}}</span></td> <td class="view-detail auto-ellipsis" style="width: 80%;"><span class="notice-description">{{.Description}}</span></td>
<td nowrap>{{DateTime "short" .CreatedUnix}}</td> <td nowrap>{{DateTime "short" .CreatedUnix}}</td>
<td class="view-detail"><a href="#">{{svg "octicon-note" 16}}</a></td> <td class="view-detail"><a href="#">{{svg "octicon-note" 16}}</a></td>
@ -33,24 +33,24 @@
<th colspan="5"> <th colspan="5">
<form class="gt-float-right" method="post" action="{{AppSubUrl}}/admin/notices/empty"> <form class="gt-float-right" method="post" action="{{AppSubUrl}}/admin/notices/empty">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button type="submit" class="ui red small button">{{.locale.Tr "admin.notices.delete_all"}}</button> <button type="submit" class="ui red small button">{{ctx.Locale.Tr "admin.notices.delete_all"}}</button>
</form> </form>
<div class="ui floating upward dropdown small button">{{/* TODO: Make this dropdown accessible */}} <div class="ui floating upward dropdown small button">{{/* TODO: Make this dropdown accessible */}}
<span class="text">{{.locale.Tr "admin.notices.operations"}}</span> <span class="text">{{ctx.Locale.Tr "admin.notices.operations"}}</span>
<div class="menu"> <div class="menu">
<div class="item select action" data-action="select-all"> <div class="item select action" data-action="select-all">
{{.locale.Tr "admin.notices.select_all"}} {{ctx.Locale.Tr "admin.notices.select_all"}}
</div> </div>
<div class="item select action" data-action="deselect-all"> <div class="item select action" data-action="deselect-all">
{{.locale.Tr "admin.notices.deselect_all"}} {{ctx.Locale.Tr "admin.notices.deselect_all"}}
</div> </div>
<div class="item select action" data-action="inverse"> <div class="item select action" data-action="inverse">
{{.locale.Tr "admin.notices.inverse_selection"}} {{ctx.Locale.Tr "admin.notices.inverse_selection"}}
</div> </div>
</div> </div>
</div> </div>
<button class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Paginater.Current}}"> <button class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Paginater.Current}}">
{{.locale.Tr "admin.notices.delete_selected"}} {{ctx.Locale.Tr "admin.notices.delete_selected"}}
</button> </button>
</th> </th>
</tr> </tr>
@ -61,7 +61,7 @@
</div> </div>
<div class="ui modal admin" id="detail-modal"> <div class="ui modal admin" id="detail-modal">
<div class="header">{{$.locale.Tr "admin.notices.view_detail_header"}}</div> <div class="header">{{ctx.Locale.Tr "admin.notices.view_detail_header"}}</div>
<div class="content"> <div class="content">
<div class="sub header"></div> <div class="sub header"></div>
<pre></pre> <pre></pre>

View File

@ -1,9 +1,9 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.orgs.org_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) {{ctx.Locale.Tr "admin.orgs.org_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right"> <div class="ui right">
<a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{.locale.Tr "admin.orgs.new_orga"}}</a> <a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{ctx.Locale.Tr "admin.orgs.new_orga"}}</a>
</div> </div>
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
@ -15,17 +15,17 @@
<tr> <tr>
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th> <th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true"> <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true">
{{.locale.Tr "admin.orgs.name"}} {{ctx.Locale.Tr "admin.orgs.name"}}
{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}} {{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
</th> </th>
<th>{{.locale.Tr "admin.orgs.teams"}}</th> <th>{{ctx.Locale.Tr "admin.orgs.teams"}}</th>
<th>{{.locale.Tr "admin.orgs.members"}}</th> <th>{{ctx.Locale.Tr "admin.orgs.members"}}</th>
<th>{{.locale.Tr "admin.users.repos"}}</th> <th>{{ctx.Locale.Tr "admin.users.repos"}}</th>
<th data-sortt-asc="recentupdate" data-sortt-desc="leastupdate"> <th data-sortt-asc="recentupdate" data-sortt-desc="leastupdate">
{{.locale.Tr "admin.users.created"}} {{ctx.Locale.Tr "admin.users.created"}}
{{SortArrow "recentupdate" "leastupdate" $.SortType false}} {{SortArrow "recentupdate" "leastupdate" $.SortType false}}
</th> </th>
<th>{{.locale.Tr "admin.users.edit"}}</th> <th>{{ctx.Locale.Tr "admin.users.edit"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -38,7 +38,7 @@
<span class="text gold">{{svg "octicon-lock"}}</span> <span class="text gold">{{svg "octicon-lock"}}</span>
{{end}} {{end}}
{{if eq .Type 3}}{{/* Reserved organization */}} {{if eq .Type 3}}{{/* Reserved organization */}}
<span class="ui mini label">{{$.locale.Tr "admin.users.reserved"}}</span> <span class="ui mini label">{{ctx.Locale.Tr "admin.users.reserved"}}</span>
{{end}} {{end}}
</td> </td>
<td>{{.NumTeams}}</td> <td>{{.NumTeams}}</td>

View File

@ -1,13 +1,13 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.packages.package_manage_panel"}} ({{.locale.Tr "admin.total" .TotalCount}}, {{ctx.Locale.Tr "admin.packages.package_manage_panel"}} ({{.locale.Tr "admin.total" .TotalCount}},
{{.locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}}, {{ctx.Locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}},
{{.locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}}) {{ctx.Locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}})
<div class="ui right"> <div class="ui right">
<form method="post" action="/admin/packages/cleanup"> <form method="post" action="/admin/packages/cleanup">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button class="ui primary tiny button">{{.locale.Tr "admin.packages.cleanup"}}</button> <button class="ui primary tiny button">{{ctx.Locale.Tr "admin.packages.cleanup"}}</button>
</form> </form>
</div> </div>
</h4> </h4>
@ -16,13 +16,13 @@
<div class="ui fluid action input"> <div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}} {{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}}
<select class="ui dropdown" name="type"> <select class="ui dropdown" name="type">
<option value="">{{.locale.Tr "packages.filter.type"}}</option> <option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
<option value="all">{{.locale.Tr "packages.filter.type.all"}}</option> <option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>
{{range $type := .AvailableTypes}} {{range $type := .AvailableTypes}}
<option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option> <option{{if eq $.PackageType $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option>
{{end}} {{end}}
</select> </select>
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
</div> </div>
@ -31,24 +31,24 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>{{.locale.Tr "admin.packages.owner"}}</th> <th>{{ctx.Locale.Tr "admin.packages.owner"}}</th>
<th>{{.locale.Tr "admin.packages.type"}}</th> <th>{{ctx.Locale.Tr "admin.packages.type"}}</th>
<th data-sortt-asc="name_asc" data-sortt-desc="name_desc"> <th data-sortt-asc="name_asc" data-sortt-desc="name_desc">
{{.locale.Tr "admin.packages.name"}} {{ctx.Locale.Tr "admin.packages.name"}}
{{SortArrow "name_asc" "name_desc" .SortType false}} {{SortArrow "name_asc" "name_desc" .SortType false}}
</th> </th>
<th data-sortt-asc="version_desc" data-sortt-desc="version_asc"> <th data-sortt-asc="version_desc" data-sortt-desc="version_asc">
{{.locale.Tr "admin.packages.version"}} {{ctx.Locale.Tr "admin.packages.version"}}
{{SortArrow "version_desc" "version_asc" .SortType false}} {{SortArrow "version_desc" "version_asc" .SortType false}}
</th> </th>
<th>{{.locale.Tr "admin.packages.creator"}}</th> <th>{{ctx.Locale.Tr "admin.packages.creator"}}</th>
<th>{{.locale.Tr "admin.packages.repository"}}</th> <th>{{ctx.Locale.Tr "admin.packages.repository"}}</th>
<th>{{.locale.Tr "admin.packages.size"}}</th> <th>{{ctx.Locale.Tr "admin.packages.size"}}</th>
<th data-sortt-asc="created_asc" data-sortt-desc="created_desc"> <th data-sortt-asc="created_asc" data-sortt-desc="created_desc">
{{.locale.Tr "admin.packages.published"}} {{ctx.Locale.Tr "admin.packages.published"}}
{{SortArrow "created_asc" "created_desc" .SortType true}} {{SortArrow "created_asc" "created_desc" .SortType true}}
</th> </th>
<th>{{.locale.Tr "admin.notices.op"}}</th> <th>{{ctx.Locale.Tr "admin.notices.op"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -85,10 +85,10 @@
<div class="ui g-modal-confirm delete modal"> <div class="ui g-modal-confirm delete modal">
<div class="header"> <div class="header">
{{svg "octicon-trash"}} {{svg "octicon-trash"}}
{{.locale.Tr "packages.settings.delete"}} {{ctx.Locale.Tr "packages.settings.delete"}}
</div> </div>
<div class="content"> <div class="content">
{{.locale.Tr "packages.settings.delete.notice" `<span class="name"></span>` `<span class="dataVersion"></span>` | Safe}} {{ctx.Locale.Tr "packages.settings.delete.notice" `<span class="name"></span>` `<span class="dataVersion"></span>` | Safe}}
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -1,18 +1,18 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.monitor.queues"}} {{ctx.Locale.Tr "admin.monitor.queues"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<table class="ui very basic striped table unstackable"> <table class="ui very basic striped table unstackable">
<thead> <thead>
<tr> <tr>
<th>{{.locale.Tr "admin.monitor.queue.name"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.name"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.type"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.type"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.exemplar"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.exemplar"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.numberworkers"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.numberworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.activeworkers"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.activeworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.numberinqueue"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.numberinqueue"}}</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
@ -25,7 +25,7 @@
<td>{{$q.GetWorkerNumber}}</td> <td>{{$q.GetWorkerNumber}}</td>
<td>{{$q.GetWorkerActiveNumber}}</td> <td>{{$q.GetWorkerActiveNumber}}</td>
<td>{{$sum := $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td> <td>{{$sum := $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td><a href="{{$.Link}}/{{$qid}}" class="button">{{$.locale.Tr "admin.monitor.queue.review_add"}}</a></td> <td><a href="{{$.Link}}/{{$qid}}" class="button">{{ctx.Locale.Tr "admin.monitor.queue.review_add"}}</a></td>
</tr> </tr>
{{end}} {{end}}
</tbody> </tbody>

View File

@ -1,19 +1,19 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.monitor.queue" .Queue.GetName}} {{ctx.Locale.Tr "admin.monitor.queue" .Queue.GetName}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<table class="ui very basic striped table"> <table class="ui very basic striped table">
<thead> <thead>
<tr> <tr>
<th>{{.locale.Tr "admin.monitor.queue.name"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.name"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.type"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.type"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.exemplar"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.exemplar"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.numberworkers"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.numberworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.activeworkers"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.activeworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.maxnumberworkers"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.maxnumberworkers"}}</th>
<th>{{.locale.Tr "admin.monitor.queue.numberinqueue"}}</th> <th>{{ctx.Locale.Tr "admin.monitor.queue.numberinqueue"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -32,7 +32,7 @@
{{$sum}} {{$sum}}
<form action="{{$.Link}}/remove-all-items" method="post" class="gt-dib gt-ml-4"> <form action="{{$.Link}}/remove-all-items" method="post" class="gt-dib gt-ml-4">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<button class="ui tiny basic red button">{{.locale.Tr "admin.monitor.queue.settings.remove_all_items"}}</button> <button class="ui tiny basic red button">{{ctx.Locale.Tr "admin.monitor.queue.settings.remove_all_items"}}</button>
</form> </form>
{{end}} {{end}}
</td> </td>
@ -42,18 +42,18 @@
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.monitor.queue.settings.title"}} {{ctx.Locale.Tr "admin.monitor.queue.settings.title"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<p>{{.locale.Tr "admin.monitor.queue.settings.desc"}}</p> <p>{{ctx.Locale.Tr "admin.monitor.queue.settings.desc"}}</p>
<form method="post" action="{{.Link}}/set"> <form method="post" action="{{.Link}}/set">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="ui form"> <div class="ui form">
<div class="inline field"> <div class="inline field">
<label for="max-number">{{.locale.Tr "admin.monitor.queue.settings.maxnumberworkers"}}</label> <label for="max-number">{{ctx.Locale.Tr "admin.monitor.queue.settings.maxnumberworkers"}}</label>
<input name="max-number" type="text" placeholder="{{.locale.Tr "admin.monitor.queue.settings.maxnumberworkers.placeholder" .Queue.GetWorkerMaxNumber}}"> <input name="max-number" type="text" placeholder="{{ctx.Locale.Tr "admin.monitor.queue.settings.maxnumberworkers.placeholder" .Queue.GetWorkerMaxNumber}}">
</div> </div>
<button class="ui submit button">{{.locale.Tr "admin.monitor.queue.settings.submit"}}</button> <button class="ui submit button">{{ctx.Locale.Tr "admin.monitor.queue.settings.submit"}}</button>
</div> </div>
</form> </form>
</div> </div>

View File

@ -1,9 +1,9 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.repos.repo_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) {{ctx.Locale.Tr "admin.repos.repo_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right"> <div class="ui right">
<a class="ui primary tiny button" href="{{AppSubUrl}}/admin/repos/unadopted">{{.locale.Tr "admin.repos.unadopted"}}</a> <a class="ui primary tiny button" href="{{AppSubUrl}}/admin/repos/unadopted">{{ctx.Locale.Tr "admin.repos.unadopted"}}</a>
</div> </div>
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
@ -14,32 +14,32 @@
<thead> <thead>
<tr> <tr>
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th> <th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
<th>{{.locale.Tr "admin.repos.owner"}}</th> <th>{{ctx.Locale.Tr "admin.repos.owner"}}</th>
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically"> <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically">
{{.locale.Tr "admin.repos.name"}} {{ctx.Locale.Tr "admin.repos.name"}}
{{SortArrow "alphabetically" "reversealphabetically" $.SortType false}} {{SortArrow "alphabetically" "reversealphabetically" $.SortType false}}
</th> </th>
<th>{{.locale.Tr "admin.repos.watches"}}</th> <th>{{ctx.Locale.Tr "admin.repos.watches"}}</th>
<th data-sortt-asc="moststars" data-sortt-desc="feweststars"> <th data-sortt-asc="moststars" data-sortt-desc="feweststars">
{{.locale.Tr "admin.repos.stars"}} {{ctx.Locale.Tr "admin.repos.stars"}}
{{SortArrow "moststars" "feweststars" $.SortType false}} {{SortArrow "moststars" "feweststars" $.SortType false}}
</th> </th>
<th data-sortt-asc="mostforks" data-sortt-desc="fewestforks"> <th data-sortt-asc="mostforks" data-sortt-desc="fewestforks">
{{.locale.Tr "admin.repos.forks"}} {{ctx.Locale.Tr "admin.repos.forks"}}
{{SortArrow "mostforks" "fewestforks" $.SortType false}} {{SortArrow "mostforks" "fewestforks" $.SortType false}}
</th> </th>
<th>{{.locale.Tr "admin.repos.issues"}}</th> <th>{{ctx.Locale.Tr "admin.repos.issues"}}</th>
<th data-sortt-asc="gitsize" data-sortt-desc="reversegitsize"> <th data-sortt-asc="gitsize" data-sortt-desc="reversegitsize">
{{.locale.Tr "admin.repos.size"}} {{ctx.Locale.Tr "admin.repos.size"}}
{{SortArrow "gitsize" "reversegitsize" $.SortType false}} {{SortArrow "gitsize" "reversegitsize" $.SortType false}}
</th> </th>
<th data-sortt-asc="lfssize" data-sortt-desc="reverselfssize"> <th data-sortt-asc="lfssize" data-sortt-desc="reverselfssize">
{{.locale.Tr "admin.repos.lfs_size"}} {{ctx.Locale.Tr "admin.repos.lfs_size"}}
{{SortArrow "lfssize" "reverselfssize" $.SortType false}} {{SortArrow "lfssize" "reverselfssize" $.SortType false}}
</th> </th>
<th>{{.locale.Tr "admin.auths.updated"}}</th> <th>{{ctx.Locale.Tr "admin.auths.updated"}}</th>
<th>{{.locale.Tr "admin.users.created"}}</th> <th>{{ctx.Locale.Tr "admin.users.created"}}</th>
<th>{{.locale.Tr "admin.notices.op"}}</th> <th>{{ctx.Locale.Tr "admin.notices.op"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -55,22 +55,22 @@
<td> <td>
<a href="{{.Link}}">{{.Name}}</a> <a href="{{.Link}}">{{.Name}}</a>
{{if .IsArchived}} {{if .IsArchived}}
<span class="ui basic mini label">{{$.locale.Tr "repo.desc.archived"}}</span> <span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
{{end}} {{end}}
{{if .IsTemplate}} {{if .IsTemplate}}
{{if .IsPrivate}} {{if .IsPrivate}}
<span class="ui basic mini label">{{$.locale.Tr "repo.desc.private_template"}}</span> <span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.private_template"}}</span>
{{else}} {{else}}
{{if .Owner.Visibility.IsPrivate}} {{if .Owner.Visibility.IsPrivate}}
<span class="ui basic mini label">{{$.locale.Tr "repo.desc.internal_template"}}</span> <span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.internal_template"}}</span>
{{end}} {{end}}
{{end}} {{end}}
{{else}} {{else}}
{{if .IsPrivate}} {{if .IsPrivate}}
<span class="ui basic mini label">{{$.locale.Tr "repo.desc.private"}}</span> <span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
{{else}} {{else}}
{{if .Owner.Visibility.IsPrivate}} {{if .Owner.Visibility.IsPrivate}}
<span class="ui basic mini label">{{$.locale.Tr "repo.desc.internal"}}</span> <span class="ui basic mini label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
{{end}} {{end}}
{{end}} {{end}}
{{end}} {{end}}
@ -101,12 +101,12 @@
<div class="ui g-modal-confirm delete modal"> <div class="ui g-modal-confirm delete modal">
<div class="header"> <div class="header">
{{svg "octicon-trash"}} {{svg "octicon-trash"}}
{{.locale.Tr "repo.settings.delete"}} {{ctx.Locale.Tr "repo.settings.delete"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{.locale.Tr "repo.settings.delete_desc"}}</p> <p>{{ctx.Locale.Tr "repo.settings.delete_desc"}}</p>
{{.locale.Tr "repo.settings.delete_notices_2" `<span class="name"></span>` | Safe}}<br> {{ctx.Locale.Tr "repo.settings.delete_notices_2" `<span class="name"></span>` | Safe}}<br>
{{.locale.Tr "repo.settings.delete_notices_fork_1"}}<br> {{ctx.Locale.Tr "repo.settings.delete_notices_fork_1"}}<br>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -2,28 +2,28 @@
<form class="ui form ignore-dirty gt-f1"> <form class="ui form ignore-dirty gt-f1">
<div class="ui fluid action input"> <div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<!-- Sort --> <!-- Sort -->
<div class="ui dropdown type jump item gt-mr-0"> <div class="ui dropdown type jump item gt-mr-0">
<span class="text"> <span class="text">
{{.locale.Tr "repo.issues.filter_sort"}} {{ctx.Locale.Tr "repo.issues.filter_sort"}}
</span> </span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a> <a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a> <a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}">{{.locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> <a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}">{{.locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> <a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a> <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a> <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
<a class="{{if eq .SortType "moststars"}}active {{end}}item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.moststars"}}</a> <a class="{{if eq .SortType "moststars"}}active {{end}}item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.moststars"}}</a>
<a class="{{if eq .SortType "feweststars"}}active {{end}}item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.feweststars"}}</a> <a class="{{if eq .SortType "feweststars"}}active {{end}}item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.feweststars"}}</a>
<a class="{{if eq .SortType "mostforks"}}active {{end}}item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.mostforks"}}</a> <a class="{{if eq .SortType "mostforks"}}active {{end}}item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.mostforks"}}</a>
<a class="{{if eq .SortType "fewestforks"}}active {{end}}item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.fewestforks"}}</a> <a class="{{if eq .SortType "fewestforks"}}active {{end}}item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.fewestforks"}}</a>
<a class="{{if eq .SortType "size"}}active {{end}}item" href="{{$.Link}}?sort=size&q={{$.Keyword}}">{{.locale.Tr "repo.issues.label.filter_sort.by_size"}}</a> <a class="{{if eq .SortType "size"}}active {{end}}item" href="{{$.Link}}?sort=size&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.by_size"}}</a>
<a class="{{if eq .SortType "reversesize"}}active {{end}}item" href="{{$.Link}}?sort=reversesize&q={{$.Keyword}}">{{.locale.Tr "repo.issues.label.filter_sort.reverse_by_size"}}</a> <a class="{{if eq .SortType "reversesize"}}active {{end}}item" href="{{$.Link}}?sort=reversesize&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_by_size"}}</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,17 +1,17 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.repos.unadopted"}} {{ctx.Locale.Tr "admin.repos.unadopted"}}
<div class="ui right"> <div class="ui right">
<a class="ui primary tiny button" href="{{AppSubUrl}}/admin/repos">{{.locale.Tr "admin.repos.repo_manage_panel"}}</a> <a class="ui primary tiny button" href="{{AppSubUrl}}/admin/repos">{{ctx.Locale.Tr "admin.repos.repo_manage_panel"}}</a>
</div> </div>
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form ignore-dirty"> <form class="ui form ignore-dirty">
<div class="ui fluid action input"> <div class="ui fluid action input">
<input name="search" value="true" type="hidden"> <input name="search" value="true" type="hidden">
<input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "repo.adopt_search"}}" autofocus> <input name="q" value="{{.Keyword}}" placeholder="{{ctx.Locale.Tr "repo.adopt_search"}}" autofocus>
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
</div> </div>
@ -23,13 +23,13 @@
<div class="item gt-df gt-ac"> <div class="item gt-df gt-ac">
<span class="gt-f1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span> <span class="gt-f1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span>
<div> <div>
<button class="ui button primary show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{$.locale.Tr "repo.adopt_preexisting_label"}}</button> <button class="ui button primary show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.adopt_preexisting_label"}}</button>
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}"> <div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
<div class="header"> <div class="header">
<span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span> <span class="label">{{ctx.Locale.Tr "repo.adopt_preexisting"}}</span>
</div> </div>
<div class="content"> <div class="content">
<p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p> <p>{{ctx.Locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
</div> </div>
<form class="ui form" method="post" action="{{AppSubUrl}}/admin/repos/unadopted"> <form class="ui form" method="post" action="{{AppSubUrl}}/admin/repos/unadopted">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
@ -40,13 +40,13 @@
{{template "base/modal_actions_confirm"}} {{template "base/modal_actions_confirm"}}
</form> </form>
</div> </div>
<button class="ui button red show-modal gt-p-3" data-modal="#delete-unadopted-modal-{{$dirI}}">{{svg "octicon-x"}} {{$.locale.Tr "repo.delete_preexisting_label"}}</button> <button class="ui button red show-modal gt-p-3" data-modal="#delete-unadopted-modal-{{$dirI}}">{{svg "octicon-x"}} {{ctx.Locale.Tr "repo.delete_preexisting_label"}}</button>
<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}"> <div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
<div class="header"> <div class="header">
<span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span> <span class="label">{{ctx.Locale.Tr "repo.delete_preexisting"}}</span>
</div> </div>
<div class="content"> <div class="content">
<p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p> <p>{{ctx.Locale.Tr "repo.delete_preexisting_content" $dir}}</p>
</div> </div>
<form class="ui form" method="post" action="{{AppSubUrl}}/admin/repos/unadopted"> <form class="ui form" method="post" action="{{AppSubUrl}}/admin/repos/unadopted">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
@ -64,7 +64,7 @@
{{template "base/paginate" .}} {{template "base/paginate" .}}
{{else}} {{else}}
<div class="item"> <div class="item">
{{.locale.Tr "admin.repos.unadopted.no_more"}} {{ctx.Locale.Tr "admin.repos.unadopted.no_more"}}
</div> </div>
{{template "base/paginate" .}} {{template "base/paginate" .}}
{{end}} {{end}}

View File

@ -4,14 +4,14 @@
<div class="gt-df gt-ac"> <div class="gt-df gt-ac">
<div class="gt-f1"> <div class="gt-f1">
<div class="ui compact small menu"> <div class="ui compact small menu">
<a class="{{if eq .ShowGoroutineList "process"}}active {{end}}item" href="{{.Link}}?show=process">{{.locale.Tr "admin.monitor.process"}}</a> <a class="{{if eq .ShowGoroutineList "process"}}active {{end}}item" href="{{.Link}}?show=process">{{ctx.Locale.Tr "admin.monitor.process"}}</a>
<a class="{{if eq .ShowGoroutineList "stacktrace"}}active {{end}}item" href="{{.Link}}?show=stacktrace">{{.locale.Tr "admin.monitor.stacktrace"}}</a> <a class="{{if eq .ShowGoroutineList "stacktrace"}}active {{end}}item" href="{{.Link}}?show=stacktrace">{{ctx.Locale.Tr "admin.monitor.stacktrace"}}</a>
</div> </div>
</div> </div>
<form target="_blank" action="{{AppSubUrl}}/admin/monitor/diagnosis" class="ui form"> <form target="_blank" action="{{AppSubUrl}}/admin/monitor/diagnosis" class="ui form">
<div class="ui inline field"> <div class="ui inline field">
<button class="ui primary small button">{{.locale.Tr "admin.monitor.download_diagnosis_report"}}</button> <button class="ui primary small button">{{ctx.Locale.Tr "admin.monitor.download_diagnosis_report"}}</button>
<input name="seconds" size="3" maxlength="3" value="10"> {{.locale.Tr "tool.raw_seconds"}} <input name="seconds" size="3" maxlength="3" value="10"> {{ctx.Locale.Tr "tool.raw_seconds"}}
</div> </div>
</form> </form>
</div> </div>
@ -20,7 +20,7 @@
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{printf "%d Goroutines" .GoroutineCount}}{{/* Goroutine is non-translatable*/}} {{printf "%d Goroutines" .GoroutineCount}}{{/* Goroutine is non-translatable*/}}
{{- if .ProcessCount -}}, {{.locale.Tr "admin.monitor.processes_count" .ProcessCount}}{{- end -}} {{- if .ProcessCount -}}, {{ctx.Locale.Tr "admin.monitor.processes_count" .ProcessCount}}{{- end -}}
</h4> </h4>
{{if .ProcessStacks}} {{if .ProcessStacks}}
@ -36,11 +36,11 @@
<div class="ui g-modal-confirm delete modal"> <div class="ui g-modal-confirm delete modal">
<div class="header"> <div class="header">
{{.locale.Tr "admin.monitor.process.cancel"}} {{ctx.Locale.Tr "admin.monitor.process.cancel"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{$.locale.Tr "admin.monitor.process.cancel_notices" `<span class="name"></span>` | Safe}}</p> <p>{{ctx.Locale.Tr "admin.monitor.process.cancel_notices" `<span class="name"></span>` | Safe}}</p>
<p>{{$.locale.Tr "admin.monitor.process.cancel_desc"}}</p> <p>{{ctx.Locale.Tr "admin.monitor.process.cancel_desc"}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -1,7 +1,7 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.dashboard.statistic"}} {{ctx.Locale.Tr "admin.dashboard.statistic"}}
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<table class="ui very basic striped table unstackable"> <table class="ui very basic striped table unstackable">

View File

@ -1,25 +1,25 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit user")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit user")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.users.edit_account"}} {{ctx.Locale.Tr "admin.users.edit_account"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="./edit" method="post"> <form class="ui form" action="./edit" method="post">
{{template "base/disable_form_autofill"}} {{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="field {{if .Err_UserName}}error{{end}}"> <div class="field {{if .Err_UserName}}error{{end}}">
<label for="user_name">{{.locale.Tr "username"}}</label> <label for="user_name">{{ctx.Locale.Tr "username"}}</label>
<input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}} maxlength="40"> <input id="user_name" name="user_name" value="{{.User.Name}}" autofocus {{if not .User.IsLocal}}disabled{{end}} maxlength="40">
</div> </div>
<!-- Types and name --> <!-- Types and name -->
<div class="inline required field {{if .Err_LoginType}}error{{end}}"> <div class="inline required field {{if .Err_LoginType}}error{{end}}">
<label>{{.locale.Tr "admin.users.auth_source"}}</label> <label>{{ctx.Locale.Tr "admin.users.auth_source"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="login_type" name="login_type" value="{{.LoginSource.Type.Int}}-{{.LoginSource.ID}}" required> <input type="hidden" id="login_type" name="login_type" value="{{.LoginSource.Type.Int}}-{{.LoginSource.ID}}" required>
<div class="text">{{.locale.Tr "admin.users.local"}}</div> <div class="text">{{ctx.Locale.Tr "admin.users.local"}}</div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<div class="item" data-value="0-0">{{.locale.Tr "admin.users.local"}}</div> <div class="item" data-value="0-0">{{ctx.Locale.Tr "admin.users.local"}}</div>
{{range .Sources}} {{range .Sources}}
<div class="item" data-value="{{.Type.Int}}-{{.ID}}">{{.Name}}</div> <div class="item" data-value="{{.Type.Int}}-{{.ID}}">{{.Name}}</div>
{{end}} {{end}}
@ -28,25 +28,25 @@
</div> </div>
<div class="inline field {{if .Err_Visibility}}error{{end}}"> <div class="inline field {{if .Err_Visibility}}error{{end}}">
<span class="inline required field"><label for="visibility">{{.locale.Tr "settings.visibility"}}</label></span> <span class="inline required field"><label for="visibility">{{ctx.Locale.Tr "settings.visibility"}}</label></span>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
{{if .User.Visibility.IsPublic}}<input type="hidden" id="visibility" name="visibility" value="0">{{end}} {{if .User.Visibility.IsPublic}}<input type="hidden" id="visibility" name="visibility" value="0">{{end}}
{{if .User.Visibility.IsLimited}}<input type="hidden" id="visibility" name="visibility" value="1">{{end}} {{if .User.Visibility.IsLimited}}<input type="hidden" id="visibility" name="visibility" value="1">{{end}}
{{if .User.Visibility.IsPrivate}}<input type="hidden" id="visibility" name="visibility" value="2">{{end}} {{if .User.Visibility.IsPrivate}}<input type="hidden" id="visibility" name="visibility" value="2">{{end}}
<div class="text"> <div class="text">
{{if .User.Visibility.IsPublic}}{{.locale.Tr "settings.visibility.public"}}{{end}} {{if .User.Visibility.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}}
{{if .User.Visibility.IsLimited}}{{.locale.Tr "settings.visibility.limited"}}{{end}} {{if .User.Visibility.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}}
{{if .User.Visibility.IsPrivate}}{{.locale.Tr "settings.visibility.private"}}{{end}} {{if .User.Visibility.IsPrivate}}{{ctx.Locale.Tr "settings.visibility.private"}}{{end}}
</div> </div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
{{range $mode := .AllowedUserVisibilityModes}} {{range $mode := .AllowedUserVisibilityModes}}
{{if $mode.IsPublic}} {{if $mode.IsPublic}}
<div class="item" data-tooltip-content="{{$.locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.locale.Tr "settings.visibility.public"}}</div> <div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{ctx.Locale.Tr "settings.visibility.public"}}</div>
{{else if $mode.IsLimited}} {{else if $mode.IsLimited}}
<div class="item" data-tooltip-content="{{$.locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.locale.Tr "settings.visibility.limited"}}</div> <div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{ctx.Locale.Tr "settings.visibility.limited"}}</div>
{{else if $mode.IsPrivate}} {{else if $mode.IsPrivate}}
<div class="item" data-tooltip-content="{{$.locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.locale.Tr "settings.visibility.private"}}</div> <div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{ctx.Locale.Tr "settings.visibility.private"}}</div>
{{end}} {{end}}
{{end}} {{end}}
</div> </div>
@ -54,81 +54,81 @@
</div> </div>
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}gt-hidden{{end}}"> <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}gt-hidden{{end}}">
<label for="login_name">{{.locale.Tr "admin.users.auth_login_name"}}</label> <label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus> <input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
</div> </div>
<div class="field {{if .Err_FullName}}error{{end}}"> <div class="field {{if .Err_FullName}}error{{end}}">
<label for="full_name">{{.locale.Tr "settings.full_name"}}</label> <label for="full_name">{{ctx.Locale.Tr "settings.full_name"}}</label>
<input id="full_name" name="full_name" value="{{.User.FullName}}" maxlength="100"> <input id="full_name" name="full_name" value="{{.User.FullName}}" maxlength="100">
</div> </div>
<div class="required field {{if .Err_Email}}error{{end}}"> <div class="required field {{if .Err_Email}}error{{end}}">
<label for="email">{{.locale.Tr "email"}}</label> <label for="email">{{ctx.Locale.Tr "email"}}</label>
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required> <input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
</div> </div>
<div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}gt-hidden{{end}}"> <div class="local field {{if .Err_Password}}error{{end}} {{if not (or (.User.IsLocal) (.User.IsOAuth2))}}gt-hidden{{end}}">
<label for="password">{{.locale.Tr "password"}}</label> <label for="password">{{ctx.Locale.Tr "password"}}</label>
<input id="password" name="password" type="password" autocomplete="new-password"> <input id="password" name="password" type="password" autocomplete="new-password">
<p class="help">{{.locale.Tr "admin.users.password_helper"}}</p> <p class="help">{{ctx.Locale.Tr "admin.users.password_helper"}}</p>
</div> </div>
<div class="field {{if .Err_Website}}error{{end}}"> <div class="field {{if .Err_Website}}error{{end}}">
<label for="website">{{.locale.Tr "settings.website"}}</label> <label for="website">{{ctx.Locale.Tr "settings.website"}}</label>
<input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="http://mydomain.com or https://mydomain.com" maxlength="255"> <input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="http://mydomain.com or https://mydomain.com" maxlength="255">
</div> </div>
<div class="field {{if .Err_Location}}error{{end}}"> <div class="field {{if .Err_Location}}error{{end}}">
<label for="location">{{.locale.Tr "settings.location"}}</label> <label for="location">{{ctx.Locale.Tr "settings.location"}}</label>
<input id="location" name="location" value="{{.User.Location}}" maxlength="50"> <input id="location" name="location" value="{{.User.Location}}" maxlength="50">
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}"> <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
<label for="max_repo_creation">{{.locale.Tr "admin.users.max_repo_creation"}}</label> <label for="max_repo_creation">{{ctx.Locale.Tr "admin.users.max_repo_creation"}}</label>
<input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.User.MaxRepoCreation}}"> <input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.User.MaxRepoCreation}}">
<p class="help">{{.locale.Tr "admin.users.max_repo_creation_desc"}}</p> <p class="help">{{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}</p>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.users.is_activated"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.is_activated"}}</strong></label>
<input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}> <input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.users.prohibit_login"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.prohibit_login"}}</strong></label>
<input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}} {{if (eq .User.ID .SignedUserID)}}disabled{{end}}> <input name="prohibit_login" type="checkbox" {{if .User.ProhibitLogin}}checked{{end}} {{if (eq .User.ID .SignedUserID)}}disabled{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.users.is_admin"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.is_admin"}}</strong></label>
<input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}> <input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.users.is_restricted"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.is_restricted"}}</strong></label>
<input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}> <input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field {{if DisableGitHooks}}gt-hidden{{end}}"> <div class="inline field {{if DisableGitHooks}}gt-hidden{{end}}">
<div class="ui checkbox" data-tooltip-content="{{.locale.Tr "admin.users.allow_git_hook_tooltip"}}"> <div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}">
<label><strong>{{.locale.Tr "admin.users.allow_git_hook"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label>
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}> <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}>
</div> </div>
</div> </div>
<div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}gt-hidden{{end}}"> <div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.users.allow_import_local"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label>
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}> <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}>
</div> </div>
</div> </div>
{{if not .DisableRegularOrgCreation}} {{if not .DisableRegularOrgCreation}}
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.users.allow_create_organization"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.allow_create_organization"}}</strong></label>
<input name="allow_create_organization" type="checkbox" {{if .User.CanCreateOrganization}}checked{{end}}> <input name="allow_create_organization" type="checkbox" {{if .User.CanCreateOrganization}}checked{{end}}>
</div> </div>
</div> </div>
@ -138,7 +138,7 @@
<div class="divider"></div> <div class="divider"></div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.users.reset_2fa"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.reset_2fa"}}</strong></label>
<input name="reset_2fa" type="checkbox"> <input name="reset_2fa" type="checkbox">
</div> </div>
</div> </div>
@ -147,14 +147,14 @@
<div class="divider"></div> <div class="divider"></div>
<div class="field"> <div class="field">
<button class="ui primary button">{{.locale.Tr "admin.users.update_profile"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "admin.users.update_profile"}}</button>
<button class="ui red button show-modal" data-modal="#delete-user-modal">{{.locale.Tr "admin.users.delete_account"}}</button> <button class="ui red button show-modal" data-modal="#delete-user-modal">{{ctx.Locale.Tr "admin.users.delete_account"}}</button>
</div> </div>
</form> </form>
</div> </div>
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "settings.avatar"}} {{ctx.Locale.Tr "settings.avatar"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="./avatar" method="post" enctype="multipart/form-data"> <form class="ui form" action="./avatar" method="post" enctype="multipart/form-data">
@ -163,11 +163,11 @@
<div class="inline field"> <div class="inline field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input name="source" value="lookup" type="radio" {{if not .User.UseCustomAvatar}}checked{{end}}> <input name="source" value="lookup" type="radio" {{if not .User.UseCustomAvatar}}checked{{end}}>
<label>{{.locale.Tr "settings.lookup_avatar_by_mail"}}</label> <label>{{ctx.Locale.Tr "settings.lookup_avatar_by_mail"}}</label>
</div> </div>
</div> </div>
<div class="field gt-pl-4 {{if .Err_Gravatar}}error{{end}}"> <div class="field gt-pl-4 {{if .Err_Gravatar}}error{{end}}">
<label for="gravatar">Avatar {{.locale.Tr "email"}}</label> <label for="gravatar">Avatar {{ctx.Locale.Tr "email"}}</label>
<input id="gravatar" name="gravatar" value="{{.User.AvatarEmail}}"> <input id="gravatar" name="gravatar" value="{{.User.AvatarEmail}}">
</div> </div>
{{end}} {{end}}
@ -175,18 +175,18 @@
<div class="inline field"> <div class="inline field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input name="source" value="local" type="radio" {{if .User.UseCustomAvatar}}checked{{end}}> <input name="source" value="local" type="radio" {{if .User.UseCustomAvatar}}checked{{end}}>
<label>{{.locale.Tr "settings.enable_custom_avatar"}}</label> <label>{{ctx.Locale.Tr "settings.enable_custom_avatar"}}</label>
</div> </div>
</div> </div>
<div class="inline field gt-pl-4"> <div class="inline field gt-pl-4">
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label> <label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp"> <input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
</div> </div>
<div class="field"> <div class="field">
<button class="ui primary button">{{$.locale.Tr "settings.update_avatar"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button>
<button class="ui red button link-action" data-url="./avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button> <button class="ui red button link-action" data-url="./avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button>
</div> </div>
</form> </form>
</div> </div>
@ -195,18 +195,18 @@
<div class="ui g-modal-confirm delete modal" id="delete-user-modal"> <div class="ui g-modal-confirm delete modal" id="delete-user-modal">
<div class="header"> <div class="header">
{{svg "octicon-trash"}} {{svg "octicon-trash"}}
{{.locale.Tr "settings.delete_account_title"}} {{ctx.Locale.Tr "settings.delete_account_title"}}
</div> </div>
<form class="ui form" method="post" action="./delete"> <form class="ui form" method="post" action="./delete">
<div class="content"> <div class="content">
<p>{{.locale.Tr "settings.delete_account_desc"}}</p> <p>{{ctx.Locale.Tr "settings.delete_account_desc"}}</p>
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="purge">{{.locale.Tr "admin.users.purge"}}</label> <label for="purge">{{ctx.Locale.Tr "admin.users.purge"}}</label>
<input name="purge" type="checkbox"> <input name="purge" type="checkbox">
</div> </div>
<p class="help">{{.locale.Tr "admin.users.purge_help"}}</p> <p class="help">{{ctx.Locale.Tr "admin.users.purge_help"}}</p>
</div> </div>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}

View File

@ -1,9 +1,9 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.users.user_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) {{ctx.Locale.Tr "admin.users.user_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right"> <div class="ui right">
<a class="ui primary tiny button" href="{{AppSubUrl}}/admin/users/new">{{.locale.Tr "admin.users.new_account"}}</a> <a class="ui primary tiny button" href="{{AppSubUrl}}/admin/users/new">{{ctx.Locale.Tr "admin.users.new_account"}}</a>
</div> </div>
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
@ -13,41 +13,41 @@
<div class="ui right floated secondary filter menu"> <div class="ui right floated secondary filter menu">
<!-- Status Filter Menu Item --> <!-- Status Filter Menu Item -->
<div class="ui dropdown type jump item"> <div class="ui dropdown type jump item">
<span class="text">{{.locale.Tr "admin.users.list_status_filter.menu_text"}}</span> <span class="text">{{ctx.Locale.Tr "admin.users.list_status_filter.menu_text"}}</span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<a class="item j-reset-status-filter">{{.locale.Tr "admin.users.list_status_filter.reset"}}</a> <a class="item j-reset-status-filter">{{ctx.Locale.Tr "admin.users.list_status_filter.reset"}}</a>
<div class="divider"></div> <div class="divider"></div>
<label class="item"><input type="radio" name="status_filter[is_admin]" value="1"> {{.locale.Tr "admin.users.list_status_filter.is_admin"}}</label> <label class="item"><input type="radio" name="status_filter[is_admin]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_admin"}}</label>
<label class="item"><input type="radio" name="status_filter[is_admin]" value="0"> {{.locale.Tr "admin.users.list_status_filter.not_admin"}}</label> <label class="item"><input type="radio" name="status_filter[is_admin]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_admin"}}</label>
<div class="divider"></div> <div class="divider"></div>
<label class="item"><input type="radio" name="status_filter[is_active]" value="1"> {{.locale.Tr "admin.users.list_status_filter.is_active"}}</label> <label class="item"><input type="radio" name="status_filter[is_active]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_active"}}</label>
<label class="item"><input type="radio" name="status_filter[is_active]" value="0"> {{.locale.Tr "admin.users.list_status_filter.not_active"}}</label> <label class="item"><input type="radio" name="status_filter[is_active]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_active"}}</label>
<div class="divider"></div> <div class="divider"></div>
<label class="item"><input type="radio" name="status_filter[is_restricted]" value="0"> {{.locale.Tr "admin.users.list_status_filter.not_restricted"}}</label> <label class="item"><input type="radio" name="status_filter[is_restricted]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_restricted"}}</label>
<label class="item"><input type="radio" name="status_filter[is_restricted]" value="1"> {{.locale.Tr "admin.users.list_status_filter.is_restricted"}}</label> <label class="item"><input type="radio" name="status_filter[is_restricted]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_restricted"}}</label>
<div class="divider"></div> <div class="divider"></div>
<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="0"> {{.locale.Tr "admin.users.list_status_filter.not_prohibit_login"}}</label> <label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_prohibit_login"}}</label>
<label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="1"> {{.locale.Tr "admin.users.list_status_filter.is_prohibit_login"}}</label> <label class="item"><input type="radio" name="status_filter[is_prohibit_login]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_prohibit_login"}}</label>
<div class="divider"></div> <div class="divider"></div>
<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="1"> {{.locale.Tr "admin.users.list_status_filter.is_2fa_enabled"}}</label> <label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="1"> {{ctx.Locale.Tr "admin.users.list_status_filter.is_2fa_enabled"}}</label>
<label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="0"> {{.locale.Tr "admin.users.list_status_filter.not_2fa_enabled"}}</label> <label class="item"><input type="radio" name="status_filter[is_2fa_enabled]" value="0"> {{ctx.Locale.Tr "admin.users.list_status_filter.not_2fa_enabled"}}</label>
</div> </div>
</div> </div>
<!-- Sort Menu Item --> <!-- Sort Menu Item -->
<div class="ui dropdown type jump item"> <div class="ui dropdown type jump item">
<span class="text"> <span class="text">
{{.locale.Tr "repo.issues.filter_sort"}} {{ctx.Locale.Tr "repo.issues.filter_sort"}}
</span> </span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<button class="item" name="sort" value="oldest">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</button> <button class="item" name="sort" value="oldest">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</button>
<button class="item" name="sort" value="newest">{{.locale.Tr "repo.issues.filter_sort.latest"}}</button> <button class="item" name="sort" value="newest">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</button>
<button class="item" name="sort" value="alphabetically">{{.locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</button> <button class="item" name="sort" value="alphabetically">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</button>
<button class="item" name="sort" value="reversealphabetically">{{.locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</button> <button class="item" name="sort" value="reversealphabetically">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</button>
<button class="item" name="sort" value="recentupdate">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</button> <button class="item" name="sort" value="recentupdate">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</button>
<button class="item" name="sort" value="leastupdate">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</button> <button class="item" name="sort" value="leastupdate">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</button>
</div> </div>
</div> </div>
</div> </div>
@ -55,7 +55,7 @@
<!-- Search Text --> <!-- Search Text -->
<div class="ui fluid action input"> <div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
</div> </div>
@ -65,16 +65,16 @@
<tr> <tr>
<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" .SortType false}}</th> <th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" .SortType false}}</th>
<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true"> <th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true">
{{.locale.Tr "admin.users.name"}} {{ctx.Locale.Tr "admin.users.name"}}
{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}} {{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
</th> </th>
<th>{{.locale.Tr "email"}}</th> <th>{{ctx.Locale.Tr "email"}}</th>
<th>{{.locale.Tr "admin.users.activated"}}</th> <th>{{ctx.Locale.Tr "admin.users.activated"}}</th>
<th>{{.locale.Tr "admin.users.restricted"}}</th> <th>{{ctx.Locale.Tr "admin.users.restricted"}}</th>
<th>{{.locale.Tr "admin.users.2fa"}}</th> <th>{{ctx.Locale.Tr "admin.users.2fa"}}</th>
<th>{{.locale.Tr "admin.users.created"}}</th> <th>{{ctx.Locale.Tr "admin.users.created"}}</th>
<th data-sortt-asc="lastlogin" data-sortt-desc="reverselastlogin"> <th data-sortt-asc="lastlogin" data-sortt-desc="reverselastlogin">
{{.locale.Tr "admin.users.last_login"}} {{ctx.Locale.Tr "admin.users.last_login"}}
{{SortArrow "lastlogin" "reverselastlogin" $.SortType false}} {{SortArrow "lastlogin" "reverselastlogin" $.SortType false}}
</th> </th>
</tr> </tr>
@ -86,13 +86,13 @@
<td> <td>
<a href="{{$.Link}}/{{.ID}}">{{.Name}}</a> <a href="{{$.Link}}/{{.ID}}">{{.Name}}</a>
{{if .IsAdmin}} {{if .IsAdmin}}
<span class="ui mini label">{{$.locale.Tr "admin.users.admin"}}</span> <span class="ui mini label">{{ctx.Locale.Tr "admin.users.admin"}}</span>
{{else if eq 2 .Type}}{{/* Reserved user */}} {{else if eq 2 .Type}}{{/* Reserved user */}}
<span class="ui mini label">{{$.locale.Tr "admin.users.reserved"}}</span> <span class="ui mini label">{{ctx.Locale.Tr "admin.users.reserved"}}</span>
{{else if eq 4 .Type}}{{/* Bot "user" */}} {{else if eq 4 .Type}}{{/* Bot "user" */}}
<span class="ui mini label">{{$.locale.Tr "admin.users.bot"}}</span> <span class="ui mini label">{{ctx.Locale.Tr "admin.users.bot"}}</span>
{{else if eq 5 .Type}}{{/* Remote user */}} {{else if eq 5 .Type}}{{/* Remote user */}}
<span class="ui mini label">{{$.locale.Tr "admin.users.remote"}}</span> <span class="ui mini label">{{ctx.Locale.Tr "admin.users.remote"}}</span>
{{end}} {{end}}
</td> </td>
<td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td> <td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td>
@ -103,7 +103,7 @@
{{if .LastLoginUnix}} {{if .LastLoginUnix}}
<td>{{DateTime "short" .LastLoginUnix}}</td> <td>{{DateTime "short" .LastLoginUnix}}</td>
{{else}} {{else}}
<td><span>{{$.locale.Tr "admin.users.never_login"}}</span></td> <td><span>{{ctx.Locale.Tr "admin.users.never_login"}}</span></td>
{{end}} {{end}}
</tr> </tr>
{{end}} {{end}}

View File

@ -1,7 +1,7 @@
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new user")}} {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new user")}}
<div class="admin-setting-content"> <div class="admin-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "admin.users.new_account"}} {{ctx.Locale.Tr "admin.users.new_account"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
@ -9,13 +9,13 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<!-- Types and name --> <!-- Types and name -->
<div class="inline required field {{if .Err_LoginType}}error{{end}}"> <div class="inline required field {{if .Err_LoginType}}error{{end}}">
<label>{{.locale.Tr "admin.users.auth_source"}}</label> <label>{{ctx.Locale.Tr "admin.users.auth_source"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required> <input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
<div class="text">{{.locale.Tr "admin.users.local"}}</div> <div class="text">{{ctx.Locale.Tr "admin.users.local"}}</div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<div class="item" data-value="0-0">{{.locale.Tr "admin.users.local"}}</div> <div class="item" data-value="0-0">{{ctx.Locale.Tr "admin.users.local"}}</div>
{{range .Sources}} {{range .Sources}}
<div class="item" data-value="{{.Type.Int}}-{{.ID}}">{{.Name}}</div> <div class="item" data-value="{{.Type.Int}}-{{.ID}}">{{.Name}}</div>
{{end}} {{end}}
@ -24,23 +24,23 @@
</div> </div>
<div class="inline field {{if .Err_Visibility}}error{{end}}"> <div class="inline field {{if .Err_Visibility}}error{{end}}">
<span class="inline required field"><label for="visibility">{{.locale.Tr "settings.visibility"}}</label></span> <span class="inline required field"><label for="visibility">{{ctx.Locale.Tr "settings.visibility"}}</label></span>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{.visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}"> <input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{.visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
<div class="text"> <div class="text">
{{if .DefaultUserVisibilityMode.IsPublic}}{{.locale.Tr "settings.visibility.public"}}{{end}} {{if .DefaultUserVisibilityMode.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}}
{{if .DefaultUserVisibilityMode.IsLimited}}{{.locale.Tr "settings.visibility.limited"}}{{end}} {{if .DefaultUserVisibilityMode.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}}
{{if .DefaultUserVisibilityMode.IsPrivate}}{{.locale.Tr "settings.visibility.private"}}{{end}} {{if .DefaultUserVisibilityMode.IsPrivate}}{{ctx.Locale.Tr "settings.visibility.private"}}{{end}}
</div> </div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
{{range $mode := .AllowedUserVisibilityModes}} {{range $mode := .AllowedUserVisibilityModes}}
{{if $mode.IsPublic}} {{if $mode.IsPublic}}
<div class="item" data-tooltip-content="{{$.locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.locale.Tr "settings.visibility.public"}}</div> <div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{ctx.Locale.Tr "settings.visibility.public"}}</div>
{{else if $mode.IsLimited}} {{else if $mode.IsLimited}}
<div class="item" data-tooltip-content="{{$.locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.locale.Tr "settings.visibility.limited"}}</div> <div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{ctx.Locale.Tr "settings.visibility.limited"}}</div>
{{else if $mode.IsPrivate}} {{else if $mode.IsPrivate}}
<div class="item" data-tooltip-content="{{$.locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.locale.Tr "settings.visibility.private"}}</div> <div class="item" data-tooltip-content="{{ctx.Locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{ctx.Locale.Tr "settings.visibility.private"}}</div>
{{end}} {{end}}
{{end}} {{end}}
</div> </div>
@ -48,25 +48,25 @@
</div> </div>
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}gt-hidden{{end}}"> <div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}gt-hidden{{end}}">
<label for="login_name">{{.locale.Tr "admin.users.auth_login_name"}}</label> <label for="login_name">{{ctx.Locale.Tr "admin.users.auth_login_name"}}</label>
<input id="login_name" name="login_name" value="{{.login_name}}"> <input id="login_name" name="login_name" value="{{.login_name}}">
</div> </div>
<div class="required field {{if .Err_UserName}}error{{end}}"> <div class="required field {{if .Err_UserName}}error{{end}}">
<label for="user_name">{{.locale.Tr "username"}}</label> <label for="user_name">{{ctx.Locale.Tr "username"}}</label>
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required maxlength="40"> <input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required maxlength="40">
</div> </div>
<div class="required field {{if .Err_Email}}error{{end}}"> <div class="required field {{if .Err_Email}}error{{end}}">
<label for="email">{{.locale.Tr "email"}}</label> <label for="email">{{ctx.Locale.Tr "email"}}</label>
<input id="email" name="email" type="email" value="{{.email}}" required> <input id="email" name="email" type="email" value="{{.email}}" required>
</div> </div>
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}gt-hidden{{end}}"> <div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}gt-hidden{{end}}">
<label for="password">{{.locale.Tr "password"}}</label> <label for="password">{{ctx.Locale.Tr "password"}}</label>
<input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}> <input id="password" name="password" type="password" autocomplete="new-password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
</div> </div>
<div class="inline field local {{if ne .login_type "0-0"}}gt-hidden{{end}}"> <div class="inline field local {{if ne .login_type "0-0"}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "auth.allow_password_change"}}</strong></label> <label><strong>{{ctx.Locale.Tr "auth.allow_password_change"}}</strong></label>
<input name="must_change_password" type="checkbox" checked> <input name="must_change_password" type="checkbox" checked>
</div> </div>
</div> </div>
@ -75,14 +75,14 @@
{{if .CanSendEmail}} {{if .CanSendEmail}}
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label><strong>{{.locale.Tr "admin.users.send_register_notify"}}</strong></label> <label><strong>{{ctx.Locale.Tr "admin.users.send_register_notify"}}</strong></label>
<input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}> <input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
</div> </div>
</div> </div>
{{end}} {{end}}
<div class="field"> <div class="field">
<button class="ui primary button">{{.locale.Tr "admin.users.new_account"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "admin.users.new_account"}}</button>
</div> </div>
</form> </form>
</div> </div>

View File

@ -1,8 +1,8 @@
<footer class="page-footer" role="group" aria-label="{{.locale.Tr "aria.footer"}}"> <footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
<div class="left-links" role="contentinfo" aria-label="{{.locale.Tr "aria.footer.software"}}"> <div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
<a target="_blank" rel="noopener noreferrer" href="https://about.gitea.com">{{.locale.Tr "powered_by" "Gitea"}}</a> <a target="_blank" rel="noopener noreferrer" href="https://about.gitea.com">{{ctx.Locale.Tr "powered_by" "Gitea"}}</a>
{{if (or .ShowFooterVersion .PageIsAdmin)}} {{if (or .ShowFooterVersion .PageIsAdmin)}}
{{.locale.Tr "version"}}: {{ctx.Locale.Tr "version"}}:
{{if .IsAdmin}} {{if .IsAdmin}}
<a href="{{AppSubUrl}}/admin/config">{{AppVer}}</a> <a href="{{AppSubUrl}}/admin/config">{{AppVer}}</a>
{{else}} {{else}}
@ -10,11 +10,11 @@
{{end}} {{end}}
{{end}} {{end}}
{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}} {{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
{{.locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong> {{ctx.Locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
{{.locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong> {{ctx.Locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
{{end}} {{end}}
</div> </div>
<div class="right-links" role="group" aria-label="{{.locale.Tr "aria.footer.links"}}"> <div class="right-links" role="group" aria-label="{{ctx.Locale.Tr "aria.footer.links"}}">
<div class="ui dropdown upward language"> <div class="ui dropdown upward language">
<span class="flex-text-inline">{{svg "octicon-globe" 14}} {{.locale.LangName}}</span> <span class="flex-text-inline">{{svg "octicon-globe" 14}} {{.locale.LangName}}</span>
<div class="menu language-menu"> <div class="menu language-menu">
@ -23,7 +23,7 @@
{{end}} {{end}}
</div> </div>
</div> </div>
<a href="{{AssetUrlPrefix}}/licenses.txt">{{.locale.Tr "licenses"}}</a> <a href="{{AssetUrlPrefix}}/licenses.txt">{{ctx.Locale.Tr "licenses"}}</a>
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}} {{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
{{template "custom/extra_links_footer" .}} {{template "custom/extra_links_footer" .}}
</div> </div>

View File

@ -3,17 +3,17 @@
{{$notificationUnreadCount = call .NotificationUnreadCount}} {{$notificationUnreadCount = call .NotificationUnreadCount}}
{{end}} {{end}}
<nav id="navbar" aria-label="{{.locale.Tr "aria.navbar"}}"> <nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
<div class="navbar-left ui secondary menu"> <div class="navbar-left ui secondary menu">
<!-- the logo --> <!-- the logo -->
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}"> <a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}">
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}" aria-hidden="true"> <img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
</a> </a>
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column --> <!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
<div class="ui secondary menu item navbar-mobile-right"> <div class="ui secondary menu item navbar-mobile-right">
{{if .IsSigned}} {{if .IsSigned}}
<a id="mobile-notifications-icon" class="item gt-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> <a id="mobile-notifications-icon" class="item gt-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
<div class="gt-relative"> <div class="gt-relative">
{{svg "octicon-bell"}} {{svg "octicon-bell"}}
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span> <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
@ -28,34 +28,34 @@
{{/* No links */}} {{/* No links */}}
{{else if .IsSigned}} {{else if .IsSigned}}
{{if not .UnitIssuesGlobalDisabled}} {{if not .UnitIssuesGlobalDisabled}}
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.locale.Tr "issues"}}</a> <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{ctx.Locale.Tr "issues"}}</a>
{{end}} {{end}}
{{if not .UnitPullsGlobalDisabled}} {{if not .UnitPullsGlobalDisabled}}
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.locale.Tr "pull_requests"}}</a> <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{ctx.Locale.Tr "pull_requests"}}</a>
{{end}} {{end}}
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}} {{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
{{if .ShowMilestonesDashboardPage}} {{if .ShowMilestonesDashboardPage}}
<a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{.locale.Tr "milestones"}}</a> <a class="item{{if .PageIsMilestonesDashboard}} active{{end}}" href="{{AppSubUrl}}/milestones">{{ctx.Locale.Tr "milestones"}}</a>
{{end}} {{end}}
{{end}} {{end}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a> <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
{{else if .IsLandingPageOrganizations}} {{else if .IsLandingPageOrganizations}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.locale.Tr "explore"}}</a> <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
{{else}} {{else}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.locale.Tr "explore"}}</a> <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
{{end}} {{end}}
{{template "custom/extra_links" .}} {{template "custom/extra_links" .}}
{{if not .IsSigned}} {{if not .IsSigned}}
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{.locale.Tr "help"}}</a> <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
{{end}} {{end}}
</div> </div>
<!-- the full dropdown menus --> <!-- the full dropdown menus -->
<div class="navbar-right ui secondary menu"> <div class="navbar-right ui secondary menu">
{{if and .IsSigned .MustChangePassword}} {{if and .IsSigned .MustChangePassword}}
<div class="ui dropdown jump item" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}"> <div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
<span class="text gt-df gt-ac"> <span class="text gt-df gt-ac">
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}} {{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span> <span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
@ -63,24 +63,24 @@
</span> </span>
<div class="menu user-menu"> <div class="menu user-menu">
<div class="ui header"> <div class="ui header">
{{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong> {{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout"> <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
{{svg "octicon-sign-out"}} {{svg "octicon-sign-out"}}
{{.locale.Tr "sign_out"}} {{ctx.Locale.Tr "sign_out"}}
</a> </a>
</div><!-- end content avatar menu --> </div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu --> </div><!-- end dropdown avatar menu -->
{{else if .IsSigned}} {{else if .IsSigned}}
{{if EnableTimetracking}} {{if EnableTimetracking}}
<a class="active-stopwatch-trigger item gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{.locale.Tr "active_stopwatch"}}"> <a class="active-stopwatch-trigger item gt-mx-0{{if not .ActiveStopwatch}} gt-hidden{{end}}" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}">
<div class="gt-relative"> <div class="gt-relative">
{{svg "octicon-stopwatch"}} {{svg "octicon-stopwatch"}}
<span class="header-stopwatch-dot"></span> <span class="header-stopwatch-dot"></span>
</div> </div>
<span class="mobile-only gt-ml-3">{{.locale.Tr "active_stopwatch"}}</span> <span class="mobile-only gt-ml-3">{{ctx.Locale.Tr "active_stopwatch"}}</span>
</a> </a>
<div class="active-stopwatch-popup item tippy-target gt-p-3"> <div class="active-stopwatch-popup item tippy-target gt-p-3">
<div class="gt-df gt-ac"> <div class="gt-df gt-ac">
@ -96,7 +96,7 @@
<button <button
type="submit" type="submit"
class="ui button mini compact basic icon" class="ui button mini compact basic icon"
data-tooltip-content="{{.locale.Tr "repo.issues.stop_tracking"}}" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.stop_tracking"}}"
>{{svg "octicon-square-fill"}}</button> >{{svg "octicon-square-fill"}}</button>
</form> </form>
<form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel"> <form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
@ -104,44 +104,44 @@
<button <button
type="submit" type="submit"
class="ui button mini compact basic icon" class="ui button mini compact basic icon"
data-tooltip-content="{{.locale.Tr "repo.issues.cancel_tracking"}}" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.cancel_tracking"}}"
>{{svg "octicon-trash"}}</button> >{{svg "octicon-trash"}}</button>
</form> </form>
</div> </div>
</div> </div>
{{end}} {{end}}
<a class="item not-mobile gt-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{.locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}"> <a class="item not-mobile gt-mx-0" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{.locale.Tr "notifications"}}">
<div class="gt-relative"> <div class="gt-relative">
{{svg "octicon-bell"}} {{svg "octicon-bell"}}
<span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span> <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span>
</div> </div>
</a> </a>
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "create_new"}}"> <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "create_new"}}">
<span class="text"> <span class="text">
{{svg "octicon-plus"}} {{svg "octicon-plus"}}
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span> <span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
<span class="mobile-only">{{.locale.Tr "create_new"}}</span> <span class="mobile-only">{{ctx.Locale.Tr "create_new"}}</span>
</span> </span>
<div class="menu"> <div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create"> <a class="item" href="{{AppSubUrl}}/repo/create">
{{svg "octicon-plus"}} {{.locale.Tr "new_repo"}} {{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
</a> </a>
{{if not .DisableMigrations}} {{if not .DisableMigrations}}
<a class="item" href="{{AppSubUrl}}/repo/migrate"> <a class="item" href="{{AppSubUrl}}/repo/migrate">
{{svg "octicon-repo-push"}} {{.locale.Tr "new_migrate"}} {{svg "octicon-repo-push"}} {{ctx.Locale.Tr "new_migrate"}}
</a> </a>
{{end}} {{end}}
{{if .SignedUser.CanCreateOrganization}} {{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create"> <a class="item" href="{{AppSubUrl}}/org/create">
{{svg "octicon-organization"}} {{.locale.Tr "new_org"}} {{svg "octicon-organization"}} {{ctx.Locale.Tr "new_org"}}
</a> </a>
{{end}} {{end}}
</div><!-- end content create new menu --> </div><!-- end content create new menu -->
</div><!-- end dropdown menu create new --> </div><!-- end dropdown menu create new -->
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{.locale.Tr "user_profile_and_more"}}"> <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
<span class="text gt-df gt-ac"> <span class="text gt-df gt-ac">
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}} {{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}}
<span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span> <span class="mobile-only gt-ml-3">{{.SignedUser.Name}}</span>
@ -149,56 +149,56 @@
</span> </span>
<div class="menu user-menu"> <div class="menu user-menu">
<div class="ui header"> <div class="ui header">
{{.locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong> {{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<a class="item" href="{{.SignedUser.HomeLink}}"> <a class="item" href="{{.SignedUser.HomeLink}}">
{{svg "octicon-person"}} {{svg "octicon-person"}}
{{.locale.Tr "your_profile"}} {{ctx.Locale.Tr "your_profile"}}
</a> </a>
{{if not .DisableStars}} {{if not .DisableStars}}
<a class="item" href="{{.SignedUser.HomeLink}}?tab=stars"> <a class="item" href="{{.SignedUser.HomeLink}}?tab=stars">
{{svg "octicon-star"}} {{svg "octicon-star"}}
{{.locale.Tr "your_starred"}} {{ctx.Locale.Tr "your_starred"}}
</a> </a>
{{end}} {{end}}
<a class="item" href="{{AppSubUrl}}/notifications/subscriptions"> <a class="item" href="{{AppSubUrl}}/notifications/subscriptions">
{{svg "octicon-bell"}} {{svg "octicon-bell"}}
{{.locale.Tr "notification.subscriptions"}} {{ctx.Locale.Tr "notification.subscriptions"}}
</a> </a>
<a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings"> <a class="{{if .PageIsUserSettings}}active {{end}}item" href="{{AppSubUrl}}/user/settings">
{{svg "octicon-tools"}} {{svg "octicon-tools"}}
{{.locale.Tr "your_settings"}} {{ctx.Locale.Tr "your_settings"}}
</a> </a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com"> <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.com">
{{svg "octicon-question"}} {{svg "octicon-question"}}
{{.locale.Tr "help"}} {{ctx.Locale.Tr "help"}}
</a> </a>
{{if .IsAdmin}} {{if .IsAdmin}}
<div class="divider"></div> <div class="divider"></div>
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin"> <a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/admin">
{{svg "octicon-server"}} {{svg "octicon-server"}}
{{.locale.Tr "admin_panel"}} {{ctx.Locale.Tr "admin_panel"}}
</a> </a>
{{end}} {{end}}
<div class="divider"></div> <div class="divider"></div>
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout"> <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout">
{{svg "octicon-sign-out"}} {{svg "octicon-sign-out"}}
{{.locale.Tr "sign_out"}} {{ctx.Locale.Tr "sign_out"}}
</a> </a>
</div><!-- end content avatar menu --> </div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu --> </div><!-- end dropdown avatar menu -->
{{else}} {{else}}
{{if .ShowRegistrationButton}} {{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up"> <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
{{svg "octicon-person"}} {{.locale.Tr "register"}} {{svg "octicon-person"}} {{ctx.Locale.Tr "register"}}
</a> </a>
{{end}} {{end}}
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}"> <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
{{svg "octicon-sign-in"}} {{.locale.Tr "sign_in"}} {{svg "octicon-sign-in"}} {{ctx.Locale.Tr "sign_in"}}
</a> </a>
{{end}} {{end}}
</div><!-- end full right menu --> </div><!-- end full right menu -->

View File

@ -34,13 +34,13 @@ If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly.
mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}}, mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
{{/* this global i18n object should only contain general texts. for specialized texts, it should be provided inside the related modules by: (1) API response (2) HTML data-attribute (3) PageData */}} {{/* this global i18n object should only contain general texts. for specialized texts, it should be provided inside the related modules by: (1) API response (2) HTML data-attribute (3) PageData */}}
i18n: { i18n: {
copy_success: {{.locale.Tr "copy_success"}}, copy_success: {{ctx.Locale.Tr "copy_success"}},
copy_error: {{.locale.Tr "copy_error"}}, copy_error: {{ctx.Locale.Tr "copy_error"}},
error_occurred: {{.locale.Tr "error.occurred"}}, error_occurred: {{ctx.Locale.Tr "error.occurred"}},
network_error: {{.locale.Tr "error.network_error"}}, network_error: {{ctx.Locale.Tr "error.network_error"}},
remove_label_str: {{.locale.Tr "remove_label_str"}}, remove_label_str: {{ctx.Locale.Tr "remove_label_str"}},
modal_confirm: {{.locale.Tr "modal.confirm"}}, modal_confirm: {{ctx.Locale.Tr "modal.confirm"}},
modal_cancel: {{.locale.Tr "modal.cancel"}}, modal_cancel: {{ctx.Locale.Tr "modal.cancel"}},
}, },
}; };
{{/* in case some pages don't render the pageData, we make sure it is an object to prevent null access */}} {{/* in case some pages don't render the pageData, we make sure it is an object to prevent null access */}}

View File

@ -5,11 +5,11 @@
<div class="ui borderless pagination menu"> <div class="ui borderless pagination menu">
<a class="{{if .IsFirst}}disabled{{end}} item navigation" {{if not .IsFirst}}href="{{$.Link}}{{if $paginationLink}}?{{$paginationLink}}{{end}}"{{end}}> <a class="{{if .IsFirst}}disabled{{end}} item navigation" {{if not .IsFirst}}href="{{$.Link}}{{if $paginationLink}}?{{$paginationLink}}{{end}}"{{end}}>
{{svg "gitea-double-chevron-left" 16 "gt-mr-2"}} {{svg "gitea-double-chevron-left" 16 "gt-mr-2"}}
<span class="navigation_label">{{$.locale.Tr "admin.first_page"}}</span> <span class="navigation_label">{{ctx.Locale.Tr "admin.first_page"}}</span>
</a> </a>
<a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}> <a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>
{{svg "octicon-chevron-left" 16 "gt-mr-2"}} {{svg "octicon-chevron-left" 16 "gt-mr-2"}}
<span class="navigation_label">{{$.locale.Tr "repo.issues.previous"}}</span> <span class="navigation_label">{{ctx.Locale.Tr "repo.issues.previous"}}</span>
</a> </a>
{{range .Pages}} {{range .Pages}}
{{if eq .Num -1}} {{if eq .Num -1}}
@ -19,11 +19,11 @@
{{end}} {{end}}
{{end}} {{end}}
<a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}> <a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>
<span class="navigation_label">{{$.locale.Tr "repo.issues.next"}}</span> <span class="navigation_label">{{ctx.Locale.Tr "repo.issues.next"}}</span>
{{svg "octicon-chevron-right" 16 "gt-ml-2"}} {{svg "octicon-chevron-right" 16 "gt-ml-2"}}
</a> </a>
<a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$.Link}}?page={{.TotalPages}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}> <a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$.Link}}?page={{.TotalPages}}{{if $paginationLink}}&{{$paginationLink}}{{end}}"{{end}}>
<span class="navigation_label">{{$.locale.Tr "admin.last_page"}}</span> <span class="navigation_label">{{ctx.Locale.Tr "admin.last_page"}}</span>
{{svg "gitea-double-chevron-right" 16 "gt-ml-2"}} {{svg "gitea-double-chevron-right" 16 "gt-ml-2"}}
</a> </a>
</div> </div>

View File

@ -3,15 +3,15 @@
<div class="ui user list"> <div class="ui user list">
{{if .CodeIndexerUnavailable}} {{if .CodeIndexerUnavailable}}
<div class="ui error message"> <div class="ui error message">
<p>{{$.locale.Tr "explore.code_search_unavailable"}}</p> <p>{{ctx.Locale.Tr "explore.code_search_unavailable"}}</p>
</div> </div>
{{else if .SearchResults}} {{else if .SearchResults}}
<h3> <h3>
{{.locale.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html}} {{ctx.Locale.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html}}
</h3> </h3>
{{template "code/searchresults" .}} {{template "code/searchresults" .}}
{{else if .Keyword}} {{else if .Keyword}}
<div>{{$.locale.Tr "explore.code_no_results"}}</div> <div>{{ctx.Locale.Tr "explore.code_no_results"}}</div>
{{end}} {{end}}
</div> </div>
{{template "base/paginate" .}} {{template "base/paginate" .}}

View File

@ -1,14 +1,14 @@
<form class="ui form ignore-dirty"> <form class="ui form ignore-dirty">
<div class="ui fluid action input"> <div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}} {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}}
<div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{.locale.Tr "explore.search.type.tooltip"}}"> <div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{ctx.Locale.Tr "explore.search.type.tooltip"}}">
<input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}} <input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="text">{{.locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div> <div class="text">{{ctx.Locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>
<div class="menu"> <div class="menu">
<div class="item" data-value="" data-tooltip-content="{{.locale.Tr "explore.search.fuzzy.tooltip"}}">{{.locale.Tr "explore.search.fuzzy"}}</div> <div class="item" data-value="" data-tooltip-content="{{ctx.Locale.Tr "explore.search.fuzzy.tooltip"}}">{{.locale.Tr "explore.search.fuzzy"}}</div>
<div class="item" data-value="match" data-tooltip-content="{{.locale.Tr "explore.search.match.tooltip"}}">{{.locale.Tr "explore.search.match"}}</div> <div class="item" data-value="match" data-tooltip-content="{{ctx.Locale.Tr "explore.search.match.tooltip"}}">{{.locale.Tr "explore.search.match"}}</div>
</div> </div>
</div> </div>
<button class="ui primary button"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{.locale.Tr "explore.search"}}</button> <button class="ui primary button"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>

View File

@ -15,11 +15,11 @@
<span class="file gt-f1"> <span class="file gt-f1">
<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a> <a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a>
{{if $repo.IsArchived}} {{if $repo.IsArchived}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span> <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
{{end}} {{end}}
- {{.Filename}} - {{.Filename}}
</span> </span>
<a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{$.locale.Tr "repo.diff.view_file"}}</a> <a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a>
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
<div class="file-body file-code code-view"> <div class="file-body file-code code-view">

View File

@ -69,7 +69,7 @@
<a class="text primary" href="{{$.Link}}"> <a class="text primary" href="{{$.Link}}">
gitea-org / gitea gitea-org / gitea
</a> </a>
<span data-tooltip-content="{{$.locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span> <span data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
</div> </div>
<div class="flex-item-trailing"> <div class="flex-item-trailing">
<a class="muted" href="{{$.Link}}"> <a class="muted" href="{{$.Link}}">

View File

@ -1,19 +1,19 @@
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar"> <div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
<div class="new-menu-inner"> <div class="new-menu-inner">
<a class="{{if .PageIsExploreRepositories}}active {{end}}item" href="{{AppSubUrl}}/explore/repos"> <a class="{{if .PageIsExploreRepositories}}active {{end}}item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo"}} {{.locale.Tr "explore.repos"}} {{svg "octicon-repo"}} {{ctx.Locale.Tr "explore.repos"}}
</a> </a>
{{if not .UsersIsDisabled}} {{if not .UsersIsDisabled}}
<a class="{{if .PageIsExploreUsers}}active {{end}}item" href="{{AppSubUrl}}/explore/users"> <a class="{{if .PageIsExploreUsers}}active {{end}}item" href="{{AppSubUrl}}/explore/users">
{{svg "octicon-person"}} {{.locale.Tr "explore.users"}} {{svg "octicon-person"}} {{ctx.Locale.Tr "explore.users"}}
</a> </a>
{{end}} {{end}}
<a class="{{if .PageIsExploreOrganizations}}active {{end}}item" href="{{AppSubUrl}}/explore/organizations"> <a class="{{if .PageIsExploreOrganizations}}active {{end}}item" href="{{AppSubUrl}}/explore/organizations">
{{svg "octicon-organization"}} {{.locale.Tr "explore.organizations"}} {{svg "octicon-organization"}} {{ctx.Locale.Tr "explore.organizations"}}
</a> </a>
{{if and (not $.UnitTypeCode.UnitGlobalDisabled) .IsRepoIndexerEnabled}} {{if and (not $.UnitTypeCode.UnitGlobalDisabled) .IsRepoIndexerEnabled}}
<a class="{{if .PageIsExploreCode}}active {{end}}item" href="{{AppSubUrl}}/explore/code"> <a class="{{if .PageIsExploreCode}}active {{end}}item" href="{{AppSubUrl}}/explore/code">
{{svg "octicon-code"}} {{.locale.Tr "explore.code"}} {{svg "octicon-code"}} {{ctx.Locale.Tr "explore.code"}}
</a> </a>
{{end}} {{end}}
</div> </div>

View File

@ -12,30 +12,30 @@
</a> </a>
<span class="label-list"> <span class="label-list">
{{if .IsArchived}} {{if .IsArchived}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span> <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span>
{{end}} {{end}}
{{if .IsTemplate}} {{if .IsTemplate}}
{{if .IsPrivate}} {{if .IsPrivate}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.private_template"}}</span> <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private_template"}}</span>
{{else}} {{else}}
{{if .Owner.Visibility.IsPrivate}} {{if .Owner.Visibility.IsPrivate}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.internal_template"}}</span> <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal_template"}}</span>
{{end}} {{end}}
{{end}} {{end}}
{{else}} {{else}}
{{if .IsPrivate}} {{if .IsPrivate}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.private"}}</span> <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.private"}}</span>
{{else}} {{else}}
{{if .Owner.Visibility.IsPrivate}} {{if .Owner.Visibility.IsPrivate}}
<span class="ui basic label">{{$.locale.Tr "repo.desc.internal"}}</span> <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.internal"}}</span>
{{end}} {{end}}
{{end}} {{end}}
{{end}} {{end}}
</span> </span>
{{if .IsFork}} {{if .IsFork}}
<span data-tooltip-content="{{$.locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span> <span data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
{{else if .IsMirror}} {{else if .IsMirror}}
<span data-tooltip-content="{{$.locale.Tr "mirror"}}">{{svg "octicon-mirror"}}</span> <span data-tooltip-content="{{ctx.Locale.Tr "mirror"}}">{{svg "octicon-mirror"}}</span>
{{end}} {{end}}
</div> </div>
<div class="flex-item-trailing"> <div class="flex-item-trailing">
@ -61,12 +61,12 @@
{{end}} {{end}}
</div> </div>
{{end}} {{end}}
<div class="flex-item-body">{{$.locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}</div> <div class="flex-item-body">{{ctx.Locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}</div>
</div> </div>
</div> </div>
{{else}} {{else}}
<div> <div>
{{$.locale.Tr "explore.repo_no_results"}} {{ctx.Locale.Tr "explore.repo_no_results"}}
</div> </div>
{{end}} {{end}}
</div> </div>

View File

@ -9,34 +9,34 @@
{{else}} {{else}}
<input type="hidden" name="tab" value="repositories"> <input type="hidden" name="tab" value="repositories">
{{end}} {{end}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<!-- Sort --> <!-- Sort -->
<div class="ui dropdown type jump item gt-mr-0"> <div class="ui dropdown type jump item gt-mr-0">
<span class="text"> <span class="text">
{{.locale.Tr "repo.issues.filter_sort"}} {{ctx.Locale.Tr "repo.issues.filter_sort"}}
</span> </span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=newest&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a> <a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=newest&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=oldest&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a> <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=oldest&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=alphabetically&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> <a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=alphabetically&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=reversealphabetically&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> <a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=reversealphabetically&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=recentupdate&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a> <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=recentupdate&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=leastupdate&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a> <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=leastupdate&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
{{if not .DisableStars}} {{if not .DisableStars}}
<a class="{{if eq .SortType "moststars"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=moststars&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.moststars"}}</a> <a class="{{if eq .SortType "moststars"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=moststars&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.filter_sort.moststars"}}</a>
<a class="{{if eq .SortType "feweststars"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=feweststars&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.feweststars"}}</a> <a class="{{if eq .SortType "feweststars"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=feweststars&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.filter_sort.feweststars"}}</a>
{{end}} {{end}}
<a class="{{if eq .SortType "mostforks"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=mostforks&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.mostforks"}}</a> <a class="{{if eq .SortType "mostforks"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=mostforks&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.filter_sort.mostforks"}}</a>
<a class="{{if eq .SortType "fewestforks"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=fewestforks&q={{$.Keyword}}&language={{$.Language}}">{{.locale.Tr "repo.issues.filter_sort.fewestforks"}}</a> <a class="{{if eq .SortType "fewestforks"}}active {{end}}item" href="{{$.Link}}?tab={{$.TabName}}&sort=fewestforks&q={{$.Keyword}}&language={{$.Language}}">{{ctx.Locale.Tr "repo.issues.filter_sort.fewestforks"}}</a>
</div> </div>
</div> </div>
</div> </div>
{{if and .PageIsExploreRepositories .OnlyShowRelevant}} {{if and .PageIsExploreRepositories .OnlyShowRelevant}}
<div class="ui message explore-relevancy-note"> <div class="ui message explore-relevancy-note">
<span data-tooltip-content="{{.locale.Tr "explore.relevant_repositories_tooltip"}}">{{.locale.Tr "explore.relevant_repositories" ((print $.Link "?only_show_relevant=0")|Escape) | Safe}}</span> <span data-tooltip-content="{{ctx.Locale.Tr "explore.relevant_repositories_tooltip"}}">{{.locale.Tr "explore.relevant_repositories" ((print $.Link "?only_show_relevant=0")|Escape) | Safe}}</span>
</div> </div>
{{end}} {{end}}
<div class="divider"></div> <div class="divider"></div>

View File

@ -2,22 +2,22 @@
<form class="ui form ignore-dirty gt-f1"> <form class="ui form ignore-dirty gt-f1">
<div class="ui fluid action input"> <div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}} {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div> </div>
</form> </form>
<!-- Sort --> <!-- Sort -->
<div class="ui dropdown type jump item gt-mr-0"> <div class="ui dropdown type jump item gt-mr-0">
<span class="text"> <span class="text">
{{.locale.Tr "repo.issues.filter_sort"}} {{ctx.Locale.Tr "repo.issues.filter_sort"}}
</span> </span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
<a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a> <a class="{{if eq .SortType "newest"}}active {{end}}item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
<a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a> <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
<a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}">{{.locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a> <a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}">{{.locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a> <a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a> <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a> <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,49 +1,49 @@
{{template "base/head" .}} {{template "base/head" .}}
<div role="main" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home"> <div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home">
<div class="gt-mb-5 gt-px-5"> <div class="gt-mb-5 gt-px-5">
<div class="center"> <div class="center">
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}"> <img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
<div class="hero"> <div class="hero">
<h1 class="ui icon header title"> <h1 class="ui icon header title">
{{AppName}} {{AppName}}
</h1> </h1>
<h2>{{.locale.Tr "startpage.app_desc"}}</h2> <h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
</div> </div>
</div> </div>
</div> </div>
<div class="ui stackable middle very relaxed page grid"> <div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column"> <div class="eight wide center column">
<h1 class="hero ui icon header"> <h1 class="hero ui icon header">
{{svg "octicon-flame"}} {{.locale.Tr "startpage.install"}} {{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
</h1> </h1>
<p class="large"> <p class="large">
{{.locale.Tr "startpage.install_desc" | Str2html}} {{ctx.Locale.Tr "startpage.install_desc" | Str2html}}
</p> </p>
</div> </div>
<div class="eight wide center column"> <div class="eight wide center column">
<h1 class="hero ui icon header"> <h1 class="hero ui icon header">
{{svg "octicon-device-desktop"}} {{.locale.Tr "startpage.platform"}} {{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
</h1> </h1>
<p class="large"> <p class="large">
{{.locale.Tr "startpage.platform_desc" | Str2html}} {{ctx.Locale.Tr "startpage.platform_desc" | Str2html}}
</p> </p>
</div> </div>
</div> </div>
<div class="ui stackable middle very relaxed page grid"> <div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column"> <div class="eight wide center column">
<h1 class="hero ui icon header"> <h1 class="hero ui icon header">
{{svg "octicon-rocket"}} {{.locale.Tr "startpage.lightweight"}} {{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}
</h1> </h1>
<p class="large"> <p class="large">
{{.locale.Tr "startpage.lightweight_desc" | Str2html}} {{ctx.Locale.Tr "startpage.lightweight_desc" | Str2html}}
</p> </p>
</div> </div>
<div class="eight wide center column"> <div class="eight wide center column">
<h1 class="hero ui icon header"> <h1 class="hero ui icon header">
{{svg "octicon-code"}} {{.locale.Tr "startpage.license"}} {{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
</h1> </h1>
<p class="large"> <p class="large">
{{.locale.Tr "startpage.license_desc" | Str2html}} {{ctx.Locale.Tr "startpage.license_desc" | Str2html}}
</p> </p>
</div> </div>
</div> </div>

View File

@ -3,19 +3,19 @@
<div class="ui grid install-config-container"> <div class="ui grid install-config-container">
<div class="sixteen wide center aligned centered column"> <div class="sixteen wide center aligned centered column">
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.locale.Tr "install.title"}} {{ctx.Locale.Tr "install.title"}}
</h3> </h3>
<div class="ui attached segment"> <div class="ui attached segment">
{{template "base/alert" .}} {{template "base/alert" .}}
<p>{{.locale.Tr "install.docker_helper" "https://docs.gitea.com/installation/install-with-docker" | Safe}}</p> <p>{{ctx.Locale.Tr "install.docker_helper" "https://docs.gitea.com/installation/install-with-docker" | Safe}}</p>
<form class="ui form" action="{{AppSubUrl}}/" method="post"> <form class="ui form" action="{{AppSubUrl}}/" method="post">
<!-- Database Settings --> <!-- Database Settings -->
<h4 class="ui dividing header">{{.locale.Tr "install.db_title"}}</h4> <h4 class="ui dividing header">{{ctx.Locale.Tr "install.db_title"}}</h4>
<p>{{.locale.Tr "install.require_db_desc"}}</p> <p>{{ctx.Locale.Tr "install.require_db_desc"}}</p>
<div class="inline required field {{if .Err_DbType}}error{{end}}"> <div class="inline required field {{if .Err_DbType}}error{{end}}">
<label>{{.locale.Tr "install.db_type"}}</label> <label>{{ctx.Locale.Tr "install.db_type"}}</label>
<div class="ui selection database type dropdown"> <div class="ui selection database type dropdown">
<input type="hidden" id="db_type" name="db_type" value="{{.CurDbType}}"> <input type="hidden" id="db_type" name="db_type" value="{{.CurDbType}}">
<div class="text">{{.CurDbType}}</div> <div class="text">{{.CurDbType}}</div>
@ -30,26 +30,26 @@
<div class="gt-mt-4 gt-hidden" data-db-setting-for="common-host"> <div class="gt-mt-4 gt-hidden" data-db-setting-for="common-host">
<div class="inline required field {{if .Err_DbSetting}}error{{end}}"> <div class="inline required field {{if .Err_DbSetting}}error{{end}}">
<label for="db_host">{{.locale.Tr "install.host"}}</label> <label for="db_host">{{ctx.Locale.Tr "install.host"}}</label>
<input id="db_host" name="db_host" value="{{.db_host}}"> <input id="db_host" name="db_host" value="{{.db_host}}">
</div> </div>
<div class="inline required field {{if .Err_DbSetting}}error{{end}}"> <div class="inline required field {{if .Err_DbSetting}}error{{end}}">
<label for="db_user">{{.locale.Tr "install.user"}}</label> <label for="db_user">{{ctx.Locale.Tr "install.user"}}</label>
<input id="db_user" name="db_user" value="{{.db_user}}"> <input id="db_user" name="db_user" value="{{.db_user}}">
</div> </div>
<div class="inline required field {{if .Err_DbSetting}}error{{end}}"> <div class="inline required field {{if .Err_DbSetting}}error{{end}}">
<label for="db_passwd">{{.locale.Tr "install.password"}}</label> <label for="db_passwd">{{ctx.Locale.Tr "install.password"}}</label>
<input id="db_passwd" name="db_passwd" type="password" value="{{.db_passwd}}"> <input id="db_passwd" name="db_passwd" type="password" value="{{.db_passwd}}">
</div> </div>
<div class="inline required field {{if .Err_DbSetting}}error{{end}}"> <div class="inline required field {{if .Err_DbSetting}}error{{end}}">
<label for="db_name">{{.locale.Tr "install.db_name"}}</label> <label for="db_name">{{ctx.Locale.Tr "install.db_name"}}</label>
<input id="db_name" name="db_name" value="{{.db_name}}"> <input id="db_name" name="db_name" value="{{.db_name}}">
</div> </div>
</div> </div>
<div class="gt-mt-4 gt-hidden" data-db-setting-for="postgres"> <div class="gt-mt-4 gt-hidden" data-db-setting-for="postgres">
<div class="inline required field"> <div class="inline required field">
<label>{{.locale.Tr "install.ssl_mode"}}</label> <label>{{ctx.Locale.Tr "install.ssl_mode"}}</label>
<div class="ui selection database type dropdown"> <div class="ui selection database type dropdown">
<input type="hidden" name="ssl_mode" value="{{if .ssl_mode}}{{.ssl_mode}}{{else}}disable{{end}}"> <input type="hidden" name="ssl_mode" value="{{if .ssl_mode}}{{.ssl_mode}}{{else}}disable{{end}}">
<div class="default text">disable</div> <div class="default text">disable</div>
@ -62,38 +62,38 @@
</div> </div>
</div> </div>
<div class="inline field {{if .Err_DbSetting}}error{{end}}"> <div class="inline field {{if .Err_DbSetting}}error{{end}}">
<label for="db_schema">{{.locale.Tr "install.db_schema"}}</label> <label for="db_schema">{{ctx.Locale.Tr "install.db_schema"}}</label>
<input id="db_schema" name="db_schema" value="{{.db_schema}}"> <input id="db_schema" name="db_schema" value="{{.db_schema}}">
<span class="help">{{.locale.Tr "install.db_schema_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.db_schema_helper"}}</span>
</div> </div>
</div> </div>
<div class="gt-mt-4 gt-hidden" data-db-setting-for="sqlite3"> <div class="gt-mt-4 gt-hidden" data-db-setting-for="sqlite3">
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}"> <div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
<label for="db_path">{{.locale.Tr "install.path"}}</label> <label for="db_path">{{ctx.Locale.Tr "install.path"}}</label>
<input id="db_path" name="db_path" value="{{.db_path}}"> <input id="db_path" name="db_path" value="{{.db_path}}">
<span class="help">{{.locale.Tr "install.sqlite_helper" | Safe}}</span> <span class="help">{{ctx.Locale.Tr "install.sqlite_helper" | Safe}}</span>
</div> </div>
</div> </div>
{{if .Err_DbInstalledBefore}} {{if .Err_DbInstalledBefore}}
<div> <div>
<p class="reinstall-message">{{.locale.Tr "install.reinstall_confirm_message"}}</p> <p class="reinstall-message">{{ctx.Locale.Tr "install.reinstall_confirm_message"}}</p>
<div class="reinstall-confirm"> <div class="reinstall-confirm">
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "install.reinstall_confirm_check_1"}}</label> <label>{{ctx.Locale.Tr "install.reinstall_confirm_check_1"}}</label>
<input name="reinstall_confirm_first" type="checkbox"> <input name="reinstall_confirm_first" type="checkbox">
</div> </div>
</div> </div>
<div class="reinstall-confirm"> <div class="reinstall-confirm">
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "install.reinstall_confirm_check_2"}}</label> <label>{{ctx.Locale.Tr "install.reinstall_confirm_check_2"}}</label>
<input name="reinstall_confirm_second" type="checkbox"> <input name="reinstall_confirm_second" type="checkbox">
</div> </div>
</div> </div>
<div class="reinstall-confirm"> <div class="reinstall-confirm">
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "install.reinstall_confirm_check_3"}}</label> <label>{{ctx.Locale.Tr "install.reinstall_confirm_check_3"}}</label>
<input name="reinstall_confirm_third" type="checkbox"> <input name="reinstall_confirm_third" type="checkbox">
</div> </div>
</div> </div>
@ -101,98 +101,98 @@
{{end}} {{end}}
<!-- General Settings --> <!-- General Settings -->
<h4 class="ui dividing header">{{.locale.Tr "install.general_title"}}</h4> <h4 class="ui dividing header">{{ctx.Locale.Tr "install.general_title"}}</h4>
<div class="inline required field {{if .Err_AppName}}error{{end}}"> <div class="inline required field {{if .Err_AppName}}error{{end}}">
<label for="app_name">{{.locale.Tr "install.app_name"}}</label> <label for="app_name">{{ctx.Locale.Tr "install.app_name"}}</label>
<input id="app_name" name="app_name" value="{{.app_name}}" required> <input id="app_name" name="app_name" value="{{.app_name}}" required>
<span class="help">{{.locale.Tr "install.app_name_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.app_name_helper"}}</span>
</div> </div>
<div class="inline required field {{if .Err_RepoRootPath}}error{{end}}"> <div class="inline required field {{if .Err_RepoRootPath}}error{{end}}">
<label for="repo_root_path">{{.locale.Tr "install.repo_path"}}</label> <label for="repo_root_path">{{ctx.Locale.Tr "install.repo_path"}}</label>
<input id="repo_root_path" name="repo_root_path" value="{{.repo_root_path}}" required> <input id="repo_root_path" name="repo_root_path" value="{{.repo_root_path}}" required>
<span class="help">{{.locale.Tr "install.repo_path_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.repo_path_helper"}}</span>
</div> </div>
<div class="inline field {{if .Err_LFSRootPath}}error{{end}}"> <div class="inline field {{if .Err_LFSRootPath}}error{{end}}">
<label for="lfs_root_path">{{.locale.Tr "install.lfs_path"}}</label> <label for="lfs_root_path">{{ctx.Locale.Tr "install.lfs_path"}}</label>
<input id="lfs_root_path" name="lfs_root_path" value="{{.lfs_root_path}}"> <input id="lfs_root_path" name="lfs_root_path" value="{{.lfs_root_path}}">
<span class="help">{{.locale.Tr "install.lfs_path_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.lfs_path_helper"}}</span>
</div> </div>
<div class="inline required field {{if .Err_RunUser}}error{{end}}"> <div class="inline required field {{if .Err_RunUser}}error{{end}}">
<label for="run_user">{{.locale.Tr "install.run_user"}}</label> <label for="run_user">{{ctx.Locale.Tr "install.run_user"}}</label>
<input id="run_user" name="run_user" value="{{.run_user}}" readonly> <input id="run_user" name="run_user" value="{{.run_user}}" readonly>
<span class="help">{{.locale.Tr "install.run_user_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.run_user_helper"}}</span>
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label for="domain">{{.locale.Tr "install.domain"}}</label> <label for="domain">{{ctx.Locale.Tr "install.domain"}}</label>
<input id="domain" name="domain" value="{{.domain}}" placeholder="try.gitea.io" required> <input id="domain" name="domain" value="{{.domain}}" placeholder="try.gitea.io" required>
<span class="help">{{.locale.Tr "install.domain_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.domain_helper"}}</span>
</div> </div>
<div class="inline field"> <div class="inline field">
<label for="ssh_port">{{.locale.Tr "install.ssh_port"}}</label> <label for="ssh_port">{{ctx.Locale.Tr "install.ssh_port"}}</label>
<input id="ssh_port" name="ssh_port" value="{{.ssh_port}}"> <input id="ssh_port" name="ssh_port" value="{{.ssh_port}}">
<span class="help">{{.locale.Tr "install.ssh_port_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.ssh_port_helper"}}</span>
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label for="http_port">{{.locale.Tr "install.http_port"}}</label> <label for="http_port">{{ctx.Locale.Tr "install.http_port"}}</label>
<input id="http_port" name="http_port" value="{{.http_port}}" required> <input id="http_port" name="http_port" value="{{.http_port}}" required>
<span class="help">{{.locale.Tr "install.http_port_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.http_port_helper"}}</span>
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label for="app_url">{{.locale.Tr "install.app_url"}}</label> <label for="app_url">{{ctx.Locale.Tr "install.app_url"}}</label>
<input id="app_url" name="app_url" value="{{.app_url}}" placeholder="https://try.gitea.io" required> <input id="app_url" name="app_url" value="{{.app_url}}" placeholder="https://try.gitea.io" required>
<span class="help">{{.locale.Tr "install.app_url_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.app_url_helper"}}</span>
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label for="log_root_path">{{.locale.Tr "install.log_root_path"}}</label> <label for="log_root_path">{{ctx.Locale.Tr "install.log_root_path"}}</label>
<input id="log_root_path" name="log_root_path" value="{{.log_root_path}}" placeholder="log" required> <input id="log_root_path" name="log_root_path" value="{{.log_root_path}}" placeholder="log" required>
<span class="help">{{.locale.Tr "install.log_root_path_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.log_root_path_helper"}}</span>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "install.enable_update_checker"}}</label> <label>{{ctx.Locale.Tr "install.enable_update_checker"}}</label>
<input name="enable_update_checker" type="checkbox"> <input name="enable_update_checker" type="checkbox">
</div> </div>
<span class="help">{{.locale.Tr "install.enable_update_checker_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.enable_update_checker_helper"}}</span>
</div> </div>
<!-- Optional Settings --> <!-- Optional Settings -->
<h4 class="ui dividing header">{{.locale.Tr "install.optional_title"}}</h4> <h4 class="ui dividing header">{{ctx.Locale.Tr "install.optional_title"}}</h4>
<!-- Email --> <!-- Email -->
<details class="optional field"> <details class="optional field">
<summary class="right-content gt-py-3{{if .Err_SMTP}} text red{{end}}"> <summary class="right-content gt-py-3{{if .Err_SMTP}} text red{{end}}">
{{.locale.Tr "install.email_title"}} {{ctx.Locale.Tr "install.email_title"}}
</summary> </summary>
<div class="inline field"> <div class="inline field">
<label for="smtp_addr">{{.locale.Tr "install.smtp_addr"}}</label> <label for="smtp_addr">{{ctx.Locale.Tr "install.smtp_addr"}}</label>
<input id="smtp_addr" name="smtp_addr" value="{{.smtp_addr}}"> <input id="smtp_addr" name="smtp_addr" value="{{.smtp_addr}}">
</div> </div>
<div class="inline field"> <div class="inline field">
<label for="smtp_port">{{.locale.Tr "install.smtp_port"}}</label> <label for="smtp_port">{{ctx.Locale.Tr "install.smtp_port"}}</label>
<input id="smtp_port" name="smtp_port" value="{{.smtp_port}}"> <input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
</div> </div>
<div class="inline field {{if .Err_SMTPFrom}}error{{end}}"> <div class="inline field {{if .Err_SMTPFrom}}error{{end}}">
<label for="smtp_from">{{.locale.Tr "install.smtp_from"}}</label> <label for="smtp_from">{{ctx.Locale.Tr "install.smtp_from"}}</label>
<input id="smtp_from" name="smtp_from" value="{{.smtp_from}}"> <input id="smtp_from" name="smtp_from" value="{{.smtp_from}}">
<span class="help">{{.locale.Tr "install.smtp_from_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.smtp_from_helper"}}</span>
</div> </div>
<div class="inline field {{if .Err_SMTPUser}}error{{end}}"> <div class="inline field {{if .Err_SMTPUser}}error{{end}}">
<label for="smtp_user">{{.locale.Tr "install.mailer_user"}}</label> <label for="smtp_user">{{ctx.Locale.Tr "install.mailer_user"}}</label>
<input id="smtp_user" name="smtp_user" value="{{.smtp_user}}"> <input id="smtp_user" name="smtp_user" value="{{.smtp_user}}">
</div> </div>
<div class="inline field"> <div class="inline field">
<label for="smtp_passwd">{{.locale.Tr "install.mailer_password"}}</label> <label for="smtp_passwd">{{ctx.Locale.Tr "install.mailer_password"}}</label>
<input id="smtp_passwd" name="smtp_passwd" type="password" value="{{.smtp_passwd}}"> <input id="smtp_passwd" name="smtp_passwd" type="password" value="{{.smtp_passwd}}">
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "install.register_confirm"}}</label> <label>{{ctx.Locale.Tr "install.register_confirm"}}</label>
<input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}> <input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "install.mail_notify"}}</label> <label>{{ctx.Locale.Tr "install.mail_notify"}}</label>
<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}> <input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
</div> </div>
</div> </div>
@ -201,87 +201,87 @@
<!-- Server and other services --> <!-- Server and other services -->
<details class="optional field"> <details class="optional field">
<summary class="right-content gt-py-3{{if .Err_Services}} text red{{end}}"> <summary class="right-content gt-py-3{{if .Err_Services}} text red{{end}}">
{{.locale.Tr "install.server_service_title"}} {{ctx.Locale.Tr "install.server_service_title"}}
</summary> </summary>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox" id="offline-mode"> <div class="ui checkbox" id="offline-mode">
<label data-tooltip-content="{{.locale.Tr "install.offline_mode_popup"}}">{{.locale.Tr "install.offline_mode"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.offline_mode_popup"}}">{{.locale.Tr "install.offline_mode"}}</label>
<input name="offline_mode" type="checkbox" {{if .offline_mode}}checked{{end}}> <input name="offline_mode" type="checkbox" {{if .offline_mode}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox" id="disable-gravatar"> <div class="ui checkbox" id="disable-gravatar">
<label data-tooltip-content="{{.locale.Tr "install.disable_gravatar_popup"}}">{{.locale.Tr "install.disable_gravatar"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.disable_gravatar_popup"}}">{{.locale.Tr "install.disable_gravatar"}}</label>
<input name="disable_gravatar" type="checkbox" {{if .disable_gravatar}}checked{{end}}> <input name="disable_gravatar" type="checkbox" {{if .disable_gravatar}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox" id="federated-avatar-lookup"> <div class="ui checkbox" id="federated-avatar-lookup">
<label data-tooltip-content="{{.locale.Tr "install.federated_avatar_lookup_popup"}}">{{.locale.Tr "install.federated_avatar_lookup"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.federated_avatar_lookup_popup"}}">{{.locale.Tr "install.federated_avatar_lookup"}}</label>
<input name="enable_federated_avatar" type="checkbox" {{if .enable_federated_avatar}}checked{{end}}> <input name="enable_federated_avatar" type="checkbox" {{if .enable_federated_avatar}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox" id="enable-openid-signin"> <div class="ui checkbox" id="enable-openid-signin">
<label data-tooltip-content="{{.locale.Tr "install.openid_signin_popup"}}">{{.locale.Tr "install.openid_signin"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.openid_signin_popup"}}">{{.locale.Tr "install.openid_signin"}}</label>
<input name="enable_open_id_sign_in" type="checkbox" {{if .enable_open_id_sign_in}}checked{{end}}> <input name="enable_open_id_sign_in" type="checkbox" {{if .enable_open_id_sign_in}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox" id="disable-registration"> <div class="ui checkbox" id="disable-registration">
<label data-tooltip-content="{{.locale.Tr "install.disable_registration_popup"}}">{{.locale.Tr "install.disable_registration"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.disable_registration_popup"}}">{{.locale.Tr "install.disable_registration"}}</label>
<input name="disable_registration" type="checkbox" {{if .disable_registration}}checked{{end}}> <input name="disable_registration" type="checkbox" {{if .disable_registration}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox" id="allow-only-external-registration"> <div class="ui checkbox" id="allow-only-external-registration">
<label data-tooltip-content="{{.locale.Tr "install.allow_only_external_registration_popup"}}">{{.locale.Tr "install.allow_only_external_registration_popup"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.allow_only_external_registration_popup"}}">{{.locale.Tr "install.allow_only_external_registration_popup"}}</label>
<input name="allow_only_external_registration" type="checkbox" {{if .allow_only_external_registration}}checked{{end}}> <input name="allow_only_external_registration" type="checkbox" {{if .allow_only_external_registration}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox" id="enable-openid-signup"> <div class="ui checkbox" id="enable-openid-signup">
<label data-tooltip-content="{{.locale.Tr "install.openid_signup_popup"}}">{{.locale.Tr "install.openid_signup"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.openid_signup_popup"}}">{{.locale.Tr "install.openid_signup"}}</label>
<input name="enable_open_id_sign_up" type="checkbox" {{if .enable_open_id_sign_up}}checked{{end}}> <input name="enable_open_id_sign_up" type="checkbox" {{if .enable_open_id_sign_up}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox" id="enable-captcha"> <div class="ui checkbox" id="enable-captcha">
<label data-tooltip-content="{{.locale.Tr "install.enable_captcha_popup"}}">{{.locale.Tr "install.enable_captcha"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.enable_captcha_popup"}}">{{.locale.Tr "install.enable_captcha"}}</label>
<input name="enable_captcha" type="checkbox" {{if .enable_captcha}}checked{{end}}> <input name="enable_captcha" type="checkbox" {{if .enable_captcha}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label data-tooltip-content="{{.locale.Tr "install.require_sign_in_view_popup"}}">{{.locale.Tr "install.require_sign_in_view"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.require_sign_in_view_popup"}}">{{.locale.Tr "install.require_sign_in_view"}}</label>
<input name="require_sign_in_view" type="checkbox" {{if .require_sign_in_view}}checked{{end}}> <input name="require_sign_in_view" type="checkbox" {{if .require_sign_in_view}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label data-tooltip-content="{{.locale.Tr "install.default_keep_email_private_popup"}}">{{.locale.Tr "install.default_keep_email_private"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.default_keep_email_private_popup"}}">{{.locale.Tr "install.default_keep_email_private"}}</label>
<input name="default_keep_email_private" type="checkbox" {{if .default_keep_email_private}}checked{{end}}> <input name="default_keep_email_private" type="checkbox" {{if .default_keep_email_private}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label data-tooltip-content="{{.locale.Tr "install.default_allow_create_organization_popup"}}">{{.locale.Tr "install.default_allow_create_organization"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.default_allow_create_organization_popup"}}">{{.locale.Tr "install.default_allow_create_organization"}}</label>
<input name="default_allow_create_organization" type="checkbox" {{if .default_allow_create_organization}}checked{{end}}> <input name="default_allow_create_organization" type="checkbox" {{if .default_allow_create_organization}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<div class="ui checkbox"> <div class="ui checkbox">
<label data-tooltip-content="{{.locale.Tr "install.default_enable_timetracking_popup"}}">{{.locale.Tr "install.default_enable_timetracking"}}</label> <label data-tooltip-content="{{ctx.Locale.Tr "install.default_enable_timetracking_popup"}}">{{.locale.Tr "install.default_enable_timetracking"}}</label>
<input name="default_enable_timetracking" type="checkbox" {{if .default_enable_timetracking}}checked{{end}}> <input name="default_enable_timetracking" type="checkbox" {{if .default_enable_timetracking}}checked{{end}}>
</div> </div>
</div> </div>
<div class="inline field"> <div class="inline field">
<label for="no_reply_address">{{.locale.Tr "install.no_reply_address"}}</label> <label for="no_reply_address">{{ctx.Locale.Tr "install.no_reply_address"}}</label>
<input id="_no_reply_address" name="no_reply_address" value="{{.no_reply_address}}"> <input id="_no_reply_address" name="no_reply_address" value="{{.no_reply_address}}">
<span class="help">{{.locale.Tr "install.no_reply_address_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.no_reply_address_helper"}}</span>
</div> </div>
<div class="inline field"> <div class="inline field">
<label for="password_algorithm">{{.locale.Tr "install.password_algorithm"}}</label> <label for="password_algorithm">{{ctx.Locale.Tr "install.password_algorithm"}}</label>
<div class="ui selection dropdown"> <div class="ui selection dropdown">
<input id="password_algorithm" type="hidden" name="password_algorithm" value="{{.password_algorithm}}"> <input id="password_algorithm" type="hidden" name="password_algorithm" value="{{.password_algorithm}}">
<div class="text">{{.password_algorithm}}</div> <div class="text">{{.password_algorithm}}</div>
@ -292,40 +292,40 @@
{{end}} {{end}}
</div> </div>
</div> </div>
<span class="help">{{.locale.Tr "install.password_algorithm_helper"}}</span> <span class="help">{{ctx.Locale.Tr "install.password_algorithm_helper"}}</span>
</div> </div>
</details> </details>
<!-- Admin --> <!-- Admin -->
<details class="optional field"> <details class="optional field">
<summary class="right-content gt-py-3{{if .Err_Admin}} text red{{end}}"> <summary class="right-content gt-py-3{{if .Err_Admin}} text red{{end}}">
{{.locale.Tr "install.admin_title"}} {{ctx.Locale.Tr "install.admin_title"}}
</summary> </summary>
<p class="center">{{.locale.Tr "install.admin_setting_desc"}}</p> <p class="center">{{ctx.Locale.Tr "install.admin_setting_desc"}}</p>
<div class="inline field {{if .Err_AdminName}}error{{end}}"> <div class="inline field {{if .Err_AdminName}}error{{end}}">
<label for="admin_name">{{.locale.Tr "install.admin_name"}}</label> <label for="admin_name">{{ctx.Locale.Tr "install.admin_name"}}</label>
<input id="admin_name" name="admin_name" value="{{.admin_name}}"> <input id="admin_name" name="admin_name" value="{{.admin_name}}">
</div> </div>
<div class="inline field {{if .Err_AdminEmail}}error{{end}}"> <div class="inline field {{if .Err_AdminEmail}}error{{end}}">
<label for="admin_email">{{.locale.Tr "install.admin_email"}}</label> <label for="admin_email">{{ctx.Locale.Tr "install.admin_email"}}</label>
<input id="admin_email" name="admin_email" type="email" value="{{.admin_email}}"> <input id="admin_email" name="admin_email" type="email" value="{{.admin_email}}">
</div> </div>
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}"> <div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
<label for="admin_passwd">{{.locale.Tr "install.admin_password"}}</label> <label for="admin_passwd">{{ctx.Locale.Tr "install.admin_password"}}</label>
<input id="admin_passwd" name="admin_passwd" type="password" autocomplete="new-password" value="{{.admin_passwd}}"> <input id="admin_passwd" name="admin_passwd" type="password" autocomplete="new-password" value="{{.admin_passwd}}">
</div> </div>
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}"> <div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
<label for="admin_confirm_passwd">{{.locale.Tr "install.confirm_password"}}</label> <label for="admin_confirm_passwd">{{ctx.Locale.Tr "install.confirm_password"}}</label>
<input id="admin_confirm_passwd" name="admin_confirm_passwd" autocomplete="new-password" type="password" value="{{.admin_confirm_passwd}}"> <input id="admin_confirm_passwd" name="admin_confirm_passwd" autocomplete="new-password" type="password" value="{{.admin_confirm_passwd}}">
</div> </div>
</details> </details>
{{if .EnvConfigKeys}} {{if .EnvConfigKeys}}
<!-- Environment Config --> <!-- Environment Config -->
<h4 class="ui dividing header">{{.locale.Tr "install.env_config_keys"}}</h4> <h4 class="ui dividing header">{{ctx.Locale.Tr "install.env_config_keys"}}</h4>
<div class="inline field"> <div class="inline field">
<div class="right-content"> <div class="right-content">
{{.locale.Tr "install.env_config_keys_prompt"}} {{ctx.Locale.Tr "install.env_config_keys_prompt"}}
</div> </div>
<div class="right-content gt-mt-3"> <div class="right-content gt-mt-3">
{{range .EnvConfigKeys}}<span class="ui label">{{.}}</span>{{end}} {{range .EnvConfigKeys}}<span class="ui label">{{.}}</span>{{end}}
@ -339,7 +339,7 @@
These configuration options will be written into: {{.CustomConfFile}} These configuration options will be written into: {{.CustomConfFile}}
</div> </div>
<div class="right-content gt-mt-3"> <div class="right-content gt-mt-3">
<button class="ui primary button">{{.locale.Tr "install.install_btn_confirm"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "install.install_btn_confirm"}}</button>
</div> </div>
</div> </div>
</form> </form>

View File

@ -5,40 +5,40 @@
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{.locale.Tr "new_org"}} {{ctx.Locale.Tr "new_org"}}
</h3> </h3>
<div class="ui attached segment"> <div class="ui attached segment">
{{template "base/alert" .}} {{template "base/alert" .}}
<div class="inline required field {{if .Err_OrgName}}error{{end}}"> <div class="inline required field {{if .Err_OrgName}}error{{end}}">
<label for="org_name">{{.locale.Tr "org.org_name_holder"}}</label> <label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label>
<input id="org_name" name="org_name" value="{{.org_name}}" autofocus required maxlength="40"> <input id="org_name" name="org_name" value="{{.org_name}}" autofocus required maxlength="40">
<span class="help">{{.locale.Tr "org.org_name_helper"}}</span> <span class="help">{{ctx.Locale.Tr "org.org_name_helper"}}</span>
</div> </div>
<div class="inline field {{if .Err_OrgVisibility}}error{{end}}"> <div class="inline field {{if .Err_OrgVisibility}}error{{end}}">
<span class="inline required field"><label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label></span> <span class="inline required field"><label for="visibility">{{ctx.Locale.Tr "org.settings.visibility"}}</label></span>
<div class="inline-grouped-list"> <div class="inline-grouped-list">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}> <input class="enable-system-radio" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}>
<label>{{.locale.Tr "org.settings.visibility.public"}}</label> <label>{{ctx.Locale.Tr "org.settings.visibility.public"}}</label>
</div> </div>
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}> <input class="enable-system-radio" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}>
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label> <label>{{ctx.Locale.Tr "org.settings.visibility.limited"}}</label>
</div> </div>
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}> <input class="enable-system-radio" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}>
<label>{{.locale.Tr "org.settings.visibility.private"}}</label> <label>{{ctx.Locale.Tr "org.settings.visibility.private"}}</label>
</div> </div>
</div> </div>
</div> </div>
<div class="inline field" id="permission_box"> <div class="inline field" id="permission_box">
<label>{{.locale.Tr "org.settings.permission"}}</label> <label>{{ctx.Locale.Tr "org.settings.permission"}}</label>
<div class="inline-grouped-list"> <div class="inline-grouped-list">
<div class="ui checkbox"> <div class="ui checkbox">
<input type="checkbox" name="repo_admin_change_team_access" checked> <input type="checkbox" name="repo_admin_change_team_access" checked>
<label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label> <label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label>
</div> </div>
</div> </div>
</div> </div>
@ -46,7 +46,7 @@
<div class="inline field"> <div class="inline field">
<label></label> <label></label>
<button class="ui primary button"> <button class="ui primary button">
{{.locale.Tr "org.create_org"}} {{ctx.Locale.Tr "org.create_org"}}
</button> </button>
</div> </div>
</div> </div>

View File

@ -6,8 +6,8 @@
{{ctx.AvatarUtils.Avatar . 100}} {{ctx.AvatarUtils.Avatar . 100}}
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> <span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
<span class="org-visibility"> <span class="org-visibility">
{{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}} {{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}} {{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span> </span>
</div> </div>
</div> </div>

View File

@ -6,11 +6,11 @@
<div class="ui header gt-df gt-fw"> <div class="ui header gt-df gt-fw">
{{.Org.DisplayName}} {{.Org.DisplayName}}
<span class="org-visibility"> <span class="org-visibility">
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}} {{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
{{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}} {{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
</span> </span>
{{if .EnableFeed}} {{if .EnableFeed}}
<a class="rss-icon gt-mx-3" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{.locale.Tr "rss_feed"}}">{{svg "octicon-rss" 24}}</a> <a class="rss-icon gt-mx-3" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 24}}</a>
{{end}} {{end}}
</div> </div>
{{if $.RenderedDescription}}<div class="render-content markup">{{$.RenderedDescription|Str2html}}</div>{{end}} {{if $.RenderedDescription}}<div class="render-content markup">{{$.RenderedDescription|Str2html}}</div>{{end}}
@ -25,9 +25,9 @@
<div class="right menu"> <div class="right menu">
<button class="link-action ui basic button gt-mr-0" data-url="{{.Org.HomeLink}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}"> <button class="link-action ui basic button gt-mr-0" data-url="{{.Org.HomeLink}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}">
{{if $.IsFollowing}} {{if $.IsFollowing}}
{{.locale.Tr "user.unfollow"}} {{ctx.Locale.Tr "user.unfollow"}}
{{else}} {{else}}
{{.locale.Tr "user.follow"}} {{ctx.Locale.Tr "user.follow"}}
{{end}} {{end}}
</button> </button>
</div> </div>
@ -47,16 +47,16 @@
<div class="ui five wide column"> <div class="ui five wide column">
{{if .CanCreateOrgRepo}} {{if .CanCreateOrgRepo}}
<div class="center aligned"> <div class="center aligned">
<a class="ui primary button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.locale.Tr "new_repo"}}</a> <a class="ui primary button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo"}}</a>
{{if not .DisableNewPullMirrors}} {{if not .DisableNewPullMirrors}}
<a class="ui primary button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.locale.Tr "new_migrate"}}</a> <a class="ui primary button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{ctx.Locale.Tr "new_migrate"}}</a>
{{end}} {{end}}
</div> </div>
<div class="divider"></div> <div class="divider"></div>
{{end}} {{end}}
{{if .NumMembers}} {{if .NumMembers}}
<h4 class="ui top attached header gt-df"> <h4 class="ui top attached header gt-df">
<strong class="gt-f1">{{.locale.Tr "org.members"}}</strong> <strong class="gt-f1">{{ctx.Locale.Tr "org.members"}}</strong>
<a class="text grey gt-df gt-ac" href="{{.OrgLink}}/members"><span>{{.NumMembers}}</span> {{svg "octicon-chevron-right"}}</a> <a class="text grey gt-df gt-ac" href="{{.OrgLink}}/members"><span>{{.NumMembers}}</span> {{svg "octicon-chevron-right"}}</a>
</h4> </h4>
<div class="ui attached segment members"> <div class="ui attached segment members">
@ -70,7 +70,7 @@
{{end}} {{end}}
{{if .IsOrganizationMember}} {{if .IsOrganizationMember}}
<div class="ui top attached header gt-df"> <div class="ui top attached header gt-df">
<strong class="gt-f1">{{.locale.Tr "org.teams"}}</strong> <strong class="gt-f1">{{ctx.Locale.Tr "org.teams"}}</strong>
<a class="text grey gt-df gt-ac" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right"}}</a> <a class="text grey gt-df gt-ac" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right"}}</a>
</div> </div>
<div class="ui attached table segment teams"> <div class="ui attached table segment teams">
@ -78,15 +78,15 @@
<div class="item"> <div class="item">
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a> <a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a>
<p class="text grey"> <p class="text grey">
<a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.locale.Tr "org.lower_members"}}</a> · <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{ctx.Locale.Tr "org.lower_members"}}</a> ·
<a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.locale.Tr "org.lower_repositories"}}</a> <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{ctx.Locale.Tr "org.lower_repositories"}}</a>
</p> </p>
</div> </div>
{{end}} {{end}}
</div> </div>
{{if .IsOrganizationOwner}} {{if .IsOrganizationOwner}}
<div class="ui bottom attached segment"> <div class="ui bottom attached segment">
<a class="ui primary small button" href="{{.OrgLink}}/teams/new">{{.locale.Tr "org.create_new_team"}}</a> <a class="ui primary small button" href="{{.OrgLink}}/teams/new">{{ctx.Locale.Tr "org.create_new_team"}}</a>
</div> </div>
{{end}} {{end}}
{{end}} {{end}}

View File

@ -15,17 +15,17 @@
<div class="flex-item-title"> <div class="flex-item-title">
{{template "shared/user/name" .}} {{template "shared/user/name" .}}
{{if not $isPublic}} {{if not $isPublic}}
<span class="ui basic tiny label">{{$.locale.Tr "org.members.private"}}</span> <span class="ui basic tiny label">{{ctx.Locale.Tr "org.members.private"}}</span>
{{end}} {{end}}
</div> </div>
{{if not $.PublicOnly}} {{if not $.PublicOnly}}
<div class="flex-item-body"> <div class="flex-item-body">
{{$.locale.Tr "org.members.member_role"}} {{ctx.Locale.Tr "org.members.member_role"}}
<strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong> <strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{ctx.Locale.Tr "org.members.owner"}}{{else}}{{ctx.Locale.Tr "org.members.member"}}{{end}}</strong>
</div> </div>
{{if $.IsOrganizationOwner}} {{if $.IsOrganizationOwner}}
<div class="flex-item-body"> <div class="flex-item-body">
{{$.locale.Tr "admin.users.2fa"}} {{ctx.Locale.Tr "admin.users.2fa"}}
<strong> <strong>
{{if index $.MembersTwoFaStatus .ID}} {{if index $.MembersTwoFaStatus .ID}}
<span class="text green">{{svg "octicon-check"}}</span> <span class="text green">{{svg "octicon-check"}}</span>
@ -40,9 +40,9 @@
<div class="flex-item-trailing"> <div class="flex-item-trailing">
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}} {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}
{{if $isPublic}} {{if $isPublic}}
<a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{$.locale.Tr "org.members.public_helper"}}</a> <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{ctx.Locale.Tr "org.members.public_helper"}}</a>
{{else}} {{else}}
<a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{$.locale.Tr "org.members.private_helper"}}</a> <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{ctx.Locale.Tr "org.members.private_helper"}}</a>
{{end}} {{end}}
{{end}} {{end}}
{{if eq $.SignedUser.ID .ID}} {{if eq $.SignedUser.ID .ID}}
@ -50,14 +50,14 @@
<button class="ui red tiny button delete-button" data-modal-id="leave-organization" <button class="ui red tiny button delete-button" data-modal-id="leave-organization"
data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}" data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}" data-name="{{.DisplayName}}"
data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button> data-data-organization-name="{{$.Org.DisplayName}}">{{ctx.Locale.Tr "org.members.leave"}}</button>
</form> </form>
{{else if $.IsOrganizationOwner}} {{else if $.IsOrganizationOwner}}
<form> <form>
<button class="ui red tiny button delete-button" data-modal-id="remove-organization-member" <button class="ui red tiny button delete-button" data-modal-id="remove-organization-member"
data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}" data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}" data-name="{{.DisplayName}}"
data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button> data-data-organization-name="{{$.Org.DisplayName}}">{{ctx.Locale.Tr "org.members.remove"}}</button>
</form> </form>
{{end}} {{end}}
</div> </div>
@ -70,19 +70,19 @@
</div> </div>
<div class="ui g-modal-confirm delete modal" id="leave-organization"> <div class="ui g-modal-confirm delete modal" id="leave-organization">
<div class="header"> <div class="header">
{{$.locale.Tr "org.members.leave"}} {{ctx.Locale.Tr "org.members.leave"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{$.locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p> <p>{{ctx.Locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>
<div class="ui g-modal-confirm delete modal" id="remove-organization-member"> <div class="ui g-modal-confirm delete modal" id="remove-organization-member">
<div class="header"> <div class="header">
{{$.locale.Tr "org.members.remove"}} {{ctx.Locale.Tr "org.members.remove"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{$.locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p> <p>{{ctx.Locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -1,35 +1,35 @@
<div class="ui container"> <div class="ui container">
<div class="ui secondary stackable pointing menu"> <div class="ui secondary stackable pointing menu">
<a class="{{if .PageIsViewRepositories}}active {{end}}item" href="{{$.Org.HomeLink}}"> <a class="{{if .PageIsViewRepositories}}active {{end}}item" href="{{$.Org.HomeLink}}">
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}} {{svg "octicon-repo"}} {{ctx.Locale.Tr "user.repositories"}}
{{if .RepoCount}} {{if .RepoCount}}
<div class="ui small label">{{.RepoCount}}</div> <div class="ui small label">{{.RepoCount}}</div>
{{end}} {{end}}
</a> </a>
{{if .CanReadProjects}} {{if .CanReadProjects}}
<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects"> <a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
{{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}} {{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
</a> </a>
{{end}} {{end}}
{{if and .IsPackageEnabled .CanReadPackages}} {{if and .IsPackageEnabled .CanReadPackages}}
<a class="item" href="{{$.Org.HomeLink}}/-/packages"> <a class="item" href="{{$.Org.HomeLink}}/-/packages">
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}} {{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
</a> </a>
{{end}} {{end}}
{{if and .IsRepoIndexerEnabled .CanReadCode}} {{if and .IsRepoIndexerEnabled .CanReadCode}}
<a class="item" href="{{$.Org.HomeLink}}/-/code"> <a class="item" href="{{$.Org.HomeLink}}/-/code">
{{svg "octicon-code"}}&nbsp;{{$.locale.Tr "org.code"}} {{svg "octicon-code"}}&nbsp;{{ctx.Locale.Tr "org.code"}}
</a> </a>
{{end}} {{end}}
{{if .NumMembers}} {{if .NumMembers}}
<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members"> <a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
{{svg "octicon-person"}}&nbsp;{{$.locale.Tr "org.members"}} {{svg "octicon-person"}}&nbsp;{{ctx.Locale.Tr "org.members"}}
<div class="ui small label">{{.NumMembers}}</div> <div class="ui small label">{{.NumMembers}}</div>
</a> </a>
{{end}} {{end}}
{{if .IsOrganizationMember}} {{if .IsOrganizationMember}}
<a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams"> <a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams">
{{svg "octicon-people"}}&nbsp;{{$.locale.Tr "org.teams"}} {{svg "octicon-people"}}&nbsp;{{ctx.Locale.Tr "org.teams"}}
{{if .NumTeams}} {{if .NumTeams}}
<div class="ui small label">{{.NumTeams}}</div> <div class="ui small label">{{.NumTeams}}</div>
{{end}} {{end}}
@ -39,7 +39,7 @@
{{if .IsOrganizationOwner}} {{if .IsOrganizationOwner}}
<div class="right menu"> <div class="right menu">
<a class="{{if .PageIsOrgSettings}}active {{end}}item" href="{{.OrgLink}}/settings"> <a class="{{if .PageIsOrgSettings}}active {{end}}item" href="{{.OrgLink}}/settings">
{{svg "octicon-tools"}} {{.locale.Tr "repo.settings"}} {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
</a> </a>
</div> </div>
{{end}} {{end}}

View File

@ -1,7 +1,7 @@
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} {{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}}
<div class="org-setting-content"> <div class="org-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "settings.applications"}} {{ctx.Locale.Tr "settings.applications"}}
</h4> </h4>
{{template "user/settings/applications_oauth2_list" .}} {{template "user/settings/applications_oauth2_list" .}}

View File

@ -2,20 +2,20 @@
<div class="org-setting-content"> <div class="org-setting-content">
<h4 class="ui top attached error header"> <h4 class="ui top attached error header">
{{.locale.Tr "org.settings.delete_account"}} {{ctx.Locale.Tr "org.settings.delete_account"}}
</h4> </h4>
<div class="ui attached error segment"> <div class="ui attached error segment">
<div class="ui red message"> <div class="ui red message">
<p class="text left">{{svg "octicon-alert"}} {{.locale.Tr "org.settings.delete_prompt" | Str2html}}</p> <p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "org.settings.delete_prompt" | Str2html}}</p>
</div> </div>
<form class="ui form ignore-dirty" id="delete-form" action="{{.Link}}" method="post"> <form class="ui form ignore-dirty" id="delete-form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="inline required field {{if .Err_OrgName}}error{{end}}"> <div class="inline required field {{if .Err_OrgName}}error{{end}}">
<label for="org_name">{{.locale.Tr "org.org_name_holder"}}</label> <label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label>
<input id="org_name" name="org_name" value="" autocomplete="off" autofocus required> <input id="org_name" name="org_name" value="" autocomplete="off" autofocus required>
</div> </div>
<button class="ui red button delete-button" data-type="form" data-form="#delete-form"> <button class="ui red button delete-button" data-type="form" data-form="#delete-form">
{{.locale.Tr "org.settings.confirm_delete_account"}} {{ctx.Locale.Tr "org.settings.confirm_delete_account"}}
</button> </button>
</form> </form>
</div> </div>
@ -24,10 +24,10 @@
<div class="ui g-modal-confirm delete modal"> <div class="ui g-modal-confirm delete modal">
<div class="header"> <div class="header">
{{svg "octicon-trash"}} {{svg "octicon-trash"}}
{{.locale.Tr "org.settings.delete_org_title"}} {{ctx.Locale.Tr "org.settings.delete_org_title"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{.locale.Tr "org.settings.delete_org_desc"}}</p> <p>{{ctx.Locale.Tr "org.settings.delete_org_desc"}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -1,7 +1,7 @@
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings new webhook")}} {{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings new webhook")}}
<div class="org-setting-content"> <div class="org-setting-content">
{{$CustomHeaderTitle := .locale.Tr "repo.settings.update_webhook"}} {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}}
{{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = .locale.Tr "repo.settings.add_webhook"}}{{end}} {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}}
{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
</div> </div>
{{template "org/settings/layout_footer" .}} {{template "org/settings/layout_footer" .}}

View File

@ -2,9 +2,9 @@
<div class="org-setting-content"> <div class="org-setting-content">
<div class="gt-df gt-ac"> <div class="gt-df gt-ac">
<div class="gt-f1"> <div class="gt-f1">
{{$.locale.Tr "org.settings.labels_desc" | Str2html}} {{ctx.Locale.Tr "org.settings.labels_desc" | Str2html}}
</div> </div>
<button class="ui small primary new-label button">{{.locale.Tr "repo.issues.new_label"}}</button> <button class="ui small primary new-label button">{{ctx.Locale.Tr "repo.issues.new_label"}}</button>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
{{template "repo/issue/labels/label_new" .}} {{template "repo/issue/labels/label_new" .}}

View File

@ -1,45 +1,45 @@
<div class="four wide column"> <div class="four wide column">
<div class="ui fluid vertical menu"> <div class="ui fluid vertical menu">
<div class="header item">{{.locale.Tr "org.settings"}}</div> <div class="header item">{{ctx.Locale.Tr "org.settings"}}</div>
<a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.OrgLink}}/settings"> <a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.OrgLink}}/settings">
{{.locale.Tr "org.settings.options"}} {{ctx.Locale.Tr "org.settings.options"}}
</a> </a>
{{if not DisableWebhooks}} {{if not DisableWebhooks}}
<a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.OrgLink}}/settings/hooks"> <a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.OrgLink}}/settings/hooks">
{{.locale.Tr "repo.settings.hooks"}} {{ctx.Locale.Tr "repo.settings.hooks"}}
</a> </a>
{{end}} {{end}}
<a class="{{if .PageIsOrgSettingsLabels}}active {{end}}item" href="{{.OrgLink}}/settings/labels"> <a class="{{if .PageIsOrgSettingsLabels}}active {{end}}item" href="{{.OrgLink}}/settings/labels">
{{.locale.Tr "repo.labels"}} {{ctx.Locale.Tr "repo.labels"}}
</a> </a>
{{if .EnableOAuth2}} {{if .EnableOAuth2}}
<a class="{{if .PageIsSettingsApplications}}active {{end}}item" href="{{.OrgLink}}/settings/applications"> <a class="{{if .PageIsSettingsApplications}}active {{end}}item" href="{{.OrgLink}}/settings/applications">
{{.locale.Tr "settings.applications"}} {{ctx.Locale.Tr "settings.applications"}}
</a> </a>
{{end}} {{end}}
{{if .EnablePackages}} {{if .EnablePackages}}
<a class="{{if .PageIsSettingsPackages}}active {{end}}item" href="{{.OrgLink}}/settings/packages"> <a class="{{if .PageIsSettingsPackages}}active {{end}}item" href="{{.OrgLink}}/settings/packages">
{{.locale.Tr "packages.title"}} {{ctx.Locale.Tr "packages.title"}}
</a> </a>
{{end}} {{end}}
{{if .EnableActions}} {{if .EnableActions}}
<details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}> <details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}>
<summary>{{.locale.Tr "actions.actions"}}</summary> <summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
<div class="menu"> <div class="menu">
<a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{.OrgLink}}/settings/actions/runners"> <a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{.OrgLink}}/settings/actions/runners">
{{.locale.Tr "actions.runners"}} {{ctx.Locale.Tr "actions.runners"}}
</a> </a>
<a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{.OrgLink}}/settings/actions/secrets"> <a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{.OrgLink}}/settings/actions/secrets">
{{.locale.Tr "secrets.secrets"}} {{ctx.Locale.Tr "secrets.secrets"}}
</a> </a>
<a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{.OrgLink}}/settings/actions/variables"> <a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{.OrgLink}}/settings/actions/variables">
{{.locale.Tr "actions.variables"}} {{ctx.Locale.Tr "actions.variables"}}
</a> </a>
</div> </div>
</details> </details>
{{end}} {{end}}
<a class="{{if .PageIsSettingsDelete}}active {{end}}item" href="{{.OrgLink}}/settings/delete"> <a class="{{if .PageIsSettingsDelete}}active {{end}}item" href="{{.OrgLink}}/settings/delete">
{{.locale.Tr "org.settings.delete"}} {{ctx.Locale.Tr "org.settings.delete"}}
</a> </a>
</div> </div>
</div> </div>

View File

@ -1,69 +1,69 @@
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} {{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}}
<div class="org-setting-content"> <div class="org-setting-content">
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "org.settings.options"}} {{ctx.Locale.Tr "org.settings.options"}}
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="required field {{if .Err_Name}}error{{end}}"> <div class="required field {{if .Err_Name}}error{{end}}">
<label for="org_name">{{.locale.Tr "org.org_name_holder"}} <label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}
<span class="text red gt-hidden" id="org-name-change-prompt"> <span class="text red gt-hidden" id="org-name-change-prompt">
<br>{{.locale.Tr "org.settings.change_orgname_prompt"}}<br>{{.locale.Tr "org.settings.change_orgname_redirect_prompt"}} <br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{.locale.Tr "org.settings.change_orgname_redirect_prompt"}}
</span> </span>
</label> </label>
<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required maxlength="40"> <input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required maxlength="40">
</div> </div>
<div class="field {{if .Err_FullName}}error{{end}}"> <div class="field {{if .Err_FullName}}error{{end}}">
<label for="full_name">{{.locale.Tr "org.org_full_name_holder"}}</label> <label for="full_name">{{ctx.Locale.Tr "org.org_full_name_holder"}}</label>
<input id="full_name" name="full_name" value="{{.Org.FullName}}" maxlength="100"> <input id="full_name" name="full_name" value="{{.Org.FullName}}" maxlength="100">
</div> </div>
<div class="field {{if .Err_Email}}error{{end}}"> <div class="field {{if .Err_Email}}error{{end}}">
<label for="email">{{.locale.Tr "org.settings.email"}}</label> <label for="email">{{ctx.Locale.Tr "org.settings.email"}}</label>
<input id="email" name="email" type="email" value="{{.Org.Email}}" maxlength="255"> <input id="email" name="email" type="email" value="{{.Org.Email}}" maxlength="255">
</div> </div>
<div class="field {{if .Err_Description}}error{{end}}"> <div class="field {{if .Err_Description}}error{{end}}">
<label for="description">{{$.locale.Tr "org.org_desc"}}</label> <label for="description">{{ctx.Locale.Tr "org.org_desc"}}</label>
<textarea id="description" name="description" rows="2" maxlength="255">{{.Org.Description}}</textarea> <textarea id="description" name="description" rows="2" maxlength="255">{{.Org.Description}}</textarea>
</div> </div>
<div class="field {{if .Err_Website}}error{{end}}"> <div class="field {{if .Err_Website}}error{{end}}">
<label for="website">{{.locale.Tr "org.settings.website"}}</label> <label for="website">{{ctx.Locale.Tr "org.settings.website"}}</label>
<input id="website" name="website" type="url" value="{{.Org.Website}}" maxlength="255"> <input id="website" name="website" type="url" value="{{.Org.Website}}" maxlength="255">
</div> </div>
<div class="field"> <div class="field">
<label for="location">{{.locale.Tr "org.settings.location"}}</label> <label for="location">{{ctx.Locale.Tr "org.settings.location"}}</label>
<input id="location" name="location" value="{{.Org.Location}}" maxlength="50"> <input id="location" name="location" value="{{.Org.Location}}" maxlength="50">
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div class="field" id="visibility_box"> <div class="field" id="visibility_box">
<label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label> <label for="visibility">{{ctx.Locale.Tr "org.settings.visibility"}}</label>
<div class="field"> <div class="field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}> <input class="enable-system-radio" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}>
<label>{{.locale.Tr "org.settings.visibility.public"}}</label> <label>{{ctx.Locale.Tr "org.settings.visibility.public"}}</label>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}> <input class="enable-system-radio" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}>
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label> <label>{{ctx.Locale.Tr "org.settings.visibility.limited"}}</label>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}> <input class="enable-system-radio" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}>
<label>{{.locale.Tr "org.settings.visibility.private"}}</label> <label>{{ctx.Locale.Tr "org.settings.visibility.private"}}</label>
</div> </div>
</div> </div>
</div> </div>
<div class="field" id="permission_box"> <div class="field" id="permission_box">
<label>{{.locale.Tr "org.settings.permission"}}</label> <label>{{ctx.Locale.Tr "org.settings.permission"}}</label>
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<input type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}> <input type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}>
<label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label> <label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label>
</div> </div>
</div> </div>
</div> </div>
@ -72,14 +72,14 @@
<div class="divider"></div> <div class="divider"></div>
<div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}"> <div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
<label for="max_repo_creation">{{.locale.Tr "admin.users.max_repo_creation"}}</label> <label for="max_repo_creation">{{ctx.Locale.Tr "admin.users.max_repo_creation"}}</label>
<input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.Org.MaxRepoCreation}}"> <input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.Org.MaxRepoCreation}}">
<p class="help">{{.locale.Tr "admin.users.max_repo_creation_desc"}}</p> <p class="help">{{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}</p>
</div> </div>
{{end}} {{end}}
<div class="field"> <div class="field">
<button class="ui primary button">{{$.locale.Tr "org.settings.update_settings"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "org.settings.update_settings"}}</button>
</div> </div>
</form> </form>
@ -88,13 +88,13 @@
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data"> <form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="inline field"> <div class="inline field">
<label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label> <label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp"> <input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
</div> </div>
<div class="field"> <div class="field">
<button class="ui primary button">{{$.locale.Tr "settings.update_avatar"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button>
<button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button> <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button>
</div> </div>
</form> </form>
</div> </div>

View File

@ -7,14 +7,14 @@
{{ctx.AvatarUtils.Avatar .Organization 140}} {{ctx.AvatarUtils.Avatar .Organization 140}}
</div> </div>
<div class="content"> <div class="content">
<div class="header">{{.locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name | Str2html}}</div> <div class="header">{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name | Str2html}}</div>
<div class="meta">{{.locale.Tr "org.teams.invite.by" .Inviter.Name}}</div> <div class="meta">{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}</div>
<div class="description">{{.locale.Tr "org.teams.invite.description"}}</div> <div class="description">{{ctx.Locale.Tr "org.teams.invite.description"}}</div>
</div> </div>
<div class="extra content"> <div class="extra content">
<form class="ui form" action="" method="post"> <form class="ui form" action="" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button class="fluid ui primary button">{{.locale.Tr "org.teams.join"}}</button> <button class="fluid ui primary button">{{ctx.Locale.Tr "org.teams.join"}}</button>
</form> </form>
</div> </div>
</div> </div>

View File

@ -12,12 +12,12 @@
<form class="ui form ignore-dirty gt-df gt-fw gt-gap-3" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post"> <form class="ui form ignore-dirty gt-df gt-fw gt-gap-3" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="uid" value="{{.SignedUser.ID}}"> <input type="hidden" name="uid" value="{{.SignedUser.ID}}">
<div id="search-user-box" class="ui search gt-mr-3"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{.locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}> <div id="search-user-box" class="ui search gt-mr-3"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{ctx.Locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}>
<div class="ui input"> <div class="ui input">
<input class="prompt" name="uname" placeholder="{{.locale.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required> <input class="prompt" name="uname" placeholder="{{ctx.Locale.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
</div> </div>
</div> </div>
<button class="ui primary button">{{.locale.Tr "org.teams.add_team_member"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "org.teams.add_team_member"}}</button>
</form> </form>
</div> </div>
{{end}} {{end}}
@ -39,20 +39,20 @@
<button class="ui red button delete-button" data-modal-id="remove-team-member" <button class="ui red button delete-button" data-modal-id="remove-team-member"
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}" data-name="{{.DisplayName}}"
data-data-team-name="{{$.Team.Name}}">{{$.locale.Tr "org.members.remove"}}</button> data-data-team-name="{{$.Team.Name}}">{{ctx.Locale.Tr "org.members.remove"}}</button>
</form> </form>
{{end}} {{end}}
</div> </div>
</div> </div>
{{else}} {{else}}
<div class="flex-item"> <div class="flex-item">
<span class="text grey italic">{{$.locale.Tr "org.teams.members.none"}}</span> <span class="text grey italic">{{ctx.Locale.Tr "org.teams.members.none"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>
</div> </div>
{{if and .Invites $.IsOrganizationOwner}} {{if and .Invites $.IsOrganizationOwner}}
<h4 class="ui top attached header">{{$.locale.Tr "org.teams.invite_team_member.list"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "org.teams.invite_team_member.list"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="flex-list"> <div class="flex-list">
{{range .Invites}} {{range .Invites}}
@ -64,7 +64,7 @@
<form action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove_invite" method="post"> <form action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove_invite" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="iid" value="{{.ID}}"> <input type="hidden" name="iid" value="{{.ID}}">
<button class="ui red button">{{$.locale.Tr "org.members.remove"}}</button> <button class="ui red button">{{ctx.Locale.Tr "org.members.remove"}}</button>
</form> </form>
</div> </div>
</div> </div>
@ -78,10 +78,10 @@
</div> </div>
<div class="ui g-modal-confirm delete modal" id="remove-team-member"> <div class="ui g-modal-confirm delete modal" id="remove-team-member">
<div class="header"> <div class="header">
{{$.locale.Tr "org.members.remove"}} {{ctx.Locale.Tr "org.members.remove"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{$.locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p> <p>{{ctx.Locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -1,4 +1,4 @@
<div class="ui top attached tabular menu org-team-navbar"> <div class="ui top attached tabular menu org-team-navbar">
<a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{$.locale.Tr "org.lower_members"}}</a> <a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{ctx.Locale.Tr "org.lower_members"}}</a>
<a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{$.locale.Tr "org.lower_repositories"}}</a> <a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{ctx.Locale.Tr "org.lower_repositories"}}</a>
</div> </div>

View File

@ -7,82 +7,82 @@
<form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/delete" method="post"> <form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/delete" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{if .PageIsOrgTeamsNew}}{{.locale.Tr "org.create_new_team"}}{{else}}{{.locale.Tr "org.teams.settings"}}{{end}} {{if .PageIsOrgTeamsNew}}{{ctx.Locale.Tr "org.create_new_team"}}{{else}}{{.locale.Tr "org.teams.settings"}}{{end}}
</h3> </h3>
<div class="ui attached segment"> <div class="ui attached segment">
{{template "base/alert" .}} {{template "base/alert" .}}
<div class="required field {{if .Err_TeamName}}error{{end}}"> <div class="required field {{if .Err_TeamName}}error{{end}}">
<label for="team_name">{{.locale.Tr "org.team_name"}}</label> <label for="team_name">{{ctx.Locale.Tr "org.team_name"}}</label>
{{if eq .Team.LowerName "owners"}} {{if eq .Team.LowerName "owners"}}
<input type="hidden" name="team_name" value="{{.Team.Name}}"> <input type="hidden" name="team_name" value="{{.Team.Name}}">
{{end}} {{end}}
<input id="team_name" name="team_name" value="{{.Team.Name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus> <input id="team_name" name="team_name" value="{{.Team.Name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus>
<span class="help">{{.locale.Tr "org.team_name_helper"}}</span> <span class="help">{{ctx.Locale.Tr "org.team_name_helper"}}</span>
</div> </div>
<div class="field {{if .Err_Description}}error{{end}}"> <div class="field {{if .Err_Description}}error{{end}}">
<label for="description">{{.locale.Tr "org.team_desc"}}</label> <label for="description">{{ctx.Locale.Tr "org.team_desc"}}</label>
<input id="description" name="description" value="{{.Team.Description}}"> <input id="description" name="description" value="{{.Team.Description}}">
<span class="help">{{.locale.Tr "org.team_desc_helper"}}</span> <span class="help">{{ctx.Locale.Tr "org.team_desc_helper"}}</span>
</div> </div>
{{if not (eq .Team.LowerName "owners")}} {{if not (eq .Team.LowerName "owners")}}
<div class="grouped field"> <div class="grouped field">
<label>{{.locale.Tr "org.team_access_desc"}}</label> <label>{{ctx.Locale.Tr "org.team_access_desc"}}</label>
<br> <br>
<div class="field"> <div class="field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input type="radio" name="repo_access" value="specific" {{if not .Team.IncludesAllRepositories}}checked{{end}}> <input type="radio" name="repo_access" value="specific" {{if not .Team.IncludesAllRepositories}}checked{{end}}>
<label>{{.locale.Tr "org.teams.specific_repositories"}}</label> <label>{{ctx.Locale.Tr "org.teams.specific_repositories"}}</label>
<span class="help">{{.locale.Tr "org.teams.specific_repositories_helper" | Str2html}}</span> <span class="help">{{ctx.Locale.Tr "org.teams.specific_repositories_helper" | Str2html}}</span>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input type="radio" name="repo_access" value="all" {{if .Team.IncludesAllRepositories}}checked{{end}}> <input type="radio" name="repo_access" value="all" {{if .Team.IncludesAllRepositories}}checked{{end}}>
<label>{{.locale.Tr "org.teams.all_repositories"}}</label> <label>{{ctx.Locale.Tr "org.teams.all_repositories"}}</label>
<span class="help">{{.locale.Tr "org.teams.all_repositories_helper" | Str2html}}</span> <span class="help">{{ctx.Locale.Tr "org.teams.all_repositories_helper" | Str2html}}</span>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<label for="can_create_org_repo">{{.locale.Tr "org.teams.can_create_org_repo"}}</label> <label for="can_create_org_repo">{{ctx.Locale.Tr "org.teams.can_create_org_repo"}}</label>
<input id="can_create_org_repo" name="can_create_org_repo" type="checkbox" {{if .Team.CanCreateOrgRepo}}checked{{end}}> <input id="can_create_org_repo" name="can_create_org_repo" type="checkbox" {{if .Team.CanCreateOrgRepo}}checked{{end}}>
<span class="help">{{.locale.Tr "org.teams.can_create_org_repo_helper"}}</span> <span class="help">{{ctx.Locale.Tr "org.teams.can_create_org_repo_helper"}}</span>
</div> </div>
</div> </div>
</div> </div>
<div class="grouped field"> <div class="grouped field">
<label>{{.locale.Tr "org.team_permission_desc"}}</label> <label>{{ctx.Locale.Tr "org.team_permission_desc"}}</label>
<br> <br>
<div class="field"> <div class="field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.AccessMode 1) (eq .Team.AccessMode 2)}}checked{{end}}> <input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.AccessMode 1) (eq .Team.AccessMode 2)}}checked{{end}}>
<label>{{.locale.Tr "org.teams.general_access"}}</label> <label>{{ctx.Locale.Tr "org.teams.general_access"}}</label>
<span class="help">{{.locale.Tr "org.teams.general_access_helper"}}</span> <span class="help">{{ctx.Locale.Tr "org.teams.general_access_helper"}}</span>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input type="radio" name="permission" value="admin" {{if eq .Team.AccessMode 3}}checked{{end}}> <input type="radio" name="permission" value="admin" {{if eq .Team.AccessMode 3}}checked{{end}}>
<label>{{.locale.Tr "org.teams.admin_access"}}</label> <label>{{ctx.Locale.Tr "org.teams.admin_access"}}</label>
<span class="help">{{.locale.Tr "org.teams.admin_access_helper"}}</span> <span class="help">{{ctx.Locale.Tr "org.teams.admin_access_helper"}}</span>
</div> </div>
</div> </div>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
<div class="team-units required grouped field {{if eq .Team.AccessMode 3}}gt-hidden{{end}}"> <div class="team-units required grouped field {{if eq .Team.AccessMode 3}}gt-hidden{{end}}">
<label>{{.locale.Tr "org.team_unit_desc"}}</label> <label>{{ctx.Locale.Tr "org.team_unit_desc"}}</label>
<table class="ui celled table"> <table class="ui celled table">
<thead> <thead>
<tr> <tr>
<th>{{.locale.Tr "units.unit"}}</th> <th>{{ctx.Locale.Tr "units.unit"}}</th>
<th class="center aligned">{{.locale.Tr "org.teams.none_access"}} <th class="center aligned">{{ctx.Locale.Tr "org.teams.none_access"}}
<span class="gt-vm" data-tooltip-content="{{.locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> <span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
<th class="center aligned">{{.locale.Tr "org.teams.read_access"}} <th class="center aligned">{{ctx.Locale.Tr "org.teams.read_access"}}
<span class="gt-vm" data-tooltip-content="{{.locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> <span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
<th class="center aligned">{{.locale.Tr "org.teams.write_access"}} <th class="center aligned">{{ctx.Locale.Tr "org.teams.write_access"}}
<span class="gt-vm" data-tooltip-content="{{.locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> <span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -90,26 +90,26 @@
{{if ge $unit.MaxPerm 2}} {{if ge $unit.MaxPerm 2}}
<tr> <tr>
<td> <td>
<div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{$.locale.Tr "repo.unit_disabled"}}"{{- else -}}class="field"{{end}}> <div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{- else -}}class="field"{{end}}>
<div> <div>
<label>{{$.locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.locale.Tr "org.team_unit_disabled"}}{{end}}</label> <label>{{ctx.Locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{ctx.Locale.Tr "org.team_unit_disabled"}}{{end}}</label>
<span class="help">{{$.locale.Tr $unit.DescKey}}</span> <span class="help">{{ctx.Locale.Tr $unit.DescKey}}</span>
</div> </div>
</div> </div>
</td> </td>
<td class="center aligned"> <td class="center aligned">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input type="radio" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{$.locale.Tr "org.teams.none_access"}}"> <input type="radio" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{ctx.Locale.Tr "org.teams.none_access"}}">
</div> </div>
</td> </td>
<td class="center aligned"> <td class="center aligned">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input type="radio" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.read_access"}}"> <input type="radio" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{ctx.Locale.Tr "org.teams.read_access"}}">
</div> </div>
</td> </td>
<td class="center aligned"> <td class="center aligned">
<div class="ui radio checkbox"> <div class="ui radio checkbox">
<input type="radio" name="unit_{{$unit.Type.Value}}" value="2"{{if (ge ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.write_access"}}"> <input type="radio" name="unit_{{$unit.Type.Value}}" value="2"{{if (ge ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{ctx.Locale.Tr "org.teams.write_access"}}">
</div> </div>
</td> </td>
</tr> </tr>
@ -119,11 +119,11 @@
</table> </table>
{{range $t, $unit := $.Units}} {{range $t, $unit := $.Units}}
{{if lt $unit.MaxPerm 2}} {{if lt $unit.MaxPerm 2}}
<div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{$.locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}> <div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
<div class="ui checkbox"> <div class="ui checkbox">
<input type="checkbox" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}> <input type="checkbox" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
<label>{{$.locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.locale.Tr "org.team_unit_disabled"}}{{end}}</label> <label>{{ctx.Locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{ctx.Locale.Tr "org.team_unit_disabled"}}{{end}}</label>
<span class="help">{{$.locale.Tr $unit.DescKey}}</span> <span class="help">{{ctx.Locale.Tr $unit.DescKey}}</span>
</div> </div>
</div> </div>
{{end}} {{end}}
@ -133,11 +133,11 @@
<div class="field"> <div class="field">
{{if .PageIsOrgTeamsNew}} {{if .PageIsOrgTeamsNew}}
<button class="ui primary button">{{.locale.Tr "org.create_team"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "org.create_team"}}</button>
{{else}} {{else}}
<button class="ui primary button">{{.locale.Tr "org.teams.update_settings"}}</button> <button class="ui primary button">{{ctx.Locale.Tr "org.teams.update_settings"}}</button>
{{if not (eq .Team.LowerName "owners")}} {{if not (eq .Team.LowerName "owners")}}
<button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.Team.Name | PathEscape}}/delete">{{.locale.Tr "org.teams.delete_team"}}</button> <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.Team.Name | PathEscape}}/delete">{{ctx.Locale.Tr "org.teams.delete_team"}}</button>
{{end}} {{end}}
{{end}} {{end}}
</div> </div>
@ -151,10 +151,10 @@
<div class="ui g-modal-confirm delete modal"> <div class="ui g-modal-confirm delete modal">
<div class="header"> <div class="header">
{{svg "octicon-trash"}} {{svg "octicon-trash"}}
{{.locale.Tr "org.teams.delete_team_title"}} {{ctx.Locale.Tr "org.teams.delete_team_title"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{.locale.Tr "org.teams.delete_team_desc"}}</p> <p>{{ctx.Locale.Tr "org.teams.delete_team_desc"}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -14,14 +14,14 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search"> <div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
<div class="ui input"> <div class="ui input">
<input class="prompt" name="repo_name" placeholder="{{.locale.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required> <input class="prompt" name="repo_name" placeholder="{{ctx.Locale.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
</div> </div>
</div> </div>
<button class="ui primary button gt-ml-3">{{.locale.Tr "add"}}</button> <button class="ui primary button gt-ml-3">{{ctx.Locale.Tr "add"}}</button>
</form> </form>
<div class="gt-dib"> <div class="gt-dib">
<button class="ui primary button link-action" data-modal-confirm="{{.locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{.locale.Tr "add_all"}}</button> <button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{.locale.Tr "add_all"}}</button>
<button class="ui red button link-action" data-modal-confirm="{{.locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{.locale.Tr "remove_all"}}</button> <button class="ui red button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{.locale.Tr "remove_all"}}</button>
</div> </div>
</div> </div>
{{end}} {{end}}
@ -41,14 +41,14 @@
{{if $canAddRemove}} {{if $canAddRemove}}
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove"> <form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button> <button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{ctx.Locale.Tr "remove"}}</button>
</form> </form>
{{end}} {{end}}
</div> </div>
</div> </div>
{{else}} {{else}}
<div class="flex-item"> <div class="flex-item">
<span class="text grey italic">{{$.locale.Tr "org.teams.repos.none"}}</span> <span class="text grey italic">{{ctx.Locale.Tr "org.teams.repos.none"}}</span>
</div> </div>
{{end}} {{end}}
</div> </div>

View File

@ -6,13 +6,13 @@
<form> <form>
<button class="ui red tiny button delete-button" data-modal-id="leave-team-sidebar" <button class="ui red tiny button delete-button" data-modal-id="leave-team-sidebar"
data-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}" data-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
data-name="{{.Team.Name}}">{{$.locale.Tr "org.teams.leave"}}</button> data-name="{{.Team.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
</form> </form>
{{else if .IsOrganizationOwner}} {{else if .IsOrganizationOwner}}
<form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/join"> <form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/join">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="page" value="team"> <input type="hidden" name="page" value="team">
<button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button> <button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
</form> </form>
{{end}} {{end}}
</div> </div>
@ -22,51 +22,51 @@
{{if .Team.Description}} {{if .Team.Description}}
{{.Team.Description}} {{.Team.Description}}
{{else}} {{else}}
<span class="text grey italic">{{.locale.Tr "org.teams.no_desc"}}</span> <span class="text grey italic">{{ctx.Locale.Tr "org.teams.no_desc"}}</span>
{{end}} {{end}}
</div> </div>
{{if eq .Team.LowerName "owners"}} {{if eq .Team.LowerName "owners"}}
<div class="item"> <div class="item">
{{.locale.Tr "org.teams.owners_permission_desc" | Str2html}} {{ctx.Locale.Tr "org.teams.owners_permission_desc" | Str2html}}
</div> </div>
{{else}} {{else}}
<div class="item"> <div class="item">
<h3>{{.locale.Tr "org.team_access_desc"}}</h3> <h3>{{ctx.Locale.Tr "org.team_access_desc"}}</h3>
<ul> <ul>
{{if .Team.IncludesAllRepositories}} {{if .Team.IncludesAllRepositories}}
<li>{{.locale.Tr "org.teams.all_repositories" | Str2html}}</li> <li>{{ctx.Locale.Tr "org.teams.all_repositories" | Str2html}}</li>
{{else}} {{else}}
<li>{{.locale.Tr "org.teams.specific_repositories" | Str2html}}</li> <li>{{ctx.Locale.Tr "org.teams.specific_repositories" | Str2html}}</li>
{{end}} {{end}}
{{if .Team.CanCreateOrgRepo}} {{if .Team.CanCreateOrgRepo}}
<li>{{.locale.Tr "org.teams.can_create_org_repo"}}</li> <li>{{ctx.Locale.Tr "org.teams.can_create_org_repo"}}</li>
{{end}} {{end}}
</ul> </ul>
{{if (eq .Team.AccessMode 2)}} {{if (eq .Team.AccessMode 2)}}
<h3>{{.locale.Tr "org.settings.permission"}}</h3> <h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3>
{{.locale.Tr "org.teams.write_permission_desc" | Str2html}} {{ctx.Locale.Tr "org.teams.write_permission_desc" | Str2html}}
{{else if (eq .Team.AccessMode 3)}} {{else if (eq .Team.AccessMode 3)}}
<h3>{{.locale.Tr "org.settings.permission"}}</h3> <h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3>
{{.locale.Tr "org.teams.admin_permission_desc" | Str2html}} {{ctx.Locale.Tr "org.teams.admin_permission_desc" | Str2html}}
{{else}} {{else}}
<table class="ui table"> <table class="ui table">
<thead> <thead>
<tr> <tr>
<th>{{.locale.Tr "units.unit"}}</th> <th>{{ctx.Locale.Tr "units.unit"}}</th>
<th>{{.locale.Tr "org.team_permission_desc"}}</th> <th>{{ctx.Locale.Tr "org.team_permission_desc"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{range $t, $unit := $.Units}} {{range $t, $unit := $.Units}}
{{if (not $unit.Type.UnitGlobalDisabled)}} {{if (not $unit.Type.UnitGlobalDisabled)}}
<tr> <tr>
<td><strong>{{$.locale.Tr $unit.NameKey}}</strong></td> <td><strong>{{ctx.Locale.Tr $unit.NameKey}}</strong></td>
<td>{{if eq ($.Team.UnitAccessMode $.Context $unit.Type) 0 -}} <td>{{if eq ($.Team.UnitAccessMode $.Context $unit.Type) 0 -}}
{{$.locale.Tr "org.teams.none_access"}} {{ctx.Locale.Tr "org.teams.none_access"}}
{{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1) -}} {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1) -}}
{{$.locale.Tr "org.teams.read_access"}} {{ctx.Locale.Tr "org.teams.read_access"}}
{{- else if eq ($.Team.UnitAccessMode $.Context $unit.Type) 2 -}} {{- else if eq ($.Team.UnitAccessMode $.Context $unit.Type) 2 -}}
{{$.locale.Tr "org.teams.write_access"}} {{ctx.Locale.Tr "org.teams.write_access"}}
{{- end}}</td> {{- end}}</td>
</tr> </tr>
{{end}} {{end}}
@ -79,16 +79,16 @@
</div> </div>
{{if .IsOrganizationOwner}} {{if .IsOrganizationOwner}}
<div class="ui bottom attached segment"> <div class="ui bottom attached segment">
<a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit">{{svg "octicon-gear"}} {{$.locale.Tr "org.teams.settings"}}</a> <a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit">{{svg "octicon-gear"}} {{ctx.Locale.Tr "org.teams.settings"}}</a>
</div> </div>
{{end}} {{end}}
</div> </div>
<div class="ui g-modal-confirm delete modal" id="leave-team-sidebar"> <div class="ui g-modal-confirm delete modal" id="leave-team-sidebar">
<div class="header"> <div class="header">
{{$.locale.Tr "org.teams.leave"}} {{ctx.Locale.Tr "org.teams.leave"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{$.locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p> <p>{{ctx.Locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -5,7 +5,7 @@
{{template "base/alert" .}} {{template "base/alert" .}}
{{if .IsOrganizationOwner}} {{if .IsOrganizationOwner}}
<div class="text right"> <div class="text right">
<a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{.locale.Tr "org.create_new_team"}}</a> <a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{ctx.Locale.Tr "org.create_new_team"}}</a>
</div> </div>
<div class="divider"></div> <div class="divider"></div>
{{end}} {{end}}
@ -20,12 +20,12 @@
<form> <form>
<button class="ui red tiny button delete-button" data-modal-id="leave-team" <button class="ui red tiny button delete-button" data-modal-id="leave-team"
data-url="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}" data-url="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
data-name="{{.Name}}">{{$.locale.Tr "org.teams.leave"}}</button> data-name="{{.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
</form> </form>
{{else if $.IsOrganizationOwner}} {{else if $.IsOrganizationOwner}}
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/join"> <form method="post" action="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/join">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<button type="submit" class="ui primary small button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button> <button type="submit" class="ui primary small button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
</form> </form>
{{end}} {{end}}
</div> </div>
@ -36,7 +36,7 @@
{{end}} {{end}}
</div> </div>
<div class="ui bottom attached header"> <div class="ui bottom attached header">
<p class="team-meta">{{.NumMembers}} {{$.locale.Tr "org.lower_members"}} · {{.NumRepos}} {{$.locale.Tr "org.lower_repositories"}}</p> <p class="team-meta">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}} · {{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</p>
</div> </div>
</div> </div>
{{end}} {{end}}
@ -45,10 +45,10 @@
</div> </div>
<div class="ui g-modal-confirm delete modal" id="leave-team"> <div class="ui g-modal-confirm delete modal" id="leave-team">
<div class="header"> <div class="header">
{{$.locale.Tr "org.teams.leave"}} {{ctx.Locale.Tr "org.teams.leave"}}
</div> </div>
<div class="content"> <div class="content">
<p>{{$.locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p> <p>{{ctx.Locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
</div> </div>
{{template "base/modal_actions_confirm" .}} {{template "base/modal_actions_confirm" .}}
</div> </div>

View File

@ -1,42 +1,42 @@
{{if eq .PackageDescriptor.Package.Type "alpine"}} {{if eq .PackageDescriptor.Package.Type "alpine"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.alpine.registry" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.alpine.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code><gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/alpine"></gitea-origin-url>/$branch/$repository</code></pre></div> <div class="markup"><pre class="code-block"><code><gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/alpine"></gitea-origin-url>/$branch/$repository</code></pre></div>
<p>{{.locale.Tr "packages.alpine.registry.info" | Safe}}</p> <p>{{ctx.Locale.Tr "packages.alpine.registry.info" | Safe}}</p>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.alpine.registry.key" | Safe}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.alpine.registry.key" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>curl -JO <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/alpine/key"></gitea-origin-url></code></pre></div> <div class="markup"><pre class="code-block"><code>curl -JO <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/alpine/key"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.alpine.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.alpine.install"}}</label>
<div class="markup"> <div class="markup">
<pre class="code-block"><code>sudo apk add {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}</code></pre> <pre class="code-block"><code>sudo apk add {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}</code></pre>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Alpine" "https://docs.gitea.com/usage/packages/alpine/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Alpine" "https://docs.gitea.com/usage/packages/alpine/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
<h4 class="ui top attached header">{{.locale.Tr "packages.alpine.repository"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.alpine.repository"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<tbody> <tbody>
<tr> <tr>
<td class="collapsing"><h5>{{.locale.Tr "packages.alpine.repository.branches"}}</h5></td> <td class="collapsing"><h5>{{ctx.Locale.Tr "packages.alpine.repository.branches"}}</h5></td>
<td>{{StringUtils.Join .Branches ", "}}</td> <td>{{StringUtils.Join .Branches ", "}}</td>
</tr> </tr>
<tr> <tr>
<td class="collapsing"><h5>{{.locale.Tr "packages.alpine.repository.repositories"}}</h5></td> <td class="collapsing"><h5>{{ctx.Locale.Tr "packages.alpine.repository.repositories"}}</h5></td>
<td>{{StringUtils.Join .Repositories ", "}}</td> <td>{{StringUtils.Join .Repositories ", "}}</td>
</tr> </tr>
<tr> <tr>
<td class="collapsing"><h5>{{.locale.Tr "packages.alpine.repository.architectures"}}</h5></td> <td class="collapsing"><h5>{{ctx.Locale.Tr "packages.alpine.repository.architectures"}}</h5></td>
<td>{{StringUtils.Join .Architectures ", "}}</td> <td>{{StringUtils.Join .Architectures ", "}}</td>
</tr> </tr>
</tbody> </tbody>
@ -44,7 +44,7 @@
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{.PackageDescriptor.Metadata.Description}} {{.PackageDescriptor.Metadata.Description}}
</div> </div>

View File

@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "cargo"}} {{if eq .PackageDescriptor.Package.Type "cargo"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.cargo.registry" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.cargo.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>[registry] <div class="markup"><pre class="code-block"><code>[registry]
default = "gitea" default = "gitea"
@ -15,29 +15,29 @@ index = "<gitea-origin-url data-url="sparse+{{AppSubUrl}}/api/packages/{{.Packag
git-fetch-with-cli = true</code></pre></div> git-fetch-with-cli = true</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.cargo.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.cargo.install"}}</label>
<div class="markup"><pre class="code-block"><code>cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Cargo" "https://docs.gitea.com/usage/packages/cargo/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Cargo" "https://docs.gitea.com/usage/packages/cargo/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}} {{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment">{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}</div>{{end}} {{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment">{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}</div>{{end}}
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Dependencies}} {{if .PackageDescriptor.Metadata.Dependencies}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<thead> <thead>
<tr> <tr>
<th class="ten wide">{{.locale.Tr "packages.dependency.id"}}</th> <th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
<th class="six wide">{{.locale.Tr "packages.dependency.version"}}</th> <th class="six wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -53,7 +53,7 @@ git-fetch-with-cli = true</code></pre></div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Keywords}} {{if .PackageDescriptor.Metadata.Keywords}}
<h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}} {{range .PackageDescriptor.Metadata.Keywords}}
{{.}} {{.}}

View File

@ -1,23 +1,23 @@
{{if eq .PackageDescriptor.Package.Type "chef"}} {{if eq .PackageDescriptor.Package.Type "chef"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.chef.registry" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.chef.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>knife[:supermarket_site] = '<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/chef"></gitea-origin-url>'</code></pre></div> <div class="markup"><pre class="code-block"><code>knife[:supermarket_site] = '<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/chef"></gitea-origin-url>'</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.chef.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.chef.install"}}</label>
<div class="markup"><pre class="code-block"><code>knife supermarket install {{.PackageDescriptor.Package.Name}} {{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>knife supermarket install {{.PackageDescriptor.Package.Name}} {{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Chef" "https://docs.gitea.com/usage/packages/chef/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Chef" "https://docs.gitea.com/usage/packages/chef/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription}} {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Description}}<p>{{.PackageDescriptor.Metadata.Description}}</p>{{end}} {{if .PackageDescriptor.Metadata.Description}}<p>{{.PackageDescriptor.Metadata.Description}}</p>{{end}}
{{if .PackageDescriptor.Metadata.LongDescription}}{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.LongDescription}}{{end}} {{if .PackageDescriptor.Metadata.LongDescription}}{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.LongDescription}}{{end}}
@ -25,13 +25,13 @@
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Dependencies}} {{if .PackageDescriptor.Metadata.Dependencies}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<thead> <thead>
<tr> <tr>
<th class="eleven wide">{{.locale.Tr "packages.dependency.id"}}</th> <th class="eleven wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
<th class="five wide">{{.locale.Tr "packages.dependency.version"}}</th> <th class="five wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "composer"}} {{if eq .PackageDescriptor.Package.Type "composer"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.composer.registry" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.composer.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>{ <div class="markup"><pre class="code-block"><code>{
"repositories": [{ "repositories": [{
"type": "composer", "type": "composer",
@ -13,34 +13,34 @@
}</code></pre></div> }</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.composer.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.composer.install"}}</label>
<div class="markup"><pre class="code-block"><code>composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Composer" "https://docs.gitea.com/usage/packages/composer/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Composer" "https://docs.gitea.com/usage/packages/composer/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{.PackageDescriptor.Metadata.Description}} {{.PackageDescriptor.Metadata.Description}}
</div> </div>
{{end}} {{end}}
{{if or .PackageDescriptor.Metadata.Require .PackageDescriptor.Metadata.RequireDev}} {{if or .PackageDescriptor.Metadata.Require .PackageDescriptor.Metadata.RequireDev}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui list"> <div class="ui list">
{{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (.locale.Tr "packages.composer.dependencies")}} {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (ctx.Locale.Tr "packages.composer.dependencies")}}
{{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (.locale.Tr "packages.composer.dependencies.development")}} {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (ctx.Locale.Tr "packages.composer.dependencies.development")}}
</div> </div>
</div> </div>
{{end}} {{end}}
{{if or .PackageDescriptor.Metadata.Keywords}} {{if or .PackageDescriptor.Metadata.Keywords}}
<h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}} {{range .PackageDescriptor.Metadata.Keywords}}
{{.}} {{.}}

View File

@ -3,8 +3,8 @@
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<thead> <thead>
<tr> <tr>
<th class="eleven wide">{{.root.locale.Tr "packages.dependency.id"}}</th> <th class="eleven wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
<th class="five wide">{{.root.locale.Tr "packages.dependency.version"}}</th> <th class="five wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,30 +1,30 @@
{{if eq .PackageDescriptor.Package.Type "conan"}} {{if eq .PackageDescriptor.Package.Type "conan"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.conan.registry"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.conan.registry"}}</label>
<div class="markup"><pre class="code-block"><code>conan remote add gitea <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conan"></gitea-origin-url></code></pre></div> <div class="markup"><pre class="code-block"><code>conan remote add gitea <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conan"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.conan.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.conan.install"}}</label>
<div class="markup"><pre class="code-block"><code>conan install --remote=gitea {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>conan install --remote=gitea {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Conan" "https://docs.gitea.com/usage/packages/conan/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Conan" "https://docs.gitea.com/usage/packages/conan/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}} {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
</div> </div>
{{end}} {{end}}
{{if or .PackageDescriptor.Metadata.Keywords}} {{if or .PackageDescriptor.Metadata.Keywords}}
<h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}} {{range .PackageDescriptor.Metadata.Keywords}}
{{.}} {{.}}

View File

@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "conda"}} {{if eq .PackageDescriptor.Package.Type "conda"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.conda.registry" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.conda.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>channel_alias: <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></gitea-origin-url> <div class="markup"><pre class="code-block"><code>channel_alias: <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></gitea-origin-url>
channels: channels:
&#32;&#32;- <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></gitea-origin-url> &#32;&#32;- <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></gitea-origin-url>
@ -11,18 +11,18 @@ default_channels:
&#32;&#32;- <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></gitea-origin-url></code></pre></div> &#32;&#32;- <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/conda"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.conda.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.conda.install"}}</label>
{{$channel := .PackageDescriptor.PackageProperties.GetByName "conda.channel"}} {{$channel := .PackageDescriptor.PackageProperties.GetByName "conda.channel"}}
<div class="markup"><pre class="code-block"><code>conda install{{if $channel}} -c {{$channel}}{{end}} {{.PackageDescriptor.PackageProperties.GetByName "conda.name"}}={{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>conda install{{if $channel}} -c {{$channel}}{{end}} {{.PackageDescriptor.PackageProperties.GetByName "conda.name"}}={{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Conda" "https://docs.gitea.com/usage/packages/conda/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Conda" "https://docs.gitea.com/usage/packages/conda/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Summary}} {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Summary}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{else}}{{.PackageDescriptor.Metadata.Summary}}{{end}} {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{else}}{{.PackageDescriptor.Metadata.Summary}}{{end}}
</div> </div>

View File

@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "container"}} {{if eq .PackageDescriptor.Package.Type "container"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.container.pull"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.container.pull"}}</label>
{{if eq .PackageDescriptor.Metadata.Type "helm"}} {{if eq .PackageDescriptor.Metadata.Type "helm"}}
<div class="markup"><pre class="code-block"><code>helm pull oci://{{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}} --version {{.PackageDescriptor.Version.LowerVersion}}</code></pre></div> <div class="markup"><pre class="code-block"><code>helm pull oci://{{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}} --version {{.PackageDescriptor.Version.LowerVersion}}</code></pre></div>
{{else}} {{else}}
@ -15,23 +15,23 @@
{{end}} {{end}}
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.container.digest"}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.container.digest"}}</label>
<div class="markup"><pre class="code-block"><code>{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}</code></pre></div> <div class="markup"><pre class="code-block"><code>{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Container" "https://docs.gitea.com/usage/packages/container/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Container" "https://docs.gitea.com/usage/packages/container/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if .PackageDescriptor.Metadata.Manifests}} {{if .PackageDescriptor.Metadata.Manifests}}
<h4 class="ui top attached header">{{.locale.Tr "packages.container.multi_arch"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.container.multi_arch"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui very basic compact table"> <table class="ui very basic compact table">
<thead> <thead>
<tr> <tr>
<th>{{.locale.Tr "packages.container.digest"}}</th> <th>{{ctx.Locale.Tr "packages.container.digest"}}</th>
<th>{{.locale.Tr "packages.container.multi_arch"}}</th> <th>{{ctx.Locale.Tr "packages.container.multi_arch"}}</th>
<th>{{.locale.Tr "admin.packages.size"}}</th> <th>{{ctx.Locale.Tr "admin.packages.size"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -47,13 +47,13 @@
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{.PackageDescriptor.Metadata.Description}} {{.PackageDescriptor.Metadata.Description}}
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.ImageLayers}} {{if .PackageDescriptor.Metadata.ImageLayers}}
<h4 class="ui top attached header">{{.locale.Tr "packages.container.layers"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.container.layers"}}</h4>
<div class="ui attached segment gt-word-break"> <div class="ui attached segment gt-word-break">
<table class="ui very basic compact table"> <table class="ui very basic compact table">
<tbody> <tbody>
@ -67,13 +67,13 @@
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Labels}} {{if .PackageDescriptor.Metadata.Labels}}
<h4 class="ui top attached header">{{.locale.Tr "packages.container.labels"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.container.labels"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui very basic compact table"> <table class="ui very basic compact table">
<thead> <thead>
<tr> <tr>
<th>{{.locale.Tr "packages.container.labels.key"}}</th> <th>{{ctx.Locale.Tr "packages.container.labels.key"}}</th>
<th>{{.locale.Tr "packages.container.labels.value"}}</th> <th>{{ctx.Locale.Tr "packages.container.labels.value"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,30 +1,30 @@
{{if eq .PackageDescriptor.Package.Type "cran"}} {{if eq .PackageDescriptor.Package.Type "cran"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.cran.registry" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.cran.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>options("repos" = c(getOption("repos"), c(gitea="<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cran"></gitea-origin-url>")))</code></pre></div> <div class="markup"><pre class="code-block"><code>options("repos" = c(getOption("repos"), c(gitea="<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/cran"></gitea-origin-url>")))</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.cran.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.cran.install"}}</label>
<div class="markup"><pre class="code-block"><code>install.packages("{{.PackageDescriptor.Package.Name}}")</code></pre></div> <div class="markup"><pre class="code-block"><code>install.packages("{{.PackageDescriptor.Package.Name}}")</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "CRAN" "https://docs.gitea.com/usage/packages/cran/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "CRAN" "https://docs.gitea.com/usage/packages/cran/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Title}} {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Title}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Title}}{{else}}{{end}} {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Title}}{{else}}{{end}}
</div> </div>
{{end}} {{end}}
{{if or .PackageDescriptor.Metadata.Imports .PackageDescriptor.Metadata.Depends .PackageDescriptor.Metadata.LinkingTo .PackageDescriptor.Metadata.Suggests}} {{if or .PackageDescriptor.Metadata.Imports .PackageDescriptor.Metadata.Depends .PackageDescriptor.Metadata.LinkingTo .PackageDescriptor.Metadata.Suggests}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<tbody> <tbody>

View File

@ -1,40 +1,40 @@
{{if eq .PackageDescriptor.Package.Type "debian"}} {{if eq .PackageDescriptor.Package.Type "debian"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.debian.registry"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.debian.registry"}}</label>
<div class="markup"><pre class="code-block"><code>sudo curl <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key"></gitea-origin-url> -o /etc/apt/trusted.gpg.d/gitea-{{$.PackageDescriptor.Owner.Name}}.asc <div class="markup"><pre class="code-block"><code>sudo curl <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key"></gitea-origin-url> -o /etc/apt/trusted.gpg.d/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
echo "deb <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian"></gitea-origin-url> $distribution $component" | sudo tee -a /etc/apt/sources.list.d/gitea.list echo "deb <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/debian"></gitea-origin-url> $distribution $component" | sudo tee -a /etc/apt/sources.list.d/gitea.list
sudo apt update</code></pre></div> sudo apt update</code></pre></div>
<p>{{.locale.Tr "packages.debian.registry.info" | Safe}}</p> <p>{{ctx.Locale.Tr "packages.debian.registry.info" | Safe}}</p>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.debian.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.debian.install"}}</label>
<div class="markup"> <div class="markup">
<pre class="code-block"><code>sudo apt install {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}</code></pre> <pre class="code-block"><code>sudo apt install {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}</code></pre>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Debian" "https://docs.gitea.com/usage/packages/debian/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Debian" "https://docs.gitea.com/usage/packages/debian/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
<h4 class="ui top attached header">{{.locale.Tr "packages.debian.repository"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.debian.repository"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<tbody> <tbody>
<tr> <tr>
<td class="collapsing"><h5>{{.locale.Tr "packages.debian.repository.distributions"}}</h5></td> <td class="collapsing"><h5>{{ctx.Locale.Tr "packages.debian.repository.distributions"}}</h5></td>
<td>{{StringUtils.Join .Distributions ", "}}</td> <td>{{StringUtils.Join .Distributions ", "}}</td>
</tr> </tr>
<tr> <tr>
<td class="collapsing"><h5>{{.locale.Tr "packages.debian.repository.components"}}</h5></td> <td class="collapsing"><h5>{{ctx.Locale.Tr "packages.debian.repository.components"}}</h5></td>
<td>{{StringUtils.Join .Components ", "}}</td> <td>{{StringUtils.Join .Components ", "}}</td>
</tr> </tr>
<tr> <tr>
<td class="collapsing"><h5>{{.locale.Tr "packages.debian.repository.architectures"}}</h5></td> <td class="collapsing"><h5>{{ctx.Locale.Tr "packages.debian.repository.architectures"}}</h5></td>
<td>{{StringUtils.Join .Architectures ", "}}</td> <td>{{StringUtils.Join .Architectures ", "}}</td>
</tr> </tr>
</tbody> </tbody>
@ -42,14 +42,14 @@ sudo apt update</code></pre></div>
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{.PackageDescriptor.Metadata.Description}} {{.PackageDescriptor.Metadata.Description}}
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Dependencies}} {{if .PackageDescriptor.Metadata.Dependencies}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<tbody> <tbody>

View File

@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "generic"}} {{if eq .PackageDescriptor.Package.Type "generic"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.generic.download"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.generic.download"}}</label>
<div class="markup"><pre class="code-block"><code> <div class="markup"><pre class="code-block"><code>
{{- range .PackageDescriptor.Files -}} {{- range .PackageDescriptor.Files -}}
curl <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/generic/{{$.PackageDescriptor.Package.Name}}/{{$.PackageDescriptor.Version.Version}}/{{.File.Name}}"></gitea-origin-url> curl <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/generic/{{$.PackageDescriptor.Package.Name}}/{{$.PackageDescriptor.Version.Version}}/{{.File.Name}}"></gitea-origin-url>
@ -11,7 +11,7 @@ curl <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescripto
</code></pre></div> </code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Generic" "https://docs.gitea.com/usage/packages/generic" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Generic" "https://docs.gitea.com/usage/packages/generic" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,13 +1,13 @@
{{if eq .PackageDescriptor.Package.Type "go"}} {{if eq .PackageDescriptor.Package.Type "go"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.go.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.go.install"}}</label>
<div class="markup"><pre class="code-block"><code>GOPROXY=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/go"></gitea-origin-url> go install {{$.PackageDescriptor.Package.Name}}@{{$.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>GOPROXY=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/go"></gitea-origin-url> go install {{$.PackageDescriptor.Package.Name}}@{{$.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Go" "https://docs.gitea.com/usage/packages/go" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Go" "https://docs.gitea.com/usage/packages/go" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,37 +1,37 @@
{{if eq .PackageDescriptor.Package.Type "helm"}} {{if eq .PackageDescriptor.Package.Type "helm"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.helm.registry"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.helm.registry"}}</label>
<div class="markup"><pre class="code-block"><code>helm repo add {{AppDomain}} <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/helm"></gitea-origin-url> <div class="markup"><pre class="code-block"><code>helm repo add {{AppDomain}} <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/helm"></gitea-origin-url>
helm repo update</code></pre></div> helm repo update</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.helm.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.helm.install"}}</label>
<div class="markup"><pre class="code-block"><code>helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}</code></pre></div> <div class="markup"><pre class="code-block"><code>helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Helm" "https://docs.gitea.com/usage/packages/helm/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Helm" "https://docs.gitea.com/usage/packages/helm/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{.PackageDescriptor.Metadata.Description}} {{.PackageDescriptor.Metadata.Description}}
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Dependencies}} {{if .PackageDescriptor.Metadata.Dependencies}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<thead> <thead>
<tr> <tr>
<th class="ten wide">{{.locale.Tr "packages.dependency.id"}}</th> <th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
<th class="six wide">{{.locale.Tr "packages.dependency.version"}}</th> <th class="six wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -47,7 +47,7 @@ helm repo update</code></pre></div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Keywords}} {{if .PackageDescriptor.Metadata.Keywords}}
<h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}} {{range .PackageDescriptor.Metadata.Keywords}}
{{.}} {{.}}

View File

@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "maven"}} {{if eq .PackageDescriptor.Package.Type "maven"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.maven.registry" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.maven.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>&lt;repositories&gt; <div class="markup"><pre class="code-block"><code>&lt;repositories&gt;
&lt;repository&gt; &lt;repository&gt;
&lt;id&gt;gitea&lt;/id&gt; &lt;id&gt;gitea&lt;/id&gt;
@ -24,7 +24,7 @@
&lt;/distributionManagement&gt;</code></pre></div> &lt;/distributionManagement&gt;</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.maven.install" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.maven.install" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>&lt;dependency&gt; <div class="markup"><pre class="code-block"><code>&lt;dependency&gt;
&lt;groupId&gt;{{.PackageDescriptor.Metadata.GroupID}}&lt;/groupId&gt; &lt;groupId&gt;{{.PackageDescriptor.Metadata.GroupID}}&lt;/groupId&gt;
&lt;artifactId&gt;{{.PackageDescriptor.Metadata.ArtifactID}}&lt;/artifactId&gt; &lt;artifactId&gt;{{.PackageDescriptor.Metadata.ArtifactID}}&lt;/artifactId&gt;
@ -32,28 +32,28 @@
&lt;/dependency&gt;</code></pre></div> &lt;/dependency&gt;</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.maven.install2"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.maven.install2"}}</label>
<div class="markup"><pre class="code-block"><code>mvn install</code></pre></div> <div class="markup"><pre class="code-block"><code>mvn install</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.maven.download"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.maven.download"}}</label>
<div class="markup"><pre class="code-block"><code>mvn dependency:get -DremoteRepositories=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></gitea-origin-url> -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>mvn dependency:get -DremoteRepositories=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/maven"></gitea-origin-url> -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Maven" "https://docs.gitea.com/usage/packages/maven/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Maven" "https://docs.gitea.com/usage/packages/maven/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{.PackageDescriptor.Metadata.Description}} {{.PackageDescriptor.Metadata.Description}}
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Dependencies}} {{if .PackageDescriptor.Metadata.Dependencies}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui list"> <div class="ui list">
{{range .PackageDescriptor.Metadata.Dependencies}} {{range .PackageDescriptor.Metadata.Dependencies}}

View File

@ -1,27 +1,27 @@
{{if eq .PackageDescriptor.Package.Type "npm"}} {{if eq .PackageDescriptor.Package.Type "npm"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.npm.registry" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.npm.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>{{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/npm/"></gitea-origin-url></code></pre></div> <div class="markup"><pre class="code-block"><code>{{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/npm/"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.npm.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.npm.install"}}</label>
<div class="markup"><pre class="code-block"><code>npm install {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div> <div class="markup"><pre class="code-block"><code>npm install {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.npm.install2"}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.npm.install2"}}</label>
<div class="markup"><pre class="code-block"><code>&quot;{{.PackageDescriptor.Package.Name}}&quot;: &quot;{{.PackageDescriptor.Version.Version}}&quot;</code></pre></div> <div class="markup"><pre class="code-block"><code>&quot;{{.PackageDescriptor.Package.Name}}&quot;: &quot;{{.PackageDescriptor.Version.Version}}&quot;</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "npm" "https://docs.gitea.com/usage/packages/npm/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "npm" "https://docs.gitea.com/usage/packages/npm/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Readme}} {{if .PackageDescriptor.Metadata.Readme}}
<div class="markup markdown"> <div class="markup markdown">
@ -34,19 +34,19 @@
{{end}} {{end}}
{{if or .PackageDescriptor.Metadata.Dependencies .PackageDescriptor.Metadata.DevelopmentDependencies .PackageDescriptor.Metadata.PeerDependencies .PackageDescriptor.Metadata.OptionalDependencies}} {{if or .PackageDescriptor.Metadata.Dependencies .PackageDescriptor.Metadata.DevelopmentDependencies .PackageDescriptor.Metadata.PeerDependencies .PackageDescriptor.Metadata.OptionalDependencies}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui list"> <div class="ui list">
{{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Dependencies "title" (.locale.Tr "packages.npm.dependencies")}} {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Dependencies "title" (ctx.Locale.Tr "packages.npm.dependencies")}}
{{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (.locale.Tr "packages.npm.dependencies.development")}} {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.development")}}
{{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.PeerDependencies "title" (.locale.Tr "packages.npm.dependencies.peer")}} {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.PeerDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.peer")}}
{{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.OptionalDependencies "title" (.locale.Tr "packages.npm.dependencies.optional")}} {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.OptionalDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.optional")}}
</div> </div>
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Keywords}} {{if .PackageDescriptor.Metadata.Keywords}}
<h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}} {{range .PackageDescriptor.Metadata.Keywords}}
{{.}} {{.}}

View File

@ -3,8 +3,8 @@
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<thead> <thead>
<tr> <tr>
<th class="eleven wide">{{.root.locale.Tr "packages.dependency.id"}}</th> <th class="eleven wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
<th class="five wide">{{.root.locale.Tr "packages.dependency.version"}}</th> <th class="five wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,23 +1,23 @@
{{if eq .PackageDescriptor.Package.Type "nuget"}} {{if eq .PackageDescriptor.Package.Type "nuget"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.nuget.registry"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.nuget.registry"}}</label>
<div class="markup"><pre class="code-block"><code>dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json"></gitea-origin-url></code></pre></div> <div class="markup"><pre class="code-block"><code>dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.nuget.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.nuget.install"}}</label>
<div class="markup"><pre class="code-block"><code>dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div> <div class="markup"><pre class="code-block"><code>dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "NuGet" "https://docs.gitea.com/usage/packages/nuget/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "NuGet" "https://docs.gitea.com/usage/packages/nuget/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes}} {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}} {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
{{if .PackageDescriptor.Metadata.ReleaseNotes}}{{Str2html .PackageDescriptor.Metadata.ReleaseNotes}}{{end}} {{if .PackageDescriptor.Metadata.ReleaseNotes}}{{Str2html .PackageDescriptor.Metadata.ReleaseNotes}}{{end}}
@ -25,14 +25,14 @@
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Dependencies}} {{if .PackageDescriptor.Metadata.Dependencies}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<thead> <thead>
<tr> <tr>
<th class="ten wide">{{.locale.Tr "packages.dependency.id"}}</th> <th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
<th class="three wide">{{.locale.Tr "packages.dependency.version"}}</th> <th class="three wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
<th class="three wide">{{.locale.Tr "packages.nuget.dependency.framework"}}</th> <th class="three wide">{{ctx.Locale.Tr "packages.nuget.dependency.framework"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,18 +1,18 @@
{{if eq .PackageDescriptor.Package.Type "pub"}} {{if eq .PackageDescriptor.Package.Type "pub"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.pub.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.pub.install"}}</label>
<div class="markup"><pre class="code-block"><code>dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pub/"></gitea-origin-url></code></pre></div> <div class="markup"><pre class="code-block"><code>dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pub/"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Pub" "https://docs.gitea.com/usage/packages/pub/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Pub" "https://docs.gitea.com/usage/packages/pub/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}} {{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
{{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment">{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}</div>{{end}} {{if .PackageDescriptor.Metadata.Readme}}<div class="ui attached segment">{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}</div>{{end}}
{{end}} {{end}}

View File

@ -1,18 +1,18 @@
{{if eq .PackageDescriptor.Package.Type "pypi"}} {{if eq .PackageDescriptor.Package.Type "pypi"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.pypi.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.pypi.install"}}</label>
<div class="markup"><pre class="code-block"><code>pip install --index-url <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple/"></gitea-origin-url> {{.PackageDescriptor.Package.Name}}</code></pre></div> <div class="markup"><pre class="code-block"><code>pip install --index-url <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple/"></gitea-origin-url> {{.PackageDescriptor.Package.Name}}</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "PyPI" "https://docs.gitea.com/usage/packages/pypi/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "PyPI" "https://docs.gitea.com/usage/packages/pypi/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}} {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<p>{{if .PackageDescriptor.Metadata.Summary}}{{.PackageDescriptor.Metadata.Summary}}{{end}}</p> <p>{{if .PackageDescriptor.Metadata.Summary}}{{.PackageDescriptor.Metadata.Summary}}{{end}}</p>
{{if .PackageDescriptor.Metadata.LongDescription}} {{if .PackageDescriptor.Metadata.LongDescription}}
@ -23,9 +23,9 @@
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.RequiresPython}} {{if .PackageDescriptor.Metadata.RequiresPython}}
<h4 class="ui top attached header">{{.locale.Tr "packages.requirements"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.requirements"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{.locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}} {{ctx.Locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}}
</div> </div>
{{end}} {{end}}
{{end}} {{end}}

View File

@ -1,33 +1,33 @@
{{if eq .PackageDescriptor.Package.Type "rpm"}} {{if eq .PackageDescriptor.Package.Type "rpm"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rpm.registry"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.rpm.registry"}}</label>
<div class="markup"><pre class="code-block"><code># {{.locale.Tr "packages.rpm.distro.redhat"}} <div class="markup"><pre class="code-block"><code># {{ctx.Locale.Tr "packages.rpm.distro.redhat"}}
dnf config-manager --add-repo <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm.repo"></gitea-origin-url> dnf config-manager --add-repo <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm.repo"></gitea-origin-url>
# {{.locale.Tr "packages.rpm.distro.suse"}} # {{ctx.Locale.Tr "packages.rpm.distro.suse"}}
zypper addrepo <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm.repo"></gitea-origin-url></code></pre></div> zypper addrepo <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm.repo"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rpm.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.rpm.install"}}</label>
<div class="markup"> <div class="markup">
<pre class="code-block"><code># {{.locale.Tr "packages.rpm.distro.redhat"}} <pre class="code-block"><code># {{ctx.Locale.Tr "packages.rpm.distro.redhat"}}
dnf install {{$.PackageDescriptor.Package.Name}} dnf install {{$.PackageDescriptor.Package.Name}}
# {{.locale.Tr "packages.rpm.distro.suse"}} # {{ctx.Locale.Tr "packages.rpm.distro.suse"}}
zypper install {{$.PackageDescriptor.Package.Name}}</code></pre> zypper install {{$.PackageDescriptor.Package.Name}}</code></pre>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "RPM" "https://docs.gitea.com/usage/packages/rpm/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "RPM" "https://docs.gitea.com/usage/packages/rpm/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if or .PackageDescriptor.Metadata.Summary .PackageDescriptor.Metadata.Description}} {{if or .PackageDescriptor.Metadata.Summary .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
{{if .PackageDescriptor.Metadata.Summary}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Summary}}</div>{{end}} {{if .PackageDescriptor.Metadata.Summary}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Summary}}</div>{{end}}
{{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}} {{if .PackageDescriptor.Metadata.Description}}<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>{{end}}
{{end}} {{end}}

View File

@ -1,39 +1,39 @@
{{if eq .PackageDescriptor.Package.Type "rubygems"}} {{if eq .PackageDescriptor.Package.Type "rubygems"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rubygems.install" | Safe}}:</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.rubygems.install" | Safe}}:</label>
<div class="markup"><pre class="code-block"><code>gem install {{.PackageDescriptor.Package.Name}} --version &quot;{{.PackageDescriptor.Version.Version}}&quot; --source &quot;<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems"></gitea-origin-url>&quot;</code></pre></div> <div class="markup"><pre class="code-block"><code>gem install {{.PackageDescriptor.Package.Name}} --version &quot;{{.PackageDescriptor.Version.Version}}&quot; --source &quot;<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems"></gitea-origin-url>&quot;</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.rubygems.install2"}}:</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.rubygems.install2"}}:</label>
<div class="markup"><pre class="code-block"><code>source "<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems"></gitea-origin-url>" do <div class="markup"><pre class="code-block"><code>source "<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems"></gitea-origin-url>" do
gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}" gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}"
end</code></pre></div> end</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "RubyGems" "https://docs.gitea.com/usage/packages/rubygems/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "RubyGems" "https://docs.gitea.com/usage/packages/rubygems/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div> <div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>
{{end}} {{end}}
{{if or .PackageDescriptor.Metadata.RequiredRubyVersion .PackageDescriptor.Metadata.RequiredRubygemsVersion}} {{if or .PackageDescriptor.Metadata.RequiredRubyVersion .PackageDescriptor.Metadata.RequiredRubygemsVersion}}
<h4 class="ui top attached header">{{.locale.Tr "packages.requirements"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.requirements"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .PackageDescriptor.Metadata.RequiredRubyVersion}}<p>{{.locale.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}} {{if .PackageDescriptor.Metadata.RequiredRubyVersion}}<p>{{ctx.Locale.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}}
{{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}<p>{{.locale.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}} {{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}<p>{{ctx.Locale.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}}
</div> </div>
{{end}} {{end}}
{{if or .PackageDescriptor.Metadata.RuntimeDependencies .PackageDescriptor.Metadata.DevelopmentDependencies}} {{if or .PackageDescriptor.Metadata.RuntimeDependencies .PackageDescriptor.Metadata.DevelopmentDependencies}}
<h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui list"> <div class="ui list">
{{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RuntimeDependencies "title" (.locale.Tr "packages.rubygems.dependencies.runtime")}} {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RuntimeDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.runtime")}}
{{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (.locale.Tr "packages.rubygems.dependencies.development")}} {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.development")}}
</div> </div>
</div> </div>
{{end}} {{end}}

View File

@ -3,8 +3,8 @@
<table class="ui single line very basic table"> <table class="ui single line very basic table">
<thead> <thead>
<tr> <tr>
<th class="eleven wide">{{.root.locale.Tr "packages.dependency.id"}}</th> <th class="eleven wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th>
<th class="five wide">{{.root.locale.Tr "packages.dependency.version"}}</th> <th class="five wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -1,36 +1,36 @@
{{if eq .PackageDescriptor.Package.Type "swift"}} {{if eq .PackageDescriptor.Package.Type "swift"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.swift.registry"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.swift.registry"}}</label>
<div class="markup"><pre class="code-block"><code>swift package-registry set <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/swift"></gitea-origin-url></code></pre></div> <div class="markup"><pre class="code-block"><code>swift package-registry set <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/swift"></gitea-origin-url></code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-code"}} {{.locale.Tr "packages.swift.install" | Safe}}</label> <label>{{svg "octicon-code"}} {{ctx.Locale.Tr "packages.swift.install" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>dependencies: [ <div class="markup"><pre class="code-block"><code>dependencies: [
.package(id: "{{.PackageDescriptor.Package.Name}}", from:"{{.PackageDescriptor.Version.Version}}") .package(id: "{{.PackageDescriptor.Package.Name}}", from:"{{.PackageDescriptor.Version.Version}}")
]</code></pre></div> ]</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.swift.install2"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.swift.install2"}}</label>
<div class="markup"><pre class="code-block"><code>swift package resolve</code></pre></div> <div class="markup"><pre class="code-block"><code>swift package resolve</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Swift" "https://docs.gitea.com/usage/packages/swift/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Swift" "https://docs.gitea.com/usage/packages/swift/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}} {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
</div> </div>
{{end}} {{end}}
{{if .PackageDescriptor.Metadata.Keywords}} {{if .PackageDescriptor.Metadata.Keywords}}
<h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}} {{range .PackageDescriptor.Metadata.Keywords}}
{{.}} {{.}}

View File

@ -1,18 +1,18 @@
{{if eq .PackageDescriptor.Package.Type "vagrant"}} {{if eq .PackageDescriptor.Package.Type "vagrant"}}
<h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment"> <div class="ui attached segment">
<div class="ui form"> <div class="ui form">
<div class="field"> <div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.vagrant.install"}}</label> <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.vagrant.install"}}</label>
<div class="markup"><pre class="code-block"><code>vagrant box add --box-version {{.PackageDescriptor.Version.Version}} "<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/vagrant/{{.PackageDescriptor.Package.Name}}"></gitea-origin-url>"</code></pre></div> <div class="markup"><pre class="code-block"><code>vagrant box add --box-version {{.PackageDescriptor.Version.Version}} "<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/vagrant/{{.PackageDescriptor.Package.Name}}"></gitea-origin-url>"</code></pre></div>
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "packages.registry.documentation" "Vagrant" "https://docs.gitea.com/usage/packages/vagrant/" | Safe}}</label> <label>{{ctx.Locale.Tr "packages.registry.documentation" "Vagrant" "https://docs.gitea.com/usage/packages/vagrant/" | Safe}}</label>
</div> </div>
</div> </div>
</div> </div>
{{if .PackageDescriptor.Metadata.Description}} {{if .PackageDescriptor.Metadata.Description}}
<h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div> <div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>
{{end}} {{end}}
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "alpine"}} {{if eq .PackageDescriptor.Package.Type "alpine"}}
{{if .PackageDescriptor.Metadata.Maintainer}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}</div>{{end}} {{if .PackageDescriptor.Metadata.Maintainer}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{$.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{end}} {{end}}

View File

@ -1,7 +1,7 @@
{{if eq .PackageDescriptor.Package.Type "cargo"}} {{if eq .PackageDescriptor.Package.Type "cargo"}}
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}</div>{{end}} {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.cargo.details.repository_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.cargo.details.repository_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.cargo.details.documentation_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.cargo.details.documentation_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{$.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "chef"}} {{if eq .PackageDescriptor.Package.Type "chef"}}
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}} {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.repository_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{$.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "composer"}} {{if eq .PackageDescriptor.Package.Type "composer"}}
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}</div>{{end}} {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}</div>{{end}}
{{if .PackageDescriptor.Metadata.Homepage}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.Homepage}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.Homepage}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.Homepage}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{range .PackageDescriptor.Metadata.License}}<div class="item" title="{{$.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}</div>{{end}} {{range .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}</div>{{end}}
{{end}} {{end}}

View File

@ -1,6 +1,6 @@
{{if eq .PackageDescriptor.Package.Type "conan"}} {{if eq .PackageDescriptor.Package.Type "conan"}}
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}} {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.conan.details.repository"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.conan.details.repository"}}</a></div>{{end}}
{{end}} {{end}}

View File

@ -1,6 +1,6 @@
{{if eq .PackageDescriptor.Package.Type "conda"}} {{if eq .PackageDescriptor.Package.Type "conda"}}
{{if .PackageDescriptor.Metadata.License}}<div class="item">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.conda.details.repository_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.conda.details.repository_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.conda.details.documentation_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.conda.details.documentation_site"}}</a></div>{{end}}
{{end}} {{end}}

View File

@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "container"}} {{if eq .PackageDescriptor.Package.Type "container"}}
<div class="item" title="{{.locale.Tr "packages.container.details.type"}}">{{svg "octicon-package" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}</div> <div class="item" title="{{ctx.Locale.Tr "packages.container.details.type"}}">{{svg "octicon-package" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}</div>
{{if .PackageDescriptor.Metadata.Platform}}<div class="item" title="{{$.locale.Tr "packages.container.details.platform"}}">{{svg "octicon-cpu" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Platform}}</div>{{end}} {{if .PackageDescriptor.Metadata.Platform}}<div class="item" title="{{ctx.Locale.Tr "packages.container.details.platform"}}">{{svg "octicon-cpu" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Platform}}</div>{{end}}
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}</div>{{end}} {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}</div>{{end}}
{{if .PackageDescriptor.Metadata.Licenses}}<div class="item">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Licenses}}</div>{{end}} {{if .PackageDescriptor.Metadata.Licenses}}<div class="item">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Licenses}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.repository_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.documentation_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "cran"}} {{if eq .PackageDescriptor.Package.Type "cran"}}
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.}}</div>{{end}} {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.}}</div>{{end}}
{{range .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.}}" target="_blank" rel="noopener noreferrer me">{{$.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{range .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{end}} {{end}}

View File

@ -1,4 +1,4 @@
{{if eq .PackageDescriptor.Package.Type "debian"}} {{if eq .PackageDescriptor.Package.Type "debian"}}
{{if .PackageDescriptor.Metadata.Maintainer}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}</div>{{end}} {{if .PackageDescriptor.Metadata.Maintainer}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{end}} {{end}}

View File

@ -1,4 +1,4 @@
{{if eq .PackageDescriptor.Package.Type "helm"}} {{if eq .PackageDescriptor.Package.Type "helm"}}
{{range .PackageDescriptor.Metadata.Maintainers}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}</div>{{end}} {{range .PackageDescriptor.Metadata.Maintainers}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}</div>{{end}}
{{if .PackageDescriptor.Metadata.Home}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.Home}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.Home}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.Home}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "maven"}} {{if eq .PackageDescriptor.Package.Type "maven"}}
{{if .PackageDescriptor.Metadata.Name}}<div class="item">{{svg "octicon-note" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Name}}</div>{{end}} {{if .PackageDescriptor.Metadata.Name}}<div class="item">{{svg "octicon-note" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Name}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{$.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}</div>{{end}} {{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}</div>{{end}}
{{end}} {{end}}

View File

@ -1,8 +1,8 @@
{{if eq .PackageDescriptor.Package.Type "npm"}} {{if eq .PackageDescriptor.Package.Type "npm"}}
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}} {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{range .PackageDescriptor.VersionProperties}} {{range .PackageDescriptor.VersionProperties}}
{{if eq .Name "npm.tag"}}<div class="item" title="{{$.locale.Tr "packages.npm.details.tag"}}">{{svg "octicon-versions" 16 "gt-mr-3"}} {{.Value}}</div>{{end}} {{if eq .Name "npm.tag"}}<div class="item" title="{{ctx.Locale.Tr "packages.npm.details.tag"}}">{{svg "octicon-versions" 16 "gt-mr-3"}} {{.Value}}</div>{{end}}
{{end}} {{end}}
{{end}} {{end}}

View File

@ -1,4 +1,4 @@
{{if eq .PackageDescriptor.Package.Type "nuget"}} {{if eq .PackageDescriptor.Package.Type "nuget"}}
{{if .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Authors}}</div>{{end}} {{if .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Authors}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "pub"}} {{if eq .PackageDescriptor.Package.Type "pub"}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.repository_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.repository_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.documentation_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.documentation_site"}}</a></div>{{end}}
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "pypi"}} {{if eq .PackageDescriptor.Package.Type "pypi"}}
{{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}} {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{ctx.Locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{end}} {{end}}

View File

@ -1,4 +1,4 @@
{{if eq .PackageDescriptor.Package.Type "rpm"}} {{if eq .PackageDescriptor.Package.Type "rpm"}}
{{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}} {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{ctx.Locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}} {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{ctx.Locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{end}} {{end}}

Some files were not shown because too many files have changed in this diff Show More