Bugfixes for editing publications
parent
e9d983247e
commit
30a01f2df3
|
|
@ -11,9 +11,14 @@ import org.librecms.assets.Person;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.persistence.NoResultException;
|
import javax.persistence.NoResultException;
|
||||||
|
import javax.persistence.TypedQuery;
|
||||||
|
import javax.persistence.criteria.CriteriaBuilder;
|
||||||
|
import javax.persistence.criteria.CriteriaQuery;
|
||||||
|
import javax.persistence.criteria.Root;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -56,14 +61,21 @@ public class PublicationRepository
|
||||||
public <T extends Publication> Optional<T> findByIdAndType(
|
public <T extends Publication> Optional<T> findByIdAndType(
|
||||||
final long publicationId, final Class<T> type
|
final long publicationId, final Class<T> type
|
||||||
) {
|
) {
|
||||||
try {
|
final CriteriaBuilder criteriaBuilder = getEntityManager()
|
||||||
return Optional.of(
|
.getCriteriaBuilder();
|
||||||
getEntityManager()
|
final CriteriaQuery<T> criteriaQuery = criteriaBuilder.createQuery(type);
|
||||||
.createNamedQuery("Publication.findByIdAndType", type)
|
final Root<T> from = criteriaQuery.from(type);
|
||||||
.setParameter("publicationId", publicationId)
|
|
||||||
.setParameter("type", type)
|
criteriaQuery.where(
|
||||||
.getSingleResult()
|
criteriaBuilder.equal(from.get("publicationId"), publicationId)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final TypedQuery<T> query = getEntityManager().createQuery(
|
||||||
|
criteriaQuery
|
||||||
|
);
|
||||||
|
|
||||||
|
try {
|
||||||
|
return Optional.of(query.getSingleResult());
|
||||||
} catch (NoResultException ex) {
|
} catch (NoResultException ex) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,17 +31,21 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
@NamedQueries({
|
@NamedQueries({
|
||||||
@NamedQuery(
|
@NamedQuery(
|
||||||
name = "PublicationItem.findForPublication",
|
name = "PublicationItem.findForPublication",
|
||||||
query = "SELECT i FROM PublicationItem i WHERE i.publication = :publication"
|
query
|
||||||
|
= "SELECT i FROM PublicationItem i WHERE i.publication = :publication"
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
public class PublicationItem<T extends Publication> extends ContentItem {
|
public class PublicationItem<T extends Publication> extends ContentItem {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@OneToOne(cascade = {CascadeType.DETACH,
|
@OneToOne(
|
||||||
|
cascade = {
|
||||||
|
CascadeType.DETACH,
|
||||||
CascadeType.MERGE,
|
CascadeType.MERGE,
|
||||||
CascadeType.PERSIST,
|
CascadeType.PERSIST,
|
||||||
CascadeType.REFRESH},
|
CascadeType.REFRESH
|
||||||
|
},
|
||||||
fetch = FetchType.LAZY,
|
fetch = FetchType.LAZY,
|
||||||
targetEntity = Publication.class
|
targetEntity = Publication.class
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,23 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
return (T) getDocument();
|
return (T) getDocument();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract Class<P> getPublicationClass();
|
||||||
|
|
||||||
protected P getPublication() {
|
protected P getPublication() {
|
||||||
return getPublicationItem().getPublication();
|
final long publicationId = getPublicationItem()
|
||||||
|
.getPublication()
|
||||||
|
.getPublicationId();
|
||||||
|
|
||||||
|
return publicationRepo
|
||||||
|
.findByIdAndType(publicationId, getPublicationClass())
|
||||||
|
.orElseThrow(
|
||||||
|
() -> new IllegalArgumentException(
|
||||||
|
String.format(
|
||||||
|
"PublicationItem %s has no associated publication",
|
||||||
|
getPublicationItem().getUuid()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -156,7 +171,7 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList())
|
||||||
);
|
);
|
||||||
|
|
||||||
propertiesStepModel.setShortDecriptionValues(
|
propertiesStepModel.setShortDescriptionValues(
|
||||||
publication
|
publication
|
||||||
.getShortDescription()
|
.getShortDescription()
|
||||||
.getValues()
|
.getValues()
|
||||||
|
|
@ -191,9 +206,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
|
||||||
@Path("/")
|
|
||||||
@AuthorizationRequired
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String showStep(
|
public String showStep(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -229,9 +241,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
*
|
*
|
||||||
* @return A redirect to this authoring step.
|
* @return A redirect to this authoring step.
|
||||||
*/
|
*/
|
||||||
@POST
|
|
||||||
@Path("/name")
|
|
||||||
@AuthorizationRequired
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String updateName(
|
public String updateName(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -271,9 +280,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST()
|
|
||||||
@Path("/properties")
|
|
||||||
@AuthorizationRequired
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String updateProperties(
|
public String updateProperties(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -294,7 +300,7 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
if (itemPermissionChecker.canEditItem(getDocument())) {
|
if (itemPermissionChecker.canEditItem(getDocument())) {
|
||||||
final Integer yearOfPublication = Optional
|
final Integer yearOfPublication = Optional
|
||||||
.ofNullable(yearOfPublicationParam)
|
.ofNullable(yearOfPublicationParam)
|
||||||
.filter(param -> param.isBlank())
|
.filter(param -> !param.isBlank())
|
||||||
.filter(param -> param.matches("\\d*"))
|
.filter(param -> param.matches("\\d*"))
|
||||||
.map(param -> Integer.parseInt(param))
|
.map(param -> Integer.parseInt(param))
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
@ -324,9 +330,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
*
|
*
|
||||||
* @return A redirect to this authoring step.
|
* @return A redirect to this authoring step.
|
||||||
*/
|
*/
|
||||||
@POST
|
|
||||||
@Path("/title/@add")
|
|
||||||
@AuthorizationRequired
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String addTitle(
|
public String addTitle(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -372,9 +375,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
*
|
*
|
||||||
* @return A redirect to this authoring step.
|
* @return A redirect to this authoring step.
|
||||||
*/
|
*/
|
||||||
@POST
|
|
||||||
@Path("/title/@edit/{locale}")
|
|
||||||
@AuthorizationRequired
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String editTitle(
|
public String editTitle(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -419,9 +419,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
*
|
*
|
||||||
* @return A redirect to this authoring step.
|
* @return A redirect to this authoring step.
|
||||||
*/
|
*/
|
||||||
@POST
|
|
||||||
@Path("/title/@remove/{locale}")
|
|
||||||
@AuthorizationRequired
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String removeTitle(
|
public String removeTitle(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -457,8 +454,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path("/shortdescription/add")
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String addShortDescription(
|
public String addShortDescription(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -491,8 +486,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path("/shortdescription/add/{locale}")
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String editShortDescription(
|
public String editShortDescription(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -525,8 +518,6 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path("/shortdescription/remove/{locale}")
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String removeShortDescription(
|
public String removeShortDescription(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
|
@ -558,10 +549,7 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@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,
|
||||||
|
|
@ -633,10 +621,7 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@Path("/authors/{authorshipUuid}")
|
|
||||||
@AuthorizationRequired
|
|
||||||
@Transactional
|
|
||||||
public String editAuthorship(
|
public String editAuthorship(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
final String sectionIdentifier,
|
final String sectionIdentifier,
|
||||||
|
|
@ -688,10 +673,7 @@ public abstract class AbstractPublicationPropertiesStep<T extends PublicationIte
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@Path("/authors/{authorshipUuid}/remove")
|
|
||||||
@AuthorizationRequired
|
|
||||||
@Transactional
|
|
||||||
public String removeAuthorship(
|
public String removeAuthorship(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
final String sectionIdentifier,
|
final String sectionIdentifier,
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package org.scientificcms.publications.ui.contenttypes;
|
||||||
|
|
||||||
import org.libreccm.api.Identifier;
|
import org.libreccm.api.Identifier;
|
||||||
import org.libreccm.api.IdentifierParser;
|
import org.libreccm.api.IdentifierParser;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
import org.librecms.contentsection.Asset;
|
import org.librecms.contentsection.Asset;
|
||||||
import org.librecms.contentsection.AssetRepository;
|
import org.librecms.contentsection.AssetRepository;
|
||||||
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||||
|
|
@ -13,7 +14,6 @@ import org.scientificcms.publications.PublicationWithPublisher;
|
||||||
import org.scientificcms.publications.Publisher;
|
import org.scientificcms.publications.Publisher;
|
||||||
import org.scientificcms.publications.PublisherManager;
|
import org.scientificcms.publications.PublisherManager;
|
||||||
import org.scientificcms.publications.assets.PublisherAsset;
|
import org.scientificcms.publications.assets.PublisherAsset;
|
||||||
import org.scientificcms.publications.contenttypes.PublicationItem;
|
|
||||||
import org.scientificcms.publications.contenttypes.PublicationWithPublisherItem;
|
import org.scientificcms.publications.contenttypes.PublicationWithPublisherItem;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
@ -22,6 +22,8 @@ import javax.inject.Inject;
|
||||||
import javax.mvc.Models;
|
import javax.mvc.Models;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
import javax.ws.rs.FormParam;
|
import javax.ws.rs.FormParam;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.PathParam;
|
import javax.ws.rs.PathParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -60,7 +62,7 @@ public abstract class AbstractPublicationWithPublisherPropertiesStep<T extends P
|
||||||
DocumentNotFoundException {
|
DocumentNotFoundException {
|
||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
if (!(getDocument() instanceof PublicationItem)) {
|
if (!(getDocument() instanceof PublicationWithPublisherItem)) {
|
||||||
throw new DocumentNotFoundException(
|
throw new DocumentNotFoundException(
|
||||||
documentUi.showDocumentNotFound(
|
documentUi.showDocumentNotFound(
|
||||||
getContentSection(),
|
getContentSection(),
|
||||||
|
|
@ -70,13 +72,25 @@ public abstract class AbstractPublicationWithPublisherPropertiesStep<T extends P
|
||||||
}
|
}
|
||||||
|
|
||||||
final P publication = getPublication();
|
final P publication = getPublication();
|
||||||
final Publisher publisher = publication.getPublisher();
|
final Optional<Publisher> publisherResult = Optional.ofNullable(
|
||||||
|
publication.getPublisher()
|
||||||
|
);
|
||||||
|
|
||||||
propertiesStepModel.setPublisherUuid(publication.getUuid());
|
propertiesStepModel.setPublisherUuid(publication.getUuid());
|
||||||
propertiesStepModel.setPublisherName(publisher.getName());
|
|
||||||
propertiesStepModel.setPublisherPlace(publisher.getPlace());
|
publisherResult.ifPresent(
|
||||||
|
publisher -> propertiesStepModel.setPublisherName(
|
||||||
|
publisher.getName()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
publisherResult.ifPresent(
|
||||||
|
publisher -> propertiesStepModel.setPublisherPlace(
|
||||||
|
publisher.getPlace()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String setPublisher(
|
public String setPublisher(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
final String sectionIdentifier,
|
final String sectionIdentifier,
|
||||||
|
|
@ -150,6 +164,7 @@ public abstract class AbstractPublicationWithPublisherPropertiesStep<T extends P
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String removePublisher(
|
public String removePublisher(
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
final String sectionIdentifier,
|
final String sectionIdentifier,
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ package org.scientificcms.publications.ui.contenttypes;
|
||||||
import org.librecms.ui.contentsections.documents.MvcAuthoringStepDef;
|
import org.librecms.ui.contentsections.documents.MvcAuthoringStepDef;
|
||||||
import org.librecms.ui.contentsections.documents.MvcAuthoringSteps;
|
import org.librecms.ui.contentsections.documents.MvcAuthoringSteps;
|
||||||
import org.scientificcms.publications.Monograph;
|
import org.scientificcms.publications.Monograph;
|
||||||
import org.scientificcms.publications.SciPublicationsConstants;
|
|
||||||
import org.scientificcms.publications.contenttypes.MonographItem;
|
import org.scientificcms.publications.contenttypes.MonographItem;
|
||||||
|
import org.scientificcms.publications.ui.SciPublicationsUiConstants;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.mvc.Controller;
|
import javax.mvc.Controller;
|
||||||
|
|
@ -18,7 +18,7 @@ import javax.ws.rs.Path;
|
||||||
@Path(MvcAuthoringSteps.PATH_PREFIX + "monograph-extendedproperties")
|
@Path(MvcAuthoringSteps.PATH_PREFIX + "monograph-extendedproperties")
|
||||||
@Controller
|
@Controller
|
||||||
@MvcAuthoringStepDef(
|
@MvcAuthoringStepDef(
|
||||||
bundle = SciPublicationsConstants.BUNDLE,
|
bundle = SciPublicationsUiConstants.BUNDLE,
|
||||||
descriptionKey = "authoringsteps.extendedproperties.description",
|
descriptionKey = "authoringsteps.extendedproperties.description",
|
||||||
labelKey = "authoringsteps.extendedproperties.label",
|
labelKey = "authoringsteps.extendedproperties.label",
|
||||||
supportedDocumentType = MonographItem.class
|
supportedDocumentType = MonographItem.class
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public class MonographItemCreateStep extends AbstractPublicationItemCreateStep<M
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String showCreateStep() {
|
public String showCreateStep() {
|
||||||
return "org/scientificccms/contenttypes/ui/monograph/create-monograph.xhtml";
|
return "org/scientificcms/contenttypes/ui/monograph/create-monograph.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import org.librecms.ui.contentsections.documents.MvcAuthoringSteps;
|
||||||
import org.librecms.ui.contenttypes.event.EventStepsConstants;
|
import org.librecms.ui.contenttypes.event.EventStepsConstants;
|
||||||
import org.scientificcms.publications.Monograph;
|
import org.scientificcms.publications.Monograph;
|
||||||
import org.scientificcms.publications.contenttypes.MonographItem;
|
import org.scientificcms.publications.contenttypes.MonographItem;
|
||||||
|
import org.scientificcms.publications.ui.SciPublicationsUiConstants;
|
||||||
import org.scientificcms.publications.ui.SciPublicationsUiMessageBundle;
|
import org.scientificcms.publications.ui.SciPublicationsUiMessageBundle;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
@ -18,7 +19,9 @@ import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.mvc.Controller;
|
import javax.mvc.Controller;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.DefaultValue;
|
||||||
import javax.ws.rs.FormParam;
|
import javax.ws.rs.FormParam;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
import javax.ws.rs.POST;
|
import javax.ws.rs.POST;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.PathParam;
|
import javax.ws.rs.PathParam;
|
||||||
|
|
@ -31,7 +34,7 @@ import javax.ws.rs.PathParam;
|
||||||
@Path(MvcAuthoringSteps.PATH_PREFIX + "monograph-basicproperties")
|
@Path(MvcAuthoringSteps.PATH_PREFIX + "monograph-basicproperties")
|
||||||
@Controller
|
@Controller
|
||||||
@MvcAuthoringStepDef(
|
@MvcAuthoringStepDef(
|
||||||
bundle = EventStepsConstants.BUNDLE,
|
bundle = SciPublicationsUiConstants.BUNDLE,
|
||||||
descriptionKey = "authoringsteps.basicproperties.description",
|
descriptionKey = "authoringsteps.basicproperties.description",
|
||||||
labelKey = "authoringsteps.basicproperties.label",
|
labelKey = "authoringsteps.basicproperties.label",
|
||||||
supportedDocumentType = MonographItem.class
|
supportedDocumentType = MonographItem.class
|
||||||
|
|
@ -60,6 +63,11 @@ public class MonographPropertiesStep extends AbstractPublicationWithPublisherPro
|
||||||
return "monograph-basicproperties";
|
return "monograph-basicproperties";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<Monograph> getPublicationClass() {
|
||||||
|
return Monograph.class;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected void init() throws ContentSectionNotFoundException,
|
protected void init() throws ContentSectionNotFoundException,
|
||||||
|
|
@ -67,13 +75,262 @@ public class MonographPropertiesStep extends AbstractPublicationWithPublisherPro
|
||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
propertiesStepModel.setReviewed(
|
propertiesStepModel.setReviewed(
|
||||||
getPublication().getReviewed()
|
Optional
|
||||||
|
.ofNullable(getPublication().getReviewed())
|
||||||
|
.orElse(false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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
|
||||||
|
@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
|
||||||
|
@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
|
||||||
|
@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("/publisher")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String setPublisher(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath,
|
||||||
|
@FormParam("publisherIdentifier")
|
||||||
|
final String publisherIdentifier
|
||||||
|
) {
|
||||||
|
return super.setPublisher(
|
||||||
|
sectionIdentifier,
|
||||||
|
documentPath,
|
||||||
|
publisherIdentifier
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/publisher/@remove")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String removePublisher(
|
||||||
|
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
|
final String documentPath
|
||||||
|
) {
|
||||||
|
return super.removePublisher(sectionIdentifier, documentPath);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getStepTemplatePath() {
|
protected String getStepTemplatePath() {
|
||||||
return "/org/scientificcms/contenttypes/monograph/ui/edit-monograph.xhtml";
|
return "org/scientificcms/contenttypes/ui/monograph/edit-monograph.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST()
|
@POST()
|
||||||
|
|
@ -108,7 +365,7 @@ public class MonographPropertiesStep extends AbstractPublicationWithPublisherPro
|
||||||
getPublication().setReviewed(
|
getPublication().setReviewed(
|
||||||
Optional
|
Optional
|
||||||
.ofNullable(reviewedParam)
|
.ofNullable(reviewedParam)
|
||||||
.map(param -> "true".equals(param) || "on".equals("param"))
|
.map(param -> "true".equals(param) || "on".equals(param))
|
||||||
.orElse(false)
|
.orElse(false)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ public class PublicationPropertiesStepModel {
|
||||||
|
|
||||||
private List<String> unusedTitleLocales;
|
private List<String> unusedTitleLocales;
|
||||||
|
|
||||||
private int yearOfPublication;
|
private Integer yearOfPublication;
|
||||||
|
|
||||||
private Map<String, String> shortDecriptionValues;
|
private Map<String, String> shortDescriptionValues;
|
||||||
|
|
||||||
private List<String> unusedShortDescriptionLocales;
|
private List<String> unusedShortDescriptionLocales;
|
||||||
|
|
||||||
|
|
@ -69,22 +69,22 @@ public class PublicationPropertiesStepModel {
|
||||||
this.unusedTitleLocales = new ArrayList<>(unusedTitleLocales);
|
this.unusedTitleLocales = new ArrayList<>(unusedTitleLocales);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getYearOfPublication() {
|
public Integer getYearOfPublication() {
|
||||||
return yearOfPublication;
|
return yearOfPublication;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setYearOfPublication(final int yearOfPublication) {
|
public void setYearOfPublication(final Integer yearOfPublication) {
|
||||||
this.yearOfPublication = yearOfPublication;
|
this.yearOfPublication = yearOfPublication;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getShortDecriptionValues() {
|
public Map<String, String> getShortDescriptionValues() {
|
||||||
return Collections.unmodifiableMap(shortDecriptionValues);
|
return Collections.unmodifiableMap(shortDescriptionValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShortDecriptionValues(
|
public void setShortDescriptionValues(
|
||||||
final Map<String, String> shortDecriptionValues
|
final Map<String, String> shortDescriptionValues
|
||||||
) {
|
) {
|
||||||
this.shortDecriptionValues = new HashMap<>(shortDecriptionValues);
|
this.shortDescriptionValues = new HashMap<>(shortDescriptionValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getUnusedShortDescriptionLocales() {
|
public List<String> getUnusedShortDescriptionLocales() {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package org.scientificcms.publications.ui.contenttypes;
|
package org.scientificcms.publications.ui.contenttypes;
|
||||||
|
|
||||||
|
import org.scientificcms.publications.assets.PublisherAsset;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
|
||||||
|
|
@ -17,6 +19,8 @@ public class PublicationWithPublisherPropertiesStepModel {
|
||||||
|
|
||||||
private String publisherPlace;
|
private String publisherPlace;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getPublisherUuid() {
|
public String getPublisherUuid() {
|
||||||
return publisherUuid;
|
return publisherUuid;
|
||||||
}
|
}
|
||||||
|
|
@ -41,4 +45,8 @@ public class PublicationWithPublisherPropertiesStepModel {
|
||||||
this.publisherPlace = publisherPlace;
|
this.publisherPlace = publisherPlace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPublisherType() {
|
||||||
|
return PublisherAsset.class.getName();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|
||||||
<form action="#{mvc.basePath}/#{contentSection}/documents/#{folderPath}@create/#{documentType}"
|
<form action="#{mvc.basePath}/#{contentSection}/documents/#{folderPath}@create/#{documentType}"
|
||||||
method="post
|
method="post">
|
||||||
">
|
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupText
|
||||||
help="#{SciPublicationsUiMessageBundle['createstep.name.help']}"
|
help="#{SciPublicationsUiMessageBundle['createstep.name.help']}"
|
||||||
inputId="name"
|
inputId="name"
|
||||||
|
|
|
||||||
|
|
@ -63,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}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/name"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/name"
|
||||||
class="modal-content"
|
class="modal-content"
|
||||||
method="post">
|
method="post">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
name="name"
|
name="name"
|
||||||
pattern="^([a-zA-Z0-9_-]*)$"
|
pattern="^([a-zA-Z0-9_-]*)$"
|
||||||
required="true"
|
required="true"
|
||||||
value="#{SciProjectPropertiesStep.name}"/>
|
value="#{SciCmsPublicationPropertiesStepModel.name}"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-warning"
|
<button class="btn btn-warning"
|
||||||
|
|
@ -113,14 +113,14 @@
|
||||||
addDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.header']}"
|
addDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.header']}"
|
||||||
addDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.title.add.value.help']}"
|
addDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.title.add.value.help']}"
|
||||||
addDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.add.value.label']}"
|
addDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.add.value.label']}"
|
||||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/title/@add"
|
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/title/@add"
|
||||||
editButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit']}"
|
editButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit']}"
|
||||||
editDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.cancel']}"
|
editDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.cancel']}"
|
||||||
editDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.submit']}"
|
editDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.submit']}"
|
||||||
editDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.header']}"
|
editDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.header']}"
|
||||||
editDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.value.help']}"
|
editDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.value.help']}"
|
||||||
editDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.value.label']}"
|
editDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.edit.value.label']}"
|
||||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/title/@edit"
|
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/title/@edit"
|
||||||
editorId="title-editor"
|
editorId="title-editor"
|
||||||
hasUnusedLocales="#{!SciCmsPublicationPropertiesStepModel.unusedTitleLocales.isEmpty()}"
|
hasUnusedLocales="#{!SciCmsPublicationPropertiesStepModel.unusedTitleLocales.isEmpty()}"
|
||||||
headingLevel="3"
|
headingLevel="3"
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
removeDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.submit']}"
|
removeDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.submit']}"
|
||||||
removeDialogText="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.text']}"
|
removeDialogText="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.text']}"
|
||||||
removeDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.header']}"
|
removeDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.title.remove.header']}"
|
||||||
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/title/@remove"
|
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/title/@remove"
|
||||||
title="#{SciPublicationsUiMessageBundle['basicproperties.title.header']}"
|
title="#{SciPublicationsUiMessageBundle['basicproperties.title.header']}"
|
||||||
unusedLocales="#{SciCmsPublicationPropertiesStepModel.unusedTitleLocales}"
|
unusedLocales="#{SciCmsPublicationPropertiesStepModel.unusedTitleLocales}"
|
||||||
values="#{SciCmsPublicationPropertiesStepModel.titleValues}"
|
values="#{SciCmsPublicationPropertiesStepModel.titleValues}"
|
||||||
|
|
@ -152,7 +152,7 @@
|
||||||
id="properties-edit-dialog"
|
id="properties-edit-dialog"
|
||||||
tabindex="-1">
|
tabindex="-1">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/properties"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/properties"
|
||||||
class="modal-content"
|
class="modal-content"
|
||||||
method="post">
|
method="post">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
|
@ -210,16 +210,16 @@
|
||||||
addDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.header']}"
|
addDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.header']}"
|
||||||
addDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.value.help']}"
|
addDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.value.help']}"
|
||||||
addDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.value.label']}"
|
addDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.add.value.label']}"
|
||||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/shortdescription/@add"
|
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/shortdescription/@add"
|
||||||
editButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit']}"
|
editButtonLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit']}"
|
||||||
editDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.cancel']}"
|
editDialogCancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.cancel']}"
|
||||||
editDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.submit']}"
|
editDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.submit']}"
|
||||||
editDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.header']}"
|
editDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.header']}"
|
||||||
editDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.value.help']}"
|
editDialogValueHelp="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.value.help']}"
|
||||||
editDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.value.label']}"
|
editDialogValueLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.edit.value.label']}"
|
||||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/shortdescription/@edit"
|
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/shortdescription/@edit"
|
||||||
editorId="shortdescription-editor"
|
editorId="shortdescription-editor"
|
||||||
hasUnusedLocales="#{!SciCmsPublicationPropertiesStepModel.unusedTitleLocales.isEmpty()}"
|
hasUnusedLocales="#{!SciCmsPublicationPropertiesStepModel.unusedShortDescriptionLocales.isEmpty()}"
|
||||||
headingLevel="3"
|
headingLevel="3"
|
||||||
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||||
readOnly="#{!CmsSelectedDocumentModel.canEdit}"
|
readOnly="#{!CmsSelectedDocumentModel.canEdit}"
|
||||||
|
|
@ -228,11 +228,11 @@
|
||||||
removeDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.submit']}"
|
removeDialogSubmitLabel="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.submit']}"
|
||||||
removeDialogText="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.text']}"
|
removeDialogText="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.text']}"
|
||||||
removeDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.header']}"
|
removeDialogTitle="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.remove.header']}"
|
||||||
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/shortdescription/@remove"
|
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/shortdescription/@remove"
|
||||||
title="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.header']}"
|
title="#{SciPublicationsUiMessageBundle['basicproperties.shortdescription.header']}"
|
||||||
unusedLocales="#{SciCmsPublicationPropertiesStepModel.unusedTitleLocales}"
|
unusedLocales="#{SciCmsPublicationPropertiesStepModel.unusedShortDescriptionLocales}"
|
||||||
useTextarea="true"
|
useTextarea="true"
|
||||||
values="#{SciCmsPublicationPropertiesStepModel.shortdescriptionValues}"
|
values="#{SciCmsPublicationPropertiesStepModel.shortDescriptionValues}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||||
|
|
@ -276,7 +276,7 @@
|
||||||
<span>#{SciPublicationsUiMessageBundle['authors.order.save']}</span>
|
<span>#{SciPublicationsUiMessageBundle['authors.order.save']}</span>
|
||||||
</button>
|
</button>
|
||||||
<table id="authors-table"
|
<table id="authors-table"
|
||||||
data-saveUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}-authors/save-order">
|
data-saveUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}-authors/save-order">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#{SciPublicationsUiMessageBundle['basicproperties.authors.table.name']}</th>
|
<th>#{SciPublicationsUiMessageBundle['basicproperties.authors.table.name']}</th>
|
||||||
|
|
@ -328,7 +328,7 @@
|
||||||
id="authorship-edit-#{author.authorshipUuid}"
|
id="authorship-edit-#{author.authorshipUuid}"
|
||||||
tabindex="-1">
|
tabindex="-1">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/authors/#{author.authorshipUuid}"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/authors/#{author.authorshipUuid}"
|
||||||
class="modal-content"
|
class="modal-content"
|
||||||
method="post">
|
method="post">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
|
@ -369,7 +369,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<libreccm:deleteDialog
|
<libreccm:deleteDialog
|
||||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationsPropertiesStep.editStepUrlFragment}/authors/#{author.authorshipUuid}/remove"
|
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@#{SciCmsPublicationPropertiesStepModel.editStepUrlFragment}/authors/#{author.authorshipUuid}/remove"
|
||||||
buttonText="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.label']}"
|
buttonText="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.label']}"
|
||||||
cancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.cancel']}"
|
cancelLabel="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.cancel']}"
|
||||||
confirmLabel="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.confirm']}"
|
confirmLabel="#{SciPublicationsUiMessageBundle['basicproperties.authors.remove.confirm']}"
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
label = Monograph
|
label = Monograph
|
||||||
descripition = A monograph
|
description = A monograph
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
label = Monographie
|
||||||
|
description = Eine Monographie
|
||||||
Loading…
Reference in New Issue