View for editing miscellaneous information about a publication.

pull/1/head
Jens Pelzetter 2022-06-25 17:43:18 +02:00
parent 8a8c6326bd
commit e9d983247e
6 changed files with 143 additions and 0 deletions

View File

@ -20,6 +20,8 @@ public class PublicationMiscStepModel {
private boolean canEdit; private boolean canEdit;
private String publicationTitle;
private Map<String, String> miscValues; private Map<String, String> miscValues;
private List<CmsEditorLocaleVariantRow> variants; private List<CmsEditorLocaleVariantRow> variants;
@ -28,6 +30,14 @@ public class PublicationMiscStepModel {
private String selectedLocale; private String selectedLocale;
public String getPublicationTitle() {
return publicationTitle;
}
public void setPublicationTitle(final String publicationTitle) {
this.publicationTitle = publicationTitle;
}
public Map<String, String> getMiscValues() { public Map<String, String> getMiscValues() {
return Collections.unmodifiableMap(miscValues); return Collections.unmodifiableMap(miscValues);
} }

View File

@ -0,0 +1,33 @@
<!DOCTYPE html [<!ENTITY times '&#215;'>]>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
xmlns:librecms="http://xmlns.jcp.org/jsf/composite/components/librecms"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
<ui:define name="authoringStep">
<h2>#{SciPublicationsUiMessageBundle.getMessage('editsteps.misc.header', SciCmsPublicationAbstractStepModel.publicationTitle)}</h2>
<librecms:cmsEditorVariants
addButtonLabel="#{SciPublicationsUiMessageBundle['editsteps.misc.editor.add_variant']}"
addDialogLocaleSelectHelp="#{SciPublicationsUiMessageBundle['editsteps.misc.editor.add.locale_help']}"
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc/misc/add"
canEdit="#{SciCmsPublicationAbstractStepModel.canEdit}"
editorPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc/misc/edit"
hasUnusedLocales="#{!SciCmsPublicationAbstractStepModel.unusedLocales.isEmpty()}"
headingLevel="3"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc/misc/remove"
sourceEditorPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc/misc/edit-source"
title="#{SciPublicationsUiMessageBundle['editsteps.misc.editor.header']}"
unusedLocales="#{SciCmsPublicationAbstractStepModel.unusedLocales}"
variants="#{SciCmsPublicationAbstractStepModel.variants}"
variantsId="publication-misc"
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc/misc/view"
/>
</ui:define>
</ui:composition>
</html>

View File

@ -0,0 +1,43 @@
<!DOCTYPE html [<!ENTITY times '&#215;'>]>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
xmlns:librecms="http://xmlns.jcp.org/jsf/composite/components/librecms"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
<ui:define name="authoringStep">
<div class="d-flex">
<a class="btn btn-secondary btn-sm align-self-center mr-2"
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/docuemnts/#{CmsSelectedDocumentModel.itemPath}/@publication-misc">
<bootstrap:svgIcon icon="caret-left-fill" />
<span class="sr-only">#{SciPublicationsUiMessageBundle['editsteps.misc.step_back']}</span>
</a>
<h2>#{SciPublicationsUiMessageBundle['editsteps.misc.header_edit']}</h2>
</div>
<c:if test="#{SciCmsPublicationAbstractStepModel.canEdit}">
<librecms:cmsEditor
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/docuemnts/#{CmsSelectedDocumentModel.itemPath}/@publication-misc"
baseUrl="#{mvc.basePath}"
canEdit="#{SciCmsPublicationAbstractStepModel.canEdit}"
contentSection="#{ContentSectionModel.sectionName}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc/misc/edit"
editorId="scipublication-misc-editor"
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
selectedLocale="#{SciCmsPublicationAbstractStepModel.selectedLocale}"
title="#{SciPublicationsUiMessageBundle['editsteps.misc.editor.header']}"
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc-resources"
/>
</c:if>
</ui:define>
<ui:define name="scripts">
<script src="#{request.contextPath}/assets/@content-sections/cms-editor.js"></script>
</ui:define>
</ui:composition>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html [<!ENTITY times '&#215;'>]>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
xmlns:librecms="http://xmlns.jcp.org/jsf/composite/components/librecms"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
<ui:define name="authoringStep">
<div class="d-flex">
<a class="btn btn-secondary btn-sm align-self-center mr-2"
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc">
<bootstrap:svgIcon icon="caret-left-fill" />
<span class="sr-only">#{SciPublicationsUiMessageBundle['editsteps.misc.step_back']}</span>
</a>
<h2>#{SciPublicationsUiMessageBundle['editsteps.misc.header_view']}</h2>
</div>
<c:if test="#{SciCmsPublicationAbstractStepModel.canEdit}">
<div class="text-right">
<a class="btn btn-secondary"
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@publication-misc/misc/edit">
<bootstrap:svgIcon icon="pen" />
<span class="sr-only">#{SciPublicationsUiMessageBundle['editsteps.misc.edit']}</span>
</a>
</div>
</c:if>
<div class="cms-text-preview article-text border p-2">
<h:outputText escape="false"
value="#{SciCmsPublicationAbstractStepModel.miscValues.get(SciCmsPublicationAbstractStepModel.selectedLocale)}"
</div>
</ui:define>
</ui:composition>
</html>

View File

@ -369,3 +369,11 @@ editsteps.abstract.step_back=Back
editsteps.abstract.header_view=Abstract editsteps.abstract.header_view=Abstract
editsteps.abstract.edit=Edit editsteps.abstract.edit=Edit
editsteps.abstract.header_edit=Edit abstract editsteps.abstract.header_edit=Edit abstract
editsteps.misc.header=Edit miscellaneous information of publication {0}
editsteps.misc.editor.add_variant=Add localized information
editsteps.misc.editor.add.locale_help=The locale of the information.
editsteps.misc.editor.header=Edit miscellaneous information
editsteps.misc.step_back=Back
editsteps.misc.header_view=Miscellaneous information
editsteps.misc.edit=Edit
editsteps.misc.header_edit=Edit miscellaneous information

View File

@ -369,3 +369,11 @@ editsteps.abstract.step_back=Zur\u00fcck
editsteps.abstract.header_view=Zusammenfassung editsteps.abstract.header_view=Zusammenfassung
editsteps.abstract.edit=Bearbeiten editsteps.abstract.edit=Bearbeiten
editsteps.abstract.header_edit=Zusammenfassung bearbeiten editsteps.abstract.header_edit=Zusammenfassung bearbeiten
editsteps.misc.header=Weitere Informationen zu Publikation {0} bearbeiten
editsteps.misc.editor.add_variant=Lokalisierte Informationen hinzuf\u00fcgen
editsteps.misc.editor.add.locale_help=Die Sprache der Informationen.
editsteps.misc.editor.header=Weitere Informationen bearbeiten
editsteps.misc.step_back=Zur\u00fcck
editsteps.misc.header_view=Weitere Informationen
editsteps.misc.edit=Bearbeiten
editsteps.misc.header_edit=Weitere Informationen bearbeiten