iachat/app/views/public/api/v1/portals
Sojan Jose 2a90652f05
feat: Add draft status for help center locales (#13768)
This adds a draft status for Help Center locales so teams can prepare
localized content in the dashboard without exposing those locales in the
public portal switcher until they are ready to publish.

Fixes: https://github.com/chatwoot/chatwoot/issues/10412
Closes: https://github.com/chatwoot/chatwoot/issues/10412

## Why

Teams need a way to work on locale-specific Help Center content ahead of
launch. The public portal should only show ready locales, while the
admin dashboard should continue to expose every allowed locale for
ongoing article and category work.

## What this change does

- Adds `draft_locales` to portal config as a subset of `allowed_locales`
- Hides drafted locales from the public portal language switchers while
keeping direct locale URLs working
- Keeps drafted locales fully visible in the admin dashboard for article
and category management
- Adds locale actions to move an existing locale to draft, publish a
drafted locale, and keep the default locale protected from drafting
- Adds a status dropdown when creating a locale so new locales can be
created as `Published` or `Draft`
- Returns each admin locale with a `draft` flag so the locale UI can
reflect the public visibility state

## Validation

- Seed a portal with multiple locales, draft one locale, and confirm the
public portal switcher hides it while `/hc/:slug/:locale` still loads
directly
- In the admin dashboard, confirm drafted locales still appear in the
locale list and remain selectable for articles and categories
- Create a new locale with `Draft` status and confirm it stays out of
the public switcher until published
- Move an existing locale back and forth between `Published` and `Draft`
and confirm the public switcher updates accordingly


## Demo 



https://github.com/user-attachments/assets/ba22dc26-c2e7-463a-b1f5-adf1fda1f9be

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2026-03-17 12:45:54 +04:00
..
articles fix: slim help center search results (#13761) 2026-03-17 00:46:23 -07:00
categories fix: Use page_title with fallback to name for portal display titles (#13719) 2026-03-05 14:20:31 +05:30
error feat: Update public portal colors with new design (#8230) 2023-11-23 08:16:52 +05:30
_article_count.html.erb fix: Fix i18n issues with help center (#6559) 2023-02-27 17:45:57 -08:00
_authors.html.erb feat: Add RTL support in public help center (#11692) 2025-06-09 15:23:04 -04:00
_category-block.html.erb feat: Author sections in category block and category list (#8414) 2023-11-27 15:13:38 +05:30
_featured_articles.html.erb feat: Author sections in category block and category list (#8414) 2023-11-27 15:13:38 +05:30
_footer.html.erb feat: Add INSTALLATION_NAME to global config (#12376) 2025-09-09 12:13:35 +05:30
_header.html.erb feat: Add draft status for help center locales (#13768) 2026-03-17 12:45:54 +04:00
_hero.html.erb fix: Use page_title with fallback to name for portal display titles (#13719) 2026-03-05 14:20:31 +05:30
_mobile_menu.html.erb feat: Add draft status for help center locales (#13768) 2026-03-17 12:45:54 +04:00
_thumbnail.html.erb feat: Author sections in category block and category list (#8414) 2023-11-27 15:13:38 +05:30
_uncategorized-block.html.erb feat: Update public portal colors with new design (#8230) 2023-11-23 08:16:52 +05:30
index.json.jbuilder feat: Sort articles based on views (#7599) 2023-07-24 20:27:43 -07:00
show.html.erb fix: Include uncategorized articles in the all article section to allow edit/delete (#10153) 2024-09-23 23:39:03 -07:00
show.json.jbuilder feat: Sort articles based on views (#7599) 2023-07-24 20:27:43 -07:00
sitemap.xml.erb fix: Update help center sitemap XML structure (#13357) 2026-01-26 18:08:20 -08:00