MVC controllers should not be named beans
parent
bf26825663
commit
8d674ac140
|
|
@ -23,6 +23,9 @@ import com.arsdigita.cms.ui.assets.forms.LegalMetadataForm;
|
||||||
import org.librecms.contentsection.Asset;
|
import org.librecms.contentsection.Asset;
|
||||||
import org.hibernate.envers.Audited;
|
import org.hibernate.envers.Audited;
|
||||||
import org.libreccm.l10n.LocalizedString;
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
import org.librecms.ui.contentsections.assets.LegalMetadataCreateStep;
|
||||||
|
import org.librecms.ui.contentsections.assets.LegalMetadataEditStep;
|
||||||
|
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -49,14 +52,20 @@ import static org.librecms.assets.AssetConstants.*;
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@AssetType(assetForm = LegalMetadataForm.class,
|
|
||||||
labelKey = "legal_metadata.label",
|
|
||||||
labelBundle = ASSETS_BUNDLE,
|
|
||||||
descriptionKey = "legal_metadata.description",
|
|
||||||
descriptionBundle = ASSETS_BUNDLE)
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "LEGAL_METADATA", schema = DB_SCHEMA)
|
@Table(name = "LEGAL_METADATA", schema = DB_SCHEMA)
|
||||||
@Audited
|
@Audited
|
||||||
|
@AssetType(
|
||||||
|
assetForm = LegalMetadataForm.class,
|
||||||
|
labelKey = "legal_metadata.label",
|
||||||
|
labelBundle = ASSETS_BUNDLE,
|
||||||
|
descriptionKey = "legal_metadata.description",
|
||||||
|
descriptionBundle = ASSETS_BUNDLE
|
||||||
|
)
|
||||||
|
@MvcAssetEditKit(
|
||||||
|
createStep = LegalMetadataCreateStep.class,
|
||||||
|
editStep = LegalMetadataEditStep.class
|
||||||
|
)
|
||||||
public class LegalMetadata extends Asset implements Serializable {
|
public class LegalMetadata extends Asset implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -5766376031105842907L;
|
private static final long serialVersionUID = -5766376031105842907L;
|
||||||
|
|
@ -73,7 +82,8 @@ public class LegalMetadata extends Asset implements Serializable {
|
||||||
@Embedded
|
@Embedded
|
||||||
@AssociationOverride(
|
@AssociationOverride(
|
||||||
name = "values",
|
name = "values",
|
||||||
joinTable = @JoinTable(name = "LEGAL_METADATA_RIGHTS",
|
joinTable = @JoinTable(
|
||||||
|
name = "LEGAL_METADATA_RIGHTS",
|
||||||
schema = DB_SCHEMA,
|
schema = DB_SCHEMA,
|
||||||
joinColumns = {
|
joinColumns = {
|
||||||
@JoinColumn(name = "ASSET_ID")
|
@JoinColumn(name = "ASSET_ID")
|
||||||
|
|
@ -89,11 +99,13 @@ public class LegalMetadata extends Asset implements Serializable {
|
||||||
private String creator;
|
private String creator;
|
||||||
|
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
@CollectionTable(name = "LEGAL_METADATA_CONTRIBUTORS",
|
@CollectionTable(
|
||||||
|
name = "LEGAL_METADATA_CONTRIBUTORS",
|
||||||
schema = DB_SCHEMA,
|
schema = DB_SCHEMA,
|
||||||
joinColumns = {
|
joinColumns = {
|
||||||
@JoinColumn(name = "LEGAL_METADATA_ID")
|
@JoinColumn(name = "LEGAL_METADATA_ID")
|
||||||
})
|
}
|
||||||
|
)
|
||||||
@Column(name = "CONTRIBUTORS")
|
@Column(name = "CONTRIBUTORS")
|
||||||
private List<String> contributors;
|
private List<String> contributors;
|
||||||
|
|
||||||
|
|
@ -140,6 +152,14 @@ public class LegalMetadata extends Asset implements Serializable {
|
||||||
return Collections.unmodifiableList(contributors);
|
return Collections.unmodifiableList(contributors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addContributor(final String contributor) {
|
||||||
|
contributors.add(contributor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeContributor(final String contributor) {
|
||||||
|
contributors.remove(contributor);
|
||||||
|
}
|
||||||
|
|
||||||
public void setContributors(final List<String> contributors) {
|
public void setContributors(final List<String> contributors) {
|
||||||
this.contributors = new ArrayList<>(contributors);
|
this.contributors = new ArrayList<>(contributors);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@
|
||||||
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.l10n.LocalizedString;
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
import org.librecms.assets.PostalAddress;
|
|
||||||
import org.librecms.contentsection.Asset;
|
import org.librecms.contentsection.Asset;
|
||||||
import org.librecms.contentsection.AssetManager;
|
import org.librecms.contentsection.AssetManager;
|
||||||
import org.librecms.contentsection.ContentSection;
|
import org.librecms.contentsection.ContentSection;
|
||||||
|
|
@ -245,7 +245,6 @@ public abstract class AbstractMvcAssetCreateStep<T extends Asset>
|
||||||
final Locale locale = new Locale(initialLocale);
|
final Locale locale = new Locale(initialLocale);
|
||||||
|
|
||||||
// final T asset = createAsset(name, title, locale, folder);
|
// final T asset = createAsset(name, title, locale, folder);
|
||||||
|
|
||||||
final T asset = assetManager.createAsset(
|
final T asset = assetManager.createAsset(
|
||||||
name,
|
name,
|
||||||
title,
|
title,
|
||||||
|
|
@ -254,11 +253,13 @@ public abstract class AbstractMvcAssetCreateStep<T extends Asset>
|
||||||
getAssetClass()
|
getAssetClass()
|
||||||
);
|
);
|
||||||
|
|
||||||
return setAssetProperties(asset);
|
return setAssetProperties(asset, formParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract Class<T> getAssetClass();
|
protected abstract Class<T> getAssetClass();
|
||||||
|
|
||||||
protected abstract String setAssetProperties(final T asset);
|
protected abstract String setAssetProperties(
|
||||||
|
final T asset, final Map<String, String[]> formParams
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui.contentsections.assets;
|
package org.librecms.ui.contentsections.assets;
|
||||||
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
@ -32,6 +31,7 @@ public class CmsAssetEditSteps implements MvcAssetEditSteps {
|
||||||
public Set<Class<?>> getClasses() {
|
public Set<Class<?>> getClasses() {
|
||||||
final Set<Class<?>> classes = new HashSet<>();
|
final Set<Class<?>> classes = new HashSet<>();
|
||||||
|
|
||||||
|
classes.add(LegalMetadataEditStep.class);
|
||||||
classes.add(PostalAddressEditStep.class);
|
classes.add(PostalAddressEditStep.class);
|
||||||
classes.add(SideNoteEditStep.class);
|
classes.add(SideNoteEditStep.class);
|
||||||
|
|
||||||
|
|
@ -47,6 +47,4 @@ public class CmsAssetEditSteps implements MvcAssetEditSteps {
|
||||||
return classes;
|
return classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,143 @@
|
||||||
|
/*
|
||||||
|
* 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 org.libreccm.l10n.GlobalizationHelper;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.librecms.assets.LegalMetadata;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Named("CmsLegalMetadataCreateStep")
|
||||||
|
public class LegalMetadataCreateStep
|
||||||
|
extends AbstractMvcAssetCreateStep<LegalMetadata> {
|
||||||
|
|
||||||
|
private String rightsHolder;
|
||||||
|
|
||||||
|
private String rights;
|
||||||
|
|
||||||
|
private String publisher;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private GlobalizationHelper globalizationHelper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String showCreateStep() {
|
||||||
|
return "org/librecms/ui/contentsection/assets/legalmetadata/create-legalmetadata.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLabel() {
|
||||||
|
return globalizationHelper
|
||||||
|
.getLocalizedTextsUtil(getBundle())
|
||||||
|
.getText("legalmetadata.create");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
|
return globalizationHelper
|
||||||
|
.getLocalizedTextsUtil(getBundle())
|
||||||
|
.getText("legalmetadata.description");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getBundle() {
|
||||||
|
return MvcAssetStepsConstants.BUNDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<LegalMetadata> getAssetClass() {
|
||||||
|
return LegalMetadata.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
protected String setAssetProperties(
|
||||||
|
final LegalMetadata asset, final Map<String, String[]> formParams
|
||||||
|
) {
|
||||||
|
rights = Optional
|
||||||
|
.ofNullable(formParams.get("rights"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
rightsHolder = Optional
|
||||||
|
.ofNullable(formParams.get("rightsHolder"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
publisher = Optional
|
||||||
|
.ofNullable(formParams.get("publisher"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
Optional
|
||||||
|
.ofNullable(formParams.get("creator"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
|
||||||
|
asset.setCreator(creator);
|
||||||
|
asset.setPublisher(publisher);
|
||||||
|
asset.getRights().addValue(new Locale(getInitialLocale()), rights);
|
||||||
|
asset.setRightsHolder(rightsHolder);
|
||||||
|
|
||||||
|
return String.format(
|
||||||
|
"redirect:/%s/assets/%s/%s/@legalmetadata-edit",
|
||||||
|
getContentSectionLabel(),
|
||||||
|
getFolderPath(),
|
||||||
|
getName()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightsHolder() {
|
||||||
|
return rightsHolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRights() {
|
||||||
|
return rights;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPublisher() {
|
||||||
|
return publisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GlobalizationHelper getGlobalizationHelper() {
|
||||||
|
return globalizationHelper;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,368 @@
|
||||||
|
/*
|
||||||
|
* 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 org.libreccm.l10n.GlobalizationHelper;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.librecms.assets.LegalMetadata;
|
||||||
|
import org.librecms.contentsection.AssetRepository;
|
||||||
|
import org.librecms.ui.contentsections.AssetPermissionsChecker;
|
||||||
|
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.mvc.Controller;
|
||||||
|
import javax.mvc.Models;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import javax.ws.rs.FormParam;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.PathParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Path(MvcAssetEditSteps.PATH_PREFIX + "legalmetadata-edit")
|
||||||
|
@Controller
|
||||||
|
@MvcAssetEditStepDef(
|
||||||
|
bundle = MvcAssetStepsConstants.BUNDLE,
|
||||||
|
descriptionKey = "legalmetadata.editstep.description",
|
||||||
|
labelKey = "legalmetadata.editstep.label",
|
||||||
|
supportedAssetType = LegalMetadata.class
|
||||||
|
)
|
||||||
|
public class LegalMetadataEditStep extends AbstractMvcAssetEditStep {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetStepsDefaultMessagesBundle messageBundle;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetUi assetUi;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetRepository assetRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private GlobalizationHelper globalizationHelper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetPermissionsChecker assetPermissionsChecker;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Models models;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private LegalMetadataEditStepModel editStepModel;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<? extends MvcAssetEditStep> getStepClass() {
|
||||||
|
return LegalMetadataEditStep.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() throws ContentSectionNotFoundException,
|
||||||
|
AssetNotFoundException {
|
||||||
|
super.init();
|
||||||
|
|
||||||
|
if (getAsset() instanceof LegalMetadata) {
|
||||||
|
final LegalMetadata legalMetadata = (LegalMetadata) getAsset();
|
||||||
|
|
||||||
|
editStepModel.setContributors(legalMetadata.getContributors());
|
||||||
|
editStepModel.setCreator(legalMetadata.getCreator());
|
||||||
|
editStepModel.setPublisher(legalMetadata.getPublisher());
|
||||||
|
editStepModel.setRights(
|
||||||
|
legalMetadata
|
||||||
|
.getRights()
|
||||||
|
.getValues()
|
||||||
|
.entrySet()
|
||||||
|
.stream()
|
||||||
|
.collect(
|
||||||
|
Collectors.toMap(
|
||||||
|
entry -> entry.getKey().toString(),
|
||||||
|
entry -> entry.getValue()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
editStepModel.setRightsHolder(legalMetadata.getRightsHolder());
|
||||||
|
} else {
|
||||||
|
throw new AssetNotFoundException(
|
||||||
|
assetUi.showAssetNotFound(
|
||||||
|
getContentSection(), getAssetPath()
|
||||||
|
),
|
||||||
|
String.format(
|
||||||
|
"No asset for path %s found in section %s.",
|
||||||
|
getAssetPath(),
|
||||||
|
getContentSection().getLabel()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String showStep(
|
||||||
|
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
|
||||||
|
final String assetPath
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (ContentSectionNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
} catch (AssetNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assetPermissionsChecker.canEditAsset(getAsset())) {
|
||||||
|
return "org/librecms/ui/contentsection/assets/legalmetadata/edit-legalmetadata.xhtml";
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/properties")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String updateProperties(
|
||||||
|
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
|
||||||
|
final String assetPath,
|
||||||
|
@FormParam("rightsHolder") final String rightsHolder,
|
||||||
|
@FormParam("publisher") final String publisher,
|
||||||
|
@FormParam("creator") final String creator
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (ContentSectionNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
} catch (AssetNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assetPermissionsChecker.canEditAsset(getAsset())) {
|
||||||
|
final LegalMetadata legalMetadata = (LegalMetadata) getAsset();
|
||||||
|
legalMetadata.setRightsHolder(rightsHolder);
|
||||||
|
legalMetadata.setPublisher(publisher);
|
||||||
|
legalMetadata.setCreator(creator);
|
||||||
|
|
||||||
|
assetRepo.save(legalMetadata);
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/rights/add")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String addRights(
|
||||||
|
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
|
||||||
|
final String assetPath,
|
||||||
|
@FormParam("locale") final String localeParam,
|
||||||
|
@FormParam("value") final String value
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (ContentSectionNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
} catch (AssetNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assetPermissionsChecker.canEditAsset(getAsset())) {
|
||||||
|
final Locale locale = new Locale(localeParam);
|
||||||
|
final LegalMetadata legalMetadata = (LegalMetadata) getAsset();
|
||||||
|
legalMetadata.getRights().addValue(locale, value);
|
||||||
|
|
||||||
|
assetRepo.save(legalMetadata);
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/rights/edit/{locale}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String editRights(
|
||||||
|
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
|
||||||
|
final String assetPath,
|
||||||
|
@PathParam("locale") final String localeParam,
|
||||||
|
@FormParam("value") final String value
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (ContentSectionNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
} catch (AssetNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assetPermissionsChecker.canEditAsset(getAsset())) {
|
||||||
|
final Locale locale = new Locale(localeParam);
|
||||||
|
final LegalMetadata legalMetadata = (LegalMetadata) getAsset();
|
||||||
|
legalMetadata.getRights().addValue(locale, value);
|
||||||
|
|
||||||
|
assetRepo.save(legalMetadata);
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/rights/remove/{locale}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String removeRights(
|
||||||
|
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
|
||||||
|
final String assetPath,
|
||||||
|
@PathParam("locale") final String localeParam
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (ContentSectionNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
} catch (AssetNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assetPermissionsChecker.canEditAsset(getAsset())) {
|
||||||
|
final Locale locale = new Locale(localeParam);
|
||||||
|
final LegalMetadata legalMetadata = (LegalMetadata) getAsset();
|
||||||
|
legalMetadata.getRights().removeValue(locale);
|
||||||
|
|
||||||
|
assetRepo.save(legalMetadata);
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/contributors/add")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String addContributor(
|
||||||
|
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
|
||||||
|
final String assetPath,
|
||||||
|
@FormParam("contributor") final String contributor
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (ContentSectionNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
} catch (AssetNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assetPermissionsChecker.canEditAsset(getAsset())) {
|
||||||
|
final LegalMetadata legalMetadata = (LegalMetadata) getAsset();
|
||||||
|
|
||||||
|
legalMetadata.addContributor(contributor);
|
||||||
|
assetRepo.save(legalMetadata);
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/contributors/remove/{index}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String removeContributor(
|
||||||
|
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||||
|
final String sectionIdentifier,
|
||||||
|
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
|
||||||
|
final String assetPath,
|
||||||
|
@PathParam("index") final int indexParam
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (ContentSectionNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
} catch (AssetNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assetPermissionsChecker.canEditAsset(getAsset())) {
|
||||||
|
final LegalMetadata legalMetadata = (LegalMetadata) getAsset();
|
||||||
|
|
||||||
|
final String contributor = legalMetadata
|
||||||
|
.getContributors()
|
||||||
|
.get(indexParam);
|
||||||
|
legalMetadata.removeContributor(contributor);
|
||||||
|
assetRepo.save(legalMetadata);
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
/*
|
||||||
|
* 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.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Named("CmsLegalMetadataEditStepModel")
|
||||||
|
public class LegalMetadataEditStepModel {
|
||||||
|
|
||||||
|
private String rightsHolder;
|
||||||
|
|
||||||
|
private Map<String, String> rights;
|
||||||
|
|
||||||
|
private String publisher;
|
||||||
|
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
private List<String> contributors;
|
||||||
|
|
||||||
|
public String getRightsHolder() {
|
||||||
|
return rightsHolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setRightsHolder(final String rightsHolder) {
|
||||||
|
this.rightsHolder = rightsHolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getRights() {
|
||||||
|
return Collections.unmodifiableMap(rights);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setRights(final Map<String, String> rights) {
|
||||||
|
this.rights = new HashMap<>(rights);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPublisher() {
|
||||||
|
return publisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setPublisher(final String publisher) {
|
||||||
|
this.publisher = publisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setCreator(final String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getContributors() {
|
||||||
|
return Collections.unmodifiableList(contributors);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setContributors(final List<String> contributors) {
|
||||||
|
this.contributors = new ArrayList<>(contributors);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -28,6 +28,7 @@ import java.util.LinkedHashMap;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -74,7 +75,36 @@ public class PostalAddressCreateStep
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@Override
|
@Override
|
||||||
protected String setAssetProperties(final PostalAddress postalAddress) {
|
protected String setAssetProperties(
|
||||||
|
final PostalAddress postalAddress,
|
||||||
|
final Map<String, String[]> formParams
|
||||||
|
) {
|
||||||
|
address = Optional
|
||||||
|
.ofNullable(formParams.get("address"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
postalCode = Optional
|
||||||
|
.ofNullable(formParams.get("postalCode"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
city = Optional
|
||||||
|
.ofNullable(formParams.get("city"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
state = Optional
|
||||||
|
.ofNullable(formParams.get("state"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
isoCountryCode = Optional
|
||||||
|
.ofNullable(formParams.get("isoCountryCode"))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
|
||||||
postalAddress.setAddress(address);
|
postalAddress.setAddress(address);
|
||||||
postalAddress.setPostalCode(postalCode);
|
postalAddress.setPostalCode(postalCode);
|
||||||
postalAddress.setCity(city);
|
postalAddress.setCity(city);
|
||||||
|
|
|
||||||
|
|
@ -21,14 +21,11 @@ package org.librecms.ui.contentsections.assets;
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
import org.librecms.assets.PostalAddress;
|
import org.librecms.assets.PostalAddress;
|
||||||
import org.librecms.contentsection.AssetManager;
|
|
||||||
import org.librecms.contentsection.AssetRepository;
|
import org.librecms.contentsection.AssetRepository;
|
||||||
import org.librecms.contentsection.FolderManager;
|
|
||||||
import org.librecms.ui.contentsections.AssetPermissionsChecker;
|
import org.librecms.ui.contentsections.AssetPermissionsChecker;
|
||||||
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import org.librecms.assets.SideNote;
|
||||||
import org.librecms.contentsection.AssetRepository;
|
import org.librecms.contentsection.AssetRepository;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
@ -44,8 +45,6 @@ public class SideNoteCreateStep extends AbstractMvcAssetCreateStep<SideNote> {
|
||||||
@Inject
|
@Inject
|
||||||
private GlobalizationHelper globalizationHelper;
|
private GlobalizationHelper globalizationHelper;
|
||||||
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
private String text;
|
private String text;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -84,7 +83,9 @@ public class SideNoteCreateStep extends AbstractMvcAssetCreateStep<SideNote> {
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
@Override
|
@Override
|
||||||
public String setAssetProperties(final SideNote sideNote) {
|
public String setAssetProperties(
|
||||||
|
final SideNote sideNote, final Map<String, String[]> formParams
|
||||||
|
) {
|
||||||
sideNote.getText().addValue(new Locale(getInitialLocale()), text);
|
sideNote.getText().addValue(new Locale(getInitialLocale()), text);
|
||||||
assetRepo.save(sideNote);
|
assetRepo.save(sideNote);
|
||||||
|
|
||||||
|
|
@ -92,7 +93,7 @@ public class SideNoteCreateStep extends AbstractMvcAssetCreateStep<SideNote> {
|
||||||
"redirect:/%s/assets/%s/%s/@sidenote-edit",
|
"redirect:/%s/assets/%s/%s/@sidenote-edit",
|
||||||
getContentSectionLabel(),
|
getContentSectionLabel(),
|
||||||
getFolderPath(),
|
getFolderPath(),
|
||||||
name
|
getName()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ 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.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;
|
||||||
|
|
@ -101,6 +102,7 @@ public abstract class AbstractMvcAuthoringStep implements MvcAuthoringStep {
|
||||||
* @throws ContentSectionNotFoundException
|
* @throws ContentSectionNotFoundException
|
||||||
* @throws DocumentNotFoundException
|
* @throws DocumentNotFoundException
|
||||||
*/
|
*/
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
protected void init()
|
protected void init()
|
||||||
throws ContentSectionNotFoundException, DocumentNotFoundException {
|
throws ContentSectionNotFoundException, DocumentNotFoundException {
|
||||||
contentSection = sectionsUi
|
contentSection = sectionsUi
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
|
||||||
import javax.mvc.Controller;
|
import javax.mvc.Controller;
|
||||||
import javax.mvc.Models;
|
import javax.mvc.Models;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
@ -58,7 +57,6 @@ import javax.ws.rs.PathParam;
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Path(MvcAuthoringSteps.PATH_PREFIX + "categorization")
|
@Path(MvcAuthoringSteps.PATH_PREFIX + "categorization")
|
||||||
@Controller
|
@Controller
|
||||||
@Named("CmsCategorizationStep")
|
|
||||||
@MvcAuthoringStepDef(
|
@MvcAuthoringStepDef(
|
||||||
bundle = DefaultAuthoringStepConstants.BUNDLE,
|
bundle = DefaultAuthoringStepConstants.BUNDLE,
|
||||||
descriptionKey = "authoringsteps.categorization.description",
|
descriptionKey = "authoringsteps.categorization.description",
|
||||||
|
|
@ -70,6 +68,9 @@ public class CategorizationStep extends AbstractMvcAuthoringStep {
|
||||||
@Inject
|
@Inject
|
||||||
private CategoryManager categoryManager;
|
private CategoryManager categoryManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private CategorizationStepModel categorizationStepModel;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private DocumentUi documentUi;
|
private DocumentUi documentUi;
|
||||||
|
|
||||||
|
|
@ -85,6 +86,23 @@ public class CategorizationStep extends AbstractMvcAuthoringStep {
|
||||||
@Inject
|
@Inject
|
||||||
private PermissionChecker permissionChecker;
|
private PermissionChecker permissionChecker;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
protected void init() throws ContentSectionNotFoundException,
|
||||||
|
DocumentNotFoundException {
|
||||||
|
super.init();
|
||||||
|
|
||||||
|
categorizationStepModel.setCategorizationTrees(
|
||||||
|
getContentSection()
|
||||||
|
.getDomains()
|
||||||
|
.stream()
|
||||||
|
.map(DomainOwnership::getDomain)
|
||||||
|
.map(this::buildCategorizationTree)
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Class<CategorizationStep> getStepClass() {
|
public Class<CategorizationStep> getStepClass() {
|
||||||
return CategorizationStep.class;
|
return CategorizationStep.class;
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +127,7 @@ public class CategorizationStep extends AbstractMvcAuthoringStep {
|
||||||
if (permissionChecker.isPermitted(
|
if (permissionChecker.isPermitted(
|
||||||
ItemPrivileges.CATEGORIZE, getDocument()
|
ItemPrivileges.CATEGORIZE, getDocument()
|
||||||
)) {
|
)) {
|
||||||
return "org/librecms/ui/documents/categorization.xhtml";
|
return "org/librecms/ui/contentsection/documents/categorization.xhtml";
|
||||||
} else {
|
} else {
|
||||||
return documentUi.showAccessDenied(
|
return documentUi.showAccessDenied(
|
||||||
getContentSection(),
|
getContentSection(),
|
||||||
|
|
@ -119,32 +137,14 @@ public class CategorizationStep extends AbstractMvcAuthoringStep {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides a tree view of the category system assigned to the current
|
|
||||||
* content section in an format which can be processed in MVC templates.
|
|
||||||
*
|
|
||||||
* The categories assigned to the current item as marked.
|
|
||||||
*
|
|
||||||
* @return Tree view of the category systems assigned to the current content
|
|
||||||
* section.
|
|
||||||
*/
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
|
||||||
public List<CategorizationTree> getCategorizationTrees() {
|
|
||||||
return getContentSection()
|
|
||||||
.getDomains()
|
|
||||||
.stream()
|
|
||||||
.map(DomainOwnership::getDomain)
|
|
||||||
.map(this::buildCategorizationTree)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the categorization of the current item.
|
* Update the categorization of the current item.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param domainParam
|
* @param domainParam
|
||||||
* @param assignedCategoriesParam
|
* @param assignedCategoriesParam
|
||||||
|
*
|
||||||
* @return A redirect to the categorization step.
|
* @return A redirect to the categorization step.
|
||||||
*/
|
*/
|
||||||
@MvcAuthoringAction(
|
@MvcAuthoringAction(
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
/*
|
||||||
|
* 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.documents;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Named("CmsCategorizationStep")
|
||||||
|
public class CategorizationStepModel {
|
||||||
|
|
||||||
|
private List<CategorizationTree> categorizationTrees;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides a tree view of the category system assigned to the current
|
||||||
|
* content section in an format which can be processed in MVC templates.
|
||||||
|
*
|
||||||
|
* The categories assigned to the current item as marked.
|
||||||
|
*
|
||||||
|
* @return Tree view of the category systems assigned to the current content
|
||||||
|
* section.
|
||||||
|
*/
|
||||||
|
public List<CategorizationTree> getCategorizationTrees() {
|
||||||
|
return Collections.unmodifiableList(categorizationTrees);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setCategorizationTrees(
|
||||||
|
final List<CategorizationTree> categorizationTrees
|
||||||
|
) {
|
||||||
|
this.categorizationTrees = new ArrayList<>(categorizationTrees);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -60,7 +60,6 @@ import javax.ws.rs.PathParam;
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Path(MvcAuthoringSteps.PATH_PREFIX + "publish")
|
@Path(MvcAuthoringSteps.PATH_PREFIX + "publish")
|
||||||
@Controller
|
@Controller
|
||||||
@Named("CmsPublishStep")
|
|
||||||
@MvcAuthoringStepDef(
|
@MvcAuthoringStepDef(
|
||||||
bundle = DefaultAuthoringStepConstants.BUNDLE,
|
bundle = DefaultAuthoringStepConstants.BUNDLE,
|
||||||
descriptionKey = "authoringsteps.publish.description",
|
descriptionKey = "authoringsteps.publish.description",
|
||||||
|
|
@ -98,11 +97,40 @@ public class PublishStep extends AbstractMvcAuthoringStep {
|
||||||
@Inject
|
@Inject
|
||||||
private Models models;
|
private Models models;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private PublishStepModel publishStepModel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<PublishStep> getStepClass() {
|
public Class<PublishStep> getStepClass() {
|
||||||
return PublishStep.class;
|
return PublishStep.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init() throws ContentSectionNotFoundException,
|
||||||
|
DocumentNotFoundException {
|
||||||
|
super.init();
|
||||||
|
|
||||||
|
publishStepModel.setAssignedLifecycleLabel(
|
||||||
|
Optional
|
||||||
|
.ofNullable(getDocument().getLifecycle())
|
||||||
|
.map(Lifecycle::getDefinition)
|
||||||
|
.map(LifecycleDefinition::getLabel)
|
||||||
|
.map(globalizationHelper::getValueFromLocalizedString)
|
||||||
|
.orElse("")
|
||||||
|
);
|
||||||
|
|
||||||
|
publishStepModel.setAssignedLifecycleDescription(
|
||||||
|
Optional
|
||||||
|
.ofNullable(getDocument().getLifecycle())
|
||||||
|
.map(Lifecycle::getDefinition)
|
||||||
|
.map(LifecycleDefinition::getDescription)
|
||||||
|
.map(globalizationHelper::getValueFromLocalizedString)
|
||||||
|
.orElse("")
|
||||||
|
);
|
||||||
|
|
||||||
|
publishStepModel.setLive(itemManager.isLive(getDocument()));
|
||||||
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
@ -148,45 +176,6 @@ public class PublishStep extends AbstractMvcAuthoringStep {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the label of the lifecycle assigned to the current content item. The
|
|
||||||
* value is determined from the label of the definition of the lifecycle
|
|
||||||
* using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
|
|
||||||
* }.
|
|
||||||
*
|
|
||||||
* @return The label of the lifecycle assigned to the current content item,
|
|
||||||
* or an empty string if no lifecycle is assigned to the item.
|
|
||||||
*/
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
|
||||||
public String getAssignedLifecycleLabel() {
|
|
||||||
return Optional
|
|
||||||
.ofNullable(getDocument().getLifecycle())
|
|
||||||
.map(Lifecycle::getDefinition)
|
|
||||||
.map(LifecycleDefinition::getLabel)
|
|
||||||
.map(globalizationHelper::getValueFromLocalizedString)
|
|
||||||
.orElse("");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the description of the lifecycle assigned to the current content
|
|
||||||
* item. The value is determined from the description of the definition of
|
|
||||||
* the lifecycle using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
|
|
||||||
* }.
|
|
||||||
*
|
|
||||||
* @return The description of the lifecycle assigned to the current content
|
|
||||||
* item, or an empty string if no lifecycle is assigned to the item.
|
|
||||||
*/
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
|
||||||
public String getAssignedLifecycleDecription() {
|
|
||||||
return Optional
|
|
||||||
.ofNullable(getDocument().getLifecycle())
|
|
||||||
.map(Lifecycle::getDefinition)
|
|
||||||
.map(LifecycleDefinition::getDescription)
|
|
||||||
.map(globalizationHelper::getValueFromLocalizedString)
|
|
||||||
.orElse("");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Publishes the current content item.If the item is already live, the
|
* Publishes the current content item.If the item is already live, the
|
||||||
* {@code selectedLifecycleDefUuid} is ignored.The apply a new lifecycle the
|
* {@code selectedLifecycleDefUuid} is ignored.The apply a new lifecycle the
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui.contentsections.documents;
|
package org.librecms.ui.contentsections.documents;
|
||||||
|
|
||||||
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -34,15 +36,67 @@ import javax.inject.Named;
|
||||||
@Named("CmsDocumentPublishStepModel")
|
@Named("CmsDocumentPublishStepModel")
|
||||||
public class PublishStepModel {
|
public class PublishStepModel {
|
||||||
|
|
||||||
|
private String assignedLifecycleLabel;
|
||||||
|
|
||||||
|
private String assignedLifecycleDescription;
|
||||||
|
|
||||||
|
private boolean live;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The phases of the lifecycle assigned to the current content item.
|
||||||
|
*/
|
||||||
|
private List<PhaseListEntry> phases;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A list of the available lifecycles.
|
* A list of the available lifecycles.
|
||||||
*/
|
*/
|
||||||
private List<LifecycleListEntry> availableListcycles;
|
private List<LifecycleListEntry> availableListcycles;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The phases of the lifecycle assigned to the current content item.
|
* Get the label of the lifecycle assigned to the current content item. The
|
||||||
|
* value is determined from the label of the definition of the lifecycle
|
||||||
|
* using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
|
||||||
|
* }.
|
||||||
|
*
|
||||||
|
* @return The label of the lifecycle assigned to the current content item,
|
||||||
|
* or an empty string if no lifecycle is assigned to the item.
|
||||||
*/
|
*/
|
||||||
private List<PhaseListEntry> phases;
|
public String getAssignedLifecycleLabel() {
|
||||||
|
return assignedLifecycleLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setAssignedLifecycleLabel(
|
||||||
|
final String assignedLifecycleLabel
|
||||||
|
) {
|
||||||
|
this.assignedLifecycleLabel = assignedLifecycleLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getLive() {
|
||||||
|
return live;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLive(final boolean live) {
|
||||||
|
this.live = live;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the description of the lifecycle assigned to the current content
|
||||||
|
* item. The value is determined from the description of the definition of
|
||||||
|
* the lifecycle using {@link GlobalizationHelper#getValueFromLocalizedString(org.libreccm.l10n.LocalizedString)
|
||||||
|
* }.
|
||||||
|
*
|
||||||
|
* @return The description of the lifecycle assigned to the current content
|
||||||
|
* item, or an empty string if no lifecycle is assigned to the item.
|
||||||
|
*/
|
||||||
|
public String getAssignedLifecycleDecription() {
|
||||||
|
return assignedLifecycleDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setAssignedLifecylceDescription(
|
||||||
|
final String assignedLifecycleDescription
|
||||||
|
) {
|
||||||
|
this.assignedLifecycleDescription = assignedLifecycleDescription;
|
||||||
|
}
|
||||||
|
|
||||||
public PublishStepModel() {
|
public PublishStepModel() {
|
||||||
availableListcycles = new ArrayList<>();
|
availableListcycles = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,6 @@ import javax.ws.rs.core.MediaType;
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Path(MvcAuthoringSteps.PATH_PREFIX + "relatedinfo")
|
@Path(MvcAuthoringSteps.PATH_PREFIX + "relatedinfo")
|
||||||
@Controller
|
@Controller
|
||||||
@Named("CmsRelatedInfoStep")
|
|
||||||
@MvcAuthoringStepDef(
|
@MvcAuthoringStepDef(
|
||||||
bundle = DefaultAuthoringStepConstants.BUNDLE,
|
bundle = DefaultAuthoringStepConstants.BUNDLE,
|
||||||
descriptionKey = "authoringsteps.relatedinfo.description",
|
descriptionKey = "authoringsteps.relatedinfo.description",
|
||||||
|
|
@ -248,11 +247,29 @@ public class RelatedInfoStep extends AbstractMvcAuthoringStep {
|
||||||
@Inject
|
@Inject
|
||||||
private PermissionChecker permissionChecker;
|
private PermissionChecker permissionChecker;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private RelatedInfoStepModel relatedInfoStepModel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<RelatedInfoStep> getStepClass() {
|
public Class<RelatedInfoStep> getStepClass() {
|
||||||
return RelatedInfoStep.class;
|
return RelatedInfoStep.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
protected void init() throws ContentSectionNotFoundException,
|
||||||
|
DocumentNotFoundException {
|
||||||
|
super.init();
|
||||||
|
relatedInfoStepModel.setAttachmentLists(
|
||||||
|
getDocument()
|
||||||
|
.getAttachments()
|
||||||
|
.stream()
|
||||||
|
.filter(list -> !list.getName().startsWith("."))
|
||||||
|
.map(this::buildAttachmentListDto)
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/")
|
@Path("/")
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
@ -283,23 +300,6 @@ public class RelatedInfoStep extends AbstractMvcAuthoringStep {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the {@link AttachmentList}s of the current content item and converts
|
|
||||||
* them to {@link AttachmentListDto}s to make data about the lists available
|
|
||||||
* in the views.
|
|
||||||
*
|
|
||||||
* @return A list of the {@link AttachmentList} of the current content item.
|
|
||||||
*/
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
|
||||||
public List<AttachmentListDto> getAttachmentLists() {
|
|
||||||
return getDocument()
|
|
||||||
.getAttachments()
|
|
||||||
.stream()
|
|
||||||
.filter(list -> !list.getName().startsWith("."))
|
|
||||||
.map(this::buildAttachmentListDto)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the asset folder tree of the current content section as JSON data.
|
* Gets the asset folder tree of the current content section as JSON data.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* 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.documents;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Named;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RequestScoped
|
||||||
|
@Named("CmsRelatedInfoStep")
|
||||||
|
public class RelatedInfoStepModel {
|
||||||
|
|
||||||
|
private List<AttachmentListDto> attachmentsLists;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the {@link AttachmentList}s of the current content item and converts
|
||||||
|
* them to {@link AttachmentListDto}s to make data about the lists available
|
||||||
|
* in the views.
|
||||||
|
*
|
||||||
|
* @return A list of the {@link AttachmentList} of the current content item.
|
||||||
|
*/
|
||||||
|
public List<AttachmentListDto> getAttachmentLists() {
|
||||||
|
return Collections.unmodifiableList(attachmentsLists);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setAttachmentLists(
|
||||||
|
final List<AttachmentListDto> attachmentLists
|
||||||
|
) {
|
||||||
|
this.attachmentsLists = new ArrayList<>(attachmentLists);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -48,7 +48,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.core.UriBuilder;
|
import javax.ws.rs.core.UriBuilder;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model/named bean providing data about the currently selected document for
|
* Model/named bean providing data about the currently selected document for
|
||||||
* several views.
|
* several views.
|
||||||
|
|
@ -229,6 +228,7 @@ public class SelectedDocumentModel {
|
||||||
.excludeDefaultAuthoringSteps();
|
.excludeDefaultAuthoringSteps();
|
||||||
authoringStepsList = buildAuthoringStepsList(item);
|
authoringStepsList = buildAuthoringStepsList(item);
|
||||||
workflow = item.getWorkflow();
|
workflow = item.getWorkflow();
|
||||||
|
if (workflow != null) {
|
||||||
workflowName = globalizationHelper.getValueFromLocalizedString(
|
workflowName = globalizationHelper.getValueFromLocalizedString(
|
||||||
workflow.getName()
|
workflow.getName()
|
||||||
);
|
);
|
||||||
|
|
@ -249,6 +249,7 @@ public class SelectedDocumentModel {
|
||||||
currentTask.setCurrentTask(true);
|
currentTask.setCurrentTask(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method for building the breadcrumb trail for the folder of the
|
* Helper method for building the breadcrumb trail for the folder of the
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
<!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/contentsection/contentsection.xhtml">
|
||||||
|
|
||||||
|
<ui:define name="main">
|
||||||
|
<div class="container">
|
||||||
|
<h1>#{CmsAssetsStepsDefaultMessagesBundle["legalmetadata.createform.title"]}</h1>
|
||||||
|
|
||||||
|
<c:forEach items="#{CmsLegalMetadataCreateStep.messages.entrySet()}"
|
||||||
|
var="message">
|
||||||
|
<div class="alert alert-#{message.key}" role="alert">
|
||||||
|
#{message.value}
|
||||||
|
</div>
|
||||||
|
</c:forEach>
|
||||||
|
|
||||||
|
<form action="#{mvc.basePath}/#{CmsLegalMetadataCreateStep.contentSectionLabel}/assets/#{CmsLegalMetadataCreateStep.folderPath}@create/#{CmsLegalMetadataCreateStep.assetType}"
|
||||||
|
method="post">
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.name.help']}"
|
||||||
|
inputId="name"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.name.label']}"
|
||||||
|
name="name"
|
||||||
|
pattern="^([a-zA-Z0-9_-]*)$"
|
||||||
|
required="true"
|
||||||
|
value="#{CmsLegalMetadataCreateStep.name}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupSelect
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.initial_locale.help']}"
|
||||||
|
inputId="locale"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.initial_locale.label']}"
|
||||||
|
name="locale"
|
||||||
|
options="#{CmsLegalMetadataCreateStep.availableLocales}"
|
||||||
|
required="true"
|
||||||
|
selectedOptions="#{[CmsLegalMetadataCreateStep.initialLocale]}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.title.help']}"
|
||||||
|
inputId="title"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.title.label']}"
|
||||||
|
name="title"
|
||||||
|
required="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.legalmetadata.rightsholder.help']}"
|
||||||
|
inputId="rightsHolder"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.legalmetadata.rightsholder.label']}"
|
||||||
|
name="rightsHolder"
|
||||||
|
required="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupTextarea
|
||||||
|
cols="80"
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.legalmetadata.rights.help']}"
|
||||||
|
inputId="rights"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.legalmetadata.rights.label']}"
|
||||||
|
name="rights"
|
||||||
|
rows="20"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.legalmetadata.publisher.help']}"
|
||||||
|
inputId="rightsHolder"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.legalmetadata.publisher.label']}"
|
||||||
|
name="rightsHolder"
|
||||||
|
required="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.legalmetadata.creator.help']}"
|
||||||
|
inputId="rightsHolder"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.legalmetadata.creator.label']}"
|
||||||
|
name="rightsHolder"
|
||||||
|
required="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<a class="btn btn-warning"
|
||||||
|
href="#{mvc.basePath}/#{CmsLegalMetadataCreateStep.contentSectionLabel}/assetfolders/#{CmsLegalMetadataCreateStep.folderPath}">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['createform.cancel']}
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
type="submit">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['createform.submit']}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,335 @@
|
||||||
|
<!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/contentsection/assets/editstep.xhtml">
|
||||||
|
|
||||||
|
<ui:define name="editStep">
|
||||||
|
<div class="container">
|
||||||
|
<h2>#{CmsAssetsStepsDefaultMessagesBundle.getMessage('legalmetadata.editstep.header', [CmsLegalMetadataEditStep.name])}</h2>
|
||||||
|
|
||||||
|
<h3>#{CmsAssetsStepsDefaultMessagesBundle['editstep.name.header']}</h3>
|
||||||
|
<div class="d-flex">
|
||||||
|
<pre class="mr-2">#{CmsLegalMetadataEditStep.name}</pre>
|
||||||
|
<c:if test="#{CmsLegalMetadataEditStep.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="#{CmsLegalMetadataEditStep.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}/@legalmetadata-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="#{CmsLegalMetadataEditStep.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}/@legalmetadata-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}/@legalmetadata-edit/title/@edit"
|
||||||
|
editorId="title-editor"
|
||||||
|
hasUnusedLocales="#{!CmsLegalMetadataEditStep.unusedTitleLocales.isEmpty()}"
|
||||||
|
headingLevel="3"
|
||||||
|
objectIdentifier="#{CmsSelectedAssetModel.assetPath}"
|
||||||
|
readOnly="#{!CmsLegalMetadataEditStep.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}/@legalmetadata-edit/title/@remove"
|
||||||
|
title="#{CmsAssetsStepsDefaultMessagesBundle['editstep.title.header']}"
|
||||||
|
unusedLocales="#{CmsLegalMetadataEditStep.unusedTitleLocales}"
|
||||||
|
values="#{CmsLegalMetadataEditStep.titleValues}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<h3>#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.properties.header']}</h3>
|
||||||
|
|
||||||
|
<c:if test="#{CmsLegalMetadataEditStep.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['editstep.legalmetadata.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}/@legalmetadata-edit/properties"
|
||||||
|
class="modal-content"
|
||||||
|
method="post">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="properties-edit-dialog-title">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.properties.edit.title']}
|
||||||
|
</h4>
|
||||||
|
<button
|
||||||
|
aria-label="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.properties.edit.close']}"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="x" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.rightsholder.help']}"
|
||||||
|
inputId="rightsHolder"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.rightsholder.label']}"
|
||||||
|
name="rightsHolder"
|
||||||
|
required="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.publisher.help']}"
|
||||||
|
inputId="rightsHolder"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.publisher.label']}"
|
||||||
|
name="rightsHolder"
|
||||||
|
required="false"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.creator.help']}"
|
||||||
|
inputId="rightsHolder"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.creator.label']}"
|
||||||
|
name="rightsHolder"
|
||||||
|
required="false"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-warning"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.properties.edit.close']}
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
type="submit">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.properties.edit.submit']}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<dl>
|
||||||
|
<div>
|
||||||
|
<dt>#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.rightsholder.label']}</dt>
|
||||||
|
<dd>#{CmsLegalMetadataEditStepModel.rightsHolder}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.publisher.label']}</dt>
|
||||||
|
<dd>#{CmsLegalMetadataEditStepModel.publisher}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{CmsAssetsStepsDefaultMessagesBundle['editform.legalmetadata.creator.label']}</dt>
|
||||||
|
<dd>#{CmsLegalMetadataEditStepModel.creator}</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<libreccm:localizedStringEditor
|
||||||
|
addButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.add_button.label']}"
|
||||||
|
addDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.add.cancel']}"
|
||||||
|
addDialogLocaleSelectHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.add.locale.help']}"
|
||||||
|
addDialogLocaleSelectLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.add.locale.label']}"
|
||||||
|
addDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.add.submit']}"
|
||||||
|
addDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.add.header']}"
|
||||||
|
addDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.add.value.help']}"
|
||||||
|
addDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.add.value.label']}"
|
||||||
|
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@legalmetadata-edit/rights/@add"
|
||||||
|
editButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.edit']}"
|
||||||
|
editDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.edit.cancel']}"
|
||||||
|
editDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.edit.submit']}"
|
||||||
|
editDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.edit.header']}"
|
||||||
|
editDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.edit.value.help']}"
|
||||||
|
editDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.edit.value.label']}"
|
||||||
|
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@legalmetadata-edit/rights/@edit"
|
||||||
|
editorId="rights-editor"
|
||||||
|
hasUnusedLocales="#{!CmsLegalMetadataEditStep.unusedTitleLocales.isEmpty()}"
|
||||||
|
headingLevel="3"
|
||||||
|
objectIdentifier="#{CmsSelectedAssetModel.assetPath}"
|
||||||
|
readOnly="#{!CmsLegalMetadataEditStep.canEdit}"
|
||||||
|
removeButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.remove']}"
|
||||||
|
removeDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.remove.cancel']}"
|
||||||
|
removeDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.remove.submit']}"
|
||||||
|
removeDialogText="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.remove.text']}"
|
||||||
|
removeDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.remove.rights']}"
|
||||||
|
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@legalmetadata-edit/rights/@remove"
|
||||||
|
title="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.rights.header']}"
|
||||||
|
unusedLocales="#{CmsLegalMetadataEditStep.unusedTitleLocales}"
|
||||||
|
useTextarea="true"
|
||||||
|
values="#{CmsLegalMetadataEditStep.rightsValues}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<h3>#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.header']}</h3>
|
||||||
|
|
||||||
|
<c:if test="#{CmsLegalMetadataEditStepModel.contributors}">
|
||||||
|
<div class="text-right">
|
||||||
|
<button class="btn btn-primary"
|
||||||
|
data-toggle="modal"
|
||||||
|
data-target="#contributors-add-dialog"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="plus-circle" />
|
||||||
|
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.add.button.label']}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="aria-hidden"
|
||||||
|
aria-labelledby="contributors-add-dialog"
|
||||||
|
class="modal fade"
|
||||||
|
id="contributors-add-dialog"
|
||||||
|
tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@legalmetadata-edit/contributors/add"
|
||||||
|
class="modal-content"
|
||||||
|
method="post">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="contributors-add-dialog">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.add.title']}
|
||||||
|
</h4>
|
||||||
|
<button
|
||||||
|
aria-label="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.add.close']}"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="x" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.add.help']}"
|
||||||
|
inputId="contributor"
|
||||||
|
label="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.add.label']}"
|
||||||
|
name="contributor"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-warning"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.add.close']}
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
type="submit">
|
||||||
|
#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.add.submit']}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.col.contributors.header']}</th>
|
||||||
|
<th>#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.col.actions.header']}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:forEach items="#{CmsLegalMetadataEditStepModel.contributors}"
|
||||||
|
var="contributor"
|
||||||
|
varStatus="index">
|
||||||
|
<tr>
|
||||||
|
<td>#{contributor}</td>
|
||||||
|
<td>
|
||||||
|
<c:if test="#{CmsLegalMetadataEditStep.canEdit}">
|
||||||
|
<libreccm:deleteDialog
|
||||||
|
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@legalmetadata-edit/contributors/remove/#{index}"
|
||||||
|
buttonText="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.remove.label']}"
|
||||||
|
cancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.remove.cancel']}"
|
||||||
|
confirmLabel="#{CmsAssetsStepsDefaultMessagesBundle['editstep.legalmetadata.contributors.remove.confirm']}"
|
||||||
|
dialogId="remove-contributor-#{index}"
|
||||||
|
dialogTitle="#{CmsAssetsStepsDefaultMessagesBundle.getMessage('editstep.legalmetadata.contributors.remove.title', [contributor])}"
|
||||||
|
message="#{CmsAssetsStepsDefaultMessagesBundle.getMessage('editstep.legalmetadata.contributors.remove.message', [contributor])}"
|
||||||
|
/>
|
||||||
|
</c:if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private List<String> contributors;
|
||||||
|
-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
name="locale"
|
name="locale"
|
||||||
options="#{CmsPostalAddressCreateStep.availableLocales}"
|
options="#{CmsPostalAddressCreateStep.availableLocales}"
|
||||||
required="true"
|
required="true"
|
||||||
selectedOptions="#{[CmsPostalAddressCreate.initialLocale]}"
|
selectedOptions="#{[CmsPostalAddressCreateStep.initialLocale]}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupText
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="modal-title"
|
<h3 class="modal-title"
|
||||||
id="edit-categorization-#{tree.domainKey}-title">
|
id="edit-categorization-#{tree.domainKey}-title">
|
||||||
#{CmsDefaultStepsMessageBundle.getMessage('categorization.edit.title', tree.domainKey, CmsSelectedDocumentModel.itemTitle)}
|
#{CmsDefaultStepsMessageBundle.getMessage('categorization.edit.title', [tree.domainKey, CmsSelectedDocumentModel.itemTitle])}
|
||||||
<button aria-label="#{CmsDefaultStepsMessageBundle['categorization.edit.cancel']}"
|
<button aria-label="#{CmsDefaultStepsMessageBundle['categorization.edit.cancel']}"
|
||||||
class="close"
|
class="close"
|
||||||
data-dismiss="modal"
|
data-dismiss="modal"
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@
|
||||||
|
|
||||||
<ui:define name="main">
|
<ui:define name="main">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="#{CmsPublishStep.live}">
|
<c:when test="#{CmsDocumentPublishStepModel.live}">
|
||||||
<h2>
|
<h2>
|
||||||
${CmsDefaultStepsMessageBundle['publishstep.lifecycle.assigned']}:
|
${CmsDefaultStepsMessageBundle['publishstep.lifecycle.assigned']}:
|
||||||
${CmsPublishStep.assignedLifecycleLabel}
|
${CmsDocumentPublishStepModel.assignedLifecycleLabel}
|
||||||
</h2>
|
</h2>
|
||||||
<p>
|
<p>
|
||||||
${CmsPublishStep.assignedLifecycleDecription}
|
${CmsDocumentPublishStepModel.assignedLifecycleDecription}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
|
|
|
||||||
|
|
@ -77,3 +77,61 @@ sidenote.text.editor.add.locale.label=Locale
|
||||||
sidenote.text.editor.edit.value.help=The localized text.
|
sidenote.text.editor.edit.value.help=The localized text.
|
||||||
sidenote.text.editor.edit.value.label=Text
|
sidenote.text.editor.edit.value.label=Text
|
||||||
sidenote.text.editor.header=Edit Side Note Text
|
sidenote.text.editor.header=Edit Side Note Text
|
||||||
|
legalmetadata.editstep.description=Legal metadata, for example for images.
|
||||||
|
legalmetadata.editstep.label=Legal Metadata
|
||||||
|
legalmetadata.create=Legal Metadata
|
||||||
|
legalmetadata.description=Legal metadata, for example for images.
|
||||||
|
legalmetadata.createform.title=Create new legal metadata asset
|
||||||
|
createform.legalmetadata.rightsholder.help=The holder of the rights.
|
||||||
|
createform.legalmetadata.rightsholder.label=Rights Holder
|
||||||
|
createform.legalmetadata.rights.help=The rights for the creative work.
|
||||||
|
createform.legalmetadata.rights.label=Rights
|
||||||
|
createform.legalmetadata.publisher.help=The publisher of the creative work.
|
||||||
|
createform.legalmetadata.publisher.label=Publisher
|
||||||
|
createform.legalmetadata.creator.help=The creator of the creative work.
|
||||||
|
createform.legalmetadata.creator.label=Creator
|
||||||
|
legalmetadata.editstep.header=Edit legal metadata record {0}
|
||||||
|
editstep.legalmetadata.properties.header=Properties
|
||||||
|
editstep.legalmetadata.properties.edit=Edit properties
|
||||||
|
editstep.legalmetadata.properties.edit.title=Edit properties
|
||||||
|
editstep.legalmetadata.properties.edit.close=Cancel
|
||||||
|
editform.legalmetadata.rightsholder.help=The rights holder
|
||||||
|
editform.legalmetadata.rightsholder.label=Rights Holder
|
||||||
|
editform.legalmetadata.publisher.help=The publisher of the creative work.
|
||||||
|
editform.legalmetadata.publisher.label=Publisher
|
||||||
|
editform.legalmetadata.creator.help=The creator of the creative work.
|
||||||
|
editform.legalmetadata.creator.label=Creator
|
||||||
|
editstep.legalmetadata.properties.edit.submit=Save
|
||||||
|
editstep.legalmetadata.rights.add_button.label=Add localized rights description
|
||||||
|
editstep.legalmetadata.rights.add.cancel=Cancel
|
||||||
|
editstep.legalmetadata.rights.add.locale.help=The locale.
|
||||||
|
editstep.legalmetadata.rights.add.locale.label=Locale
|
||||||
|
editstep.legalmetadata.rights.add.submit=Add
|
||||||
|
editstep.legalmetadata.rights.add.header=Add localized rights information
|
||||||
|
editstep.legalmetadata.rights.add.value.help=The description of the rights.
|
||||||
|
editstep.legalmetadata.rights.add.value.label=Rights
|
||||||
|
editstep.legalmetadata.rights.edit=Edit
|
||||||
|
editstep.legalmetadata.rights.edit.cancel=Cancel
|
||||||
|
editstep.legalmetadata.rights.edit.submit=Save
|
||||||
|
editstep.legalmetadata.rights.edit.header=Edit rights information
|
||||||
|
editstep.legalmetadata.rights.edit.value.help=The localized rights information.
|
||||||
|
editstep.legalmetadata.rights.edit.value.label=Rights
|
||||||
|
editstep.legalmetadata.rights.remove=Remove
|
||||||
|
editstep.legalmetadata.rights.remove.cancel=Cancel
|
||||||
|
editstep.legalmetadata.rights.remove.text=Are your sure to remove the localized rights information for the following locale?
|
||||||
|
editstep.legalmetadata.rights.remove.rights=Remove localized rights information
|
||||||
|
editstep.legalmetadata.rights.header=Rights
|
||||||
|
editstep.legalmetadata.contributors.header=Constributors
|
||||||
|
editstep.legalmetadata.contributors.add.button.label=Add contributor
|
||||||
|
editstep.legalmetadata.contributors.add.title=Add contributor
|
||||||
|
editstep.legalmetadata.contributors.add.close=Cancel
|
||||||
|
editstep.legalmetadata.contributors.add.help=The contributor
|
||||||
|
editstep.legalmetadata.contributors.add.label=Contributor
|
||||||
|
editstep.legalmetadata.contributors.add.submit=Add
|
||||||
|
editstep.legalmetadata.contributors.col.contributors.header=Contributor
|
||||||
|
editstep.legalmetadata.contributors.col.actions.header=Actions
|
||||||
|
editstep.legalmetadata.contributors.remove.label=Remove
|
||||||
|
editstep.legalmetadata.contributors.remove.cancel=Cancel
|
||||||
|
editstep.legalmetadata.contributors.remove.confirm=Remove
|
||||||
|
editstep.legalmetadata.contributors.remove.title=Remove contributor {0}
|
||||||
|
editstep.legalmetadata.contributors.remove.message=Are you sure to remove contributor {0}?
|
||||||
|
|
|
||||||
|
|
@ -77,3 +77,61 @@ sidenote.text.editor.add.locale.label=Sprache
|
||||||
sidenote.text.editor.edit.value.help=The translated text.
|
sidenote.text.editor.edit.value.help=The translated text.
|
||||||
sidenote.text.editor.edit.value.label=Text
|
sidenote.text.editor.edit.value.label=Text
|
||||||
sidenote.text.editor.header=Text der Randbemerkung bearbeiten
|
sidenote.text.editor.header=Text der Randbemerkung bearbeiten
|
||||||
|
legalmetadata.editstep.description=Beschreibung der Rechte z.B. f\u00fcr Bilder.
|
||||||
|
legalmetadata.editstep.label=Rechte-Informationen
|
||||||
|
legalmetadata.create=Rechte-Informationen
|
||||||
|
legalmetadata.description=Beschreibung der Rechte z.B. f\u00fcr Bilder.
|
||||||
|
legalmetadata.createform.title=Neue Rechte-Informationen Datensatz anlegen
|
||||||
|
createform.legalmetadata.rightsholder.help=Der Inhaber der Rechte.
|
||||||
|
createform.legalmetadata.rightsholder.label=Rechteinhaber
|
||||||
|
createform.legalmetadata.rights.help=Die Rechte an dem Werk.
|
||||||
|
createform.legalmetadata.rights.label=Rechte
|
||||||
|
createform.legalmetadata.publisher.help=Der Verleger des Werkes.
|
||||||
|
createform.legalmetadata.publisher.label=Verleger
|
||||||
|
createform.legalmetadata.creator.help=Der Erschaffer des Werkes.
|
||||||
|
createform.legalmetadata.creator.label=Erschaffer
|
||||||
|
legalmetadata.editstep.header=Rechte Informationen {0} bearbeiten
|
||||||
|
editstep.legalmetadata.properties.header=Eigenschaften
|
||||||
|
editstep.legalmetadata.properties.edit=Eigenschaften bearbeiten
|
||||||
|
editstep.legalmetadata.properties.edit.title=Eigenschaften bearbeiten
|
||||||
|
editstep.legalmetadata.properties.edit.close=Abbrechen
|
||||||
|
editform.legalmetadata.rightsholder.help=Der Rechteinhaber
|
||||||
|
editform.legalmetadata.rightsholder.label=Rechteinhaber
|
||||||
|
editform.legalmetadata.publisher.help=Der Verleger des Werkes.
|
||||||
|
editform.legalmetadata.publisher.label=Verleger
|
||||||
|
editform.legalmetadata.creator.help=Der Erschaffer des Werkes.
|
||||||
|
editform.legalmetadata.creator.label=Erschaffer
|
||||||
|
editstep.legalmetadata.properties.edit.submit=Speichern
|
||||||
|
editstep.legalmetadata.rights.add_button.label=Lokalisierte Beschreibung der Rechte hinzuf\u00fcgen
|
||||||
|
editstep.legalmetadata.rights.add.cancel=Abbrechen
|
||||||
|
editstep.legalmetadata.rights.add.locale.help=Die Sprache.
|
||||||
|
editstep.legalmetadata.rights.add.locale.label=Sprache
|
||||||
|
editstep.legalmetadata.rights.add.submit=Hinzuf\u00fcgen
|
||||||
|
editstep.legalmetadata.rights.add.header=Lokalisierte Rechteinformationen hinzuf\u00fcgen
|
||||||
|
editstep.legalmetadata.rights.add.value.help=Beschreibung der Rechte
|
||||||
|
editstep.legalmetadata.rights.add.value.label=Rechte
|
||||||
|
editstep.legalmetadata.rights.edit=Bearbeiten
|
||||||
|
editstep.legalmetadata.rights.edit.cancel=Abbrechen
|
||||||
|
editstep.legalmetadata.rights.edit.submit=Speichern
|
||||||
|
editstep.legalmetadata.rights.edit.header=Rechteinformationen bearbeiten
|
||||||
|
editstep.legalmetadata.rights.edit.value.help=Die lokaliserten Rechteinformationen.
|
||||||
|
editstep.legalmetadata.rights.edit.value.label=Rechte
|
||||||
|
editstep.legalmetadata.rights.remove=Entfernen
|
||||||
|
editstep.legalmetadata.rights.remove.cancel=Abbrechen
|
||||||
|
editstep.legalmetadata.rights.remove.text=Sind Sie sicher, dass Sie die lokaliserten Rechteinformationen f\u00fcr die folgende Sprache entfernen wollen?
|
||||||
|
editstep.legalmetadata.rights.remove.rights=Lokalisierte Rechteinformationen entfernen
|
||||||
|
editstep.legalmetadata.rights.header=Rechte
|
||||||
|
editstep.legalmetadata.contributors.header=Beitragende
|
||||||
|
editstep.legalmetadata.contributors.add.button.label=Beitregende hinzuf\u00fcgen
|
||||||
|
editstep.legalmetadata.contributors.add.title=Beitragende hinzuf\u00fcgen
|
||||||
|
editstep.legalmetadata.contributors.add.close=Abbrechen
|
||||||
|
editstep.legalmetadata.contributors.add.help=Der/die Beitragende
|
||||||
|
editstep.legalmetadata.contributors.add.label=Der/die Beitragende
|
||||||
|
editstep.legalmetadata.contributors.add.submit=Hinzuf\u00fcgen
|
||||||
|
editstep.legalmetadata.contributors.col.contributors.header=Beitragende
|
||||||
|
editstep.legalmetadata.contributors.col.actions.header=Aktionen
|
||||||
|
editstep.legalmetadata.contributors.remove.label=Entfernen
|
||||||
|
editstep.legalmetadata.contributors.remove.cancel=Abbrechen
|
||||||
|
editstep.legalmetadata.contributors.remove.confirm=Entfernen
|
||||||
|
editstep.legalmetadata.contributors.remove.title=Beitragende(n) {0} entfernen
|
||||||
|
editstep.legalmetadata.contributors.remove.message=Sind Sie sicher, dass Sie den/den Beitragende(n) {0} entfernen wollen?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue