diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/CmsMvcAuthoringSteps.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/CmsMvcAuthoringSteps.java index f0b25f53c..df43c40a7 100644 --- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/CmsMvcAuthoringSteps.java +++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/CmsMvcAuthoringSteps.java @@ -39,7 +39,6 @@ public class CmsMvcAuthoringSteps implements MvcAuthoringSteps { classes.add(ExampleAuthoringStep.class); classes.add(CategorizationStep.class); - classes.add(PublishStep.class); classes.add(RelatedInfoStep.class); classes.add(MvcArticlePropertiesStep.class); classes.add(MvcArticleTextBodyStep.class); diff --git a/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/MvcAuthoringStepService.java b/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/MvcAuthoringStepService.java index 004b551ed..b3c10320a 100644 --- a/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/MvcAuthoringStepService.java +++ b/ccm-cms/src/main/java/org/librecms/ui/contentsections/documents/MvcAuthoringStepService.java @@ -31,6 +31,7 @@ import java.util.Optional; import javax.enterprise.context.Dependent; import javax.inject.Inject; +import javax.mvc.Models; import javax.ws.rs.Path; /** @@ -58,6 +59,9 @@ public class MvcAuthoringStepService { @Inject private GlobalizationHelper globalizationHelper; + @Inject + private Models models; + @Inject private SelectedDocumentModel documentModel; @@ -166,6 +170,12 @@ public class MvcAuthoringStepService { documentModel.setContentItem(document); this.documentPath = itemManager.getItemPath(document); + + models.put("activeDocumentTab", "editTab"); + } + + public void updateDocumentPath() { + documentPath = itemManager.getItemPath(document); } /** @@ -193,8 +203,9 @@ public class MvcAuthoringStepService { section.getLabel() ) .replace( - String.format("{%s}", - MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME + String.format( + "{%s}", + MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM ), documentPath ) 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 d07cebaf5..6b16f7d32 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 @@ -357,7 +357,7 @@ public class SelectedDocumentModel { .replace( String.format( "{%s}", - MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM + MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM ), itemPath ); diff --git a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticlePropertiesStep.java b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticlePropertiesStep.java index 33dd66101..e2b78ab83 100644 --- a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticlePropertiesStep.java +++ b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/MvcArticlePropertiesStep.java @@ -60,7 +60,7 @@ import javax.ws.rs.PathParam; * @author Jens Pelzetter */ @RequestScoped -@Path(MvcAuthoringSteps.PATH_PREFIX + "basicproperties") +@Path(MvcAuthoringSteps.PATH_PREFIX + "article-basicproperties") @Controller @Named("CmsArticlePropertiesStep") @MvcAuthoringStep( @@ -242,13 +242,17 @@ public class MvcArticlePropertiesStep { stepService.getDocument().setDisplayName(name); itemRepo.save(stepService.getDocument()); + + stepService.updateDocumentPath(); - return stepService.buildRedirectPathForStep(getClass()); + return stepService.buildRedirectPathForStep( + MvcArticlePropertiesStep.class + ); } else { return documentUi.showAccessDenied( stepService.getContentSection(), stepService.getDocument(), - stepService.getLabel(getClass()) + stepService.getLabel(MvcArticlePropertiesStep.class) ); } } 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 76a79857c..39d1c5a3b 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 @@ -5,92 +5,94 @@ -
- + +

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

#{CmsAdminMessages['contentsection.document.authoring.workflow.active_workflow_label']}: #{CmsSelectedDocumentModel.workflowName} -

- #{CmsAdminMessages['contentsection.document.authoring.workflow.active_task']}: } + #{CmsAdminMessages['contentsection.document.authoring.workflow.active_task']} #{CmsSelectedDocumentModel.currentTask.label} - #{CmsAdminMessages['contentsection.document.authoring.workflow.active_task.none']}: } + #{CmsAdminMessages['contentsection.document.authoring.workflow.active_task.none']} - - -

- - -
-
- - -
- - -
- - -
-
- -
- - -
-
- + + + +
+ + +
+
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+

@@ -111,14 +113,14 @@
  • + href="#{mvc.basePath}/documents/#{CmsSelectedDocumentModel.itemPath}/@categorization"> #{CmsAdminMessages['contentsection.document.authoring.steps.categorize.label']}
  • + href="#{mvc.basePath}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo"> #{CmsAdminMessages['contentsection.document.authoring.steps.relatedInfo.label']}
  • diff --git a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contenttypes/article/article-basic-properties.xhtml b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contenttypes/article/article-basic-properties.xhtml index 959b088fd..075f7b50a 100644 --- a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contenttypes/article/article-basic-properties.xhtml +++ b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contenttypes/article/article-basic-properties.xhtml @@ -7,57 +7,89 @@ -

    #{CmsArticleMessageBundle['basicproperties.name.header']}

    +

    #{CmsArticleMessageBundle.getMessage('basicproperties.header', [CmsArticlePropertiesStep.name])}

    +

    #{CmsArticleMessageBundle.getMessage('basicproperties.name.header')}

    -
    -                    #{CmsArticlePropertiesStep.name}
    -                
    - - + +