Skip to content

Add derivate_types classification and menu action to set the derivate type#310

Merged
sebhofmann merged 2 commits into
mainfrom
derivate-types-classification
Jul 16, 2026
Merged

Add derivate_types classification and menu action to set the derivate type#310
sebhofmann merged 2 commits into
mainfrom
derivate-types-classification

Conversation

@sebhofmann

Copy link
Copy Markdown
Collaborator

Summary

Adds the derivate_types classification to the project and lets editors set a derivate's type directly from the derivate actions menu.

Changes

  • Classification: local derivate_types classification with two categories, content (Inhalt) and edition_tei (Editions TEI). Loaded during setup via update classification from file.
  • Resource: CMODerivateResource at rsc/cmo/derivate/{id}/set-type/{type}. Validates the id, checks write permission, validates the category against the classification, replaces any existing derivate_types entry and redirects back.
  • Menu: a "type of file area" section in the derivate actions dropdown. The currently set type is marked with a check icon; clicking an entry sets it.
  • i18n: keys added for de, en and tr.

Notes

  • The derivate_types classification only contains content and edition_tei on purpose, not the full upstream list.
  • Existing German messages_de.properties stays ISO-8859-1; only ASCII keys were appended.

Test

  • mvn -pl cmo-module -am clean install builds green.
  • Menu shows both types, marks the active one, and setting a type persists and redirects back.

… type

* add local derivate_types classification with the categories content and
  edition_tei, including de, en and tr labels, and load it during setup
* add CMODerivateResource exposing rsc/cmo/derivate/{id}/set-type/{type} to
  set the derivate_types category of a derivate (write permission required)
* add a file-area-type selector to the derivate actions menu; the labels are
  read from the classification and the current type is marked with a check icon
@sebhofmann
sebhofmann force-pushed the derivate-types-classification branch from bb4098c to b32fe77 Compare July 15, 2026 17:04

@kkrebs kkrebs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good for me. I found only a minor text issue

Comment thread cmo-cli/src/main/config/classifications/derivate_types.xml Outdated
@sebhofmann
sebhofmann requested a review from kkrebs July 16, 2026 08:12
@sebhofmann
sebhofmann merged commit 8d58041 into main Jul 16, 2026
@sebhofmann
sebhofmann deleted the derivate-types-classification branch July 16, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants