diff --git a/sci-types-department/src/main/java/org/scientificcms/contenttypes/scidepartment/ui/SciDepartmentDescriptionStep.java b/sci-types-department/src/main/java/org/scientificcms/contenttypes/scidepartment/ui/SciDepartmentDescriptionStep.java index 569627e..d5ae79d 100644 --- a/sci-types-department/src/main/java/org/scientificcms/contenttypes/scidepartment/ui/SciDepartmentDescriptionStep.java +++ b/sci-types-department/src/main/java/org/scientificcms/contenttypes/scidepartment/ui/SciDepartmentDescriptionStep.java @@ -352,38 +352,38 @@ public class SciDepartmentDescriptionStep extends AbstractMvcAuthoringStep { } } - @GET - @Path("/texts/view/{textKey}") - @Transactional(Transactional.TxType.REQUIRED) - @AuthorizationRequired - public String viewDepartmentText( - @PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM) - final String sectionIdentifier, - @PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME) - final String documentPath, - @PathParam("textKey") - final String textKey - ) { - try { - init(); - } catch (ContentSectionNotFoundException ex) { - return ex.showErrorMessage(); - } catch (DocumentNotFoundException ex) { - return ex.showErrorMessage(); - } - - if (itemPermissionChecker.canEditItem(getDepartment())) { - textsModel.setSelectedText(textKey); - - return "org/scientificcms/contenttypes/scidepartment/ui/texts/view-values.xhtml"; - } else { - return documentUi.showAccessDenied( - getContentSection(), - getDepartment(), - messageBundle.getMessage("scidepartment.edit.denied") - ); - } - } +// @GET +// @Path("/texts/view/{textKey}") +// @Transactional(Transactional.TxType.REQUIRED) +// @AuthorizationRequired +// public String viewDepartmentText( +// @PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM) +// final String sectionIdentifier, +// @PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME) +// final String documentPath, +// @PathParam("textKey") +// final String textKey +// ) { +// try { +// init(); +// } catch (ContentSectionNotFoundException ex) { +// return ex.showErrorMessage(); +// } catch (DocumentNotFoundException ex) { +// return ex.showErrorMessage(); +// } +// +// if (itemPermissionChecker.canEditItem(getDepartment())) { +// textsModel.setSelectedText(textKey); +// +// return "org/scientificcms/contenttypes/scidepartment/ui/texts/view-values.xhtml"; +// } else { +// return documentUi.showAccessDenied( +// getContentSection(), +// getDepartment(), +// messageBundle.getMessage("scidepartment.edit.denied") +// ); +// } +// } @GET @Path("/texts/view/{textKey}/{locale}") @@ -409,7 +409,7 @@ public class SciDepartmentDescriptionStep extends AbstractMvcAuthoringStep { textsModel.setSelectedText(textKey); textsModel.setSelectedLocale(new Locale(localeParam).toString()); - return "org/scientificcms/contenttypes/scidepartment/ui/texts/view-text.xhtml"; + return "org/scientificcms/contenttypes/scidepartment/ui/texts/view.xhtml"; } else { return documentUi.showAccessDenied( getContentSection(),