mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:57:15 +08:00
DEV: Initial parts for a redesigned /about page (#27996)
This commit introduces the foundation for a new design for the /about page that we're currently working on. The current version will remain available and still be the default until we finish the new version and are ready to roll out. To opt into the new version right now, add one or more group to the `experimental_redesigned_about_page_groups` site setting and members in those groups will get the new version. Internal topic: t/128545.
This commit is contained in:
@ -20,6 +20,8 @@ class AboutSerializer < ApplicationSerializer
|
||||
|
||||
attributes :stats,
|
||||
:description,
|
||||
:extended_site_description,
|
||||
:banner_image,
|
||||
:title,
|
||||
:locale,
|
||||
:version,
|
||||
@ -52,6 +54,14 @@ class AboutSerializer < ApplicationSerializer
|
||||
SiteSetting.contact_email
|
||||
end
|
||||
|
||||
def include_extended_site_description?
|
||||
render_redesigned_about_page?
|
||||
end
|
||||
|
||||
def include_banner_image?
|
||||
render_redesigned_about_page?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def can_see_about_stats
|
||||
@ -61,4 +71,10 @@ class AboutSerializer < ApplicationSerializer
|
||||
def can_see_site_contact_details
|
||||
scope.can_see_site_contact_details?
|
||||
end
|
||||
|
||||
def render_redesigned_about_page?
|
||||
return false if scope.anonymous?
|
||||
|
||||
scope.user.in_any_groups?(SiteSetting.experimental_redesigned_about_page_groups_map)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user