Authoring steps for Internet Article
parent
4ce92ac312
commit
b84ac8c161
|
|
@ -1,8 +1,3 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications;
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications.contenttypes;
|
||||
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
import org.librecms.contenttypes.ContentTypeDescription;
|
||||
import org.librecms.ui.contentsections.documents.MvcAuthoringKit;
|
||||
import org.scientificcms.publications.InternetArticle;
|
||||
import org.scientificcms.publications.ui.contenttypes.InternetArticleExtendedPropertiesStep;
|
||||
import org.scientificcms.publications.ui.contenttypes.InternetArticleItemCreateStep;
|
||||
import org.scientificcms.publications.ui.contenttypes.InternetArticlePropertiesStep;
|
||||
import org.scientificcms.publications.ui.contenttypes.PublicationAbstractStep;
|
||||
import org.scientificcms.publications.ui.contenttypes.PublicationMiscStep;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
|
@ -25,7 +25,16 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
|||
@ContentTypeDescription(
|
||||
labelBundle = "org.scientificcms.publications.contenttypes.InternetArticle",
|
||||
descriptionBundle
|
||||
= "org.scientificcms.publications.contenttypes.InternetArticle"
|
||||
= "org.scientificcms.publications.contenttypes.InternetArticle"
|
||||
)
|
||||
@MvcAuthoringKit(
|
||||
createStep = InternetArticleItemCreateStep.class,
|
||||
authoringSteps = {
|
||||
InternetArticlePropertiesStep.class,
|
||||
InternetArticleExtendedPropertiesStep.class,
|
||||
PublicationAbstractStep.class,
|
||||
PublicationMiscStep.class
|
||||
}
|
||||
)
|
||||
public class InternetArticleItem extends PublicationItem<InternetArticle> {
|
||||
|
||||
|
|
@ -70,7 +79,7 @@ public class InternetArticleItem extends PublicationItem<InternetArticle> {
|
|||
return false;
|
||||
}
|
||||
final InternetArticleItem other
|
||||
= (InternetArticleItem) obj;
|
||||
= (InternetArticleItem) obj;
|
||||
// if (!other.canEqual(this)) {
|
||||
// return false;
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package org.scientificcms.publications.ui.contenttypes;
|
|||
|
||||
import org.libreccm.api.Identifier;
|
||||
import org.libreccm.api.IdentifierParser;
|
||||
import org.libreccm.l10n.GlobalizationHelper;
|
||||
import org.libreccm.security.AuthorizationRequired;
|
||||
import org.librecms.assets.Organization;
|
||||
import org.librecms.contentsection.AssetRepository;
|
||||
|
|
@ -552,7 +551,7 @@ public class ExpertisePropertiesStep
|
|||
}
|
||||
|
||||
if (itemPermissionChecker.canEditItem(getDocument())) {
|
||||
updateProperties(
|
||||
super.updateProperties(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
yearOfPublicationParam
|
||||
|
|
|
|||
|
|
@ -0,0 +1,294 @@
|
|||
package org.scientificcms.publications.ui.contenttypes;
|
||||
|
||||
import org.libreccm.security.AuthorizationRequired;
|
||||
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||
import org.librecms.ui.contentsections.ItemPermissionChecker;
|
||||
import org.librecms.ui.contentsections.documents.DocumentNotFoundException;
|
||||
import org.librecms.ui.contentsections.documents.DocumentUi;
|
||||
import org.librecms.ui.contentsections.documents.MvcAuthoringStepDef;
|
||||
import org.librecms.ui.contentsections.documents.MvcAuthoringSteps;
|
||||
import org.scientificcms.publications.InternetArticle;
|
||||
import org.scientificcms.publications.PublicationRepository;
|
||||
import org.scientificcms.publications.contenttypes.InternetArticleItem;
|
||||
import org.scientificcms.publications.ui.SciPublicationsUiConstants;
|
||||
import org.scientificcms.publications.ui.SciPublicationsUiMessageBundle;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.mvc.Controller;
|
||||
import javax.mvc.Models;
|
||||
import javax.transaction.Transactional;
|
||||
import javax.ws.rs.FormParam;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Path(MvcAuthoringSteps.PATH_PREFIX + "internetarticle-extendedproperties")
|
||||
@Controller
|
||||
@MvcAuthoringStepDef(
|
||||
bundle = SciPublicationsUiConstants.BUNDLE,
|
||||
descriptionKey = "authoringsteps.extendedproperties.description",
|
||||
labelKey = "authoringsteps.extendedproperties.label",
|
||||
supportedDocumentType = InternetArticleItem.class
|
||||
)
|
||||
public class InternetArticleExtendedPropertiesStep
|
||||
extends AbstractPublicationExtendedPropertiesStep<InternetArticleItem, InternetArticle> {
|
||||
|
||||
@Inject
|
||||
private DocumentUi documentUi;
|
||||
|
||||
@Inject
|
||||
private InternetArticleExtendedPropertiesStepModel propertiesStepModel;
|
||||
|
||||
@Inject
|
||||
private ItemPermissionChecker itemPermissionChecker;
|
||||
|
||||
@Inject
|
||||
private SciPublicationsUiMessageBundle messageBundle;
|
||||
|
||||
@Inject
|
||||
private Models models;
|
||||
|
||||
@Inject
|
||||
private PublicationRepository publicationRepo;
|
||||
|
||||
@Override
|
||||
public Class<InternetArticleExtendedPropertiesStep> getStepClass() {
|
||||
return InternetArticleExtendedPropertiesStep.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<InternetArticle> getPublicationClass() {
|
||||
return InternetArticle.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEditStepUrlFragment() {
|
||||
return "internetarticle-extendedproperties";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getStepTemplatePath() {
|
||||
return "org/scientificcms/contenttypes/ui/internetarticle/edit-extended-properties.xhtml";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
protected void init() throws ContentSectionNotFoundException,
|
||||
DocumentNotFoundException {
|
||||
super.init();
|
||||
|
||||
final DateTimeFormatter isoDateFormatter = DateTimeFormatter.ISO_DATE
|
||||
.withZone(ZoneId.systemDefault());
|
||||
|
||||
propertiesStepModel.setDoi(getPublication().getDoi());
|
||||
propertiesStepModel.setIssn(getPublication().getIssn());
|
||||
propertiesStepModel.setLastAccessed(
|
||||
Optional
|
||||
.of(getPublication().getLastAccessed())
|
||||
.map(date -> isoDateFormatter.format(date))
|
||||
.orElse(null)
|
||||
);
|
||||
propertiesStepModel.setPublicationDate(
|
||||
Optional
|
||||
.of(getPublication().getPublicationDate())
|
||||
.map(date -> isoDateFormatter.format(date))
|
||||
.orElse(null)
|
||||
);
|
||||
propertiesStepModel.setUrn(getPublication().getUrn());
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String showStep(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath
|
||||
) {
|
||||
return super.showStep(sectionIdentifier, documentPath);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/properties")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String updateProperties(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@FormParam("languageOfPublication")
|
||||
final String languageOfPublicationParam,
|
||||
@FormParam("peerReviewed")
|
||||
final String peerReviewedParam,
|
||||
@FormParam("yearFirstPublished")
|
||||
final String yearFirstPublishedParam,
|
||||
@FormParam("issn")
|
||||
final String issn,
|
||||
@FormParam("lastAccessed")
|
||||
final String lastAccessedParam,
|
||||
@FormParam("publicationDate")
|
||||
final String publicationDateParam,
|
||||
@FormParam("urn")
|
||||
final String urn,
|
||||
@FormParam("doe")
|
||||
final String doi
|
||||
) {
|
||||
try {
|
||||
init();
|
||||
} catch (ContentSectionNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
} catch (DocumentNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
}
|
||||
|
||||
if (itemPermissionChecker.canEditItem(getDocument())) {
|
||||
super.updateProperties(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
languageOfPublicationParam,
|
||||
peerReviewedParam,
|
||||
yearFirstPublishedParam
|
||||
);
|
||||
|
||||
getPublication().setDoi(doi);
|
||||
getPublication().setIssn(issn);
|
||||
final DateTimeFormatter isoDateTimeFormatter
|
||||
= DateTimeFormatter.ISO_DATE.withZone(ZoneId.systemDefault());
|
||||
try {
|
||||
getPublication().setLastAccessed(
|
||||
LocalDate.parse(lastAccessedParam, isoDateTimeFormatter)
|
||||
);
|
||||
} catch (DateTimeParseException ex) {
|
||||
return showInvalidLastAccessedDate(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
lastAccessedParam
|
||||
);
|
||||
}
|
||||
try {
|
||||
getPublication().setPublicationDate(
|
||||
LocalDate.parse(publicationDateParam, isoDateTimeFormatter)
|
||||
);
|
||||
} catch (DateTimeParseException ex) {
|
||||
return showInvalidPublicationDate(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
lastAccessedParam
|
||||
);
|
||||
}
|
||||
getPublication().setUrn(urn);
|
||||
|
||||
publicationRepo.save(getPublication());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
} else {
|
||||
return documentUi.showAccessDenied(
|
||||
getContentSection(),
|
||||
getDocument(),
|
||||
messageBundle.getMessage("publication.edit.denied")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/series")
|
||||
@AuthorizationRequired
|
||||
@Transactional
|
||||
@Override
|
||||
public String addSeries(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@FormParam("seriesIdentifier")
|
||||
final String seriesIdentifier,
|
||||
@FormParam("volumeOfSeries")
|
||||
final String volumeOfSeries
|
||||
) {
|
||||
return super.addSeries(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
seriesIdentifier,
|
||||
volumeOfSeries
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/series/{volumeInSeriesUuid}")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String editVolumeInSeries(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@PathParam("volumeInSeriesUuid")
|
||||
final String volumeInSeriesUuid,
|
||||
@FormParam("volumeOfSeries")
|
||||
final String volumeOfSeries
|
||||
) {
|
||||
return super.editVolumeInSeries(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
volumeInSeriesUuid,
|
||||
volumeOfSeries
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/series/{volumeInSeriesUuid}/remove")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String removeVolumeInSeries(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@PathParam("volumeInSeriesUuid")
|
||||
final String volumeInSeriesUuid
|
||||
) {
|
||||
return super.removeVolumeInSeries(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
volumeInSeriesUuid
|
||||
);
|
||||
}
|
||||
|
||||
private String showInvalidLastAccessedDate(
|
||||
final String sectionIdentifier,
|
||||
final String documentPath,
|
||||
final String lastAccessedParam
|
||||
) {
|
||||
models.put("invalidLastAccessedDate", lastAccessedParam);
|
||||
return showStep(sectionIdentifier, documentPath);
|
||||
}
|
||||
|
||||
private String showInvalidPublicationDate(
|
||||
final String sectionIdentifier,
|
||||
final String documentPath,
|
||||
final String lastAccessedParam
|
||||
) {
|
||||
models.put("invalidPublicationDate", lastAccessedParam);
|
||||
return showStep(sectionIdentifier, documentPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package org.scientificcms.publications.ui.contenttypes;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Named("SciCmsInternetArticleExtendedPropertiesStepModel")
|
||||
public class InternetArticleExtendedPropertiesStepModel {
|
||||
|
||||
private String issn;
|
||||
|
||||
private String lastAccessed;
|
||||
|
||||
private String publicationDate;
|
||||
|
||||
private String urn;
|
||||
|
||||
private String doi;
|
||||
|
||||
public String getIssn() {
|
||||
return issn;
|
||||
}
|
||||
|
||||
public void setIssn(final String issn) {
|
||||
this.issn = issn;
|
||||
}
|
||||
|
||||
public String getLastAccessed() {
|
||||
return lastAccessed;
|
||||
}
|
||||
|
||||
public void setLastAccessed(final String lastAccessed) {
|
||||
this.lastAccessed = lastAccessed;
|
||||
}
|
||||
|
||||
public String getPublicationDate() {
|
||||
return publicationDate;
|
||||
}
|
||||
|
||||
public void setPublicationDate(final String publicationDate) {
|
||||
this.publicationDate = publicationDate;
|
||||
}
|
||||
|
||||
public String getUrn() {
|
||||
return urn;
|
||||
}
|
||||
|
||||
public void setUrn(final String urn) {
|
||||
this.urn = urn;
|
||||
}
|
||||
|
||||
public String getDoi() {
|
||||
return doi;
|
||||
}
|
||||
|
||||
public void setDoi(final String doi) {
|
||||
this.doi = doi;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package org.scientificcms.publications.ui.contenttypes;
|
||||
|
||||
import org.libreccm.l10n.GlobalizationHelper;
|
||||
import org.scientificcms.publications.InternetArticle;
|
||||
import org.scientificcms.publications.contenttypes.InternetArticleItem;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Named("SciPublicationsInternetArticleCreateStep")
|
||||
public class InternetArticleItemCreateStep
|
||||
extends AbstractPublicationItemCreateStep<InternetArticleItem, InternetArticle>{
|
||||
|
||||
@Inject
|
||||
private GlobalizationHelper globalizationHelper;
|
||||
|
||||
@Override
|
||||
public String getDocumentType() {
|
||||
return InternetArticleItem.class.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return globalizationHelper
|
||||
.getLocalizedTextsUtil(getBundle())
|
||||
.getText("internetarticleitem.createstep.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String showCreateStep() {
|
||||
return "org/scientificcms/contenttypes/ui/internetarticle/create-internetarticle.xhtml";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<InternetArticleItem> getPublicationItemClass() {
|
||||
return InternetArticleItem.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InternetArticle createPublication() {
|
||||
return new InternetArticle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEditStepName() {
|
||||
return InternetArticlePropertiesStep.EDIT_STEP_URL_FRAGMENT;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,501 @@
|
|||
package org.scientificcms.publications.ui.contenttypes;
|
||||
|
||||
import org.libreccm.api.Identifier;
|
||||
import org.libreccm.api.IdentifierParser;
|
||||
import org.libreccm.security.AuthorizationRequired;
|
||||
import org.librecms.assets.Organization;
|
||||
import org.librecms.contentsection.AssetRepository;
|
||||
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||
import org.librecms.ui.contentsections.ItemPermissionChecker;
|
||||
import org.librecms.ui.contentsections.documents.DocumentNotFoundException;
|
||||
import org.librecms.ui.contentsections.documents.DocumentUi;
|
||||
import org.librecms.ui.contentsections.documents.MvcAuthoringStepDef;
|
||||
import org.librecms.ui.contentsections.documents.MvcAuthoringSteps;
|
||||
import org.scientificcms.publications.InternetArticle;
|
||||
import org.scientificcms.publications.PublicationRepository;
|
||||
import org.scientificcms.publications.SciPublicationsConstants;
|
||||
import org.scientificcms.publications.contenttypes.InternetArticleItem;
|
||||
import org.scientificcms.publications.ui.SciPublicationsUiMessageBundle;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.mvc.Controller;
|
||||
import javax.mvc.Models;
|
||||
import javax.transaction.Transactional;
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.FormParam;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Path(
|
||||
MvcAuthoringSteps.PATH_PREFIX
|
||||
+ InternetArticlePropertiesStep.EDIT_STEP_URL_FRAGMENT
|
||||
)
|
||||
@Controller
|
||||
@MvcAuthoringStepDef(
|
||||
bundle = SciPublicationsConstants.BUNDLE,
|
||||
descriptionKey = "authoringsteps.basicproperties.description",
|
||||
labelKey = "authoringsteps.basicproperties.label",
|
||||
supportedDocumentType = InternetArticleItem.class
|
||||
)
|
||||
public class InternetArticlePropertiesStep
|
||||
extends AbstractPublicationPropertiesStep<InternetArticleItem, InternetArticle> {
|
||||
|
||||
public static final String EDIT_STEP_URL_FRAGMENT
|
||||
= "internetarticle-basicproperties";
|
||||
|
||||
@Inject
|
||||
private AssetRepository assetRepo;
|
||||
|
||||
@Inject
|
||||
private DocumentUi documentUi;
|
||||
|
||||
@Inject
|
||||
private IdentifierParser identifierParser;
|
||||
|
||||
@Inject
|
||||
private InternetArticlePropertiesStepModel propertiesStepModel;
|
||||
|
||||
@Inject
|
||||
private ItemPermissionChecker itemPermissionChecker;
|
||||
|
||||
@Inject
|
||||
private Models models;
|
||||
|
||||
@Inject
|
||||
private PublicationRepository publicationRepo;
|
||||
|
||||
@Inject
|
||||
private SciPublicationsUiMessageBundle messageBundle;
|
||||
|
||||
@Override
|
||||
public Class<InternetArticlePropertiesStep> getStepClass() {
|
||||
return InternetArticlePropertiesStep.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getEditStepUrlFragment() {
|
||||
return EDIT_STEP_URL_FRAGMENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getStepTemplatePath() {
|
||||
return "org/scientificcms/contenttypes/ui/internetarticle/edit-internetarticle.xhtml";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<InternetArticle> getPublicationClass() {
|
||||
return InternetArticle.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
protected void init() throws ContentSectionNotFoundException,
|
||||
DocumentNotFoundException {
|
||||
super.init();
|
||||
|
||||
propertiesStepModel.setEdition(getPublication().getEdition());
|
||||
|
||||
propertiesStepModel.setNumber(getPublication().getNumber());
|
||||
|
||||
propertiesStepModel
|
||||
.setNumberOfPages(getPublication().getNumberOfPages());
|
||||
|
||||
propertiesStepModel.setOrganizationName(
|
||||
Optional
|
||||
.ofNullable(getPublication().getOrganization())
|
||||
.map(Organization::getName)
|
||||
.orElse(null)
|
||||
);
|
||||
|
||||
propertiesStepModel.setPlace(getPublication().getPlace());
|
||||
|
||||
propertiesStepModel.setUrl(getPublication().getUrl());
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String showStep(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath
|
||||
) {
|
||||
return super.showStep(sectionIdentifier, documentPath);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/name")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String updateName(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@FormParam("name") @DefaultValue("")
|
||||
final String name
|
||||
) {
|
||||
return super.updateName(sectionIdentifier, documentPath, name);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/title/@add")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String addTitle(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@FormParam("locale") final String localeParam,
|
||||
@FormParam("value") final String value
|
||||
) {
|
||||
return super.addTitle(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
localeParam,
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/title/@edit/{locale}")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String editTitle(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@PathParam("locale") final String localeParam,
|
||||
@FormParam("value") final String value
|
||||
) {
|
||||
return super.editTitle(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
localeParam,
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/title/@remove/{locale}")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String removeTitle(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@PathParam("locale") final String localeParam
|
||||
) {
|
||||
return super.removeTitle(sectionIdentifier, documentPath, localeParam);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/shortdescription/@add")
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String addShortDescription(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@FormParam("locale") final String localeParam,
|
||||
@FormParam("value") final String value
|
||||
) {
|
||||
return super.addShortDescription(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
localeParam,
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/shortdescription/@edit/{locale}")
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String editShortDescription(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@PathParam("locale") final String localeParam,
|
||||
@FormParam("value") final String value
|
||||
) {
|
||||
return super.editShortDescription(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
localeParam,
|
||||
value
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/shortdescription/@remove/{locale}")
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String removeShortDescription(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@PathParam("locale") final String localeParam
|
||||
) {
|
||||
return super.removeShortDescription(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
localeParam
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/authors")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String addAuthor(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@FormParam("authorIdentifier")
|
||||
final String authorIdentifier,
|
||||
@FormParam("editor")
|
||||
final String editorParam
|
||||
) {
|
||||
return super.addAuthor(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
authorIdentifier,
|
||||
editorParam
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/authors/{authorshipUuid}")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String editAuthorship(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@PathParam("authorshipUuid")
|
||||
final String authorshipUuid,
|
||||
@FormParam("editor")
|
||||
final String editorParam
|
||||
) {
|
||||
return super.editAuthorship(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
authorshipUuid,
|
||||
editorParam
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/authors/{authorshipUuid}/remove")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String removeAuthorship(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@PathParam("authorshipUuid")
|
||||
final String authorshipUuid
|
||||
) {
|
||||
return super.removeAuthorship(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
authorshipUuid
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/organization")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String setOrganization(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@FormParam("organizationIdentifier")
|
||||
final String organizationIdentifier
|
||||
) {
|
||||
try {
|
||||
init();
|
||||
} catch (ContentSectionNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
} catch (DocumentNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
}
|
||||
|
||||
if (itemPermissionChecker.canEditItem(getDocument())) {
|
||||
final Identifier identifier = identifierParser.parseIdentifier(
|
||||
organizationIdentifier
|
||||
);
|
||||
final Optional<Organization> organizationResult;
|
||||
switch (identifier.getType()) {
|
||||
case ID:
|
||||
organizationResult = assetRepo.findById(
|
||||
Long.parseLong(identifier.getIdentifier()),
|
||||
Organization.class
|
||||
);
|
||||
break;
|
||||
case UUID:
|
||||
organizationResult = assetRepo.findByUuidAndType(
|
||||
identifier.getIdentifier(),
|
||||
Organization.class
|
||||
);
|
||||
break;
|
||||
default:
|
||||
organizationResult = Optional.empty();
|
||||
break;
|
||||
}
|
||||
|
||||
if (organizationResult.isEmpty()) {
|
||||
return showOrganizationNotFound(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
organizationIdentifier
|
||||
);
|
||||
}
|
||||
|
||||
final Organization organization = organizationResult.get();
|
||||
getPublication().setOrganization(organization);
|
||||
publicationRepo.save(getPublication());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
} else {
|
||||
return documentUi.showAccessDenied(
|
||||
getContentSection(),
|
||||
getDocument(),
|
||||
getLabel()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/organization/remove")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String removeOrganization(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath
|
||||
) {
|
||||
try {
|
||||
init();
|
||||
} catch (ContentSectionNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
} catch (DocumentNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
}
|
||||
|
||||
if (itemPermissionChecker.canEditItem(getDocument())) {
|
||||
getPublication().setOrganization(null);
|
||||
publicationRepo.save(getPublication());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
} else {
|
||||
return documentUi.showAccessDenied(
|
||||
getContentSection(),
|
||||
getDocument(),
|
||||
getLabel()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@POST()
|
||||
@Path("/properties")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String updateProperties(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
final String documentPath,
|
||||
@FormParam("yearOfPublication")
|
||||
final String yearOfPublicationParam,
|
||||
@FormParam("place")
|
||||
final String place,
|
||||
@FormParam("number")
|
||||
final String number,
|
||||
@FormParam("numberOfPages")
|
||||
final String numberOfPagesParam,
|
||||
@FormParam("edition")
|
||||
final String edition,
|
||||
@FormParam("url")
|
||||
final String url
|
||||
) {
|
||||
try {
|
||||
init();
|
||||
} catch (ContentSectionNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
} catch (DocumentNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
}
|
||||
|
||||
if (itemPermissionChecker.canEditItem(getDocument())) {
|
||||
super.updateProperties(
|
||||
sectionIdentifier,
|
||||
documentPath,
|
||||
yearOfPublicationParam
|
||||
);
|
||||
|
||||
getPublication().setPlace(place);
|
||||
getPublication().setNumber(number);
|
||||
if (numberOfPagesParam.matches("\\d*")) {
|
||||
getPublication().setNumberOfPages(
|
||||
Integer.parseInt(numberOfPagesParam)
|
||||
);
|
||||
}
|
||||
getPublication().setEdition(edition);
|
||||
getPublication().setUrl(url);
|
||||
|
||||
publicationRepo.save(getPublication());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
} else {
|
||||
return documentUi.showAccessDenied(
|
||||
getContentSection(),
|
||||
getDocument(),
|
||||
messageBundle.getMessage("publication.edit.denied")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private String showOrganizationNotFound(
|
||||
final String sectionIdentifier,
|
||||
final String documentPath,
|
||||
final String organizationIdentifier
|
||||
) {
|
||||
models.put("organizationNotFound", organizationIdentifier);
|
||||
return showStep(sectionIdentifier, documentPath);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package org.scientificcms.publications.ui.contenttypes;
|
||||
|
||||
import org.librecms.assets.Organization;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Named("SciCmsInternetArticlePropertiesStepModel")
|
||||
public class InternetArticlePropertiesStepModel {
|
||||
|
||||
private String place;
|
||||
|
||||
private String number;
|
||||
|
||||
private Integer numberOfPages;
|
||||
|
||||
private String edition;
|
||||
|
||||
private String url;
|
||||
|
||||
private String organizationName;
|
||||
|
||||
public String getPlace() {
|
||||
return place;
|
||||
}
|
||||
|
||||
public void setPlace(final String place) {
|
||||
this.place = place;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(final String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Integer getNumberOfPages() {
|
||||
return numberOfPages;
|
||||
}
|
||||
|
||||
public void setNumberOfPages(final Integer numberOfPages) {
|
||||
this.numberOfPages = numberOfPages;
|
||||
}
|
||||
|
||||
public String getEdition() {
|
||||
return edition;
|
||||
}
|
||||
|
||||
public void setEdition(final String edition) {
|
||||
this.edition = edition;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(final String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getOrganizationName() {
|
||||
return organizationName;
|
||||
}
|
||||
|
||||
public void setOrganizationName(final String organizationName) {
|
||||
this.organizationName = organizationName;
|
||||
}
|
||||
|
||||
public String getOrganizationType() {
|
||||
return Organization.class.getName();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -28,6 +28,8 @@ public class PublicationAuthoringSteps implements MvcAuthoringSteps {
|
|||
GreyLiteratureExtendedPropertiesStep.class,
|
||||
InProceedingsPropertiesStep.class,
|
||||
InProceedingsExtendedPropertiesStep.class,
|
||||
InternetArticlePropertiesStep.class,
|
||||
InternetArticleExtendedPropertiesStep.class,
|
||||
MonographPropertiesStep.class,
|
||||
MonographExtendedPropertiesStep.class,
|
||||
ProceedingsPropertiesStep.class,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html [<!ENTITY times '×'>]>
|
||||
<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:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||
<ui:composition template="/WEB-INF/views/org/scientificcms/contenttypes/ui/create-publication.xhtml">
|
||||
|
||||
<ui:param name="availableLocales"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.availableLocales}" />
|
||||
|
||||
<ui:param name="availableWorkflows"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.availableWorkflows}" />
|
||||
|
||||
<ui:param name="contentSection"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.contentSectionLabel}" />
|
||||
|
||||
<ui:param name="createFormSubmitLabel"
|
||||
value="#{SciPublicationsUiMessageBundle['internetarticle.createform.submit']}" />
|
||||
|
||||
<ui:param name="documentType"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.documentType}" />
|
||||
|
||||
<ui:param name="folderPath"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.folderPath}" />
|
||||
|
||||
<ui:param name="initialLocale"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.initialLocale}" />
|
||||
|
||||
<ui:param name="messages"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.messages}" />
|
||||
|
||||
<ui:param name="nameValue"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.name}" />
|
||||
|
||||
<ui:param name="publicationCreateStepTitle"
|
||||
value="#{SciPublicationsUiMessageBundle['internetarticle.createform.title']}" />
|
||||
|
||||
<ui:param name="selectedWorkflow"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.selectedWorkflow}" />
|
||||
|
||||
<ui:param name="title"
|
||||
value="#{SciPublicationsInternetArticleCreateStep.title}" />
|
||||
|
||||
</ui:composition>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
<!DOCTYPE html [<!ENTITY times '×'>]>
|
||||
<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/scientificcms/contenttypes/ui/edit-publication-extended-properties.xhtml">
|
||||
|
||||
<ui:param name="authoringStep"
|
||||
value="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@internetarticle-extendedproperties" />
|
||||
|
||||
<ui:param name="authoringStepTitle"
|
||||
value="#{SciPublicationsUiMessageBundle.getMessage('internetarticle.extendedproperties.header', [CmsSelectedDocumentModel.itemName])}" />
|
||||
|
||||
<ui:param name="editStepUrlFragement"
|
||||
value="internetarticle-extendedproperties" />
|
||||
|
||||
<ui:define name="publicationExtendedPropertiesFormElements">
|
||||
<bootstrap:formGroupText
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.issn.help']}"
|
||||
inputId="issn"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.issn.label']}"
|
||||
name="issn"
|
||||
value="#{SciCmsInternetArticleExtendedPropertiesStepModel.issn}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupDate
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.lastaccessed.help']}"
|
||||
inputId="last-accessed"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.lastaccessed.label']}"
|
||||
name="lastAccessed"
|
||||
value="#{SciCmsInternetArticleExtendedPropertiesStepModel.lastAccessed}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupDate
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.publicationdate.help']}"
|
||||
inputId="publicationdate"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.publicationdate.label']}"
|
||||
name="publicationDate"
|
||||
value="#{SciCmsInternetArticleExtendedPropertiesStepModel.publicationDate}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.urn.help']}"
|
||||
inputId="urn"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.urn.label']}"
|
||||
name="urn"
|
||||
value="#{SciCmsInternetArticleExtendedPropertiesStepModel.urn}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.doi.help']}"
|
||||
inputId="doi"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.doi.label']}"
|
||||
name="doi"
|
||||
value="#{SciCmsInternetArticleExtendedPropertiesStepModel.doi}"
|
||||
/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="publicationExtendedPropertiesList">
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.issn.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticleExtendedPropertiesStepModel.issn}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.lastaccessed.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticleExtendedPropertiesStepModel.lastAccessed}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.publicationdate.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticleExtendedPropertiesStepModel.publicationDate}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.urn.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticleExtendedPropertiesStepModel.urn}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.extendedproperties.doi.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticleExtendedPropertiesStepModel.doi}</dd>
|
||||
</div>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="publicationExtendedPropertiesWidgets">
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
<!DOCTYPE html [<!ENTITY times '×'>]>
|
||||
<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:scicms="http://xmlns.jcp.org/jsf/composite/components/scicms"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||
<ui:composition template="/WEB-INF/views/org/scientificcms/contenttypes/ui/edit-publication.xhtml">
|
||||
|
||||
<ui:param name="authoringStep"
|
||||
value="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@internetarticle-basicproperties" />
|
||||
|
||||
<ui:param name="authoringStepTitle"
|
||||
value="#{SciPublicationsUiMessageBundle.getMessage('internetarticle.basicproperties.header', [SciCmsPublicationPropertiesStepModel.name])}" />
|
||||
|
||||
<ui:define name="publicationMessages">
|
||||
<c:if test="#{organizationNotFound != null}">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
#{SciPublicationsUiMessageBundle.getMessage('internetarticle.basicproperties.errors.organization_not_found', [organizationNotFound])}
|
||||
</div>
|
||||
</c:if>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="publicationBasicPropertiesForm">
|
||||
<bootstrap:formGroupText
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.place.help']}"
|
||||
inputId="place"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.place.label']}"
|
||||
name="place"
|
||||
value="#{SciCmsInternetArticlePropertiesStepModel.place}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.number.help']}"
|
||||
inputId="number"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.number.label']}"
|
||||
name="number"
|
||||
value="#{SciCmsInternetArticlePropertiesStepModel.number}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupNumber
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.numberofpages.help']}"
|
||||
inputId="number-of-pages"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.numberofpages.label']}"
|
||||
name="numberOfPages"
|
||||
value="#{SciCmsInternetArticlePropertiesStepModel.numberOfPages}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.edition.help']}"
|
||||
inputId="edition"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.edition.label']}"
|
||||
name="number"
|
||||
value="#{SciCmsInternetArticlePropertiesStepModel.edition}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.url.help']}"
|
||||
inputId="url"
|
||||
label="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.url.label']}"
|
||||
name="url"
|
||||
value="#{SciCmsInternetArticlePropertiesStepModel.url}"
|
||||
/>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="publicationBasicPropertiesDl">
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.place.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticlePropertiesStepModel.place}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.number.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticlePropertiesStepModel.number}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.numberofpages.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticlePropertiesStepModel.numberOfPages}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.edition.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticlePropertiesStepModel.edition}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.url.label']}</dt>
|
||||
<dd>#{SciCmsInternetArticlePropertiesStepModel.url}</dd>
|
||||
</div>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="publicationProperties">
|
||||
<h3 class="mt-5">#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.organization']}</h3>
|
||||
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="organization-picker"
|
||||
buttonIcon="pen"
|
||||
buttonText="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.organization.set']}"
|
||||
/>
|
||||
<librecms:assetPicker
|
||||
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@internetarticle-basicproperties/organization"
|
||||
assetPickerId="organization-picker"
|
||||
assetType="#{SciCmsInternetArticlePropertiesStepModel.organizationType}"
|
||||
baseUrl="#{SciCmsPublicationPropertiesStepModel.baseUrl}"
|
||||
contentSection="#{ContentSectionModel.sectionName}"
|
||||
formParamName="organizationIdentifier"
|
||||
/>
|
||||
</c:if>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="#{SciCmsInternetArticlePropertiesStepModel.organizationName == null}">
|
||||
<p>#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.organization.none']}</p>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<p>
|
||||
#{SciCmsInternetArticlePropertiesStepModel.organizationName}
|
||||
</p>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@internetarticle-basicproperties/organization/remove"
|
||||
buttonText="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.organization.remove']}"
|
||||
cancelLabel="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.organization.remove.cancel']}"
|
||||
confirmLabel="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.organization.confirm']}"
|
||||
dialogId="remove-organization-dialog"
|
||||
dialogTitle="#{SciPublicationsUiMessageBundle['internetarticle.basicproperties.organization.title']}"
|
||||
message="#{SciPublicationsUiMessageBundle.getMessage('internetarticle.basicproperties.organization.message', [CmsSelectedDocumentModel.name, SciCmsInternetArticlePropertiesStepModel.organization])}"
|
||||
/>
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
|
||||
</html>
|
||||
|
|
@ -598,3 +598,37 @@ greyliterature.basicproperties.startpage.help=The first page of the publication,
|
|||
greyliterature.basicproperties.startpage.label=First page
|
||||
greyliterature.basicproperties.endpage.help=The last page of the publication, if the publication is part of another publication.
|
||||
greyliterature.basicproperties.endpage.label=Last page
|
||||
internetarticleitem.createstep.description=Create a new publication record for an internet article.
|
||||
internetarticle.createform.submit=Create new internet article
|
||||
internetarticle.createform.title=Create new Internet Article record
|
||||
internetarticle.basicproperties.header=Edit basic properties of Internet Article record {0}
|
||||
internetarticle.basicproperties.errors.organization_not_found=The selected organization {0} was not found.
|
||||
internetarticle.basicproperties.place.help=The place of publication of the internet article.
|
||||
internetarticle.basicproperties.place.label=Place
|
||||
internetarticle.basicproperties.number.help=The number of the Internet Article.
|
||||
internetarticle.basicproperties.number.label=Number
|
||||
internetarticle.basicproperties.numberofpages.help=The number of pages of the Internet Article.
|
||||
internetarticle.basicproperties.numberofpages.label=Number of pages
|
||||
internetarticle.basicproperties.edition.help=The edition of the Internet Article.
|
||||
internetarticle.basicproperties.edition.label=Edition
|
||||
internetarticle.basicproperties.url.help=The URL (web address) or the Internet Article, for example https://www.example.org/example-article
|
||||
internetarticle.basicproperties.url.label=URL
|
||||
internetarticle.basicproperties.organization=Organization
|
||||
internetarticle.basicproperties.organization.set=Set organization
|
||||
internetarticle.basicproperties.organization.none=No organization has been set for this Internet Article yet.
|
||||
internetarticle.basicproperties.organization.remove=Remove organization
|
||||
internetarticle.basicproperties.organization.remove.cancel=Cancel
|
||||
internetarticle.basicproperties.organization.confirm=Remove organization
|
||||
internetarticle.basicproperties.organization.title=Confirm removal of organization from Internet Article
|
||||
internetarticle.basicproperties.organization.message=Are you sure to remove the organization {1} from the Internet Article {0}?
|
||||
internetarticle.extendedproperties.header=Edit extended properties of Internet Article record {0}
|
||||
internetarticle.extendedproperties.issn.help=The ISSN of the internet article.
|
||||
internetarticle.extendedproperties.issn.label=ISSN
|
||||
internetarticle.extendedproperties.lastaccessed.help=The date of the last access of the internet article.
|
||||
internetarticle.extendedproperties.lastaccessed.label=Last accessed
|
||||
internetarticle.extendedproperties.publicationdate.help=The publication date of the internet article.
|
||||
internetarticle.extendedproperties.publicationdate.label=Publication date
|
||||
internetarticle.extendedproperties.urn.help=The URN of the internet article.
|
||||
internetarticle.extendedproperties.urn.label=URN
|
||||
internetarticle.extendedproperties.doi.help=The DOI of the internet article.
|
||||
internetarticle.extendedproperties.doi.label=DOI
|
||||
|
|
|
|||
|
|
@ -598,3 +598,37 @@ greyliterature.basicproperties.startpage.help=Die erste Seite der Publikation, s
|
|||
greyliterature.basicproperties.startpage.label=Erste Seite
|
||||
greyliterature.basicproperties.endpage.help=Die letzte Seite der Publikation, sofern die Publikation Teil einer anderen Publikation ist.
|
||||
greyliterature.basicproperties.endpage.label=Letzte Seite
|
||||
internetarticleitem.createstep.description=Legt einen Datensatz mit Angaben zu einem Internet-Artikel an.
|
||||
internetarticle.createform.submit=Neuen Internet-Artikel anlegen
|
||||
internetarticle.createform.title=Einen neuen Internet-Artikel-Datensatz erstellen
|
||||
internetarticle.basicproperties.header=Basiseigenschaften des Internet-Artikel-Datensatzes {0} bearbeiten
|
||||
internetarticle.basicproperties.errors.organization_not_found=Die ausgew\u00e4hlte Organisation {0} konnte nicht gefunden werden.
|
||||
internetarticle.basicproperties.place.help=Der Erscheinungsort des Internet-Artikels.
|
||||
internetarticle.basicproperties.place.label=Erscheinungsort
|
||||
internetarticle.basicproperties.number.help=Die Nummer des Internet-Artikels.
|
||||
internetarticle.basicproperties.number.label=Nummer
|
||||
internetarticle.basicproperties.numberofpages.help=Die Anzahl der Seiten des Internet-Artikels.
|
||||
internetarticle.basicproperties.numberofpages.label=Anzahl der Seiten
|
||||
internetarticle.basicproperties.edition.help=Die Auflage des Internet-Artikels.
|
||||
internetarticle.basicproperties.edition.label=Auflage
|
||||
internetarticle.basicproperties.url.help=Die URL (Internet-Adresse) des Internet-Artikels, z.B. https://www.example.org/beispiel-artikel
|
||||
internetarticle.basicproperties.url.label=URL
|
||||
internetarticle.basicproperties.organization=Organisation
|
||||
internetarticle.basicproperties.organization.set=Organisation festlegen
|
||||
internetarticle.basicproperties.organization.none=F\u00fcr diesen Internet-Artikel wurde noch keine Organisation festgelegt.
|
||||
internetarticle.basicproperties.organization.remove=Organisation entfernen
|
||||
internetarticle.basicproperties.organization.remove.cancel=Abbrechen
|
||||
internetarticle.basicproperties.organization.confirm=Organisation entfernen
|
||||
internetarticle.basicproperties.organization.title=Entfernen der Organisation best\u00e4tigen
|
||||
internetarticle.basicproperties.organization.message=Sind Sie sicher, dass Sie die Organisation {1} vom Internet-Artikel {0} entfernen wollen?
|
||||
internetarticle.extendedproperties.header=Erweiterte Eigenschaften des Internet-Artikel-Datensatzes {0} bearbeiten
|
||||
internetarticle.extendedproperties.issn.help=Die ISSN des Internet-Artikels.
|
||||
internetarticle.extendedproperties.issn.label=ISSN
|
||||
internetarticle.extendedproperties.lastaccessed.help=Das Datum des letzten Zugriffs auf den Internet-Artikel
|
||||
internetarticle.extendedproperties.lastaccessed.label=Letzter Zugriff
|
||||
internetarticle.extendedproperties.publicationdate.help=Das Ver\u00f6ffentlichungsdatum des Internet-Artikels.
|
||||
internetarticle.extendedproperties.publicationdate.label=Ver\u00f6ffentlichungsdatum
|
||||
internetarticle.extendedproperties.urn.help=Die URN des Internet-Artikels.
|
||||
internetarticle.extendedproperties.urn.label=URN
|
||||
internetarticle.extendedproperties.doi.help=Die DOI des Internet-Artikels.
|
||||
internetarticle.extendedproperties.doi.label=DOI
|
||||
|
|
|
|||
Loading…
Reference in New Issue