mirror of
https://github.com/discourse/discourse.git
synced 2025-01-29 05:20:45 +08:00
UX: Admin setting page consistency - Legal (#30572)
Followup c2282439b3
Make the Legal config page reached from the sidebar
use our consistent site setting page rules.
This commit is contained in:
parent
21470e4afd
commit
9a87baaab4
|
@ -0,0 +1,3 @@
|
||||||
|
import AdminAreaSettingsBaseController from "admin/controllers/admin-area-settings-base";
|
||||||
|
|
||||||
|
export default class AdminConfigLegalSettingsController extends AdminAreaSettingsBaseController {}
|
|
@ -0,0 +1,8 @@
|
||||||
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
|
export default class AdminConfigLegalRoute extends DiscourseRoute {
|
||||||
|
titleToken() {
|
||||||
|
return i18n("admin.community.sidebar_link.legal");
|
||||||
|
}
|
||||||
|
}
|
|
@ -231,6 +231,11 @@ export default function () {
|
||||||
path: "/",
|
path: "/",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
this.route("legal", 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,21 @@
|
||||||
|
<DPageHeader
|
||||||
|
@titleLabel={{i18n "admin.config.legal.title"}}
|
||||||
|
@descriptionLabel={{i18n "admin.config.legal.header_description"}}
|
||||||
|
>
|
||||||
|
<:breadcrumbs>
|
||||||
|
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
||||||
|
<DBreadcrumbsItem
|
||||||
|
@path="/admin/config/legal"
|
||||||
|
@label={{i18n "admin.config.legal.title"}}
|
||||||
|
/>
|
||||||
|
</:breadcrumbs>
|
||||||
|
</DPageHeader>
|
||||||
|
|
||||||
|
<div class="admin-config-page__main-area">
|
||||||
|
<AdminAreaSettings
|
||||||
|
@area="legal"
|
||||||
|
@path="/admin/config/legal"
|
||||||
|
@filter={{this.filter}}
|
||||||
|
@adminSettingsFilterChangedCallback={{this.adminSettingsFilterChangedCallback}}
|
||||||
|
/>
|
||||||
|
</div>
|
|
@ -79,9 +79,7 @@ export const ADMIN_NAV_MAP = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "admin_legal",
|
name: "admin_legal",
|
||||||
route: "adminSiteSettingsCategory",
|
route: "adminConfig.legal.settings",
|
||||||
routeModels: ["legal"],
|
|
||||||
query: { filter: "" },
|
|
||||||
label: "admin.community.sidebar_link.legal",
|
label: "admin.community.sidebar_link.legal",
|
||||||
icon: "gavel",
|
icon: "gavel",
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class SiteSetting < ActiveRecord::Base
|
class SiteSetting < ActiveRecord::Base
|
||||||
VALID_AREAS = %w[about embedding emojis flags fonts notifications permalinks]
|
VALID_AREAS = %w[about embedding emojis flags fonts legal notifications permalinks]
|
||||||
|
|
||||||
extend GlobalPath
|
extend GlobalPath
|
||||||
extend SiteSettingExtension
|
extend SiteSettingExtension
|
||||||
|
|
|
@ -5146,6 +5146,9 @@ en:
|
||||||
notifications:
|
notifications:
|
||||||
title: "Notifications"
|
title: "Notifications"
|
||||||
header_description: "Configure how notifications are managed and delivered for users, including email preferences, push notifications, mention limits, and notification consolidation."
|
header_description: "Configure how notifications are managed and delivered for users, including email preferences, push notifications, mention limits, and notification consolidation."
|
||||||
|
legal:
|
||||||
|
title: "Legal"
|
||||||
|
header_description: "Configure legal settings, such as terms of service, privacy policy, contact details, and EU-specific considerations."
|
||||||
trust_levels:
|
trust_levels:
|
||||||
title: "Trust levels"
|
title: "Trust levels"
|
||||||
header_description: "Trust level settings allow you to fine-tune the requirements and notifications for your community’s progression system, which automatically promotes users to higher trust levels as they demonstrate consistent, positive engagement with your forum."
|
header_description: "Trust level settings allow you to fine-tune the requirements and notifications for your community’s progression system, which automatically promotes users to higher trust levels as they demonstrate consistent, positive engagement with your forum."
|
||||||
|
|
|
@ -397,6 +397,7 @@ Discourse::Application.routes.draw do
|
||||||
get "login-and-authentication" => "site_settings#index"
|
get "login-and-authentication" => "site_settings#index"
|
||||||
get "logo" => "site_settings#index"
|
get "logo" => "site_settings#index"
|
||||||
get "notifications" => "site_settings#index"
|
get "notifications" => "site_settings#index"
|
||||||
|
get "legal" => "site_settings#index"
|
||||||
get "trust-levels" => "site_settings#index"
|
get "trust-levels" => "site_settings#index"
|
||||||
|
|
||||||
resources :flags, only: %i[index new create update destroy] do
|
resources :flags, only: %i[index new create update destroy] do
|
||||||
|
|
|
@ -53,10 +53,10 @@ required:
|
||||||
contact_email:
|
contact_email:
|
||||||
default: ""
|
default: ""
|
||||||
type: email
|
type: email
|
||||||
area: "about|notifications"
|
area: "about|notifications|legal"
|
||||||
contact_url:
|
contact_url:
|
||||||
default: ""
|
default: ""
|
||||||
area: "about"
|
area: "about|legal"
|
||||||
notification_email:
|
notification_email:
|
||||||
default: "noreply@unconfigured.discourse.org"
|
default: "noreply@unconfigured.discourse.org"
|
||||||
type: email
|
type: email
|
||||||
|
@ -75,13 +75,13 @@ required:
|
||||||
list_type: simple
|
list_type: simple
|
||||||
company_name:
|
company_name:
|
||||||
default: ""
|
default: ""
|
||||||
area: "about"
|
area: "about|legal"
|
||||||
governing_law:
|
governing_law:
|
||||||
default: ""
|
default: ""
|
||||||
area: "about"
|
area: "about|legal"
|
||||||
city_for_disputes:
|
city_for_disputes:
|
||||||
default: ""
|
default: ""
|
||||||
area: "about"
|
area: "about|legal"
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
logo:
|
logo:
|
||||||
|
@ -2564,17 +2564,22 @@ legal:
|
||||||
tos_url:
|
tos_url:
|
||||||
client: true
|
client: true
|
||||||
default: ""
|
default: ""
|
||||||
|
area: "legal"
|
||||||
privacy_policy_url:
|
privacy_policy_url:
|
||||||
client: true
|
client: true
|
||||||
default: ""
|
default: ""
|
||||||
|
area: "legal"
|
||||||
faq_url:
|
faq_url:
|
||||||
client: true
|
client: true
|
||||||
default: ""
|
default: ""
|
||||||
|
area: "legal"
|
||||||
log_anonymizer_details:
|
log_anonymizer_details:
|
||||||
default: true
|
default: true
|
||||||
|
area: "legal"
|
||||||
display_eu_visitor_stats:
|
display_eu_visitor_stats:
|
||||||
default: false
|
default: false
|
||||||
client: true
|
client: true
|
||||||
|
area: "legal"
|
||||||
|
|
||||||
backups:
|
backups:
|
||||||
enable_backups:
|
enable_backups:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user