From e93fcbe7a1a9d15b85c68c14015bc934791c98bf Mon Sep 17 00:00:00 2001 From: Jens Pelzetter Date: Fri, 15 Apr 2022 17:36:27 +0200 Subject: [PATCH] XHTML for basic properties step of SciProject --- .../ui/SciProjectPropertiesStep.java | 10 +- .../ui/sciproject-basic-properties.xhtml | 280 ++++++++++++++++++ 2 files changed, 283 insertions(+), 7 deletions(-) create mode 100644 sci-types-project/src/main/resources/WEB-INF/views/org/scientificcms/contenttypes/sciproject/ui/sciproject-basic-properties.xhtml 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 847ec9a..31c7346 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 @@ -57,13 +57,9 @@ public class SciProjectPropertiesStep extends AbstractMvcAuthoringStep { @Inject private ContentItemRepository itemRepo; - - @Inject private DocumentUi documentUi; - - /** * Provides functions for working with {@link LocalizedString}s. */ @@ -264,7 +260,7 @@ public class SciProjectPropertiesStep extends AbstractMvcAuthoringStep { if (itemPermissionChecker.canEditItem(getDocument())) { final SciProject project = (SciProject) getDocument(); final DateTimeFormatter isoDateFormatter - = DateTimeFormatter.ISO_DATE + = DateTimeFormatter.ISO_DATE .withZone(ZoneId.systemDefault()); project.setBegin(LocalDate.parse(begin, isoDateFormatter)); @@ -303,7 +299,7 @@ public class SciProjectPropertiesStep extends AbstractMvcAuthoringStep { if (itemPermissionChecker.canEditItem(getDocument())) { final SciProject project = (SciProject) getDocument(); final DateTimeFormatter isoDateFormatter - = DateTimeFormatter.ISO_DATE + = DateTimeFormatter.ISO_DATE .withZone(ZoneId.systemDefault()); project.setEnd(LocalDate.parse(end, isoDateFormatter)); @@ -573,7 +569,7 @@ public class SciProjectPropertiesStep extends AbstractMvcAuthoringStep { final SciProject project = (SciProject) getDocument(); project.getShortDescription().removeValue(locale); itemRepo.save(project); - + return buildRedirectPathForStep(); } else { return documentUi.showAccessDenied( 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 new file mode 100644 index 0000000..a4839ce --- /dev/null +++ b/sci-types-project/src/main/resources/WEB-INF/views/org/scientificcms/contenttypes/sciproject/ui/sciproject-basic-properties.xhtml @@ -0,0 +1,280 @@ +]> + + + + + + + +

#{SciProjectMessageBundle.getMessage('basicproperties.header', [SciProjectPropertiesSteo.name])}

+ +

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

+
+
#{SciProjectPropertiesStep.name}
+ + + +
+ + + + + + + + +
+

#{SciProjectMessageBundle['basicproperties.begin.header']}

+ +
+
+
#{SciProjectMessageBundle['basicproperties.begin.label']}
+
+ #{SciProjectPropertiesStep.begin} +
+
+ + +
+

#{SciProjectMessageBundle['basicproperties.end.header']}

+ +
+
+
#{SciProjectMessageBundle['basicproperties.end.label']}
+
+ #{SciProjectPropertiesStep.end} +
+
+ + + + + +
+ + +