From c34b6bdedbbbd98977b1db0ab7a13d1f56e9f9ff Mon Sep 17 00:00:00 2001 From: Jens Pelzetter Date: Sat, 23 Apr 2022 15:04:45 +0200 Subject: [PATCH] Several bugfixes for the authoring steps of SciProject --- .../contenttypes/sciproject/SciProject.java | 3 +- .../ui/SciProjectPropertiesStep.java | 6 +- .../ui/sciproject-basic-properties.xhtml | 4 +- .../ui/sciproject-description.xhtml | 369 +++++++++--------- .../sciproject/ui/SciProjectBundle.properties | 8 + .../ui/SciProjectBundle_de.properties | 8 + 6 files changed, 216 insertions(+), 182 deletions(-) diff --git a/sci-types-project/src/main/java/org/scientificcms/contenttypes/sciproject/SciProject.java b/sci-types-project/src/main/java/org/scientificcms/contenttypes/sciproject/SciProject.java index d000e1a..bb7a438 100644 --- a/sci-types-project/src/main/java/org/scientificcms/contenttypes/sciproject/SciProject.java +++ b/sci-types-project/src/main/java/org/scientificcms/contenttypes/sciproject/SciProject.java @@ -147,7 +147,8 @@ public class SciProject extends ContentItem implements Serializable { private List contacts; @OneToMany(mappedBy = "project", cascade = CascadeType.ALL) - @OrderBy("member.personName ASC") +// @OrderBy("member.personName ASC") + @OrderBy("member ASC") private List members; @OneToMany(mappedBy = "project", cascade = CascadeType.ALL) diff --git a/sci-types-project/src/main/java/org/scientificcms/contenttypes/sciproject/ui/SciProjectPropertiesStep.java b/sci-types-project/src/main/java/org/scientificcms/contenttypes/sciproject/ui/SciProjectPropertiesStep.java index 6548138..aa5cfb8 100644 --- a/sci-types-project/src/main/java/org/scientificcms/contenttypes/sciproject/ui/SciProjectPropertiesStep.java +++ b/sci-types-project/src/main/java/org/scientificcms/contenttypes/sciproject/ui/SciProjectPropertiesStep.java @@ -226,6 +226,8 @@ public class SciProjectPropertiesStep extends AbstractMvcAuthoringStep { getDocument().setDisplayName(name); itemRepo.save(getDocument()); + + updateDocumentPath(); return buildRedirectPathForStep(); } else { @@ -506,7 +508,7 @@ public class SciProjectPropertiesStep extends AbstractMvcAuthoringStep { * @return A redirect to this authoring step. */ @POST - @Path("/short-description/{locale}") + @Path("/short-description/@edit/{locale}") @Transactional(Transactional.TxType.REQUIRED) @AuthorizationRequired public String editShortDescription( @@ -552,7 +554,7 @@ public class SciProjectPropertiesStep extends AbstractMvcAuthoringStep { * @return A redirect to this authoring step. */ @POST - @Path("/short-description/remove/{locale}") + @Path("/short-description/@remove/{locale}") @Transactional(Transactional.TxType.REQUIRED) @AuthorizationRequired public String removeShortDescription( diff --git a/sci-types-project/src/main/resources/WEB-INF/views/org/scientificcms/contenttypes/sciproject/ui/sciproject-basic-properties.xhtml b/sci-types-project/src/main/resources/WEB-INF/views/org/scientificcms/contenttypes/sciproject/ui/sciproject-basic-properties.xhtml index fdce987..df992dc 100644 --- a/sci-types-project/src/main/resources/WEB-INF/views/org/scientificcms/contenttypes/sciproject/ui/sciproject-basic-properties.xhtml +++ b/sci-types-project/src/main/resources/WEB-INF/views/org/scientificcms/contenttypes/sciproject/ui/sciproject-basic-properties.xhtml @@ -190,7 +190,7 @@
#{SciProjectMessageBundle['basicproperties.end.label']}
- #{SciProjectPropertiesStep.end} + #{SciProjectPropertiesStep.endDate}