Several improvements for path handling and asset creation and editing.
parent
6b125c532f
commit
101f802d9c
|
|
@ -22,6 +22,9 @@ import com.arsdigita.cms.ui.assets.forms.PostalAddressForm;
|
||||||
|
|
||||||
import org.hibernate.envers.Audited;
|
import org.hibernate.envers.Audited;
|
||||||
import org.librecms.contentsection.Asset;
|
import org.librecms.contentsection.Asset;
|
||||||
|
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
|
||||||
|
import org.librecms.ui.contentsections.assets.PostalAddressCreateStep;
|
||||||
|
import org.librecms.ui.contentsections.assets.PostalAddressEditStep;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -29,8 +32,9 @@ import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
import static org.librecms.CmsConstants.*;
|
import static org.librecms.CmsConstants.DB_SCHEMA;
|
||||||
import static org.librecms.assets.AssetConstants.*;
|
import static org.librecms.assets.AssetConstants.ASSETS_BUNDLE;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A reuable postal address.
|
* A reuable postal address.
|
||||||
|
|
@ -40,11 +44,17 @@ import static org.librecms.assets.AssetConstants.*;
|
||||||
@Entity
|
@Entity
|
||||||
@Audited
|
@Audited
|
||||||
@Table(name = "POSTAL_ADDRESSES", schema = DB_SCHEMA)
|
@Table(name = "POSTAL_ADDRESSES", schema = DB_SCHEMA)
|
||||||
@AssetType(assetForm = PostalAddressForm.class,
|
@AssetType(
|
||||||
|
assetForm = PostalAddressForm.class,
|
||||||
labelBundle = ASSETS_BUNDLE,
|
labelBundle = ASSETS_BUNDLE,
|
||||||
labelKey = "postaladdress.label",
|
labelKey = "postaladdress.label",
|
||||||
descriptionBundle = ASSETS_BUNDLE,
|
descriptionBundle = ASSETS_BUNDLE,
|
||||||
descriptionKey = "postaladdress.description")
|
descriptionKey = "postaladdress.description"
|
||||||
|
)
|
||||||
|
@MvcAssetEditKit(
|
||||||
|
createStep = PostalAddressCreateStep.class,
|
||||||
|
editStep = PostalAddressEditStep.class
|
||||||
|
)
|
||||||
public class PostalAddress extends Asset {
|
public class PostalAddress extends Asset {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
||||||
|
|
@ -501,7 +501,9 @@ public class FolderManager {
|
||||||
Folder current = folder;
|
Folder current = folder;
|
||||||
while (getParentFolder(current).isPresent()) {
|
while (getParentFolder(current).isPresent()) {
|
||||||
current = getParentFolder(current).get();
|
current = getParentFolder(current).get();
|
||||||
tokens.add(current.getName());
|
if (getParentFolder(current).isPresent()) {
|
||||||
|
tokens.add(current.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Collections.reverse(tokens);
|
Collections.reverse(tokens);
|
||||||
|
|
|
||||||
|
|
@ -665,11 +665,11 @@ public class AssetFolderController {
|
||||||
row.setFolderPath(
|
row.setFolderPath(
|
||||||
folderManager
|
folderManager
|
||||||
.getFolderPath(folder)
|
.getFolderPath(folder)
|
||||||
.substring(
|
// .substring(
|
||||||
folderManager
|
// folderManager
|
||||||
.getFolderPath(section.getRootAssetsFolder())
|
// .getFolderPath(section.getRootAssetsFolder())
|
||||||
.length()
|
// .length()
|
||||||
)
|
// )
|
||||||
);
|
);
|
||||||
row.setName(entry.getDisplayName());
|
row.setName(entry.getDisplayName());
|
||||||
row.setTitle(
|
row.setTitle(
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.libreccm.ui.IsAuthenticatedFilter;
|
import org.libreccm.ui.IsAuthenticatedFilter;
|
||||||
import org.librecms.ui.contentsections.assets.AssetEditStepsValidator;
|
import org.librecms.ui.contentsections.assets.AssetEditStepsValidator;
|
||||||
|
import org.librecms.ui.contentsections.assets.AssetController;
|
||||||
import org.librecms.ui.contentsections.assets.MvcAssetEditSteps;
|
import org.librecms.ui.contentsections.assets.MvcAssetEditSteps;
|
||||||
import org.librecms.ui.contentsections.documents.AuthoringStepsValidator;
|
import org.librecms.ui.contentsections.documents.AuthoringStepsValidator;
|
||||||
import org.librecms.ui.contentsections.documents.DocumentController;
|
import org.librecms.ui.contentsections.documents.DocumentController;
|
||||||
|
|
@ -69,6 +70,7 @@ public class ContentSectionApplication extends Application {
|
||||||
public Set<Class<?>> getClasses() {
|
public Set<Class<?>> getClasses() {
|
||||||
final Set<Class<?>> classes = new HashSet<>();
|
final Set<Class<?>> classes = new HashSet<>();
|
||||||
|
|
||||||
|
classes.add(AssetController.class);
|
||||||
classes.add(AssetFolderController.class);
|
classes.add(AssetFolderController.class);
|
||||||
classes.add(CategoriesController.class);
|
classes.add(CategoriesController.class);
|
||||||
classes.add(ConfigurationController.class);
|
classes.add(ConfigurationController.class);
|
||||||
|
|
|
||||||
|
|
@ -799,11 +799,11 @@ public class DocumentFolderController {
|
||||||
row.setFolderPath(
|
row.setFolderPath(
|
||||||
folderManager
|
folderManager
|
||||||
.getFolderPath(folder)
|
.getFolderPath(folder)
|
||||||
.substring(
|
// .substring(
|
||||||
folderManager
|
// folderManager
|
||||||
.getFolderPath(section.getRootDocumentsFolder())
|
// .getFolderPath(section.getRootDocumentsFolder())
|
||||||
.length()
|
// .length()
|
||||||
)
|
// )
|
||||||
);
|
);
|
||||||
row.setLanguages(Collections.emptySortedSet());
|
row.setLanguages(Collections.emptySortedSet());
|
||||||
row.setLastEditPublished(false);
|
row.setLastEditPublished(false);
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ public abstract class AbstractMvcAssetCreateStep<T extends Asset>
|
||||||
if (folder.getParentFolder() == null) {
|
if (folder.getParentFolder() == null) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
return folderManager.getFolderPath(folder);
|
return folderManager.getFolderPath(folder).substring(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
package org.librecms.ui.contentsections.assets;
|
package org.librecms.ui.contentsections.assets;
|
||||||
|
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
|
||||||
import org.librecms.contentsection.Asset;
|
import org.librecms.contentsection.Asset;
|
||||||
import org.librecms.contentsection.AssetManager;
|
import org.librecms.contentsection.AssetManager;
|
||||||
import org.librecms.contentsection.AssetRepository;
|
import org.librecms.contentsection.AssetRepository;
|
||||||
|
|
@ -28,7 +27,6 @@ import org.librecms.ui.contentsections.AssetPermissionsChecker;
|
||||||
import org.librecms.ui.contentsections.ContentSectionModel;
|
import org.librecms.ui.contentsections.ContentSectionModel;
|
||||||
import org.librecms.ui.contentsections.ContentSectionsUi;
|
import org.librecms.ui.contentsections.ContentSectionsUi;
|
||||||
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||||
import org.librecms.ui.contentsections.documents.MvcAuthoringSteps;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -37,10 +35,6 @@ import java.util.Optional;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.mvc.Models;
|
import javax.mvc.Models;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.transaction.Transactional;
|
|
||||||
import javax.ws.rs.DefaultValue;
|
|
||||||
import javax.ws.rs.FormParam;
|
|
||||||
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;
|
||||||
import javax.ws.rs.WebApplicationException;
|
import javax.ws.rs.WebApplicationException;
|
||||||
|
|
@ -82,10 +76,10 @@ public abstract class AbstractMvcAssetEditStep implements MvcAssetEditStep {
|
||||||
@Inject
|
@Inject
|
||||||
private SelectedAssetModel assetModel;
|
private SelectedAssetModel assetModel;
|
||||||
|
|
||||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
private String sectionIdentifier;
|
private String sectionIdentifier;
|
||||||
|
|
||||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
|
||||||
private String assetPathParam;
|
private String assetPathParam;
|
||||||
|
|
||||||
private ContentSection contentSection;
|
private ContentSection contentSection;
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ import javax.ws.rs.core.MediaType;
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Path("/{sectionIdentifier}/assets")
|
@Path("/{sectionIdentifier}/assets")
|
||||||
@Controller
|
@Controller
|
||||||
public class AssetsController {
|
public class AssetController {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AssetEditStepsValidator stepsValidator;
|
private AssetEditStepsValidator stepsValidator;
|
||||||
|
|
@ -183,7 +183,7 @@ public class AssetsController {
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String showCreateStepPost(
|
public String showCreateStepPost(
|
||||||
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
||||||
@FormParam("documentType") final String assetType
|
@FormParam("assetType") final String assetType
|
||||||
) {
|
) {
|
||||||
return String.format(
|
return String.format(
|
||||||
"redirect:/%s/assets/@create/%s",
|
"redirect:/%s/assets/@create/%s",
|
||||||
|
|
@ -199,7 +199,7 @@ public class AssetsController {
|
||||||
public String showCreateStep(
|
public String showCreateStep(
|
||||||
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
||||||
@PathParam("folderPath") final String folderPath,
|
@PathParam("folderPath") final String folderPath,
|
||||||
@FormParam("assetType") final String assetType
|
@PathParam("assetType") final String assetType
|
||||||
) {
|
) {
|
||||||
final CreateStepResult result = findCreateStep(
|
final CreateStepResult result = findCreateStep(
|
||||||
sectionIdentifier,
|
sectionIdentifier,
|
||||||
|
|
@ -224,7 +224,7 @@ public class AssetsController {
|
||||||
@FormParam("assetType") final String assetType
|
@FormParam("assetType") final String assetType
|
||||||
) {
|
) {
|
||||||
return String.format(
|
return String.format(
|
||||||
"redirect:/%s/documents/%s/@create/%s",
|
"redirect:/%s/assets/%s/@create/%s",
|
||||||
sectionIdentifier,
|
sectionIdentifier,
|
||||||
folderPath,
|
folderPath,
|
||||||
assetType
|
assetType
|
||||||
|
|
@ -275,7 +275,7 @@ public class AssetsController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/{assetPath:(.+)?")
|
@Path("/{assetPath:(.+)?}")
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String editAsset(
|
public String editAsset(
|
||||||
|
|
@ -345,7 +345,7 @@ public class AssetsController {
|
||||||
* @param section The content section.
|
* @param section The content section.
|
||||||
* @param folderPath The folder path.
|
* @param folderPath The folder path.
|
||||||
*
|
*
|
||||||
* @return The template of the "document folder not found" page.
|
* @return The template of the "asset folder not found" page.
|
||||||
*/
|
*/
|
||||||
private String showAssetFolderNotFound(
|
private String showAssetFolderNotFound(
|
||||||
final ContentSection section, final String folderPath
|
final ContentSection section, final String folderPath
|
||||||
|
|
@ -58,7 +58,7 @@ public class AssetUi {
|
||||||
models.put("section", section.getLabel());
|
models.put("section", section.getLabel());
|
||||||
models.put("assetPath", assetPath);
|
models.put("assetPath", assetPath);
|
||||||
models.put(step, step);
|
models.put(step, step);
|
||||||
return "org/librecms/ui/contentsections/assets/access-denied.xhtml";
|
return "org/librecms/ui/contentsection/assets/access-denied.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String showAssetNotFound(
|
public String showAssetNotFound(
|
||||||
|
|
@ -66,7 +66,7 @@ public class AssetUi {
|
||||||
) {
|
) {
|
||||||
models.put("section", section.getLabel());
|
models.put("section", section.getLabel());
|
||||||
models.put("assetPath", assetPath);
|
models.put("assetPath", assetPath);
|
||||||
return "/org/librecms/ui/contentsections/assets/asset-not-found.xhtml";
|
return "/org/librecms/ui/contentsection/assets/asset-not-found.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.librecms.ui.contentsections.assets;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
public class CmsAssetEditSteps implements MvcAssetEditSteps {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Set<Class<?>> getClasses() {
|
||||||
|
final Set<Class<?>> classes = new HashSet<>();
|
||||||
|
|
||||||
|
classes.add(PostalAddressEditStep.class);
|
||||||
|
|
||||||
|
return classes;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -25,8 +25,11 @@ import org.librecms.contentsection.AssetManager;
|
||||||
import org.librecms.contentsection.AssetRepository;
|
import org.librecms.contentsection.AssetRepository;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
|
@ -76,7 +79,7 @@ public class PostalAddressCreateStep
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String showCreateStep() {
|
public String showCreateStep() {
|
||||||
return "/org/librecms/ui/assets/postaladdress/create-postaladdress.xhtml";
|
return "org/librecms/ui/contentsection/assets/postaladdress/create-postaladdress.xhtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
|
|
@ -220,17 +223,29 @@ public class PostalAddressCreateStep
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getCountries() {
|
public Map<String, String> getCountries() {
|
||||||
return Arrays
|
final Set<Locale> countries = Arrays
|
||||||
.stream(Locale.getISOCountries())
|
.stream(Locale.getISOCountries())
|
||||||
.map(country -> new Locale(country))
|
.map(country -> new Locale("", country))
|
||||||
|
.collect(Collectors.toCollection(LinkedHashSet::new));
|
||||||
|
|
||||||
|
final Map<String, String> countriesMap = countries
|
||||||
|
.stream()
|
||||||
.collect(
|
.collect(
|
||||||
Collectors.toMap(
|
Collectors.toMap(
|
||||||
Locale::toString,
|
Locale::getCountry,
|
||||||
locale -> locale.getDisplayCountry(
|
locale -> locale.getDisplayCountry(
|
||||||
globalizationHelper.getNegotiatedLocale()
|
globalizationHelper.getNegotiatedLocale()
|
||||||
)
|
),
|
||||||
|
(value1, value2) -> value1,
|
||||||
|
LinkedHashMap::new
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
final Map<String, String> values = new LinkedHashMap<>();
|
||||||
|
values.put("", "");
|
||||||
|
values.putAll(countriesMap);
|
||||||
|
|
||||||
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -92,11 +94,41 @@ public class PostalAddressEditStep extends AbstractMvcAssetEditStep {
|
||||||
|
|
||||||
private List<String> unusedTitleLocales;
|
private List<String> unusedTitleLocales;
|
||||||
|
|
||||||
|
private Map<String, String> countries;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends MvcAssetEditStep> getStepClass() {
|
public Class<? extends MvcAssetEditStep> getStepClass() {
|
||||||
return PostalAddressEditStep.class;
|
return PostalAddressEditStep.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() throws ContentSectionNotFoundException,
|
||||||
|
AssetNotFoundException {
|
||||||
|
super.init();
|
||||||
|
|
||||||
|
final Set<Locale> countryLocales = Arrays
|
||||||
|
.stream(Locale.getISOCountries())
|
||||||
|
.map(country -> new Locale("", country))
|
||||||
|
.collect(Collectors.toCollection(LinkedHashSet::new));
|
||||||
|
|
||||||
|
final Map<String, String> countriesMap = countryLocales
|
||||||
|
.stream()
|
||||||
|
.collect(
|
||||||
|
Collectors.toMap(
|
||||||
|
Locale::getCountry,
|
||||||
|
locale -> locale.getDisplayCountry(
|
||||||
|
globalizationHelper.getNegotiatedLocale()
|
||||||
|
),
|
||||||
|
(value1, value2) -> value1,
|
||||||
|
LinkedHashMap::new
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
countries = new LinkedHashMap<>();
|
||||||
|
countries.put("", "");
|
||||||
|
countries.putAll(countriesMap);
|
||||||
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
|
|
@ -139,7 +171,7 @@ public class PostalAddressEditStep extends AbstractMvcAssetEditStep {
|
||||||
.map(Locale::toString)
|
.map(Locale::toString)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
return "org/librecms/ui/assets/postaladdress/edit-postaladdress.xhtml";
|
return "org/librecms/ui/contentsection/assets/postaladdress/edit-postaladdress.xhtml";
|
||||||
} else {
|
} else {
|
||||||
return assetUi.showAccessDenied(
|
return assetUi.showAccessDenied(
|
||||||
getContentSection(),
|
getContentSection(),
|
||||||
|
|
@ -326,8 +358,7 @@ public class PostalAddressEditStep extends AbstractMvcAssetEditStep {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCountry() {
|
public String getCountry() {
|
||||||
return new Locale(getPostalAddress()
|
return new Locale("", getPostalAddress().getIsoCountryCode())
|
||||||
.getIsoCountryCode())
|
|
||||||
.getDisplayCountry(globalizationHelper.getNegotiatedLocale());
|
.getDisplayCountry(globalizationHelper.getNegotiatedLocale());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -374,17 +405,7 @@ public class PostalAddressEditStep extends AbstractMvcAssetEditStep {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getCountries() {
|
public Map<String, String> getCountries() {
|
||||||
return Arrays
|
return countries;
|
||||||
.stream(Locale.getISOCountries())
|
|
||||||
.map(country -> new Locale(country))
|
|
||||||
.collect(
|
|
||||||
Collectors.toMap(
|
|
||||||
Locale::toString,
|
|
||||||
locale -> locale.getDisplayCountry(
|
|
||||||
globalizationHelper.getNegotiatedLocale()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ public abstract class AbstractMvcDocumentCreateStep<T extends ContentItem>
|
||||||
if (folder.getParentFolder() == null) {
|
if (folder.getParentFolder() == null) {
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
return folderManager.getFolderPath(folder);
|
return folderManager.getFolderPath(folder).substring(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ import org.librecms.lifecycle.LifecycleDefinition;
|
||||||
import org.librecms.lifecycle.Phase;
|
import org.librecms.lifecycle.Phase;
|
||||||
import org.librecms.ui.contentsections.ContentSectionModel;
|
import org.librecms.ui.contentsections.ContentSectionModel;
|
||||||
import org.librecms.ui.contentsections.ContentSectionsUi;
|
import org.librecms.ui.contentsections.ContentSectionsUi;
|
||||||
import org.librecms.ui.contentsections.DocumentFolderController;
|
|
||||||
import org.librecms.ui.contentsections.ItemPermissionChecker;
|
import org.librecms.ui.contentsections.ItemPermissionChecker;
|
||||||
|
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
|
|
@ -257,7 +256,7 @@ public class DocumentController {
|
||||||
public String showCreateStep(
|
public String showCreateStep(
|
||||||
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
||||||
@PathParam("folderPath") final String folderPath,
|
@PathParam("folderPath") final String folderPath,
|
||||||
@FormParam("documentType") final String documentType
|
@PathParam("documentType") final String documentType
|
||||||
) {
|
) {
|
||||||
final CreateStepResult result = findCreateStep(
|
final CreateStepResult result = findCreateStep(
|
||||||
sectionIdentifier,
|
sectionIdentifier,
|
||||||
|
|
@ -273,7 +272,7 @@ public class DocumentController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path("/{folderPath:(.+)?}/@create/{documentType}")
|
@Path("/{folderPath:(.+)?}/@create")
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public String showCreateStepPost(
|
public String showCreateStepPost(
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,11 @@
|
||||||
default="Failed to load variant."
|
default="Failed to load variant."
|
||||||
required="false"
|
required="false"
|
||||||
type="String" />
|
type="String" />
|
||||||
|
<cc:attribute name="mode"
|
||||||
|
default="full"
|
||||||
|
shortDescription="The editor mode. Use 'full' to enable all options including adding images etc. Use 'textonly' for a minimal version that only supports text editing, but does not allow insertation of images etc."
|
||||||
|
required="false"
|
||||||
|
type="String" />
|
||||||
<cc:attribute name="objectIdentifier"
|
<cc:attribute name="objectIdentifier"
|
||||||
required="true"
|
required="true"
|
||||||
shortDescription="Identifier of the object to which the localized string belongs"
|
shortDescription="Identifier of the object to which the localized string belongs"
|
||||||
|
|
|
||||||
|
|
@ -275,8 +275,8 @@
|
||||||
<c:when test="#{row.folder and (row.permissions.grantedEdit or row.permissions.grantedPreview)}">
|
<c:when test="#{row.folder and (row.permissions.grantedEdit or row.permissions.grantedPreview)}">
|
||||||
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assetfolders/#{row.folderPath}">#{row.name}</a>
|
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assetfolders/#{row.folderPath}">#{row.name}</a>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:when test="#{row.permissions.grantedApprove or row.permissions.grantedCategorize or row.permissions.grantedEdit or row.permissions.grantedPreview or row.permissions.grantedPublish}">
|
<c:when test="#{row.permissions.grantedEdit or row.permissions.grantedUse or row.permissions.grantedView}">
|
||||||
<a href="#">#{row.name}</a>
|
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{AssetFolderModel.pathWithTrailingSlash}#{row.name}">#{row.name}</a>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<span>#{row.name}</span>
|
<span>#{row.name}</span>
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,11 @@
|
||||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.postaladdress.country.label']}"
|
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.postaladdress.country.label']}"
|
||||||
name="isoCountryCode"
|
name="isoCountryCode"
|
||||||
options="#{CmsPostalAddressCreateStep.countries}"
|
options="#{CmsPostalAddressCreateStep.countries}"
|
||||||
|
required="false"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<a class="btn btn-warning"
|
<a class="btn btn-warning"
|
||||||
href="#{mvc.basePath}/#{CmsPostalAddressCreateStep.contentSectionLabel}/assetsfolders/#{CmsPostalAddressCreateStep.folderPath}">
|
href="#{mvc.basePath}/#{CmsPostalAddressCreateStep.contentSectionLabel}/assetfolders/#{CmsPostalAddressCreateStep.folderPath}">
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['createform.cancel']}
|
#{CmsAssetsStepsDefaultMessagesBundle['createform.cancel']}
|
||||||
</a>
|
</a>
|
||||||
<button class="btn btn-success"
|
<button class="btn btn-success"
|
||||||
|
|
|
||||||
|
|
@ -5,218 +5,223 @@
|
||||||
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
||||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||||
|
|
||||||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsections/assets/editstep.xhtml">
|
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/assets/editstep.xhtml">
|
||||||
<h2>#{CmsAssetsStepsDefaultMessagesBundle.getMessage('postaladdress.editstep.header', [CmsPostalAddressEditStep.name])}</h2>
|
|
||||||
|
|
||||||
<h3>#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.header']}</h3>
|
<ui:define name="editStep">
|
||||||
<div class="d-flex">
|
<div class="container">
|
||||||
<pre class="mr-2">#{CmsPostalAddressEditStep.name}</pre>
|
<h2>#{CmsAssetsStepsDefaultMessagesBundle.getMessage('postaladdress.editstep.header', [CmsPostalAddressEditStep.name])}</h2>
|
||||||
<c:if test="#{CmsPostalAddressEditStep.canEdit}">
|
|
||||||
<button class="btn btn-primary btn-sm"
|
|
||||||
data-toggle="modal"
|
|
||||||
data-target="#name-edit-dialog"
|
|
||||||
type="button">
|
|
||||||
<bootstrap:svgIcon icon="pen" />
|
|
||||||
<span class="sr-only">
|
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.edit']}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</c:if>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<c:if test="#{CmsPostalAddressEditStep.canEdit}">
|
<h3>#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.header']}</h3>
|
||||||
<div aria-hidden="true"
|
<div class="d-flex">
|
||||||
aria-labelledby="name-edit-dialog-title"
|
<pre class="mr-2">#{CmsPostalAddressEditStep.name}</pre>
|
||||||
class="modal fade"
|
<c:if test="#{CmsPostalAddressEditStep.canEdit}">
|
||||||
id="name-edit-dialog"
|
<button class="btn btn-primary btn-sm"
|
||||||
tabindex="-1">
|
data-toggle="modal"
|
||||||
<div class="modal-dialog">
|
data-target="#name-edit-dialog"
|
||||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@edit-postaladdress/name"
|
|
||||||
class="modal-content"
|
|
||||||
method="post">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title"
|
|
||||||
id="name-edit-dialog-title">
|
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.edit.title']}
|
|
||||||
</h4>
|
|
||||||
<button aria-label="#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.edit.close']}"
|
|
||||||
class="close"
|
|
||||||
data-dismiss="modal"
|
|
||||||
type="button">
|
|
||||||
<bootstrap:svgIcon icon="x" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<bootstrap:formGroupText
|
|
||||||
help="#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.help']}"
|
|
||||||
inputId="name"
|
|
||||||
label="#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.label']}"
|
|
||||||
name="name"
|
|
||||||
pattern="^([a-zA-Z0-9_-]*)$"
|
|
||||||
required="true"
|
|
||||||
value="#{CmsPostalAddressEditStep.name}"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button class="btn btn-warning"
|
|
||||||
data-dismiss="modal"
|
|
||||||
type="button">
|
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.close']}
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-success"
|
|
||||||
type="submit">
|
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.submit']}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</c:if>
|
|
||||||
|
|
||||||
<libreccm:localizedStringEditor
|
|
||||||
addButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add_button.label']}"
|
|
||||||
addDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.cancel']}"
|
|
||||||
addDialogLocaleSelectHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.locale.help']}"
|
|
||||||
addDialogLocaleSelectLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.locale.label']}"
|
|
||||||
addDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.submit']}"
|
|
||||||
addDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.header']}"
|
|
||||||
addDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.value.help']}"
|
|
||||||
addDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.value.label']}"
|
|
||||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/title/@add"
|
|
||||||
editButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit']}"
|
|
||||||
editDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.cancel']}"
|
|
||||||
editDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.submit']}"
|
|
||||||
editDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.header']}"
|
|
||||||
editDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.value.help']}"
|
|
||||||
editDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.value.label']}"
|
|
||||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/title/@edit"
|
|
||||||
editorId="title-editor"
|
|
||||||
hasUnusedLocales="#{!CmsPostalAddressEditStep.unusedTitleLocales.isEmpty()}"
|
|
||||||
headingLevel="3"
|
|
||||||
objectIdentifier="#{CmsSelectedAssetModel.assetPath}"
|
|
||||||
readOnly="#{!CmsPostalAddressEditStep.canEdit}"
|
|
||||||
removeButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove']}"
|
|
||||||
removeDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove.cancel']}"
|
|
||||||
removeDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove.submit']}"
|
|
||||||
removeDialogText="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove.text']}"
|
|
||||||
removeDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove.title']}"
|
|
||||||
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/title/@remove"
|
|
||||||
title="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.header']}"
|
|
||||||
unusedLocales="#{CmsPostalAddressEditStep.unusedTitleLocales}"
|
|
||||||
values="#{CmsPostalAddressEditStep.titleValues}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<h3>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.header']}</h3>
|
|
||||||
|
|
||||||
<c:if test="#{CmsPostalAddressEditStep.canEdit}">
|
|
||||||
<div class="text-right">
|
|
||||||
<button class="btn btn-primary"
|
|
||||||
data-toggle="modal"
|
|
||||||
data-target="#properties-edit-dialog"
|
|
||||||
type="button">
|
|
||||||
<bootstrap:svgIcon icon="pen" />
|
|
||||||
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit']}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div aria-hidden="true"
|
|
||||||
aria-labelledby="properties-edit-dialog-title"
|
|
||||||
class="modal fade"
|
|
||||||
id="properties-edit-dialog"
|
|
||||||
tabindex="-1">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/properties"
|
|
||||||
class="modal-content"
|
|
||||||
method="post">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title"
|
|
||||||
id="properties-edit-dialog-title">
|
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.title']}
|
|
||||||
</h4>
|
|
||||||
<button
|
|
||||||
aria-label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.close']}"
|
|
||||||
class="close"
|
|
||||||
data-dismiss="modal"
|
|
||||||
type="button">
|
type="button">
|
||||||
<bootstrap:svgIcon icon="x" />
|
<bootstrap:svgIcon icon="pen" />
|
||||||
</button>
|
<span class="sr-only">
|
||||||
</div>
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.edit']}
|
||||||
<div class="modal-body">
|
</span>
|
||||||
<bootstrap:formGroupTextarea
|
</button>
|
||||||
cols="80"
|
</c:if>
|
||||||
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.address.help']}"
|
|
||||||
inputId="address"
|
|
||||||
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.address.label']}"
|
|
||||||
name="address"
|
|
||||||
rows="10"
|
|
||||||
value="#{CmsPostalAddressEditStep.address}"
|
|
||||||
/>
|
|
||||||
<bootstrap:formGroupText
|
|
||||||
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.postal_code.help']}"
|
|
||||||
inputId="postalCode"
|
|
||||||
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.postal_code.label']}"
|
|
||||||
name="postalCode"
|
|
||||||
value="#{CmsPostalAddressEditStep.postalCode}"
|
|
||||||
/>
|
|
||||||
<bootstrap:formGroupText
|
|
||||||
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.city.help']}"
|
|
||||||
inputId="city"
|
|
||||||
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.city.label']}"
|
|
||||||
name="city"
|
|
||||||
value="#{CmsPostalAddressEditStep.city}"
|
|
||||||
/>
|
|
||||||
<bootstrap:formGroupText
|
|
||||||
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.state.help']}"
|
|
||||||
inputId="state"
|
|
||||||
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.state.label']}"
|
|
||||||
name="state"
|
|
||||||
value="#{CmsPostalAddressEditStep.state}"
|
|
||||||
/>
|
|
||||||
<bootstrap:formGroupSelect
|
|
||||||
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.country.help']}"
|
|
||||||
inputId="isoCountryCode"
|
|
||||||
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.country.label']}"
|
|
||||||
name="isoCountryCode"
|
|
||||||
options="#{CmsPostalAddressEditStep.countries}"
|
|
||||||
selectedOptions="#{[CmsPostalAddressEditStep.isoCountryCode]}"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button class="btn btn-warning"
|
|
||||||
data-dismiss="modal"
|
|
||||||
type="button">
|
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.close']}
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-success"
|
|
||||||
type="submit">
|
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.submit']}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<c:if test="#{CmsPostalAddressEditStep.canEdit}">
|
||||||
|
<div aria-hidden="true"
|
||||||
|
aria-labelledby="name-edit-dialog-title"
|
||||||
|
class="modal fade"
|
||||||
|
id="name-edit-dialog"
|
||||||
|
tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/name"
|
||||||
|
class="modal-content"
|
||||||
|
method="post">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="name-edit-dialog-title">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.edit.title']}
|
||||||
|
</h4>
|
||||||
|
<button aria-label="#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.edit.close']}"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="x" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.help']}"
|
||||||
|
inputId="name"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.label']}"
|
||||||
|
name="name"
|
||||||
|
pattern="^([a-zA-Z0-9_-]*)$"
|
||||||
|
required="true"
|
||||||
|
value="#{CmsPostalAddressEditStep.name}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-warning"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.close']}
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
type="submit">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.submit']}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
<libreccm:localizedStringEditor
|
||||||
|
addButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add_button.label']}"
|
||||||
|
addDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.cancel']}"
|
||||||
|
addDialogLocaleSelectHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.locale.help']}"
|
||||||
|
addDialogLocaleSelectLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.locale.label']}"
|
||||||
|
addDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.submit']}"
|
||||||
|
addDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.header']}"
|
||||||
|
addDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.value.help']}"
|
||||||
|
addDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.add.value.label']}"
|
||||||
|
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/title/@add"
|
||||||
|
editButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit']}"
|
||||||
|
editDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.cancel']}"
|
||||||
|
editDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.submit']}"
|
||||||
|
editDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.header']}"
|
||||||
|
editDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.value.help']}"
|
||||||
|
editDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.edit.value.label']}"
|
||||||
|
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/title/@edit"
|
||||||
|
editorId="title-editor"
|
||||||
|
hasUnusedLocales="#{!CmsPostalAddressEditStep.unusedTitleLocales.isEmpty()}"
|
||||||
|
headingLevel="3"
|
||||||
|
objectIdentifier="#{CmsSelectedAssetModel.assetPath}"
|
||||||
|
readOnly="#{!CmsPostalAddressEditStep.canEdit}"
|
||||||
|
removeButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove']}"
|
||||||
|
removeDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove.cancel']}"
|
||||||
|
removeDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove.submit']}"
|
||||||
|
removeDialogText="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove.text']}"
|
||||||
|
removeDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.remove.title']}"
|
||||||
|
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/title/@remove"
|
||||||
|
title="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.header']}"
|
||||||
|
unusedLocales="#{CmsPostalAddressEditStep.unusedTitleLocales}"
|
||||||
|
values="#{CmsPostalAddressEditStep.titleValues}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<h3>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.header']}</h3>
|
||||||
|
|
||||||
|
<c:if test="#{CmsPostalAddressEditStep.canEdit}">
|
||||||
|
<div class="text-right">
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
data-toggle="modal"
|
||||||
|
data-target="#properties-edit-dialog"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="pen" />
|
||||||
|
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit']}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div aria-hidden="true"
|
||||||
|
aria-labelledby="properties-edit-dialog-title"
|
||||||
|
class="modal fade"
|
||||||
|
id="properties-edit-dialog"
|
||||||
|
tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@postaladdress-edit/properties"
|
||||||
|
class="modal-content"
|
||||||
|
method="post">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="properties-edit-dialog-title">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.title']}
|
||||||
|
</h4>
|
||||||
|
<button
|
||||||
|
aria-label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.close']}"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="x" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<bootstrap:formGroupTextarea
|
||||||
|
cols="80"
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.address.help']}"
|
||||||
|
inputId="address"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.address.label']}"
|
||||||
|
name="address"
|
||||||
|
rows="10"
|
||||||
|
value="#{CmsPostalAddressEditStep.address}"
|
||||||
|
/>
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.postal_code.help']}"
|
||||||
|
inputId="postalCode"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.postal_code.label']}"
|
||||||
|
name="postalCode"
|
||||||
|
value="#{CmsPostalAddressEditStep.postalCode}"
|
||||||
|
/>
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.city.help']}"
|
||||||
|
inputId="city"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.city.label']}"
|
||||||
|
name="city"
|
||||||
|
value="#{CmsPostalAddressEditStep.city}"
|
||||||
|
/>
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.state.help']}"
|
||||||
|
inputId="state"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.state.label']}"
|
||||||
|
name="state"
|
||||||
|
value="#{CmsPostalAddressEditStep.state}"
|
||||||
|
/>
|
||||||
|
<bootstrap:formGroupSelect
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.country.help']}"
|
||||||
|
inputId="isoCountryCode"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.country.label']}"
|
||||||
|
name="isoCountryCode"
|
||||||
|
options="#{CmsPostalAddressEditStep.countries}"
|
||||||
|
selectedOptions="#{[CmsPostalAddressEditStep.isoCountryCode]}"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-warning"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.close']}
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
type="submit">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.edit.submit']}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<dl>
|
||||||
|
<div>
|
||||||
|
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.address.label']}</dt>
|
||||||
|
<dd><pre>#{CmsPostalAddressEditStep.address}</pre></dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.postal_code.label']}</dt>
|
||||||
|
<dd>#{CmsPostalAddressEditStep.postalCode}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.city.label']}</dt>
|
||||||
|
<dd>#{CmsPostalAddressEditStep.city}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.state.label']}</dt>
|
||||||
|
<dd>#{CmsPostalAddressEditStep.state}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.country.label']}</dt>
|
||||||
|
<dd>#{CmsPostalAddressEditStep.country}</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</ui:define>
|
||||||
<dl>
|
|
||||||
<div>
|
|
||||||
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.address.label']}</dt>
|
|
||||||
<dd>#{CmsPostalAddressEditStep.address}</dd>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.postal_code.label']}</dt>
|
|
||||||
<dd>#{CmsPostalAddressEditStep.postalCode}</dd>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.city.label']}</dt>
|
|
||||||
<dd>#{CmsPostalAddressEditStep.city}</dd>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.state.label']}</dt>
|
|
||||||
<dd>#{CmsPostalAddressEditStep.state}</dd>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<dt>#{CmsAssetsStepsDefaultMessagesBundle['postaladdress.editstep.properties.country.label']}</dt>
|
|
||||||
<dd>#{CmsPostalAddressEditStep.country}</dd>
|
|
||||||
</div>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,3 +63,5 @@ postaladdress.editstep.properties.state.label=State
|
||||||
postaladdress.editstep.properties.edit.country.help=The country part of the address.
|
postaladdress.editstep.properties.edit.country.help=The country part of the address.
|
||||||
postaladdress.editstep.properties.country.label=Country
|
postaladdress.editstep.properties.country.label=Country
|
||||||
postaladdress.editstep.properties.edit.submit=Save
|
postaladdress.editstep.properties.edit.submit=Save
|
||||||
|
postal_address.label=Postal address
|
||||||
|
editstep.name.close=Cancel
|
||||||
|
|
|
||||||
|
|
@ -63,3 +63,5 @@ postaladdress.editstep.properties.state.label=Bundesstaat
|
||||||
postaladdress.editstep.properties.edit.country.help=Das Land, in dem sich die Adresse befindet.
|
postaladdress.editstep.properties.edit.country.help=Das Land, in dem sich die Adresse befindet.
|
||||||
postaladdress.editstep.properties.country.label=Land
|
postaladdress.editstep.properties.country.label=Land
|
||||||
postaladdress.editstep.properties.edit.submit=Speichern
|
postaladdress.editstep.properties.edit.submit=Speichern
|
||||||
|
postal_address.label=Postanschrift
|
||||||
|
editstep.name.close=Abbrechen
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
id="#{cc.attrs.inputId}"
|
id="#{cc.attrs.inputId}"
|
||||||
multiple="#{cc.attrs.multiple ? 'multiple' : null}"
|
multiple="#{cc.attrs.multiple ? 'multiple' : null}"
|
||||||
name="#{cc.attrs.name}"
|
name="#{cc.attrs.name}"
|
||||||
required="#{cc.attrs.required}"
|
required="#{cc.attrs.required ? 'required' : ''}"
|
||||||
size="#{not empty cc.attrs.size ? cc.attrs.size : null}">
|
size="#{not empty cc.attrs.size ? cc.attrs.size : null}">
|
||||||
<c:forEach items="#{cc.attrs.options.entrySet()}" var="option">
|
<c:forEach items="#{cc.attrs.options.entrySet()}" var="option">
|
||||||
<option selected="#{cc.attrs.selectedOptions.contains(option.key) ? 'selected' : null}"
|
<option selected="#{cc.attrs.selectedOptions.contains(option.key) ? 'selected' : null}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue