Fixed version of Wildfly, some work on categories edit for CMS Admin

Former-commit-id: b45eb95aaab2a53aa2af91ae2b3078786d8403cf
pull/10/head
Jens Pelzetter 2021-02-16 21:31:21 +01:00
parent 722f5c210f
commit 66cdcaf820
6 changed files with 155 additions and 48 deletions

View File

@ -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(

View File

@ -28,11 +28,11 @@ public class CategoryModel {
private String path;
private String title;
private Map<String, String> localizedTitles;
private String description;
private Map<String, String> localizedDescriptions;
private boolean enabled;
@ -47,15 +47,9 @@ public class CategoryModel {
private long categoryOrder;
private boolean hasUnusedTitleLocales;
private boolean hasUnusedDescriptionLocales;
private List<String> unusedTitleLocales;
private List<String> 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<String, String> getLocalizedTitles() {
return localizedTitles;
return Collections.unmodifiableMap(localizedTitles);
}
public void setLocalizedTitles(Map<String, String> localizedTitles) {
this.localizedTitles = localizedTitles;
public void setLocalizedTitles(final Map<String, String> localizedTitles) {
this.localizedTitles = new HashMap<>(localizedTitles);
}
public Map<String, String> getLocalizedDescriptions() {
return localizedDescriptions;
return Collections.unmodifiableMap(localizedDescriptions);
}
public void setLocalizedDescriptions(
Map<String, String> localizedDescriptions) {
this.localizedDescriptions = localizedDescriptions;
final Map<String, String> localizedDescriptions
) {
this.localizedDescriptions = new HashMap<>(localizedDescriptions);
}
public boolean isHasUnusedDescriptionLocales() {
return hasUnusedDescriptionLocales;
}
public void setHasUnusedDescriptionLocales(
boolean hasUnusedDescriptionLocales) {
this.hasUnusedDescriptionLocales = hasUnusedDescriptionLocales;
return !unusedDescriptionLocales.isEmpty();
}
public List<String> getUnusedTitleLocales() {
return unusedTitleLocales;
return Collections.unmodifiableList(unusedTitleLocales);
}
public void setUnusedTitleLocales(List<String> unusedTitleLocales) {
this.unusedTitleLocales = unusedTitleLocales;
public void setUnusedTitleLocales(final List<String> unusedTitleLocales) {
this.unusedTitleLocales = new ArrayList<>(unusedTitleLocales);
}
public List<String> getUnusedDescriptionLocales() {
return unusedDescriptionLocales;
return Collections.unmodifiableList(unusedDescriptionLocales);
}
public void setUnusedDescriptionLocales(
List<String> unusedDescriptionLocales) {
this.unusedDescriptionLocales = unusedDescriptionLocales;
final List<String> unusedDescriptionLocales
) {
this.unusedDescriptionLocales = new ArrayList<>(
unusedDescriptionLocales
);
}
}

View File

@ -128,8 +128,8 @@
tabindex="-1">
<div class="modal-dialog">
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{CategorySystemModel.selectedCategory.path}/@properties"
class="modal-content"
method="post">
class="modal-content"
method="post">
<div class="modal-header">
<h3 class="modal-title"
id="category-properties-title">#{CmsAdminMessages.getMessage("contentsecton.categorysystems.category.properties.edit.dialog.title", [CategorySystemModel.selectedCategory.path])}</h3>
@ -184,7 +184,15 @@
</div>
</div>
<h2>#{CmsAdminMessages.getMessage("contentsection.categorysystems.category.titles.heading", [CategorySystemModel.selectedCategory.name])}</h2>
<!--<h2>#{CmsAdminMessages.getMessage("contentsection.categorysystems.category.titles.heading", [CategorySystemModel.selectedCategory.name])}</h2>-->
<ul>
<c:forEach items="#{CategorySystemModel.selectedCategory.unusedTitleLocales}" var="locale">
<li>
<code>#{locale}</code>
</li>
</c:forEach>
</ul>
<pre>#{CategorySystemModel.selectedCategory.hasUnusedTitleLocales}</pre>
<libreccm:localizedStringEditor addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{CategorySystemModel.selectedCategory.path}/@title/add"
addButtonLabel="#{CmsAdminMessages['contentsection.categorysystems.category.titles.add.label']}"
addDialogCancelLabel="#{CmsAdminMessages['contentsection.categorysystems.category.titles.add.cancel']}"
@ -204,6 +212,7 @@
editorId="category-title"
emptyText="#{CmsAdminMessages['contentsection.categorysystems.category.titles.none']}"
hasUnusedLocales="#{CategorySystemModel.selectedCategory.hasUnusedTitleLocales}"
headingLevel="2"
objectIdentifier="#{CategorySystemModel.selectedCategory.path}"
removeButtonLabel="#{CmsAdminMessages['contentsection.categorysystems.category.titles.delete.label']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.categorysystems.category.titles.delete.cancel']}"
@ -217,9 +226,9 @@
title="#{CmsAdminMessages['contentsection.categorysystems.category.titles.locale.title']}"
unusedLocales="#{CategorySystemModel.selectedCategory.unusedTitleLocales}"
values="#{CategorySystemModel.selectedCategory.localizedTitles}" />
<h2>#{CmsAdminMessages.getMessage("contentsection.categorysystems.category.descriptions.heading", [CategorySystemModel.selectedCategory.name])}</h2>
<libreccm:localizedStringEditor addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{CategorySystemModel.selectedCategory.path}/@title/add"
<!--<h2>#{CmsAdminMessages.getMessage("contentsection.categorysystems.category.descriptions.heading", [CategorySystemModel.selectedCategory.name])}</h2>-->
<libreccm:localizedStringEditor addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{CategorySystemModel.selectedCategory.path}/@description/add"
addButtonLabel="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.add.label']}"
addDialogCancelLabel="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.add.cancel']}"
addDialogLocaleSelectHelp="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.add.locale.help']}"
@ -234,25 +243,26 @@
editDialogTitle="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.edit.title']}"
editDialogValueHelp="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.edit.value.help']}"
editDialogValueLabel="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.edit.value.label']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{CategorySystemModel.selectedCategory.path}/@title/edit"
editorId="category-title"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{CategorySystemModel.selectedCategory.path}/@description/edit"
editorId="category-description"
emptyText="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.none']}"
hasUnusedLocales="#{CategorySystemModel.selectedCategory.hasUnusedTitleLocales}"
hasUnusedLocales="#{CategorySystemModel.selectedCategory.hasUnusedDescriptionLocales}"
headingLevel="2"
objectIdentifier="#{CategorySystemModel.selectedCategory.path}"
removeButtonLabel="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.delete.label']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.delete.cancel']}"
removeDialogSubmitLabel="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.delete.submit']}"
removeDialogText="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.delete.text']}"
removeDialogTitle="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.delete.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{CategorySystemModel.selectedCategory.path}/@title/remove"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{CategorySystemModel.selectedCategory.path}/@description/remove"
tableActionsHeading="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.actions.heading']}"
tableLocaleHeading="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.locale.heading']}"
tableValueHeading="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.value.heading']}"
title="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.locale.title']}"
unusedLocales="#{CategorySystemModel.selectedCategory.unusedTitleLocales}"
values="#{CategorySystemModel.selectedCategory.localizedTitles}" />
</div>
title="#{CmsAdminMessages['contentsection.categorysystems.category.descriptions.title']}"
unusedLocales="#{CategorySystemModel.selectedCategory.unusedDescriptionLocales}"
values="#{CategorySystemModel.selectedCategory.localizedDescriptions}" />
</div>
</div>
</div>
</ui:define>

View File

@ -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

View File

@ -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

View File

@ -340,6 +340,7 @@
<version>2.1.0.Beta1</version>
<configuration>
<skip>true</skip>
<version>22.0.1.Final</version>
</configuration>
</plugin>
</plugins>