Controller for PublishStep, various templates
parent
8bd923a1d9
commit
1577130605
|
|
@ -70,6 +70,8 @@ import org.libreccm.security.PermissionManager;
|
||||||
import org.librecms.contentsection.privileges.TypePrivileges;
|
import org.librecms.contentsection.privileges.TypePrivileges;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manager class providing several methods to manipulate {@link ContentItem}s.
|
* Manager class providing several methods to manipulate {@link ContentItem}s.
|
||||||
|
|
@ -839,6 +841,39 @@ public class ContentItemManager {
|
||||||
|
|
||||||
return publish(item, lifecycleDefinition);
|
return publish(item, lifecycleDefinition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a live version of content item or updates the live version of a
|
||||||
|
* content item if there already a live version using the default lifecycle
|
||||||
|
* for the content type of the provided item.
|
||||||
|
*
|
||||||
|
* @param item The content item to publish.
|
||||||
|
* @param startDateTime Start date and time of the lifecycle. May not ben null.
|
||||||
|
* @param endDateTime End date/time of the lifecycle. May be null.
|
||||||
|
*
|
||||||
|
* @return The published content item.
|
||||||
|
*/
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public ContentItem publish(
|
||||||
|
@RequiresPrivilege(ItemPrivileges.PUBLISH)
|
||||||
|
final ContentItem item,
|
||||||
|
final Date startDateTime,
|
||||||
|
final Date endDateTime
|
||||||
|
) {
|
||||||
|
|
||||||
|
if (item == null) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"The item to publish can't be null.");
|
||||||
|
}
|
||||||
|
|
||||||
|
final LifecycleDefinition lifecycleDefinition = item.getContentType()
|
||||||
|
.getDefaultLifecycle();
|
||||||
|
|
||||||
|
return publish(
|
||||||
|
item, lifecycleDefinition, startDateTime, endDateTime
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a live version of content item or updates the live version of a
|
* Creates a live version of content item or updates the live version of a
|
||||||
|
|
@ -856,8 +891,35 @@ public class ContentItemManager {
|
||||||
public ContentItem publish(
|
public ContentItem publish(
|
||||||
@RequiresPrivilege(ItemPrivileges.PUBLISH)
|
@RequiresPrivilege(ItemPrivileges.PUBLISH)
|
||||||
final ContentItem item,
|
final ContentItem item,
|
||||||
final LifecycleDefinition lifecycleDefinition) {
|
final LifecycleDefinition lifecycleDefinition
|
||||||
|
) {
|
||||||
|
return publish(
|
||||||
|
item, lifecycleDefinition, Date.from(Instant.now()), null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a live version of content item or updates the live version of a
|
||||||
|
* content item if there already a live version.
|
||||||
|
*
|
||||||
|
* @param item The content item to publish.
|
||||||
|
* @param lifecycleDefinition The definition of the lifecycle to use for the
|
||||||
|
* new item.
|
||||||
|
* @param startDateTime The begin of the lifecycle. May not be null.
|
||||||
|
* @param endDateTime The end of the lifecycle. May be null.
|
||||||
|
*
|
||||||
|
* @return The published content item.
|
||||||
|
*/
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public ContentItem publish(
|
||||||
|
@RequiresPrivilege(ItemPrivileges.PUBLISH)
|
||||||
|
final ContentItem item,
|
||||||
|
final LifecycleDefinition lifecycleDefinition,
|
||||||
|
final Date startDateTime,
|
||||||
|
final Date endDateTime
|
||||||
|
) {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"The item to publish can't be null.");
|
"The item to publish can't be null.");
|
||||||
|
|
@ -868,6 +930,12 @@ public class ContentItemManager {
|
||||||
"The lifecycle definition for the "
|
"The lifecycle definition for the "
|
||||||
+ "lifecycle of the item to publish can't be null.");
|
+ "lifecycle of the item to publish can't be null.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (startDateTime == null) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"The start date of the "
|
||||||
|
+ "lifecycle of the item to publish can't be null.");
|
||||||
|
}
|
||||||
|
|
||||||
final ContentItem draftItem = getDraftVersion(item, ContentItem.class);
|
final ContentItem draftItem = getDraftVersion(item, ContentItem.class);
|
||||||
final ContentItem liveItem;
|
final ContentItem liveItem;
|
||||||
|
|
@ -887,6 +955,10 @@ public class ContentItemManager {
|
||||||
|
|
||||||
final Lifecycle lifecycle = lifecycleManager
|
final Lifecycle lifecycle = lifecycleManager
|
||||||
.createLifecycle(lifecycleDefinition);
|
.createLifecycle(lifecycleDefinition);
|
||||||
|
lifecycle.setStartDateTime(startDateTime);
|
||||||
|
if (endDateTime != null) {
|
||||||
|
lifecycle.setEndDateTime(endDateTime);
|
||||||
|
}
|
||||||
|
|
||||||
liveItem.setLifecycle(lifecycle);
|
liveItem.setLifecycle(lifecycle);
|
||||||
liveItem.setWorkflow(draftItem.getWorkflow());
|
liveItem.setWorkflow(draftItem.getWorkflow());
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.JoinTable;
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.NamedQueries;
|
||||||
|
import javax.persistence.NamedQuery;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
@ -50,6 +52,12 @@ import static org.librecms.CmsConstants.*;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "LIFECYLE_DEFINITIONS", schema = DB_SCHEMA)
|
@Table(name = "LIFECYLE_DEFINITIONS", schema = DB_SCHEMA)
|
||||||
|
@NamedQueries(
|
||||||
|
@NamedQuery(
|
||||||
|
name = "LifecycleDefinition.findByUuid",
|
||||||
|
query = "SELECT d FROM LifecycleDefinition d WHERE d.uuid = :uuid"
|
||||||
|
)
|
||||||
|
)
|
||||||
public class LifecycleDefinition implements Identifiable, Serializable {
|
public class LifecycleDefinition implements Identifiable, Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1291162870555527717L;
|
private static final long serialVersionUID = 1291162870555527717L;
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,11 @@ package org.librecms.lifecycle;
|
||||||
|
|
||||||
import org.libreccm.core.AbstractEntityRepository;
|
import org.libreccm.core.AbstractEntityRepository;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.persistence.NoResultException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -34,6 +36,21 @@ public class LifecycleDefinitionRepository
|
||||||
|
|
||||||
private static final long serialVersionUID = -6388883975391235155L;
|
private static final long serialVersionUID = -6388883975391235155L;
|
||||||
|
|
||||||
|
public Optional<LifecycleDefinition> findByUuid(final String uuid) {
|
||||||
|
try {
|
||||||
|
return Optional.of(
|
||||||
|
getEntityManager()
|
||||||
|
.createNamedQuery(
|
||||||
|
"LifecycleDefinition.findByUuid",
|
||||||
|
LifecycleDefinition.class)
|
||||||
|
.setParameter("uuid", uuid)
|
||||||
|
.getSingleResult()
|
||||||
|
);
|
||||||
|
} catch(NoResultException ex) {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<LifecycleDefinition> getEntityClass() {
|
public Class<LifecycleDefinition> getEntityClass() {
|
||||||
return LifecycleDefinition.class;
|
return LifecycleDefinition.class;
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ public class CategorizationStep implements MvcAuthoringStep {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String showStep() {
|
public String showStep() {
|
||||||
return "org/librecms/ui/contenttypes/categorization.xhtml";
|
return "org/librecms/ui/documents/categorization.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
@ -201,7 +201,7 @@ public class CategorizationStep implements MvcAuthoringStep {
|
||||||
if (!domainResult.isPresent()) {
|
if (!domainResult.isPresent()) {
|
||||||
models.put("section", section.getLabel());
|
models.put("section", section.getLabel());
|
||||||
models.put("domainIdentifier", domainIdentifierParam);
|
models.put("domainIdentifier", domainIdentifierParam);
|
||||||
return "org/librecms/ui/contenttypes/categorization-domain-not-found.xhtml";
|
return "org/librecms/ui/documents/categorization-domain-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
final Domain domain = domainResult.get();
|
final Domain domain = domainResult.get();
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ public class DocumentNotFound implements MvcAuthoringStep {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String showStep() {
|
public String showStep() {
|
||||||
return "org/librecms/ui/contentsection/document-not-found.xhtml";
|
return "org/librecms/ui/contentsection/documents/document-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class DocumentUi {
|
||||||
) {
|
) {
|
||||||
models.put("section", section.getLabel());
|
models.put("section", section.getLabel());
|
||||||
models.put("documentPath", documentPath);
|
models.put("documentPath", documentPath);
|
||||||
return "org/librecms/ui/contentsection/document-not-found.xhtml";
|
return "org/librecms/ui/contentsection/documents/document-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,333 @@
|
||||||
|
/*
|
||||||
|
* 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.librecms.ui.contentsections.documents;
|
||||||
|
|
||||||
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
|
import org.librecms.contentsection.ContentItem;
|
||||||
|
import org.librecms.contentsection.ContentItemManager;
|
||||||
|
import org.librecms.contentsection.ContentSection;
|
||||||
|
import org.librecms.lifecycle.LifecycleDefinition;
|
||||||
|
import org.librecms.lifecycle.LifecycleDefinitionRepository;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZoneOffset;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.format.DateTimeParseException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
import javax.mvc.Controller;
|
||||||
|
import javax.mvc.Models;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.FormParam;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Controller
|
||||||
|
@Path("/")
|
||||||
|
@AuthoringStepPathFragment(PublishStep.PATH_FRAGMENT)
|
||||||
|
@Named("CmsPublishStep")
|
||||||
|
public class PublishStep implements MvcAuthoringStep {
|
||||||
|
|
||||||
|
static final String PATH_FRAGMENT = "publish";
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ContentItemManager itemManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private GlobalizationHelper globalizationHelper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private LifecycleDefinitionRepository lifecycleDefRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Models models;
|
||||||
|
|
||||||
|
private ContentItem document;
|
||||||
|
|
||||||
|
private ContentSection section;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<? extends ContentItem> supportedDocumentType() {
|
||||||
|
return ContentItem.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLabel() {
|
||||||
|
return globalizationHelper
|
||||||
|
.getLocalizedTextsUtil(getBundle())
|
||||||
|
.getText("authoringsteps.publish.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
|
return globalizationHelper
|
||||||
|
.getLocalizedTextsUtil(getBundle())
|
||||||
|
.getText("authoringsteps.publish.description");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getBundle() {
|
||||||
|
return DefaultAuthoringStepConstants.BUNDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ContentSection getContentSection() {
|
||||||
|
return section;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setContentSection(final ContentSection section) {
|
||||||
|
this.section = section;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getContentSectionLabel() {
|
||||||
|
return section.getLabel();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getContentSectionTitle() {
|
||||||
|
return globalizationHelper
|
||||||
|
.getValueFromLocalizedString(section.getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ContentItem getContentItem() {
|
||||||
|
return document;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setContentItem(final ContentItem document) {
|
||||||
|
this.document = document;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getContentItemPath() {
|
||||||
|
return itemManager.getItemPath(document);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getContentItemTitle() {
|
||||||
|
return globalizationHelper
|
||||||
|
.getValueFromLocalizedString(document.getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String showStep() {
|
||||||
|
final String lifecycleDefUuid;
|
||||||
|
if (itemManager.isLive(document)) {
|
||||||
|
lifecycleDefUuid = document
|
||||||
|
.getLifecycle()
|
||||||
|
.getDefinition()
|
||||||
|
.getUuid();
|
||||||
|
} else {
|
||||||
|
lifecycleDefUuid = document
|
||||||
|
.getContentType()
|
||||||
|
.getDefaultLifecycle()
|
||||||
|
.getUuid();
|
||||||
|
}
|
||||||
|
models.put("lifecycleDefinitionUuid", lifecycleDefUuid);
|
||||||
|
return "org/librecms/ui/documents/publish.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLive() {
|
||||||
|
return itemManager.isLive(document);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAssignedLifecycleLabel() {
|
||||||
|
return globalizationHelper.getValueFromLocalizedString(
|
||||||
|
document.getLifecycle().getDefinition().getLabel()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAssignedLifecycleDecription() {
|
||||||
|
return globalizationHelper.getValueFromLocalizedString(
|
||||||
|
document.getLifecycle().getDefinition().getDescription()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Publishes the current content item.If the item is already live, the
|
||||||
|
* {@code selectedLifecycleDefUuid} is ignored.The apply a new lifecycle the
|
||||||
|
* document the unpublished first.
|
||||||
|
*
|
||||||
|
* @param selectedLifecycleDefUuid The ID of the lifecycle definition from
|
||||||
|
* which the lifecycle for the item is
|
||||||
|
* created.
|
||||||
|
* @param startDateParam
|
||||||
|
* @param startTimeParam
|
||||||
|
* @param endDateParam
|
||||||
|
* @param endTimeParam
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return A redirect the the publish step.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/@publish")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String publish(
|
||||||
|
@FormParam("selectedLifecycleDefUuid")
|
||||||
|
final String selectedLifecycleDefUuid,
|
||||||
|
@FormParam("startDate") final String startDateParam,
|
||||||
|
@FormParam("startTime") final String startTimeParam,
|
||||||
|
@FormParam("endDate") final String endDateParam,
|
||||||
|
@FormParam("endTime") final String endTimeParam
|
||||||
|
) {
|
||||||
|
if (selectedLifecycleDefUuid == null) {
|
||||||
|
models.put("missingLifecycleDefinitionUuid", true);
|
||||||
|
models.put("startDateTime", startDateParam);
|
||||||
|
models.put("startDateTime", startTimeParam);
|
||||||
|
models.put("endDateTime", endDateParam);
|
||||||
|
models.put("endDateTime", endTimeParam);
|
||||||
|
return "org/librecms/ui/documenttypes/publish.xhtml";
|
||||||
|
}
|
||||||
|
if (startDateParam == null
|
||||||
|
|| startDateParam.isEmpty()
|
||||||
|
|| startTimeParam == null
|
||||||
|
|| startTimeParam.isEmpty()) {
|
||||||
|
models.put("lifecycleDefinitionUuid", selectedLifecycleDefUuid);
|
||||||
|
models.put("missingStartDateTime", true);
|
||||||
|
models.put("startDateTime", startDateParam);
|
||||||
|
models.put("startDateTime", startTimeParam);
|
||||||
|
models.put("endDateTime", endDateParam);
|
||||||
|
models.put("endDateTime", endTimeParam);
|
||||||
|
return "org/librecms/ui/documents/publish.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
final DateTimeFormatter isoDateFormatter = DateTimeFormatter.ISO_DATE
|
||||||
|
.withZone(ZoneId.systemDefault());
|
||||||
|
final DateTimeFormatter isoTimeFormatter = DateTimeFormatter.ISO_TIME
|
||||||
|
.withZone(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
final LocalDate localStartDate;
|
||||||
|
try {
|
||||||
|
localStartDate = LocalDate.parse(startDateParam, isoDateFormatter);
|
||||||
|
} catch (DateTimeParseException ex) {
|
||||||
|
models.put("invalidStartDate", true);
|
||||||
|
models.put("lifecycleDefinitionUuid", selectedLifecycleDefUuid);
|
||||||
|
models.put("startDateTime", startDateParam);
|
||||||
|
models.put("startDateTime", startTimeParam);
|
||||||
|
models.put("endDateTime", endDateParam);
|
||||||
|
models.put("endDateTime", endTimeParam);
|
||||||
|
return "org/librecms/ui/documents/publish.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
final LocalTime localStartTime;
|
||||||
|
try {
|
||||||
|
localStartTime = LocalTime.parse(startTimeParam, isoTimeFormatter);
|
||||||
|
} catch (DateTimeParseException ex) {
|
||||||
|
models.put("invalidStartTime", true);
|
||||||
|
models.put("lifecycleDefinitionUuid", selectedLifecycleDefUuid);
|
||||||
|
models.put("startDateTime", startDateParam);
|
||||||
|
models.put("startDateTime", startTimeParam);
|
||||||
|
models.put("endDateTime", endDateParam);
|
||||||
|
models.put("endDateTime", endTimeParam);
|
||||||
|
return "org/librecms/ui/documents/publish.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
final LocalDateTime startLocalDateTime = LocalDateTime.of(
|
||||||
|
localStartDate, localStartTime
|
||||||
|
);
|
||||||
|
final Date startDateTime = Date.from(
|
||||||
|
startLocalDateTime.toInstant(
|
||||||
|
ZoneOffset.from(startLocalDateTime)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
final LocalDate localEndDate;
|
||||||
|
try {
|
||||||
|
localEndDate = LocalDate.parse(endDateParam, isoDateFormatter);
|
||||||
|
} catch (DateTimeParseException ex) {
|
||||||
|
models.put("invalidEndDate", true);
|
||||||
|
models.put("lifecycleDefinitionUuid", selectedLifecycleDefUuid);
|
||||||
|
models.put("startDateTime", startDateParam);
|
||||||
|
models.put("startDateTime", startTimeParam);
|
||||||
|
models.put("endDateTime", endDateParam);
|
||||||
|
models.put("endDateTime", endTimeParam);
|
||||||
|
return "org/librecms/ui/documents/publish.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
final LocalTime localEndTime;
|
||||||
|
try {
|
||||||
|
localEndTime = LocalTime.parse(endTimeParam, isoTimeFormatter);
|
||||||
|
} catch (DateTimeParseException ex) {
|
||||||
|
models.put("invalidEndTime", true);
|
||||||
|
models.put("lifecycleDefinitionUuid", selectedLifecycleDefUuid);
|
||||||
|
models.put("startDateTime", startDateParam);
|
||||||
|
models.put("startDateTime", startTimeParam);
|
||||||
|
models.put("endDateTime", endDateParam);
|
||||||
|
models.put("endDateTime", endTimeParam);
|
||||||
|
return "org/librecms/ui/documents/publish.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
final LocalDateTime endLocalDateTime = LocalDateTime.of(
|
||||||
|
localEndDate, localEndTime
|
||||||
|
);
|
||||||
|
final Date endDateTime = Date.from(
|
||||||
|
endLocalDateTime.toInstant(
|
||||||
|
ZoneOffset.from(endLocalDateTime)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (selectedLifecycleDefUuid.isEmpty()) {
|
||||||
|
if (itemManager.isLive(document)) {
|
||||||
|
final LifecycleDefinition definition;
|
||||||
|
definition = document.getLifecycle().getDefinition();
|
||||||
|
itemManager.publish(
|
||||||
|
document, definition, startDateTime, endDateTime
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
itemManager.publish(document, startDateTime, endDateTime);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
final Optional<LifecycleDefinition> definitionResult
|
||||||
|
= lifecycleDefRepo.findByUuid(selectedLifecycleDefUuid);
|
||||||
|
if (!definitionResult.isPresent()) {
|
||||||
|
models.put("contentSection", section.getLabel());
|
||||||
|
models.put("lifecycleDefinitionUuid", selectedLifecycleDefUuid);
|
||||||
|
return "org/librecms/ui/documents/lifecycle-definition-not-found.xhtml";
|
||||||
|
}
|
||||||
|
final LifecycleDefinition definition = definitionResult.get();
|
||||||
|
itemManager.publish(
|
||||||
|
document, definition, startDateTime, endDateTime
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return String.format(
|
||||||
|
"redirect:/%s/@documents/%s/@authoringsteps/%s",
|
||||||
|
section.getLabel(),
|
||||||
|
getContentItemPath(),
|
||||||
|
PATH_FRAGMENT
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/@unpublish")
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String unpublish() {
|
||||||
|
itemManager.unpublish(document);
|
||||||
|
|
||||||
|
return String.format(
|
||||||
|
"redirect:/%s/@documents/%s/@authoringsteps/%s",
|
||||||
|
section.getLabel(),
|
||||||
|
getContentItemPath(),
|
||||||
|
PATH_FRAGMENT
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -29,7 +29,7 @@ public class PublishStepModel {
|
||||||
phases = new ArrayList<>();
|
phases = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LifecycleListEntry> getAvailableListcycles() {
|
public List<LifecycleListEntry> getAvailableLifecycles() {
|
||||||
return Collections.unmodifiableList(availableListcycles);
|
return Collections.unmodifiableList(availableListcycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String showStep() {
|
public String showStep() {
|
||||||
return "org/librecms/ui/contenttypes/relatedinfo.xhtml";
|
return "org/librecms/ui/documents/relatedinfo.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
@ -239,8 +239,9 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
|
|
||||||
final Optional<Asset> assetResult = assetRepo.findByUuid(assetUuid);
|
final Optional<Asset> assetResult = assetRepo.findByUuid(assetUuid);
|
||||||
if (!assetResult.isPresent()) {
|
if (!assetResult.isPresent()) {
|
||||||
|
models.put("section", section.getLabel());
|
||||||
models.put("assetUuid", assetUuid);
|
models.put("assetUuid", assetUuid);
|
||||||
return "org/librecms/ui/contenttypes/asset-not-found.xhtml";
|
return "org/librecms/ui/documents/asset-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
final Asset asset = assetResult.get();
|
final Asset asset = assetResult.get();
|
||||||
|
|
@ -277,7 +278,7 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
);
|
);
|
||||||
if (!itemResult.isPresent()) {
|
if (!itemResult.isPresent()) {
|
||||||
models.put("targetItemUuid", targetItemUuid);
|
models.put("targetItemUuid", targetItemUuid);
|
||||||
return "org/librecms/ui/contenttypes/target-item-not-found.xhtml";
|
return "org/librecms/ui/documents/target-item-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
final RelatedLink relatedLink = new RelatedLink();
|
final RelatedLink relatedLink = new RelatedLink();
|
||||||
|
|
@ -318,7 +319,7 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
);
|
);
|
||||||
if (!itemResult.isPresent()) {
|
if (!itemResult.isPresent()) {
|
||||||
models.put("targetItemUuid", targetItemUuid);
|
models.put("targetItemUuid", targetItemUuid);
|
||||||
return "org/librecms/ui/contenttypes/target-item-not-found.xhtml";
|
return "org/librecms/ui/documents/target-item-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
final Optional<RelatedLink> linkResult = list
|
final Optional<RelatedLink> linkResult = list
|
||||||
|
|
@ -332,9 +333,9 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
|
|
||||||
if (!linkResult.isPresent()) {
|
if (!linkResult.isPresent()) {
|
||||||
models.put("contentItem", itemManager.getItemPath(document));
|
models.put("contentItem", itemManager.getItemPath(document));
|
||||||
models.put("listIdentifierParam", listIdentifierParam);
|
models.put("listIdentifier", listIdentifierParam);
|
||||||
models.put("internalLinkUuid", internalLinkUuid);
|
models.put("internalLinkUuid", internalLinkUuid);
|
||||||
return "org/librecms/ui/contenttypes/internal-link-asset-not-found.xhtml";
|
return "org/librecms/ui/documents/internal-link-asset-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
final RelatedLink link = linkResult.get();
|
final RelatedLink link = linkResult.get();
|
||||||
|
|
@ -381,7 +382,7 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
models.put("contentItem", itemManager.getItemPath(document));
|
models.put("contentItem", itemManager.getItemPath(document));
|
||||||
models.put("listIdentifierParam", listIdentifierParam);
|
models.put("listIdentifierParam", listIdentifierParam);
|
||||||
models.put("internalLinkUuid", internalLinkUuid);
|
models.put("internalLinkUuid", internalLinkUuid);
|
||||||
return "org/librecms/ui/contenttypes/internal-link-asset-not-found.xhtml";
|
return "org/librecms/ui/documents/internal-link-asset-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
final RelatedLink link = linkResult.get();
|
final RelatedLink link = linkResult.get();
|
||||||
|
|
@ -429,7 +430,7 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
models.put("contentItem", itemManager.getItemPath(document));
|
models.put("contentItem", itemManager.getItemPath(document));
|
||||||
models.put("listIdentifierParam", listIdentifierParam);
|
models.put("listIdentifierParam", listIdentifierParam);
|
||||||
models.put("internalLinkUuid", internalLinkUuid);
|
models.put("internalLinkUuid", internalLinkUuid);
|
||||||
return "org/librecms/ui/contenttypes/internal-link-asset-not-found.xhtml";
|
return "org/librecms/ui/documents/internal-link-asset-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
final RelatedLink link = linkResult.get();
|
final RelatedLink link = linkResult.get();
|
||||||
|
|
@ -476,7 +477,7 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
models.put("contentItem", itemManager.getItemPath(document));
|
models.put("contentItem", itemManager.getItemPath(document));
|
||||||
models.put("listIdentifierParam", listIdentifierParam);
|
models.put("listIdentifierParam", listIdentifierParam);
|
||||||
models.put("internalLinkUuid", internalLinkUuid);
|
models.put("internalLinkUuid", internalLinkUuid);
|
||||||
return "org/librecms/ui/contenttypes/internal-link-asset-not-found.xhtml";
|
return "org/librecms/ui/documents/internal-link-asset-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
final RelatedLink link = linkResult.get();
|
final RelatedLink link = linkResult.get();
|
||||||
|
|
@ -693,7 +694,7 @@ public class RelatedInfoStep implements MvcAuthoringStep {
|
||||||
private String showAttachmentListNotFound(final String listIdentifier) {
|
private String showAttachmentListNotFound(final String listIdentifier) {
|
||||||
models.put("contentItem", itemManager.getItemPath(document));
|
models.put("contentItem", itemManager.getItemPath(document));
|
||||||
models.put("listIdentifier", listIdentifier);
|
models.put("listIdentifier", listIdentifier);
|
||||||
return "org/librecms/ui/contenttypes/attachmentlist-not-found.xhtml";
|
return "org/librecms/ui/documents/attachmentlist-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
private AttachmentListDto buildAttachmentListDto(
|
private AttachmentListDto buildAttachmentListDto(
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<!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/librecms/ui/content-section/documents/document.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="document" />
|
||||||
|
<ui:param name="title" value="#{CmsDefaultStepsMessageBundle['relatedinfo.asset.not_found.title']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<ui:include src="document-breadcrumbs.xhtml" />
|
||||||
|
<li aria-current="page" class="breadcrumb-item">
|
||||||
|
#{CmsAdminMessages['contentsection.document.workflows.breadcrumb']}
|
||||||
|
</li>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.asset.not_found.message', [section, assetUuid])}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<!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/librecms/ui/content-section/documents/document.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="document" />
|
||||||
|
<ui:param name="title" value="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlist.not_found.title']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<ui:include src="document-breadcrumbs.xhtml" />
|
||||||
|
<li aria-current="page" class="breadcrumb-item">
|
||||||
|
#{CmsAdminMessages['contentsection.document.workflows.breadcrumb']}
|
||||||
|
</li>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.attachmentlist.not_found.message', [contentItem, listIdentifier])}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<!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/librecms/ui/content-section/documents/document.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="document" />
|
||||||
|
<ui:param name="title" value="#{CmsDefaultStepsMessageBundle['categorization.domain.not_found.title']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<ui:include src="document-breadcrumbs.xhtml" />
|
||||||
|
<li aria-current="page" class="breadcrumb-item">
|
||||||
|
#{CmsAdminMessages['contentsection.document.workflows.breadcrumb']}
|
||||||
|
</li>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
#{CmsDefaultStepsMessageBundle.getMessage('categorization.domain.not_found.message', [section, assetUuid])}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<!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/librecms/ui/content-section/documents/document.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="document" />
|
||||||
|
<ui:param name="title" value="#{CmsDefaultStepsMessageBundle['relatedinfo.internal_link.not_found.title']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<ui:include src="document-breadcrumbs.xhtml" />
|
||||||
|
<li aria-current="page" class="breadcrumb-item">
|
||||||
|
#{CmsAdminMessages['contentsection.document.workflows.breadcrumb']}
|
||||||
|
</li>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.internal_link.not_found.message', [contentItem, listIdentifier, internalLinkUuid])}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<!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/librecms/ui/content-section/documents/document.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="document" />
|
||||||
|
<ui:param name="title" value="#{CmsDefaultStepsMessageBundle['publishstep.lifecycle.not_available.title']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<ui:include src="document-breadcrumbs.xhtml" />
|
||||||
|
<li aria-current="page" class="breadcrumb-item">
|
||||||
|
#{CmsAdminMessages['contentsection.document.workflows.breadcrumb']}
|
||||||
|
</li>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
#{CmsDefaultStepsMessageBundle('publishstep.lifecycle.not_available.message', [section, lifecycleDefinitionUuid])}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -17,11 +17,125 @@
|
||||||
</ui:define>
|
</ui:define>
|
||||||
|
|
||||||
<ui:define name="main">
|
<ui:define name="main">
|
||||||
<div class="container">
|
<c:choose>
|
||||||
<div class="alert alert-info" role="alert">
|
<c:when test="#{CmsPublishStep.live}">
|
||||||
Not implemented yet.
|
<h2>
|
||||||
</div>
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle.assigned']}:
|
||||||
</div>
|
${CmsPublishStep.assignedLifecycleLabel}
|
||||||
|
</h2>
|
||||||
|
<p>
|
||||||
|
${CmsPublishStep.assignedLifecycleDecription}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="d-flex">
|
||||||
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@authoringSteps/publish/@publish"
|
||||||
|
method="post">
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
type="submit">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle.republish']}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@authoringSteps/publish/@unpublish"
|
||||||
|
method="post">
|
||||||
|
<button class="btn btn-warning"
|
||||||
|
type="submit">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle.unpublish']}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@authoringSteps/publish/@publish"
|
||||||
|
method="post">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="lifecycle-select">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle_select.label']}
|
||||||
|
</label>
|
||||||
|
<select aria-describedby="lifecycle-select-help"
|
||||||
|
class="form-control custom-select"
|
||||||
|
id="lifecycle-select"
|
||||||
|
name="selectedLifecycleDefUuid">
|
||||||
|
<c:forEach items="#{CmsDocumentPublishStepModel.availableLifecycles}"
|
||||||
|
var="lifecycleDef">
|
||||||
|
<option
|
||||||
|
selected="#{lifecycleDef.uuid == lifecycleDefinitionUuid ? 'selected' : ''}"
|
||||||
|
value="#{lifecycleDef.uuid}">
|
||||||
|
#{lifecycleDef.label}
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
<small class="form-text text-muted"
|
||||||
|
id="lifecycle-select-help">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle_select.help']}
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div aria-describedby="lifecycle-startdatetime-help"
|
||||||
|
class="d-flex">
|
||||||
|
<label for="lifecycle-startdate">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle_startdate.label']}
|
||||||
|
</label>
|
||||||
|
<input class="form-control"
|
||||||
|
id="lifecycle-startdate"
|
||||||
|
name="startDate"
|
||||||
|
required="true"
|
||||||
|
type="date" />
|
||||||
|
|
||||||
|
<label for="starttime">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle_starttime.label']}
|
||||||
|
</label>
|
||||||
|
<input class="form-control"
|
||||||
|
id="lifecycle-starttime"
|
||||||
|
name="startTime"
|
||||||
|
required="true"
|
||||||
|
type="date" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted"
|
||||||
|
id="lifecycle-startdatetime-help">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle_startdatetime.help']}
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div aria-describedby="lifecycle-enddatetime-help"
|
||||||
|
class="d-flex">
|
||||||
|
<label for="lifecycle-enddate">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle_enddate.label']}
|
||||||
|
</label>
|
||||||
|
<input class="form-control"
|
||||||
|
id="lifecycle-enddate"
|
||||||
|
name="endDate"
|
||||||
|
required="true"
|
||||||
|
type="date" />
|
||||||
|
|
||||||
|
<label for="endtime">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle_endtime.label']}
|
||||||
|
</label>
|
||||||
|
<input class="form-control"
|
||||||
|
id="lifecycle-endtime"
|
||||||
|
name="endTime"
|
||||||
|
required="true"
|
||||||
|
type="date" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<small class="form-text text-muted"
|
||||||
|
id="lifecycle-enddatetime-help">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle_enddatetime.help']}
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
type="submit">
|
||||||
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle.publish']}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
|
||||||
</ui:define>
|
</ui:define>
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
<!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/librecms/ui/content-section/documents/document.xhtml">
|
||||||
|
|
||||||
|
<ui:param name="activePage" value="document" />
|
||||||
|
<ui:param name="title" value="#{CmsDefaultStepsMessageBundle['relatedinfo.target_item.not_found.title']}" />
|
||||||
|
|
||||||
|
<ui:define name="breadcrumb">
|
||||||
|
<ui:include src="document-breadcrumbs.xhtml" />
|
||||||
|
<li aria-current="page" class="breadcrumb-item">
|
||||||
|
#{CmsAdminMessages['contentsection.document.workflows.breadcrumb']}
|
||||||
|
</li>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.target_item.not_found.message', [targetItemUuid])}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue