diff --git a/conf/locale/locale_de-DE.ini b/conf/locale/locale_de-DE.ini index dbf31a32..2d22d049 100755 --- a/conf/locale/locale_de-DE.ini +++ b/conf/locale/locale_de-DE.ini @@ -631,6 +631,7 @@ config.db_path_helper=(nur für "sqlite3") config.service_config=Service-Einstellungen config.register_email_confirm=E-Mail-Bestätigung bei Registrierung config.disable_register=Registrierung deaktivieren +config.show_registration_button = Registrierungs-Button anzeigen config.require_sign_in_view=Ansehen erfordert Registrierung config.mail_notify=E-Mail-Benachrichtigung config.enable_cache_avatar=Avatar-Cache aktivieren diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini index 660fb253..4b8325ef 100644 --- a/conf/locale/locale_en-US.ini +++ b/conf/locale/locale_en-US.ini @@ -635,6 +635,7 @@ config.db_path_helper = (for "sqlite3" only) config.service_config = Service Configuration config.register_email_confirm = Require E-mail Confirmation config.disable_register = Disable Registration +config.show_registration_button = Show Register Button config.require_sign_in_view = Require Sign In View config.mail_notify = Mail Notification config.enable_cache_avatar = Enable Cache Avatar diff --git a/conf/locale/locale_fr-CA.ini b/conf/locale/locale_fr-CA.ini index 833d8e1d..06a810e5 100755 --- a/conf/locale/locale_fr-CA.ini +++ b/conf/locale/locale_fr-CA.ini @@ -631,6 +631,7 @@ config.db_path_helper=("sqlite3" uniquement) config.service_config=Configuration du Service config.register_email_confirm=Require E-mail Confirmation config.disable_register=Désactiver l'Enregistrement +config.show_registration_button = Affichage bouton Se inscrire config.require_sign_in_view=Connexion Obligatoire pour Visualiser config.mail_notify=Mailer les Notifications config.enable_cache_avatar=Activer le Cache d'Avatar diff --git a/conf/locale/locale_ja-JP.ini b/conf/locale/locale_ja-JP.ini index 1d1d6149..135350d0 100755 --- a/conf/locale/locale_ja-JP.ini +++ b/conf/locale/locale_ja-JP.ini @@ -631,6 +631,7 @@ config.db_path_helper=(「sqlite3」のみ) config.service_config=サービスの構成 config.register_email_confirm=電子メールの確認を必要 config.disable_register=登録を無効にする +config.show_registration_button = 表示レジスタボタン config.require_sign_in_view=サインインを要求 config.mail_notify=メール通知 config.enable_cache_avatar=アバターのキャッシュを有効にします。 diff --git a/conf/locale/locale_lv-LV.ini b/conf/locale/locale_lv-LV.ini index 19373118..266c3e63 100755 --- a/conf/locale/locale_lv-LV.ini +++ b/conf/locale/locale_lv-LV.ini @@ -631,6 +631,7 @@ config.db_path_helper=(tikai Sqlite3 datu bāzei) config.service_config=Pakalpojuma konfigurācija config.register_email_confirm=Pieprasīt e-pasta apstiprināšanu config.disable_register=Atspējot jaunu lietotāju reģistrāciju +config.show_registration_button = config.require_sign_in_view=Nepieciešama autorizācija config.mail_notify=Pasta paziņojumi config.enable_cache_avatar=Glabāt profila attēlus kešatmiņā diff --git a/conf/locale/locale_nl-NL.ini b/conf/locale/locale_nl-NL.ini index f0bc7c70..9957bf1e 100755 --- a/conf/locale/locale_nl-NL.ini +++ b/conf/locale/locale_nl-NL.ini @@ -631,6 +631,7 @@ config.db_path_helper=(alleen voor "sqlite3") config.service_config=Serviceconfiguratie config.register_email_confirm=E-mailbevestiging registreren config.disable_register=Registratie uitgeschakeld +config.show_registration_button =Weergave knop Registreren config.require_sign_in_view=Inloggen vereist om te kunnen inzien config.mail_notify=E-mailnotificaties config.enable_cache_avatar=Avatar Cache inschakelen diff --git a/conf/locale/locale_ru-RU.ini b/conf/locale/locale_ru-RU.ini index b0da5c55..dfb5870d 100755 --- a/conf/locale/locale_ru-RU.ini +++ b/conf/locale/locale_ru-RU.ini @@ -631,6 +631,7 @@ config.db_path_helper=(for "sqlite3" only) config.service_config=Service Configuration config.register_email_confirm=Require E-mail Confirmation config.disable_register=Отключить регистрацию +config.show_registration_button = Показать Регистрация Кнопка config.require_sign_in_view=Для просмотра необходима авторизация config.mail_notify=Почтовые уведомления config.enable_cache_avatar=Кешировать аватар diff --git a/conf/locale/locale_zh-CN.ini b/conf/locale/locale_zh-CN.ini index 49c013a9..8a91570c 100755 --- a/conf/locale/locale_zh-CN.ini +++ b/conf/locale/locale_zh-CN.ini @@ -359,7 +359,7 @@ settings.githook_name=钩子名称 settings.githook_content=钩子文本 settings.update_githook=更新钩子设置 settings.remove_hook_success=Web 钩子删除成功! -settings.add_webhook_desc=我们会通过 POST 请求将订阅事件信息发送至向指定 URL 地址。您可以设置不同的数据接收方式(JSON 或 x-www-form-urlencoded)。 请查阅 Webhooks 文档 获取更多信息。 +settings.add_webhook_desc=我们会通过 POST 请求将订阅事件信息发送至向指定 URL 地址。您可以设置不同的数据接收方式(JSON 或 x-www-form-urlencoded)。 请查阅 Webhooks 文档 获取更多信息。 settings.payload_url=推送地址 settings.content_type=数据格式 settings.secret=密钥文本 @@ -631,6 +631,7 @@ config.db_path_helper=(仅限 "sqlite3" 使用) config.service_config=服务配置 config.register_email_confirm=注册邮件确认 config.disable_register=关闭注册功能 +config.show_registration_button = 显示注册按钮 config.require_sign_in_view=强制登录浏览 config.mail_notify=邮件通知提醒 config.enable_cache_avatar=开启缓存头像 diff --git a/conf/locale/locale_zh-HK.ini b/conf/locale/locale_zh-HK.ini index accf0795..969d3c54 100755 --- a/conf/locale/locale_zh-HK.ini +++ b/conf/locale/locale_zh-HK.ini @@ -631,6 +631,7 @@ config.db_path_helper=(僅限 "sqlite3" 使用) config.service_config=服務配置 config.register_email_confirm=註冊電子郵件確認 config.disable_register=關閉註冊功能 +config.show_register_button = config.require_sign_in_view=強制登錄瀏覽 config.mail_notify=郵件通知提醒 config.enable_cache_avatar=開啟緩存頭像 diff --git a/modules/setting/setting.go b/modules/setting/setting.go index e7c44cdd..4d407362 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -311,6 +311,7 @@ func NewConfigContext() { var Service struct { RegisterEmailConfirm bool DisableRegistration bool + ShowRegistrationButton bool RequireSignInView bool EnableCacheAvatar bool EnableNotifyMail bool @@ -324,6 +325,7 @@ func newService() { Service.ActiveCodeLives = Cfg.Section("service").Key("ACTIVE_CODE_LIVE_MINUTES").MustInt(180) Service.ResetPwdCodeLives = Cfg.Section("service").Key("RESET_PASSWD_CODE_LIVE_MINUTES").MustInt(180) Service.DisableRegistration = Cfg.Section("service").Key("DISABLE_REGISTRATION").MustBool() + Service.ShowRegistrationButton = Cfg.Section("service").Key("SHOW_REGISTRATION_BUTTON").MustBool() Service.RequireSignInView = Cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").MustBool() Service.EnableCacheAvatar = Cfg.Section("service").Key("ENABLE_CACHE_AVATAR").MustBool() Service.EnableReverseProxyAuth = Cfg.Section("service").Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool() diff --git a/routers/home.go b/routers/home.go index dd604ec7..24fc77e1 100644 --- a/routers/home.go +++ b/routers/home.go @@ -41,6 +41,7 @@ func Home(ctx *middleware.Context) { ctx.Data["OauthEnabled"] = true ctx.Data["OauthService"] = setting.OauthService } + ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton ctx.Data["PageIsHome"] = true ctx.HTML(200, HOME) diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 1f8a85ec..f8b4be0b 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -78,6 +78,8 @@
{{.i18n.Tr "admin.config.disable_register"}}
+
{{.i18n.Tr "admin.config.show_registration_button"}}
+
{{.i18n.Tr "admin.config.require_sign_in_view"}}
{{.i18n.Tr "admin.config.mail_notify"}}
diff --git a/templates/home.tmpl b/templates/home.tmpl index 8603f26f..29865dbf 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -14,7 +14,9 @@ + {{if .ShowRegistrationButton}} + {{end}}
{{template "ng/base/social" .}}