From e3970246c3196ee142f7898b8b2e3732f04692df Mon Sep 17 00:00:00 2001 From: Jens Pelzetter Date: Sat, 7 Aug 2021 15:50:40 +0200 Subject: [PATCH] Highlight current authoring step --- .../documents/AuthoringStepListEntry.java | 2 +- .../documents/SelectedDocumentModel.java | 23 +--- .../documents/authoringstep.xhtml | 112 +++++++++++++----- .../documents/categorization.xhtml | 2 + .../ui/contentsection/documents/media.xhtml | 6 +- .../ui/contentsection/documents/publish.xhtml | 1 + .../documents/relatedinfo.xhtml | 4 + .../article/article-basic-properties.xhtml | 3 + .../contenttypes/article/article-text.xhtml | 3 + .../org/librecms/CmsAdminMessages.properties | 1 + .../librecms/CmsAdminMessages_de.properties | 1 + .../ui/DefaultAuthoringStepsBundle.properties | 2 + .../DefaultAuthoringStepsBundle_de.properties | 2 + .../ui/MvcAssetStepsBundle.properties | 3 + .../ui/MvcAssetStepsBundle_de.properties | 3 + 15 files changed, 116 insertions(+), 52 deletions(-) diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/AuthoringStepListEntry.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/AuthoringStepListEntry.java index b252391bc..efbb02d92 100644 --- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/AuthoringStepListEntry.java +++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/AuthoringStepListEntry.java @@ -39,7 +39,7 @@ public class AuthoringStepListEntry { private String description; /** - * The path fragment of the authoring step. + * The path of the step. */ private String path; diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/SelectedDocumentModel.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/SelectedDocumentModel.java index 3ef827c7e..a318e9996 100644 --- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/SelectedDocumentModel.java +++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/SelectedDocumentModel.java @@ -348,10 +348,7 @@ public class SelectedDocumentModel { ) { final MvcAuthoringStepDef stepAnnotation = authoringStepClass .getAnnotation(MvcAuthoringStepDef.class); - final Path pathAnnotation = authoringStepClass.getAnnotation( - Path.class - ); - final LocalizedTextsUtil textsUtil = globalizationHelper + final LocalizedTextsUtil textsUtil = globalizationHelper .getLocalizedTextsUtil(stepAnnotation.bundle()); final AuthoringStepListEntry entry = new AuthoringStepListEntry(); entry.setDescription(textsUtil.getText(stepAnnotation.descriptionKey())); @@ -360,24 +357,6 @@ public class SelectedDocumentModel { return entry; } - private String createStepPath(final String path) { - return path - .replace( - String.format( - "{%s}", - MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM - ), - item.getContentType().getContentSection().getLabel() - ) - .replace( - String.format( - "{%s}", - MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM - ), - itemPath - ); - } - private String createStepPath(final Class stepClass) { final Map values = new HashMap<>(); values.put( diff --git a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml index 8fa1f5634..0a26f046d 100644 --- a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml +++ b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml @@ -114,42 +114,98 @@

#{CmsAdminMessages['contentsection.document.authoring.steps.title']}

+ + diff --git a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/categorization.xhtml b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/categorization.xhtml index caa1e7a17..9f1253181 100644 --- a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/categorization.xhtml +++ b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/categorization.xhtml @@ -6,6 +6,8 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> + +

#{CmsDefaultStepsMessageBundle.getMessage('categorization.title', [CmsSelectedDocumentModel.itemTitle])}

diff --git a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/media.xhtml b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/media.xhtml index 4a6badbf7..31730f540 100644 --- a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/media.xhtml +++ b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contentsection/documents/media.xhtml @@ -7,7 +7,11 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> + + +

#{CmsDefaultStepsMessageBundle.getMessage("media.title", [CmsSelectedDocumentModel.itemTitle])}

+