diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/CategoriesController.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/CategoriesController.java index 3940368bc..574ace1cb 100644 --- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/CategoriesController.java +++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/CategoriesController.java @@ -296,7 +296,7 @@ public class CategoriesController { } @POST - @Path("/{context}/categories/{categoryPath:(.+)?}/@title/locale") + @Path("/{context}/categories/{categoryPath:(.+)?}/@title/edit") @AuthorizationRequired @Transactional(Transactional.TxType.REQUIRED) public String editTitle( diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/CategoryModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/CategoryModel.java index 76c829315..cb46c4867 100644 --- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/CategoryModel.java +++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/CategoryModel.java @@ -28,11 +28,11 @@ public class CategoryModel { private String path; private String title; - + private Map localizedTitles; private String description; - + private Map localizedDescriptions; private boolean enabled; @@ -47,15 +47,9 @@ public class CategoryModel { private long categoryOrder; - private boolean hasUnusedTitleLocales; - - private boolean hasUnusedDescriptionLocales; - private List unusedTitleLocales; - + private List unusedDescriptionLocales; - - public CategoryModel() { subCategories = new ArrayList<>(); @@ -169,54 +163,49 @@ public class CategoryModel { } public boolean isHasUnusedTitleLocales() { - return hasUnusedTitleLocales; - } - - public void setHasUnusedTitleLocales(final boolean hasUnusedTitleLocales) { - this.hasUnusedTitleLocales = hasUnusedTitleLocales; + return !unusedTitleLocales.isEmpty(); } public Map getLocalizedTitles() { - return localizedTitles; + return Collections.unmodifiableMap(localizedTitles); } - public void setLocalizedTitles(Map localizedTitles) { - this.localizedTitles = localizedTitles; + public void setLocalizedTitles(final Map localizedTitles) { + this.localizedTitles = new HashMap<>(localizedTitles); } public Map getLocalizedDescriptions() { - return localizedDescriptions; + return Collections.unmodifiableMap(localizedDescriptions); } public void setLocalizedDescriptions( - Map localizedDescriptions) { - this.localizedDescriptions = localizedDescriptions; + final Map localizedDescriptions + ) { + this.localizedDescriptions = new HashMap<>(localizedDescriptions); } public boolean isHasUnusedDescriptionLocales() { - return hasUnusedDescriptionLocales; - } - - public void setHasUnusedDescriptionLocales( - boolean hasUnusedDescriptionLocales) { - this.hasUnusedDescriptionLocales = hasUnusedDescriptionLocales; + return !unusedDescriptionLocales.isEmpty(); } public List getUnusedTitleLocales() { - return unusedTitleLocales; + return Collections.unmodifiableList(unusedTitleLocales); } - public void setUnusedTitleLocales(List unusedTitleLocales) { - this.unusedTitleLocales = unusedTitleLocales; + public void setUnusedTitleLocales(final List unusedTitleLocales) { + this.unusedTitleLocales = new ArrayList<>(unusedTitleLocales); } public List getUnusedDescriptionLocales() { - return unusedDescriptionLocales; + return Collections.unmodifiableList(unusedDescriptionLocales); } public void setUnusedDescriptionLocales( - List unusedDescriptionLocales) { - this.unusedDescriptionLocales = unusedDescriptionLocales; + final List unusedDescriptionLocales + ) { + this.unusedDescriptionLocales = new ArrayList<>( + unusedDescriptionLocales + ); } } diff --git a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/categorysystems/categorysystem.xhtml b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/categorysystems/categorysystem.xhtml index 21281febd..3a4619575 100644 --- a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/categorysystems/categorysystem.xhtml +++ b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/categorysystems/categorysystem.xhtml @@ -128,8 +128,8 @@ tabindex="-1"> -

#{CmsAdminMessages.getMessage("contentsection.categorysystems.category.titles.heading", [CategorySystemModel.selectedCategory.name])}

+ +
    + +
  • + #{locale} +
  • +
    +
+
#{CategorySystemModel.selectedCategory.hasUnusedTitleLocales}
- -

#{CmsAdminMessages.getMessage("contentsection.categorysystems.category.descriptions.heading", [CategorySystemModel.selectedCategory.name])}

- #{CmsAdminMessages.getMessage("contentsection.categorysystems.category.descriptions.heading", [CategorySystemModel.selectedCategory.name])}--> + - - + title="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.title']}" + unusedLocales="#{CategorySystemModel.selectedCategory.unusedDescriptionLocales}" + values="#{CategorySystemModel.selectedCategory.localizedDescriptions}" /> + + diff --git a/ccm-cms/src/main/resources/org/librecms/CmsAdminMessages.properties b/ccm-cms/src/main/resources/org/librecms/CmsAdminMessages.properties index 984d81583..19669de4e 100644 --- a/ccm-cms/src/main/resources/org/librecms/CmsAdminMessages.properties +++ b/ccm-cms/src/main/resources/org/librecms/CmsAdminMessages.properties @@ -177,3 +177,56 @@ contentsecton.categorysystems.category.properties.edit.dialog.enabled.label=Enab contentsecton.categorysystems.category.properties.edit.dialog.visible.label=Visible? contentsecton.categorysystems.category.properties.edit.dialog.abstract_category.label=Abstract? contentsection.categorysystems.category.titles.heading=Localized Titles +contentsection.categorysystems.category.titles.add.label=Add localized title +contentsection.categorysystems.category.titles.add.cancel=Cancel +contentsection.categorysystems.category.titles.add.locale.help=The language of the localized title +contentsection.categorysystems.category.titles.add.locale.label=Locale +contentsection.categorysystems.category.titles.add.submit=Add localized title +contentsection.categorysystems.category.titles.add.add.title=Add localized title +contentsection.categorysystems.category.titles.add.value.help=The localized title +contentsection.categorysystems.category.titles.add.value.label=Title +contentsection.categorysystems.category.titles.edit.label=Edit +contentsection.categorysystems.category.titles.edit.cancel=Cancel +contentsection.categorysystems.category.titles.edit.submit=Save +contentsection.categorysystems.category.titles.edit.title=Edit localized title +contentsection.categorysystems.category.titles.edit.value.help=The localized title +contentsection.categorysystems.category.titles.edit.value.label=Title +contentsection.categorysystems.category.titles.delete.label=Remove +contentsection.categorysystems.category.titles.delete.cancel=Cancel +contentsection.categorysystems.category.titles.delete.submit=Remove localized title +contentsection.categorysystems.category.titles.delete.text=Are you sure to remove this localized title? +contentsection.categorysystems.category.titles.delete.title=Confirm removal of localized title +contentsection.categorysystems.category.titles.actions.heading=Actions +contentsection.categorysystems.category.titles.locale.heading=Locale +contentsection.categorysystems.category.titles.locale.title=Localized titles +contentsection.categorysystems.category.descriptions.heading=Localized Descriptions +contentsection.categorysystems.category.descriptions.add.label=Add localized description +contentsection.categorysystems.category.descriptions.add.cancel=Cancel +contentsection.categorysystems.category.descriptions.add.locale.help=The language of the localized description +contentsection.categorysystems.category.descriptions.add.locale.label=Locale +contentsection.categorysystems.category.descriptions.add.submit=Add localized description +contentsection.categorysystems.category.descriptions.add.add.description=Add localized description +contentsection.categorysystems.category.descriptions.add.value.help=The localized description +contentsection.categorysystems.category.descriptions.add.value.label=Description +contentsection.categorysystems.category.descriptions.edit.label=Edit +contentsection.categorysystems.category.descriptions.edit.cancel=Cancel +contentsection.categorysystems.category.descriptions.edit.submit=Save +contentsection.categorysystems.category.descriptions.edit.description=Edit localized description +contentsection.categorysystems.category.descriptions.edit.value.help=The localized description +contentsection.categorysystems.category.descriptions.edit.value.label=Description +contentsection.categorysystems.category.descriptions.delete.label=Remove +contentsection.categorysystems.category.descriptions.delete.cancel=Cancel +contentsection.categorysystems.category.descriptions.delete.submit=Remove localized description +contentsection.categorysystems.category.descriptions.delete.text=Are you sure to remove this localized description? +contentsection.categorysystems.category.descriptions.delete.description=Confirm removal of localized description +contentsection.categorysystems.category.descriptions.actions.heading=Actions +contentsection.categorysystems.category.descriptions.locale.heading=Locale +contentsection.categorysystems.category.descriptions.locale.description=Localized descriptions +contentsection.categorysystems.category.titles.none=No localized titles yet +contentsection.categorysystems.category.descriptions.none=No localized descriptions yet +contentsection.categorysystems.category.descriptions.edit.title=Edit localized description +contentsection.categorysystems.category.descriptions.locale.title=Locale +contentsection.categorysystems.category.descriptions.delete.title=Confirm removal of localized description +contentsection.categorysystems.category.descriptions.add.add.title=Add localized description +contentsection.categorysystems.category.titles.value.heading=Localized title +contentsection.categorysystems.category.descriptions.value.heading=Localized description diff --git a/ccm-cms/src/main/resources/org/librecms/CmsAdminMessages_de.properties b/ccm-cms/src/main/resources/org/librecms/CmsAdminMessages_de.properties index 8202791b0..18675f92b 100644 --- a/ccm-cms/src/main/resources/org/librecms/CmsAdminMessages_de.properties +++ b/ccm-cms/src/main/resources/org/librecms/CmsAdminMessages_de.properties @@ -177,3 +177,57 @@ contentsecton.categorysystems.category.properties.edit.dialog.enabled.label=Akti contentsecton.categorysystems.category.properties.edit.dialog.visible.label=Sichtbar? contentsecton.categorysystems.category.properties.edit.dialog.abstract_category.label=Abstrakt? contentsection.categorysystems.category.titles.heading=Lokalisierte Titel +contentsection.categorysystems.category.titles.add.label=Lokalizierten Titel hinzuf\u00fcgen +contentsection.categorysystems.category.titles.add.cancel=Abbrechen +contentsection.categorysystems.category.titles.add.locale.help=Die Sprache des lokalisierten Titels +contentsection.categorysystems.category.titles.add.locale.label=Sprache +contentsection.categorysystems.category.titles.add.submit=Lokalisierten Titel hinzuf\u00fcgen +contentsection.categorysystems.category.titles.add.add.title=Lokalisierten Titel hinzuf\u00fcgen +contentsection.categorysystems.category.titles.add.value.help=Der lokalisierte Titel +contentsection.categorysystems.category.titles.add.value.label=Titel +contentsection.categorysystems.category.titles.edit.label=Bearbeiten +contentsection.categorysystems.category.titles.edit.cancel=Abbrechen +contentsection.categorysystems.category.titles.edit.submit=Speichern +contentsection.categorysystems.category.titles.edit.title=Lokalisierten Titel bearbeiten +contentsection.categorysystems.category.titles.edit.value.help=Der lokalisierte Titel +contentsection.categorysystems.category.titles.edit.value.label=Titel +contentsection.categorysystems.category.titles.delete.label=L\u00f6schen +contentsection.categorysystems.category.titles.delete.cancel=Abbrechen +contentsection.categorysystems.category.titles.delete.submit=Lokalisierten Titel entfernen +contentsection.categorysystems.category.titles.delete.text=Sind Sie sicher dass Sie diesen lokalisierten Titel entfernen wollen? +contentsection.categorysystems.category.titles.delete.title=Entfernen eines lokalisierten Titels best\u00e4tigen +contentsection.categorysystems.category.titles.actions.heading=Aktionen +contentsection.categorysystems.category.titles.locale.heading=Sprache +contentsection.categorysystems.category.titles.locale.title=Lokalisierte Titel + +contentsection.categorysystems.category.descriptions.heading=Lokalisierte Beschreibung +contentsection.categorysystems.category.descriptions.add.label=Lokalizierten Beschreibung hinzuf\u00fcgen +contentsection.categorysystems.category.descriptions.add.cancel=Abbrechen +contentsection.categorysystems.category.descriptions.add.locale.help=Die Sprache des lokalisierten Beschreibung +contentsection.categorysystems.category.descriptions.add.locale.label=Sprache +contentsection.categorysystems.category.descriptions.add.submit=Lokalisierten Beschreibung hinzuf\u00fcgen +contentsection.categorysystems.category.descriptions.add.add.title=Lokalisierten Beschreibung hinzuf\u00fcgen +contentsection.categorysystems.category.descriptions.add.value.help=Die lokalisierte Beschreibung +contentsection.categorysystems.category.descriptions.add.value.label=Beschreibung +contentsection.categorysystems.category.descriptions.edit.label=Bearbeiten +contentsection.categorysystems.category.descriptions.edit.cancel=Abbrechen +contentsection.categorysystems.category.descriptions.edit.submit=Speichern +contentsection.categorysystems.category.descriptions.edit.title=Lokalisierte Beschreibung bearbeiten +contentsection.categorysystems.category.descriptions.edit.value.help=Die lokalisierte Beschreibung +contentsection.categorysystems.category.descriptions.edit.value.label=Beschreibung +contentsection.categorysystems.category.descriptions.delete.label=L\u00f6schen +contentsection.categorysystems.category.descriptions.delete.cancel=Abbrechen +contentsection.categorysystems.category.descriptions.delete.submit=Lokalisierten Beschreibung entfernen +contentsection.categorysystems.category.descriptions.delete.text=Sind Sie sicher dass Sie diesen lokalisierten Beschreibung entfernen wollen? +contentsection.categorysystems.category.descriptions.delete.title=Entfernen einer lokalisierten Beschreibung best\u00e4tigen +contentsection.categorysystems.category.descriptions.actions.heading=Aktionen +contentsection.categorysystems.category.descriptions.locale.heading=Sprache +contentsection.categorysystems.category.descriptions.locale.title=Sprache +contentsection.categorysystems.category.titles.none=Keine lokaliserten Titel +contentsection.categorysystems.category.descriptions.none=Keine lokalisierten Bechreibungen +contentsection.categorysystems.category.descriptions.add.add.description=Lokalisierten Beschreibung hinzuf\u00fcgen +contentsection.categorysystems.category.descriptions.edit.description=Lokaliserte Beschreibung bearbeiten +contentsection.categorysystems.category.descriptions.delete.description=Entfernen einer lokalisierten Bescreibung best\u00e4tigen +contentsection.categorysystems.category.descriptions.locale.description=Lokalisierte Beschreibungen +contentsection.categorysystems.category.titles.value.heading=Lokalisierter Titel +contentsection.categorysystems.category.descriptions.value.heading=Lokalisierte Beschreibung diff --git a/pom.xml b/pom.xml index 89091cab6..2f3a60d42 100644 --- a/pom.xml +++ b/pom.xml @@ -340,6 +340,7 @@ 2.1.0.Beta1 true + 22.0.1.Final