mirror of
https://github.com/discourse/discourse.git
synced 2025-06-10 18:03:44 +08:00
DEV: Add Site admin admin config page (#32196)
This PR adds a dedicated admin config page for Site admin related site settings.
This commit is contained in:
@ -0,0 +1,3 @@
|
|||||||
|
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||||
|
|
||||||
|
export default class AdminConfigSiteAdminSettingsController extends AdminAreaSettingsBaseController {}
|
@ -0,0 +1,8 @@
|
|||||||
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
|
export default class AdminConfigSiteAdminSettingsRoute extends DiscourseRoute {
|
||||||
|
titleToken() {
|
||||||
|
return i18n("admin.config.site_admin.title");
|
||||||
|
}
|
||||||
|
}
|
@ -281,6 +281,11 @@ export default function () {
|
|||||||
path: "/",
|
path: "/",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
this.route("siteAdmin", { path: "/site-admin" }, function () {
|
||||||
|
this.route("settings", {
|
||||||
|
path: "/",
|
||||||
|
});
|
||||||
|
});
|
||||||
this.route("trustLevels", { path: "/trust-levels" }, function () {
|
this.route("trustLevels", { path: "/trust-levels" }, function () {
|
||||||
this.route("settings", {
|
this.route("settings", {
|
||||||
path: "/",
|
path: "/",
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
import RouteTemplate from "ember-route-template";
|
||||||
|
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
|
||||||
|
import DPageHeader from "discourse/components/d-page-header";
|
||||||
|
import { i18n } from "discourse-i18n";
|
||||||
|
import AdminAreaSettings from "admin/components/admin-area-settings";
|
||||||
|
|
||||||
|
export default RouteTemplate(
|
||||||
|
<template>
|
||||||
|
<DPageHeader
|
||||||
|
@hideTabs={{true}}
|
||||||
|
@titleLabel={{i18n "admin.config.site_admin.title"}}
|
||||||
|
@descriptionLabel={{i18n "admin.config.site_admin.header_description"}}
|
||||||
|
>
|
||||||
|
<:breadcrumbs>
|
||||||
|
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
||||||
|
<DBreadcrumbsItem
|
||||||
|
@path="/admin/config/site-admin"
|
||||||
|
@label={{i18n "admin.config.site_admin.title"}}
|
||||||
|
/>
|
||||||
|
</:breadcrumbs>
|
||||||
|
</DPageHeader>
|
||||||
|
|
||||||
|
<div class="admin-config-page__main-area">
|
||||||
|
<AdminAreaSettings
|
||||||
|
@showBreadcrumb={{false}}
|
||||||
|
@area="site_admin"
|
||||||
|
@path="/admin/config/site-admin"
|
||||||
|
@filter={{@controller.filter}}
|
||||||
|
@adminSettingsFilterChangedCallback={{@controller.adminSettingsFilterChangedCallback}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
);
|
@ -196,6 +196,16 @@ export const ADMIN_NAV_MAP = [
|
|||||||
icon: "eye",
|
icon: "eye",
|
||||||
moderator: true,
|
moderator: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "admin_site_admin",
|
||||||
|
route: "adminConfig.siteAdmin",
|
||||||
|
label: "admin.config.site_admin.title",
|
||||||
|
description: "admin.config.site_admin.header_description",
|
||||||
|
keywords: "admin.config.site_admin.keywords",
|
||||||
|
icon: "screwdriver-wrench",
|
||||||
|
settings_area: "site_admin",
|
||||||
|
multi_tabbed: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "admin_legal",
|
name: "admin_legal",
|
||||||
route: "adminConfig.legal.settings",
|
route: "adminConfig.legal.settings",
|
||||||
|
@ -16,6 +16,7 @@ class SiteSetting < ActiveRecord::Base
|
|||||||
notifications
|
notifications
|
||||||
permalinks
|
permalinks
|
||||||
user_defaults
|
user_defaults
|
||||||
|
site_admin
|
||||||
trust_levels
|
trust_levels
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -5445,6 +5445,10 @@ en:
|
|||||||
title: "Themes and components"
|
title: "Themes and components"
|
||||||
header_description: "Personalize your Discourse site with themes and components to match your needs"
|
header_description: "Personalize your Discourse site with themes and components to match your needs"
|
||||||
keywords: "theme|component|extension|customize"
|
keywords: "theme|component|extension|customize"
|
||||||
|
site_admin:
|
||||||
|
title: "Site admin"
|
||||||
|
header_description: "Configure various settings relating to the management of your site"
|
||||||
|
keywords: "discover|bootstrap|apps"
|
||||||
site_texts:
|
site_texts:
|
||||||
title: "Site texts"
|
title: "Site texts"
|
||||||
header_description: "Customize any text used in Discourse to match your community’s voice and tone"
|
header_description: "Customize any text used in Discourse to match your community’s voice and tone"
|
||||||
|
@ -407,6 +407,7 @@ Discourse::Application.routes.draw do
|
|||||||
get "other" => "site_settings#index"
|
get "other" => "site_settings#index"
|
||||||
get "search" => "site_settings#index"
|
get "search" => "site_settings#index"
|
||||||
get "security" => "site_settings#index"
|
get "security" => "site_settings#index"
|
||||||
|
get "site-admin" => "site_settings#index"
|
||||||
get "spam" => "site_settings#index"
|
get "spam" => "site_settings#index"
|
||||||
get "user-api" => "site_settings#index"
|
get "user-api" => "site_settings#index"
|
||||||
get "user-defaults" => "site_settings#index"
|
get "user-defaults" => "site_settings#index"
|
||||||
|
@ -2871,9 +2871,13 @@ uncategorized:
|
|||||||
version_checks:
|
version_checks:
|
||||||
client: true
|
client: true
|
||||||
default: true
|
default: true
|
||||||
|
area: "site_admin"
|
||||||
include_in_discourse_discover:
|
include_in_discourse_discover:
|
||||||
default: false
|
default: false
|
||||||
new_version_emails: true
|
area: "site_admin"
|
||||||
|
new_version_emails:
|
||||||
|
default: true
|
||||||
|
area: "site_admin"
|
||||||
send_welcome_message: true
|
send_welcome_message: true
|
||||||
|
|
||||||
suppress_uncategorized_badge:
|
suppress_uncategorized_badge:
|
||||||
@ -2980,6 +2984,7 @@ uncategorized:
|
|||||||
global_notice:
|
global_notice:
|
||||||
default: ""
|
default: ""
|
||||||
client: true
|
client: true
|
||||||
|
area: "site_admin"
|
||||||
has_login_hint:
|
has_login_hint:
|
||||||
default: false
|
default: false
|
||||||
hidden: true
|
hidden: true
|
||||||
@ -3016,9 +3021,11 @@ uncategorized:
|
|||||||
|
|
||||||
use_site_small_logo_as_system_avatar:
|
use_site_small_logo_as_system_avatar:
|
||||||
default: true
|
default: true
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
enable_listing_suspended_users_on_search:
|
enable_listing_suspended_users_on_search:
|
||||||
default: false
|
default: false
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
disable_system_edit_notifications:
|
disable_system_edit_notifications:
|
||||||
default: true
|
default: true
|
||||||
@ -3085,6 +3092,7 @@ uncategorized:
|
|||||||
default: 50
|
default: 50
|
||||||
client: true
|
client: true
|
||||||
max: 5000
|
max: 5000
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
bootstrap_mode_enabled:
|
bootstrap_mode_enabled:
|
||||||
default: false
|
default: false
|
||||||
@ -3107,9 +3115,13 @@ uncategorized:
|
|||||||
default: true
|
default: true
|
||||||
client: true
|
client: true
|
||||||
|
|
||||||
native_app_install_banner_ios: false
|
native_app_install_banner_ios:
|
||||||
|
default: false
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
native_app_install_banner_android: false
|
native_app_install_banner_android:
|
||||||
|
default: false
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
ios_app_id:
|
ios_app_id:
|
||||||
default: "1173672076"
|
default: "1173672076"
|
||||||
@ -3126,16 +3138,21 @@ uncategorized:
|
|||||||
app_association_android:
|
app_association_android:
|
||||||
default: ""
|
default: ""
|
||||||
textarea: true
|
textarea: true
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
app_association_ios:
|
app_association_ios:
|
||||||
default: ""
|
default: ""
|
||||||
textarea: true
|
textarea: true
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
share_anonymized_statistics: true
|
share_anonymized_statistics:
|
||||||
|
default: true
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
enable_powered_by_discourse:
|
enable_powered_by_discourse:
|
||||||
default: true
|
default: true
|
||||||
client: true
|
client: true
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
auto_handle_queued_age:
|
auto_handle_queued_age:
|
||||||
default: 60
|
default: 60
|
||||||
@ -3155,6 +3172,7 @@ uncategorized:
|
|||||||
type: "list"
|
type: "list"
|
||||||
list_type: "compact"
|
list_type: "compact"
|
||||||
client: true
|
client: true
|
||||||
|
area: "site_admin"
|
||||||
|
|
||||||
always_include_topic_excerpts:
|
always_include_topic_excerpts:
|
||||||
default: false
|
default: false
|
||||||
|
@ -214,6 +214,7 @@ module SvgSprite
|
|||||||
robot
|
robot
|
||||||
rocket
|
rocket
|
||||||
rotate
|
rotate
|
||||||
|
screwdriver-wrench
|
||||||
scroll
|
scroll
|
||||||
share
|
share
|
||||||
shield-halved
|
shield-halved
|
||||||
|
Reference in New Issue
Block a user