Create step is now found
parent
7d9193c474
commit
2ab4b0c5ed
|
|
@ -76,6 +76,7 @@ public class FolderManager {
|
|||
* @see #folderIsDeletable(org.librecms.contentsection.Folder)
|
||||
*/
|
||||
public enum FolderIsDeletable {
|
||||
|
||||
/**
|
||||
* Folder can be deleted.
|
||||
*/
|
||||
|
|
@ -92,12 +93,14 @@ public class FolderManager {
|
|||
* Folder can't be deleted because the folder is a root folder.
|
||||
*/
|
||||
IS_ROOT_FOLDER
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes if a folder is movable to another folder or not and why.
|
||||
*/
|
||||
public enum FolderIsMovable {
|
||||
|
||||
/**
|
||||
* The folder can be moved to the specified target folder.
|
||||
*/
|
||||
|
|
@ -127,6 +130,7 @@ public class FolderManager {
|
|||
* The folder to contains assets which are in use.
|
||||
*/
|
||||
HAS_IN_USE_ASSETS
|
||||
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package org.librecms.ui.contentsections.documents;
|
||||
|
||||
import org.libreccm.api.Identifier;
|
||||
import org.libreccm.api.IdentifierParser;
|
||||
import org.libreccm.l10n.GlobalizationHelper;
|
||||
import org.libreccm.l10n.LocalizedString;
|
||||
|
|
@ -28,17 +27,18 @@ import org.librecms.contentsection.ContentSectionRepository;
|
|||
import org.librecms.contentsection.Folder;
|
||||
import org.librecms.contentsection.FolderManager;
|
||||
import org.librecms.contentsection.FolderRepository;
|
||||
import org.librecms.contentsection.FolderType;
|
||||
import org.librecms.ui.contentsections.ItemPermissionChecker;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.NavigableMap;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.enterprise.context.Dependent;
|
||||
import javax.inject.Inject;
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -49,12 +49,6 @@ import javax.inject.Inject;
|
|||
public abstract class AbstractMvcDocumentCreateStep<T extends ContentItem>
|
||||
implements MvcDocumentCreateStep<T> {
|
||||
|
||||
@Inject
|
||||
private ContentSectionRepository sectionRepo;
|
||||
|
||||
@Inject
|
||||
private FolderRepository folderRepository;
|
||||
|
||||
/**
|
||||
* Provides operations for folders.
|
||||
*/
|
||||
|
|
@ -67,9 +61,6 @@ public abstract class AbstractMvcDocumentCreateStep<T extends ContentItem>
|
|||
@Inject
|
||||
private GlobalizationHelper globalizationHelper;
|
||||
|
||||
@Inject
|
||||
private IdentifierParser identifierParser;
|
||||
|
||||
private boolean canCreate;
|
||||
|
||||
/**
|
||||
|
|
@ -82,6 +73,8 @@ public abstract class AbstractMvcDocumentCreateStep<T extends ContentItem>
|
|||
*/
|
||||
private ContentSection section;
|
||||
|
||||
private Map<String, String> availableWorkflows;
|
||||
|
||||
/**
|
||||
* Messages to be shown to the user.
|
||||
*/
|
||||
|
|
@ -91,21 +84,41 @@ public abstract class AbstractMvcDocumentCreateStep<T extends ContentItem>
|
|||
messages = new TreeMap<>();
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public Map<String, String> getAvailableLocales() {
|
||||
return globalizationHelper
|
||||
.getAvailableLocales()
|
||||
.stream()
|
||||
.collect(
|
||||
Collectors.toMap(
|
||||
locale -> locale.toString(),
|
||||
locale -> locale.toString(),
|
||||
(value1, value2) -> value1,
|
||||
() -> new LinkedHashMap<String, String>()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public ContentSection getContentSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public void setContentSection(final ContentSection section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String getContentSectionLabel() {
|
||||
return section.getLabel();
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String getContentSectionTitle() {
|
||||
return globalizationHelper.getValueFromLocalizedString(
|
||||
|
|
@ -113,6 +126,18 @@ public abstract class AbstractMvcDocumentCreateStep<T extends ContentItem>
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getAvailableWorkflows() {
|
||||
return Collections.unmodifiableMap(availableWorkflows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAvailableWorkflows(
|
||||
final Map<String, String> availableWorkflows
|
||||
) {
|
||||
this.availableWorkflows = new LinkedHashMap<>(availableWorkflows);
|
||||
}
|
||||
|
||||
// protected final void setContentSectionByIdentifier(
|
||||
// final String sectionIdentifierParam
|
||||
// ) {
|
||||
|
|
@ -146,7 +171,6 @@ public abstract class AbstractMvcDocumentCreateStep<T extends ContentItem>
|
|||
// canCreate = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
// protected final void setFolderByPath(final String folderPath) {
|
||||
// final Optional<Folder> folderResult = folderRepository.findByPath(
|
||||
// section,
|
||||
|
|
@ -183,7 +207,11 @@ public abstract class AbstractMvcDocumentCreateStep<T extends ContentItem>
|
|||
|
||||
@Override
|
||||
public String getFolderPath() {
|
||||
return folderManager.getFolderPath(folder);
|
||||
if (folder.getParentFolder() == null) {
|
||||
return "";
|
||||
} else {
|
||||
return folderManager.getFolderPath(folder);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -40,22 +40,27 @@ import org.librecms.ui.contentsections.ItemPermissionChecker;
|
|||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.enterprise.inject.Any;
|
||||
import javax.enterprise.inject.Instance;
|
||||
import javax.enterprise.util.AnnotationLiteral;
|
||||
import javax.inject.Inject;
|
||||
import javax.mvc.Controller;
|
||||
import javax.mvc.Models;
|
||||
import javax.transaction.Transactional;
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DefaultValue;
|
||||
import javax.ws.rs.FormParam;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.core.Form;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
|
||||
/**
|
||||
|
|
@ -76,7 +81,7 @@ public class DocumentController {
|
|||
|
||||
@Inject
|
||||
private ContentSectionModel sectionModel;
|
||||
|
||||
|
||||
/**
|
||||
* {@link ContentSectionsUi} instance providing for helper functions for
|
||||
* dealing with {@link ContentSection}s.
|
||||
|
|
@ -112,6 +117,7 @@ public class DocumentController {
|
|||
* All available {@link MvcDocumentCreateStep}s.
|
||||
*/
|
||||
@Inject
|
||||
@Any
|
||||
private Instance<MvcDocumentCreateStep<?>> createSteps;
|
||||
|
||||
/**
|
||||
|
|
@ -253,23 +259,28 @@ public class DocumentController {
|
|||
|
||||
@POST
|
||||
@Path("/@create/{documentType}")
|
||||
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String createDocument(
|
||||
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
||||
@PathParam("documentType") final String documentType,
|
||||
final MultivaluedMap<String, String> formParameters
|
||||
//final MultivaluedMap<String, String> formParameters
|
||||
final Form form
|
||||
) {
|
||||
return createDocument(
|
||||
sectionIdentifier,
|
||||
"", documentType,
|
||||
formParameters
|
||||
"",
|
||||
documentType,
|
||||
//formParameters
|
||||
form.asMap()
|
||||
);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/{folderPath:(.+)?}/@create/{documentType}")
|
||||
@AuthorizationRequired
|
||||
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@SuppressWarnings({"unchecked", "unchecked"})
|
||||
public String createDocument(
|
||||
|
|
@ -925,12 +936,8 @@ public class DocumentController {
|
|||
);
|
||||
}
|
||||
|
||||
//final Class<? extends ContentItem> documentClass;
|
||||
final Class<?> clazz;
|
||||
try {
|
||||
// documentClass = (Class<? extends ContentItem>) Class.forName(
|
||||
// documentType
|
||||
// );
|
||||
clazz = Class.forName(documentType);
|
||||
} catch (ClassNotFoundException ex) {
|
||||
return new CreateStepResult(
|
||||
|
|
@ -964,6 +971,22 @@ public class DocumentController {
|
|||
.get();
|
||||
|
||||
createStep.setContentSection(section);
|
||||
createStep.setAvailableWorkflows(
|
||||
section
|
||||
.getWorkflowTemplates()
|
||||
.stream()
|
||||
.collect(
|
||||
Collectors.toMap(
|
||||
workflow -> workflow.getUuid(),
|
||||
workflow -> globalizationHelper
|
||||
.getValueFromLocalizedString(
|
||||
workflow.getName()
|
||||
),
|
||||
(value1, value2) -> value1,
|
||||
() -> new LinkedHashMap<String, String>()
|
||||
)
|
||||
)
|
||||
);
|
||||
createStep.setFolder(folder);
|
||||
|
||||
return new CreateStepResult(createStep);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import org.librecms.contentsection.Folder;
|
|||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javax.ws.rs.core.Form;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
|
||||
/**
|
||||
|
|
@ -38,10 +37,10 @@ import javax.ws.rs.core.MultivaluedMap;
|
|||
* } to provide the current current content section and folder. After that,
|
||||
* depending on the request method, either {@link #showCreateStep} or {@link #createItem(javax.ws.rs.core.Form)]
|
||||
* will be called.
|
||||
*
|
||||
*
|
||||
* In most cases, {@link AbstractMvcDocumentCreateStep} should be used as
|
||||
* base for implementations. {@link AbstractMvcDocumentCreateStep} implements
|
||||
* several common operations.
|
||||
* several common operations.
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*
|
||||
|
|
@ -64,7 +63,7 @@ public interface MvcDocumentCreateStep<T extends ContentItem> {
|
|||
*
|
||||
* @return A redirect to the first authoring step of the new document.
|
||||
*/
|
||||
String createItem(MultivaluedMap<String, String> formParams);
|
||||
String createItem(MultivaluedMap<String, String> formParams);
|
||||
|
||||
/**
|
||||
* Should be set by the implementing class to indicate if the current user
|
||||
|
|
@ -80,7 +79,7 @@ public interface MvcDocumentCreateStep<T extends ContentItem> {
|
|||
*
|
||||
* @return Document type generated.
|
||||
*/
|
||||
Class<T> getDocumentType();
|
||||
String getDocumentType();
|
||||
|
||||
/**
|
||||
* Localized description of the create step. The current locale as returned
|
||||
|
|
@ -100,6 +99,13 @@ public interface MvcDocumentCreateStep<T extends ContentItem> {
|
|||
*/
|
||||
String getBundle();
|
||||
|
||||
/**
|
||||
* The locales that can be used for documents.
|
||||
*
|
||||
* @return The locales that can be used for documents.
|
||||
*/
|
||||
Map<String, String> getAvailableLocales();
|
||||
|
||||
/**
|
||||
* The current content section.
|
||||
*
|
||||
|
|
@ -129,6 +135,23 @@ public interface MvcDocumentCreateStep<T extends ContentItem> {
|
|||
*/
|
||||
void setContentSection(final ContentSection section);
|
||||
|
||||
/**
|
||||
* Retrieves the workflows available for the current content section.
|
||||
*
|
||||
* @return A map of the available workflows. The key is the UUID of the
|
||||
* workflow, the value is the name of the workflow.
|
||||
*/
|
||||
Map<String, String> getAvailableWorkflows();
|
||||
|
||||
/**
|
||||
* Used by the {@link DocumentController} to provide the available
|
||||
* workflows.
|
||||
*
|
||||
* @param availableWorkflows
|
||||
*/
|
||||
void setAvailableWorkflows(
|
||||
final Map<String, String> availableWorkflows);
|
||||
|
||||
/**
|
||||
* The parent folder of the new item.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.librecms.ui.contenttypes;
|
|||
|
||||
import org.libreccm.l10n.GlobalizationHelper;
|
||||
import org.libreccm.l10n.LocalizedString;
|
||||
import org.libreccm.security.AuthorizationRequired;
|
||||
import org.libreccm.workflow.Workflow;
|
||||
import org.librecms.contentsection.ContentItemManager;
|
||||
import org.librecms.contentsection.ContentItemRepository;
|
||||
|
|
@ -35,6 +36,7 @@ import javax.inject.Named;
|
|||
|
||||
import javax.inject.Inject;
|
||||
import javax.mvc.Models;
|
||||
import javax.transaction.Transactional;
|
||||
import javax.ws.rs.core.MultivaluedMap;
|
||||
|
||||
/**
|
||||
|
|
@ -109,8 +111,8 @@ public class MvcArticleCreateStep
|
|||
private String selectedWorkflow;
|
||||
|
||||
@Override
|
||||
public Class<Article> getDocumentType() {
|
||||
return Article.class;
|
||||
public String getDocumentType() {
|
||||
return Article.class.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -141,6 +143,7 @@ public class MvcArticleCreateStep
|
|||
return initialLocale;
|
||||
}
|
||||
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String getSelectedWorkflow() {
|
||||
if (selectedWorkflow == null || selectedWorkflow.isEmpty()) {
|
||||
return getContentSection()
|
||||
|
|
@ -169,6 +172,8 @@ public class MvcArticleCreateStep
|
|||
return "org/librecms/ui/contenttypes/article/create-article.xhtml";
|
||||
}
|
||||
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
@Override
|
||||
public String createItem(final MultivaluedMap<String, String> formParams) {
|
||||
if (!formParams.containsKey(FORM_PARAM_NAME)
|
||||
|
|
@ -180,6 +185,7 @@ public class MvcArticleCreateStep
|
|||
getBundle()
|
||||
).getText("createstep.name.error.missing")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
|
||||
name = formParams.getFirst(FORM_PARAM_NAME);
|
||||
|
|
@ -190,6 +196,7 @@ public class MvcArticleCreateStep
|
|||
getBundle()
|
||||
).getText("createstep.name.error.invalid")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
|
||||
if (!formParams.containsKey(FORM_PARAM_TITLE)
|
||||
|
|
@ -201,6 +208,7 @@ public class MvcArticleCreateStep
|
|||
getBundle()
|
||||
).getText("createstep.title.error.missing")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
title = formParams.getFirst(FORM_PARAM_TITLE);
|
||||
|
||||
|
|
@ -213,6 +221,7 @@ public class MvcArticleCreateStep
|
|||
getBundle()
|
||||
).getText("createstep.summary.error.missing")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
summary = formParams.getFirst(FORM_PARAM_SUMMARY);
|
||||
|
||||
|
|
@ -225,6 +234,7 @@ public class MvcArticleCreateStep
|
|||
getBundle()
|
||||
).getText("createstep.initial_locale.error.missing")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
final Locale locale = new Locale(
|
||||
formParams.getFirst(FORM_PARAM_INITIAL_LOCALE)
|
||||
|
|
@ -239,6 +249,7 @@ public class MvcArticleCreateStep
|
|||
getBundle()
|
||||
).getText("createstep.workflow.none_selected")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
selectedWorkflow = formParams.getFirst(FORM_PARAM_SELECTED_WORKFLOW);
|
||||
|
||||
|
|
@ -255,24 +266,11 @@ public class MvcArticleCreateStep
|
|||
getBundle()
|
||||
).getText("createstep.workflow.error.not_available")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
|
||||
if (!getMessages().isEmpty()) {
|
||||
final String folderPath = getFolderPath();
|
||||
if (folderPath.isEmpty() || "/".equals(folderPath)) {
|
||||
return String.format(
|
||||
"/@contentsections/%s/documents/@create/%s",
|
||||
getContentSectionLabel(),
|
||||
getDocumentType().getName()
|
||||
);
|
||||
} else {
|
||||
return String.format(
|
||||
"/@contentsections/%s/documents/%s/@create/%s",
|
||||
getContentSectionLabel(),
|
||||
folderPath,
|
||||
getDocumentType().getName()
|
||||
);
|
||||
}
|
||||
return showCreateStep();
|
||||
}
|
||||
|
||||
final Article article = itemManager.createContentItem(
|
||||
|
|
@ -296,4 +294,6 @@ public class MvcArticleCreateStep
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
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/contentsection.xhtml">
|
||||
<ui:composition template="../contentsection.xhtml">
|
||||
|
||||
<ui:param name="activePage" value="documentFolders" />
|
||||
<ui:param name="title" value="#{CmsAdminMessages['contentsection.documentfolders.title']}" />
|
||||
|
|
|
|||
|
|
@ -7,71 +7,75 @@
|
|||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/contentsection.xhtml">
|
||||
|
||||
<ui:define name="main">
|
||||
|
||||
<c:forEach items="#{CmsArticleCreateStep.messages.entrySet}"
|
||||
var="message">
|
||||
<div class="alert alert-#{message.key}" role="alert">
|
||||
#{message.value}
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
<form action="#{mvc.basePath}/#{CmsArticleCreateStep.contentSectionLabel}/documents/#{CmsArticleCreateStep.folderPath}/@create/#{CmsArticleCreateStep.documentType}"
|
||||
method="post">
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsArticleMessageBundle['createform.name.help']}"
|
||||
inputId="name"
|
||||
label="#{CmsArticleMessageBundle['createform.name.label']}"
|
||||
name="name"
|
||||
pattern="^([a-zA-Z0-9_-]*)$"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupSelect
|
||||
help="#{CmsArticleMessageBundle['createform.initial_locale.help']}"
|
||||
inputId="locale"
|
||||
label="#{CmsArticleMessageBundle['createform.initial_locale.label']}"
|
||||
name="locale"
|
||||
options="#{CmsArticleCreateStep.availableLocales}"
|
||||
required="true"
|
||||
selectedOptions="#{[CmsArticleCreateStep.initialLocale]}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsArticleMessageBundle['createform.title.help']}"
|
||||
inputId="title"
|
||||
label="#{CmsArticleMessageBundle['createform.title.label']}"
|
||||
name="title"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupTextarea
|
||||
help="#{CmsArticleMessageBundle['createform.summary.help']}"
|
||||
inputId="summary"
|
||||
label="#{CmsArticleMessageBundle['createform.summary.label']}"
|
||||
name="summary"
|
||||
required="true"
|
||||
/>
|
||||
<div class="container">
|
||||
<h1>#{CmsArticleMessageBundle['createform.title']}</h1>
|
||||
|
||||
<bootstrap:formGroupSelect
|
||||
help="#{CmsArticleMessageBundle['createform.workflow.help']}"
|
||||
inputId="workflow"
|
||||
label="#{CmsArticleMessageBundle['createform.workflow.label']}"
|
||||
name="workflow"
|
||||
options="#{CmsArticleCreateStep.availableWorkflows}"
|
||||
selectedOptions="#{[CmsArticleCreateStep.selectedWorkflow]}"
|
||||
/>
|
||||
|
||||
<a class="btn btn-warning"
|
||||
href="#{mvc.basePath}/#{CmsArticleCreateStep.contentSectionLabel}/documentfolders/#{CmsArticleCreateStep.folderPath}">
|
||||
#{CmsArticleMessageBundle['createform.cancel']}
|
||||
</a>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsArticleMessageBundle['createform.submit']}
|
||||
</button>
|
||||
<c:forEach items="#{CmsArticleCreateStep.messages.entrySet}"
|
||||
var="message">
|
||||
<div class="alert alert-#{message.key}" role="alert">
|
||||
#{message.value}
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
</form>
|
||||
<form action="#{mvc.basePath}/#{CmsArticleCreateStep.contentSectionLabel}/documents/#{CmsArticleCreateStep.folderPath}@create/#{CmsArticleCreateStep.documentType}"
|
||||
method="post">
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsArticleMessageBundle['createform.name.help']}"
|
||||
inputId="name"
|
||||
label="#{CmsArticleMessageBundle['createform.name.label']}"
|
||||
name="name"
|
||||
pattern="^([a-zA-Z0-9_-]*)$"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupSelect
|
||||
help="#{CmsArticleMessageBundle['createform.initial_locale.help']}"
|
||||
inputId="locale"
|
||||
label="#{CmsArticleMessageBundle['createform.initial_locale.label']}"
|
||||
name="locale"
|
||||
options="#{CmsArticleCreateStep.availableLocales}"
|
||||
required="true"
|
||||
selectedOptions="#{[CmsArticleCreateStep.initialLocale]}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsArticleMessageBundle['createform.title.help']}"
|
||||
inputId="title"
|
||||
label="#{CmsArticleMessageBundle['createform.title.label']}"
|
||||
name="title"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupTextarea
|
||||
cols="80"
|
||||
help="#{CmsArticleMessageBundle['createform.summary.help']}"
|
||||
inputId="summary"
|
||||
label="#{CmsArticleMessageBundle['createform.summary.label']}"
|
||||
name="summary"
|
||||
required="true"
|
||||
rows="16"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupSelect
|
||||
help="#{CmsArticleMessageBundle['createform.workflow.help']}"
|
||||
inputId="workflow"
|
||||
label="#{CmsArticleMessageBundle['createform.workflow.label']}"
|
||||
name="workflow"
|
||||
options="#{CmsArticleCreateStep.availableWorkflows}"
|
||||
selectedOptions="#{[CmsArticleCreateStep.selectedWorkflow]}"
|
||||
/>
|
||||
|
||||
<a class="btn btn-warning"
|
||||
href="#{mvc.basePath}/#{CmsArticleCreateStep.contentSectionLabel}/documentfolders/#{CmsArticleCreateStep.folderPath}">
|
||||
#{CmsArticleMessageBundle['createform.cancel']}
|
||||
</a>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsArticleMessageBundle['createform.submit']}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
|
|
|
|||
|
|
@ -28,3 +28,5 @@ basicproperties.name.header=Basic Properties
|
|||
basicproperties.name.edit=Edit
|
||||
basicproperties.title.header=Title
|
||||
basicproperties.description.header=Summary
|
||||
createform.title=Create new article
|
||||
createform.summary.label=Summary
|
||||
|
|
|
|||
|
|
@ -28,3 +28,5 @@ basicproperties.name.header=Basiseigenschaften
|
|||
basicproperties.name.edit=Bearbeiten
|
||||
basicproperties.title.header=Titel
|
||||
basicproperties.description.header=Zusammenfassung
|
||||
createform.title=Neuen Artikel anlegen
|
||||
createform.summary.label=Zusammenfassung
|
||||
|
|
|
|||
Loading…
Reference in New Issue