Document Creator 0.6.0: Templates in several categories at once
Document Creator 0.6.0 lets one template belong to several categories, each with its own group, instead of exactly one. It also adds a button that sets up a standard list of groups, and the image picker now speaks the admin’s language.
Several categories per template
Until now a template had one category and one group. It can now be filed under any number of categories, with an optional group in each. In the templates list, each row gets a Categories & groups pop-up with a checkbox per category and a Group select next to each. Documents keep their single category and type pickers.
A template that belongs to several categories appears under each of them, with that category’s group. Trashing a category or a group no longer trashes a template that still belongs to another active category.
The old single category and group columns on templates are kept and filled from the template’s first category (the one placed highest in the category list), so code that reads them keeps working.
Standard groups
The Categories page has a new Standard groups button for the selected category. After a confirmation it creates nine predefined groups in a fixed order (from Hinnapakkumine to Hooldusjuhend), or moves existing groups with those names into place. Other groups move after them. Running it again changes nothing.
Image picker translated
Every visible text in the template image picker was written in Russian, whatever the admin’s language. All of it now goes through translations, and the file counter uses proper plural forms. The documents list’s Search by name… field is now translated too.
Upgrading
Run mix phoenix_kit.update to apply the module’s migration V2. It creates the new link table and fills it with one row per template that has a category, so existing templates keep their category and group. Do not drop the old category and type columns on templates. Rolling back to V1 deletes the link table and with it every extra category a template was given.
Full release notes: Document Creator 0.6.0
0.6.0 · 13 August 2026
Added
-
A template can belong to several categories at once (#38). Membership moves from the single
category_uuid/type_uuidpair onphoenix_kit_doc_templatesto a many-to-many join table,phoenix_kit_doc_template_taxonomy— one row per(template, category)with its own optional group, unique on(template_uuid, category_uuid). The admin UI gains a per-row checkbox popover for templates; documents keep their single-select dropdowns.Taxonomy.set_template_memberships/3is a transactional replace-all, andDocuments.list_templates_for_category/1now sources through the join, so a multi-category template appears under each category annotated with that category’s group. -
Migration chain V2 creates the join table, backfills one row per template that currently has a category, and stamps a deprecation
COMMENTon the legacy columns. ⚠️down(target: 1)destroys all multi-category data — it drops the join table, and only the single-binding legacy mirror survives. -
A “Standard groups” seed (
Taxonomy.ensure_default_group_order/2, plus a button in the categories admin) puts the nine canonical groups in order. Idempotent.
Changed
-
The legacy
templates.category_uuid/type_uuidcolumns are kept and kept populated as a backward-compatibility mirror of the primary membership (the one whose category has the lowestCategory.position), so the host-app consumer keeps working unchanged until it migrates to the join table. Do not drop them without a coordinated host-app migration. The mirror is recomputed from surviving active memberships on category/group trash and restore, so it never points at a trashed category and a multi-category template does not vanish from single-category readers. -
trash_category/1andtrash_type/1no longer trash a template that still belongs to another active category. -
Dependency updates:
phoenix_kit2.3.0.
Fixed
-
The image picker was hardcoded in Russian (#37). Every visible string in
Web.Components.ImagePickerwas a Russian literal — “Убрать”, “Сбросить”, “Поиск по имени”, “Файлы не найдены”, “Назад”, “Вперёд” — so an Estonian or English user got Russian in the middle of an otherwise translated page. All seven now go through Gettext, and the file counter became a realngettext/3instead of the abbreviation that was there to dodge plurals. The documents view’s “Search by name…” msgid had never been extracted, so it fell through to English in every locale; it is now in the catalogues. -
Four tests tagged
:requires_unreleased_coreno longer sit excluded from every run. They gate onPhoenixKit.Integrations.add_connection/3’s strict-UUID return shape, which was unpublished when the tag was added but has shipped since core 2.0 — and this package has pinned~> 2.0since, so every version the pin can resolve carries it. The exclusion had stopped protecting anything and was hiding four passing tests.
Document Creator 0.6.0. Install or update: {:phoenix_kit_document_creator, "~> 0.6"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.