Edit forms for monograph
parent
6cea3ca1e3
commit
01431f3f92
|
|
@ -4,6 +4,7 @@ import org.libreccm.api.Identifier;
|
||||||
import org.libreccm.api.IdentifierParser;
|
import org.libreccm.api.IdentifierParser;
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.libreccm.ui.BaseUrl;
|
||||||
import org.librecms.assets.Person;
|
import org.librecms.assets.Person;
|
||||||
import org.librecms.assets.PersonRepository;
|
import org.librecms.assets.PersonRepository;
|
||||||
import org.librecms.contentsection.AssetRepository;
|
import org.librecms.contentsection.AssetRepository;
|
||||||
|
|
@ -31,6 +32,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.mvc.Models;
|
import javax.mvc.Models;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
import javax.ws.rs.DefaultValue;
|
import javax.ws.rs.DefaultValue;
|
||||||
import javax.ws.rs.FormParam;
|
import javax.ws.rs.FormParam;
|
||||||
|
|
@ -51,6 +53,9 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
@Inject
|
@Inject
|
||||||
private AssetRepository assetRepo;
|
private AssetRepository assetRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private BaseUrl baseUrl;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ContentItemRepository itemRepo;
|
private ContentItemRepository itemRepo;
|
||||||
|
|
||||||
|
|
@ -60,6 +65,9 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
@Inject
|
@Inject
|
||||||
private GlobalizationHelper globalizationHelper;
|
private GlobalizationHelper globalizationHelper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private HttpServletRequest request;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private IdentifierParser identifierParser;
|
private IdentifierParser identifierParser;
|
||||||
|
|
||||||
|
|
@ -111,6 +119,10 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
final T item = getPublicationItem();
|
final T item = getPublicationItem();
|
||||||
final P publication = getPublication();
|
final P publication = getPublication();
|
||||||
|
|
||||||
|
propertiesStepModel.setBaseUrl(baseUrl.getBaseUrl(request));
|
||||||
|
|
||||||
|
propertiesStepModel.setEditStepUrlFragment(getEditStepUrlFragment());
|
||||||
|
|
||||||
propertiesStepModel.setName(item.getDisplayName());
|
propertiesStepModel.setName(item.getDisplayName());
|
||||||
|
|
||||||
propertiesStepModel.setYearOfPublication(
|
propertiesStepModel.setYearOfPublication(
|
||||||
|
|
@ -546,6 +558,10 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/authors")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional
|
||||||
public String addAuthor(
|
public String addAuthor(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
final String sectionIdentifier,
|
final String sectionIdentifier,
|
||||||
|
|
@ -724,6 +740,15 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL fragment of the implementation of this class, without the leading
|
||||||
|
* {@code @} symbol.
|
||||||
|
*
|
||||||
|
* @return URL fragment of the implementation of this class, without the
|
||||||
|
* leading {@code @} symbol.
|
||||||
|
*/
|
||||||
|
protected abstract String getEditStepUrlFragment();
|
||||||
|
|
||||||
protected abstract String getStepTemplatePath();
|
protected abstract String getStepTemplatePath();
|
||||||
|
|
||||||
private AuthorsTableRow buildAuthorsTableRow(final Authorship authorship) {
|
private AuthorsTableRow buildAuthorsTableRow(final Authorship authorship) {
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,11 @@ public class MonographPropertiesStep extends AbstractPublicationWithPublisherPro
|
||||||
public Class<MonographPropertiesStep> getStepClass() {
|
public Class<MonographPropertiesStep> getStepClass() {
|
||||||
return MonographPropertiesStep.class;
|
return MonographPropertiesStep.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getEditStepUrlFragment() {
|
||||||
|
return "monograph-basicproperties";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ import javax.inject.Named;
|
||||||
@Named("SciCmsPublicationPropertiesStepModel")
|
@Named("SciCmsPublicationPropertiesStepModel")
|
||||||
public class PublicationPropertiesStepModel {
|
public class PublicationPropertiesStepModel {
|
||||||
|
|
||||||
|
private String baseUrl;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private Map<String, String> titleValues;
|
private Map<String, String> titleValues;
|
||||||
|
|
@ -26,12 +28,22 @@ public class PublicationPropertiesStepModel {
|
||||||
private List<String> unusedTitleLocales;
|
private List<String> unusedTitleLocales;
|
||||||
|
|
||||||
private int yearOfPublication;
|
private int yearOfPublication;
|
||||||
|
|
||||||
private Map<String, String> shortDecriptionValues;
|
private Map<String, String> shortDecriptionValues;
|
||||||
|
|
||||||
private List<String> unusedShortDescriptionLocales;
|
private List<String> unusedShortDescriptionLocales;
|
||||||
|
|
||||||
private List<AuthorsTableRow> authors;
|
private List<AuthorsTableRow> authors;
|
||||||
|
|
||||||
|
private String editStepUrlFragment;
|
||||||
|
|
||||||
|
public String getBaseUrl() {
|
||||||
|
return baseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setBaseUrl(final String baseUrl) {
|
||||||
|
this.baseUrl = baseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
|
|
@ -56,11 +68,11 @@ public class PublicationPropertiesStepModel {
|
||||||
public void setUnusedTitleLocales(final List<String> unusedTitleLocales) {
|
public void setUnusedTitleLocales(final List<String> unusedTitleLocales) {
|
||||||
this.unusedTitleLocales = new ArrayList<>(unusedTitleLocales);
|
this.unusedTitleLocales = new ArrayList<>(unusedTitleLocales);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getYearOfPublication() {
|
public int getYearOfPublication() {
|
||||||
return yearOfPublication;
|
return yearOfPublication;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setYearOfPublication(final int yearOfPublication) {
|
public void setYearOfPublication(final int yearOfPublication) {
|
||||||
this.yearOfPublication = yearOfPublication;
|
this.yearOfPublication = yearOfPublication;
|
||||||
}
|
}
|
||||||
|
|
@ -95,4 +107,12 @@ public class PublicationPropertiesStepModel {
|
||||||
this.authors = new ArrayList<>(authors);
|
this.authors = new ArrayList<>(authors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getEditStepUrlFragment() {
|
||||||
|
return editStepUrlFragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEditStepUrlFragment(final String editStepUrlFragment) {
|
||||||
|
this.editStepUrlFragment = editStepUrlFragment;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,54 @@
|
||||||
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
||||||
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
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:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
<ui:composition template="/WEB-INF/views/org/scientificcms/contenttypes/ui/edit-publication.xhtml">
|
<ui:composition template="/WEB-INF/views/org/scientificcms/contenttypes/ui/edit-publication.xhtml">
|
||||||
|
|
||||||
<ui:define name="publicationProperties">
|
<ui:define name="publicationProperties">
|
||||||
|
|
||||||
<!-- Publisher via AssetSearchWidget -->
|
<h3>#{SciPublicationsUiMessageBundle['publicationwithpublisher.publisher']}</h3>
|
||||||
|
|
||||||
|
<div class="mb-2">
|
||||||
|
<div class="text-right">
|
||||||
|
<librecms:assetPickerButton
|
||||||
|
assetPickerId="publisher-picker"
|
||||||
|
buttonIcon="plus-circle"
|
||||||
|
buttonText="#{SciPublicationsUiMessageBundle['publicationwithpublisher.publisher.set.label']}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<librecms:assetPicker
|
||||||
|
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/publisher"
|
||||||
|
assetType="#{SciCmsPublicationWithPublisherPropertiesStepModel.publisherType}"
|
||||||
|
assetPickerId="publisher-picker"
|
||||||
|
baseUrl="#{SciCmsPublicationPropertiesStepModel.baseUrl}"
|
||||||
|
contentSection="#{ContentSectionModel.sectionName}"
|
||||||
|
dialogTitle="#{SciPublicationsUiMessageBundle['publicationwithpublisher.publisher.select.dialog.title']}"
|
||||||
|
formParamName="publisherIdentifier"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{SciCmsPublicationWithPublisherPropertiesStepModel.publisherPlace != null}">
|
||||||
|
#{SciCmsPublicationWithPublisherPropertiesStepModel.publisherName}, #{SciCmsPublicationWithPublisherPropertiesStepModel.publisherPlace}
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
#{SciCmsPublicationWithPublisherPropertiesStepModel.publisherName}
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
<c:if test="#{SciCmsPublicationWithPublisherPropertiesStepModel.publisherUuid != null}">
|
||||||
|
<libreccm:deleteDialog
|
||||||
|
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@collectedvolume-edit/publisher/@remove"
|
||||||
|
buttonText="#{SciPublicationsUiMessageBundle['publicationwithpublisher.publisher.remove.label']}"
|
||||||
|
cancelLabel="#{SciPublicationsUiMessageBundle['publicationwithpublisher.publisher.cancel']}"
|
||||||
|
confirmLabel="#{SciPublicationsUiMessageBundle['publicationwithpublisher.publisher.confirm']}"
|
||||||
|
dialogId="publisher-remove"
|
||||||
|
dialogTitle="#{SciPublicationsUiMessageBundle['publicationwithpublisher.publisher.title']}"
|
||||||
|
message="#{SciPublicationsUiMessageBundle['publicationwithpublisher.publisher.message']}"
|
||||||
|
/>
|
||||||
|
</c:if>
|
||||||
|
</p>
|
||||||
|
|
||||||
<ui:insert name="publicationWithPublisherProperties" />
|
<ui:insert name="publicationWithPublisherProperties" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
||||||
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
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:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
||||||
|
|
||||||
|
|
@ -10,6 +11,35 @@
|
||||||
|
|
||||||
<h2>#{authoringStepTitle}</h2>
|
<h2>#{authoringStepTitle}</h2>
|
||||||
|
|
||||||
|
<c:if test="#{authorNotFound != null}">
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
#{SciPublicationsUiMessageBundle.getMessage('basicproperties.errors.author_not_found', [authorNotFound])}
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
<c:if test="#{authorshipNotFound != null}">
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
#{SciPublicationsUiMessageBundle.getMessage('basicproperties.errors.authorship_not_found', [authorshipNotFound])}
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
<c:if test="#{publisherNotFound != null}">
|
||||||
|
<div class="alert alert-warning" role="alert">
|
||||||
|
#{SciPublicationsUiMessageBundle.getMessage('basicproperties.errors.publisher_not_found', [publisherNotFound])}
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
<template id="authors-sort-error-general">
|
||||||
|
<div class="alert alert-warning mt-3" role="alert">
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.errors.authors.sort.general']}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template id="authors-sort-error-save">
|
||||||
|
<div class="alert alert-warning mt-3" role="alert">
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.errors.authors.sort.save']}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<h3>#{SciPublicationsUiMessageBundle['basicproperties.name.header']}</h3>
|
<h3>#{SciPublicationsUiMessageBundle['basicproperties.name.header']}</h3>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<pre class="mr-2">#{SciCmsPublicationPropertiesStepModel.name}</pre>
|
<pre class="mr-2">#{SciCmsPublicationPropertiesStepModel.name}</pre>
|
||||||
|
|
@ -33,7 +63,7 @@
|
||||||
id="name-edit-dialog"
|
id="name-edit-dialog"
|
||||||
tabindex="-1">
|
tabindex="-1">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@monograph-basicproperties/name"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/name"
|
||||||
class="modal-content"
|
class="modal-content"
|
||||||
method="post">
|
method="post">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
|
@ -74,19 +104,236 @@
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<!-- name: String -->
|
<libreccm:localizedStringEditor
|
||||||
|
addButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.add']}"
|
||||||
|
addDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.cancel']}"
|
||||||
|
addDialogLocaleSelectHelp="#{SciPublicationsUiMessageBundle['basicproperties.title.add.locale.help']}"
|
||||||
|
addDialogLocaleSelectLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.add.locale.label']}"
|
||||||
|
addDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.add.submit']}"
|
||||||
|
addDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.header']}"
|
||||||
|
addDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.title.add.value.help']}"
|
||||||
|
addDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.add.value.label']}"
|
||||||
|
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/title/@add"
|
||||||
|
editButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit']}"
|
||||||
|
editDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.cancel']}"
|
||||||
|
editDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.submit']}"
|
||||||
|
editDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.header']}"
|
||||||
|
editDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.value.help']}"
|
||||||
|
editDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.value.label']}"
|
||||||
|
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/title/@edit"
|
||||||
|
editorId="title-editor"
|
||||||
|
hasUnusedLocales="#{!SciCmsPublicationPropertiesStepModel.unusedTitleLocales.isEmpty()}"
|
||||||
|
headingLevel="3"
|
||||||
|
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||||
|
readOnly="#{!CmsSelectedDocumentModel.canEdit}"
|
||||||
|
removeButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.remove']}"
|
||||||
|
removeDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.cancel']}"
|
||||||
|
removeDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.submit']}"
|
||||||
|
removeDialogText="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.text']}"
|
||||||
|
removeDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.header']}"
|
||||||
|
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/title/@remove"
|
||||||
|
title="#{SciPublicationsUiMessageBundle['basicproperties.title.header']}"
|
||||||
|
unusedLocales="#{SciCmsPublicationPropertiesStepModel.unusedTitleLocales}"
|
||||||
|
values="#{SciCmsPublicationPropertiesStepModel.titleValues}"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- title: LocalizedString -->
|
<bootstrap:formGroupNumber
|
||||||
|
help="#{SciPublicationsUiMessageBundle['basicproperties.yearofpublication.help']}"
|
||||||
|
inputId="yearOfPublication"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['basicproperties.yearofpublication.help']}"
|
||||||
|
name="yearOfPublication"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- yearOfPublication: int -->
|
<libreccm:localizedStringEditor
|
||||||
|
addButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add']}"
|
||||||
|
addDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.cancel']}"
|
||||||
|
addDialogLocaleSelectHelp="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.locale.help']}"
|
||||||
|
addDialogLocaleSelectLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.locale.label']}"
|
||||||
|
addDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.submit']}"
|
||||||
|
addDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.header']}"
|
||||||
|
addDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.value.help']}"
|
||||||
|
addDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.value.label']}"
|
||||||
|
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/shortdescription/@add"
|
||||||
|
editButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit']}"
|
||||||
|
editDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.cancel']}"
|
||||||
|
editDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.submit']}"
|
||||||
|
editDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.header']}"
|
||||||
|
editDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.value.help']}"
|
||||||
|
editDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.value.label']}"
|
||||||
|
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/shortdescription/@edit"
|
||||||
|
editorId="shortdescription-editor"
|
||||||
|
hasUnusedLocales="#{!SciCmsPublicationPropertiesStepModel.unusedTitleLocales.isEmpty()}"
|
||||||
|
headingLevel="3"
|
||||||
|
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||||
|
readOnly="#{!CmsSelectedDocumentModel.canEdit}"
|
||||||
|
removeButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove']}"
|
||||||
|
removeDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.cancel']}"
|
||||||
|
removeDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.submit']}"
|
||||||
|
removeDialogText="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.text']}"
|
||||||
|
removeDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.header']}"
|
||||||
|
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/shortdescription/@remove"
|
||||||
|
title="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.header']}"
|
||||||
|
unusedLocales="#{SciCmsPublicationPropertiesStepModel.unusedTitleLocales}"
|
||||||
|
values="#{SciCmsPublicationPropertiesStepModel.shortdescriptionValues}"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- shortDescription: LocalizedString Textarea! -->
|
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||||
|
<h3>#{SciPublicationsUiMessageBundle['basicproperties.authors.header']}</h3>
|
||||||
<!-- authors: List<Authorships>, via asset search widget -->
|
<div class="mb-2">
|
||||||
|
<div class="text-right">
|
||||||
|
<librecms:assetPickerButton
|
||||||
|
assetPickerId="authors-picker"
|
||||||
|
buttonIcon="plus-circle"
|
||||||
|
buttonText="#{SciPublicationsUiMessageBundle['basicproperties.authors.add.label']}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<librecms:assetPicker
|
||||||
|
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/authors"
|
||||||
|
assetType="#{SciCmsCollectedVolumeAssetEditStepModel.authorType}"
|
||||||
|
assetPickerId="authors-picker"
|
||||||
|
baseUrl="#{SciCmsPublicationPropertiesStepModel.baseUrl}"
|
||||||
|
contentSection="#{ContentSectionModel.sectionName}"
|
||||||
|
dialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.authors.add.dialog.title']}"
|
||||||
|
formParamName="authorIdentifier"
|
||||||
|
>
|
||||||
|
<bootstrap:formCheck
|
||||||
|
inputId="authors-picker-editor"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['basicproperties.authors.editor.label']}"
|
||||||
|
name="editor"
|
||||||
|
/>
|
||||||
|
</librecms:assetPicker>
|
||||||
|
<button class="btn btn-secondary authors-save-order-button"
|
||||||
|
disabled="disabled"
|
||||||
|
type="button">
|
||||||
|
<span class="save-icon">
|
||||||
|
<bootstrap:svgIcon icon="save" />
|
||||||
|
</span>
|
||||||
|
<span class="save-spinner d-none">
|
||||||
|
<span aria-hidden="true"
|
||||||
|
class="spinner-border spinner-border-sm"
|
||||||
|
role="status"></span>
|
||||||
|
<span class="sr-only">#{SciPublicationsUiMessageBundle['authors.order.save.inprogress']}</span>
|
||||||
|
</span>
|
||||||
|
<span>#{SciPublicationsUiMessageBundle['authors.order.save']}</span>
|
||||||
|
</button>
|
||||||
|
<table id="authors-table"
|
||||||
|
data-saveUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}-authors/save-order">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#{SciPublicationsUiMessageBundle['basicproperties.authors.table.name']}</th>
|
||||||
|
<th>
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.authors.table.editor']}
|
||||||
|
</th>
|
||||||
|
<th colspan="2">
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.authors.table.actions']}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:forEach items="#{SciCmsPublicationPropertiesStepModel.authors}"
|
||||||
|
var="author">
|
||||||
|
<tr class="publication-author"
|
||||||
|
id="#{author.authorshipId}"
|
||||||
|
data-id="#{author.authorshipId}">
|
||||||
|
<td>
|
||||||
|
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="arrows-move" />
|
||||||
|
<span class="sr-only">#{SciPublicationsUiMessageBundle['basicproperties.authors.move']}</span>
|
||||||
|
</button>
|
||||||
|
#{author.authorName}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{author.editor}">
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.authors.table.editor.yes']}
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.authors.table.editor.no']}
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<button class="btn btn-secondary"
|
||||||
|
data-toggle="modal"
|
||||||
|
data-target="#authorship-edit-#{author.authorshipUuid}"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="pen" />
|
||||||
|
<span class="sr-only">
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.authors.edit.label']}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<div aria-hidden="true"
|
||||||
|
aria-labelledby="authorship-edit-#{author.authorshipUuid}-title"
|
||||||
|
class="modal fade"
|
||||||
|
id="authorship-edit-#{author.authorshipUuid}"
|
||||||
|
tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/authors/#{author.authorshipUuid}"
|
||||||
|
class="modal-content"
|
||||||
|
method="post">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="authorship-edit-#{author.authorshipUuid}-title">
|
||||||
|
#{SciPublicationsUiMessageBundle.getMessage('basicproperties.authors.editdialog.title', [author.authorName])}
|
||||||
|
</h4>
|
||||||
|
<button aria-label="{SciPublicationsUiMessageBundle['basicproperties.authors.editdialog.cancel']}"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="x" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<bootstrap:formCheck
|
||||||
|
checked="#{author.editor}"
|
||||||
|
inputId="#{author.authorshipUuid}-editor"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['basicproperties.authors.editdialog.editor.label']}"
|
||||||
|
name="editor"
|
||||||
|
value="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-warning"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.authors.editdialog.cancel']}
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
type="submit">
|
||||||
|
#{SciPublicationsUiMessageBundle['basicproperties.authors.editdialog.submit']}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<libreccm:deleteDialog
|
||||||
|
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/authors/#{author.authorshipUuid}/remove"
|
||||||
|
buttonText="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.label']}"
|
||||||
|
cancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.cancel']}"
|
||||||
|
confirmLabel="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.confirm']}"
|
||||||
|
dialogId="remove-author-#{author.authorshipUuid}"
|
||||||
|
dialogTitle="#{SciPublicationsUiMessageBundle.getMessage('basicproperties.authors.remove.title', [author.authorName])}"
|
||||||
|
message="#{SciPublicationsUiMessageBundle.getMessage('basicproperties.authors.remove.text', [author.authorName])}"
|
||||||
|
/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
<ui:insert name="publicationProperties" />
|
<ui:insert name="publicationProperties" />
|
||||||
</ui:define>
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="scripts">
|
||||||
|
<script src="#{request.contextPath}/assets/@scipublications/publication-authors.js" />
|
||||||
|
<ui:insert name="publicationScript" />
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
||||||
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||||
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
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:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
<ui:composition template="/WEB-INF/views/org/scientificcms/contenttypes/ui/edit-publication-with-publisher.xhtml">
|
<ui:composition template="/WEB-INF/views/org/scientificcms/contenttypes/ui/edit-publication-with-publisher.xhtml">
|
||||||
|
|
||||||
|
|
@ -12,11 +13,14 @@
|
||||||
<ui:param name="authoringStepTitle"
|
<ui:param name="authoringStepTitle"
|
||||||
value="#{SciPublicationsUiMessageBundle.getMessage('monograph.basicproperties.header', [SciCmsPublicationPropertiesStepModel.name])}" />
|
value="#{SciPublicationsUiMessageBundle.getMessage('monograph.basicproperties.header', [SciCmsPublicationPropertiesStepModel.name])}" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ui:define name="publicationWithPublisherProperties">
|
<ui:define name="publicationWithPublisherProperties">
|
||||||
<!-- insert publication with publisher -->
|
<bootstrap:formCheck
|
||||||
|
checked="#{SciCmsMonographPropertiesStepModel.reviewed}"
|
||||||
|
inputId="publication-reviewed"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['monograph.reviewed.label']}"
|
||||||
|
name="reviewed"
|
||||||
|
/>
|
||||||
|
|
||||||
</ui:define>
|
</ui:define>
|
||||||
|
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,6 @@
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<h3 class="mr-2">#{SciProjectMessageBundle['basicproperties.begin.header']}</h3>
|
<h3 class="mr-2">#{SciProjectMessageBundle['basicproperties.begin.header']}</h3>
|
||||||
<button class="btn btn-primary btn-sm"
|
<button class="btn btn-primary btn-sm"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue