Create and edit steps for external audio and video assets.
parent
f7ae8f8238
commit
178789690f
|
|
@ -19,7 +19,11 @@
|
|||
package org.librecms.assets;
|
||||
|
||||
import com.arsdigita.cms.ui.assets.forms.ExternalAudioAssetForm;
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
import org.librecms.ui.contentsections.assets.ExternalAudioAssetCreateStep;
|
||||
import org.librecms.ui.contentsections.assets.ExternalAudioAssetEditStep;
|
||||
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
|
@ -48,6 +52,10 @@ import static org.librecms.assets.AssetConstants.*;
|
|||
labelBundle = ASSETS_BUNDLE,
|
||||
descriptionKey = "external_audio_asset.description",
|
||||
descriptionBundle = ASSETS_BUNDLE)
|
||||
@MvcAssetEditKit(
|
||||
createStep = ExternalAudioAssetCreateStep.class,
|
||||
editStep = ExternalAudioAssetEditStep.class
|
||||
)
|
||||
public class ExternalAudioAsset extends Bookmark implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1190735204910197490L;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ package org.librecms.assets;
|
|||
import com.arsdigita.cms.ui.assets.forms.ExternalVideoAssetForm;
|
||||
|
||||
import org.hibernate.envers.Audited;
|
||||
import org.librecms.ui.contentsections.assets.ExternalVideoAssetCreateStep;
|
||||
import org.librecms.ui.contentsections.assets.ExternalVideoAssetEditStep;
|
||||
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
|
@ -46,6 +49,10 @@ import static org.librecms.assets.AssetConstants.*;
|
|||
labelBundle = ASSETS_BUNDLE,
|
||||
descriptionKey = "external_video_asset.description",
|
||||
descriptionBundle = ASSETS_BUNDLE)
|
||||
@MvcAssetEditKit(
|
||||
createStep = ExternalVideoAssetCreateStep.class,
|
||||
editStep = ExternalVideoAssetEditStep.class
|
||||
)
|
||||
public class ExternalVideoAsset extends Bookmark implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2927375812188779049L;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* 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.librecms.assets.Bookmark;
|
||||
import org.librecms.contentsection.AssetRepository;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* Abstract base class for create steps of assets derivated from
|
||||
* {@link Bookmark}.
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
* @param <T>
|
||||
*/
|
||||
public abstract class AbstractBookmarkCreateStep<T extends Bookmark> extends AbstractMvcAssetCreateStep<T> {
|
||||
|
||||
@Inject
|
||||
private AssetRepository assetRepository;
|
||||
|
||||
@Inject
|
||||
private GlobalizationHelper globalizationHelper;
|
||||
|
||||
private String bookmarkDescription;
|
||||
|
||||
private String url;
|
||||
|
||||
@Override
|
||||
public String getBundle() {
|
||||
return MvcAssetStepsConstants.BUNDLE;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getBookmarkDescription() {
|
||||
return bookmarkDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String setAssetProperties(
|
||||
final T bookmark, final Map<String, String[]> formParams
|
||||
) {
|
||||
url = Optional
|
||||
.ofNullable(formParams.get("url"))
|
||||
.filter(value -> value.length > 0)
|
||||
.map(value -> value[0])
|
||||
.orElse("");
|
||||
bookmarkDescription = Optional
|
||||
.ofNullable(formParams.get("description"))
|
||||
.filter(value -> value.length > 0)
|
||||
.map(value -> value[0])
|
||||
.orElse("");
|
||||
|
||||
if (url.isEmpty() || url.matches("\\s*")) {
|
||||
addMessage(
|
||||
"warning",
|
||||
globalizationHelper
|
||||
.getLocalizedTextsUtil(getBundle())
|
||||
.getText("bookmark.create.url.missing")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
|
||||
bookmark.setUrl(url);
|
||||
bookmark
|
||||
.getDescription()
|
||||
.addValue(new Locale(getInitialLocale()), bookmarkDescription);
|
||||
assetRepository.save(bookmark);
|
||||
|
||||
return String.format(
|
||||
"redirect:/%s/assets/%s/%s/@bookmark-edit",
|
||||
getContentSectionLabel(),
|
||||
getFolderPath(),
|
||||
getName()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -34,7 +34,6 @@ import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@ package org.librecms.ui.contentsections.assets;
|
|||
|
||||
import org.libreccm.l10n.GlobalizationHelper;
|
||||
import org.librecms.assets.Bookmark;
|
||||
import org.librecms.contentsection.AssetRepository;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
|
|
@ -36,18 +31,11 @@ import javax.inject.Named;
|
|||
*/
|
||||
@RequestScoped
|
||||
@Named("CmsBookmarkCreateStep")
|
||||
public class BookmarkCreateStep extends AbstractMvcAssetCreateStep<Bookmark> {
|
||||
|
||||
@Inject
|
||||
private AssetRepository assetRepository;
|
||||
public class BookmarkCreateStep extends AbstractBookmarkCreateStep<Bookmark> {
|
||||
|
||||
@Inject
|
||||
private GlobalizationHelper globalizationHelper;
|
||||
|
||||
private String bookmarkDescription;
|
||||
|
||||
private String url;
|
||||
|
||||
@Override
|
||||
public String showCreateStep() {
|
||||
return "org/librecms/ui/contentsection/assets/bookmark/create-bookmark.xhtml";
|
||||
|
|
@ -67,61 +55,9 @@ public class BookmarkCreateStep extends AbstractMvcAssetCreateStep<Bookmark> {
|
|||
.getText("bookmark.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBundle() {
|
||||
return MvcAssetStepsConstants.BUNDLE;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getBookmarkDescription() {
|
||||
return bookmarkDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<Bookmark> getAssetClass() {
|
||||
return Bookmark.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String setAssetProperties(
|
||||
final Bookmark bookmark, final Map<String, String[]> formParams
|
||||
) {
|
||||
url = Optional
|
||||
.ofNullable(formParams.get("url"))
|
||||
.filter(value -> value.length > 0)
|
||||
.map(value -> value[0])
|
||||
.orElse("");
|
||||
bookmarkDescription = Optional
|
||||
.ofNullable(formParams.get("description"))
|
||||
.filter(value -> value.length > 0)
|
||||
.map(value -> value[0])
|
||||
.orElse("");
|
||||
|
||||
if (url.isEmpty() || url.matches("\\s*")) {
|
||||
addMessage(
|
||||
"warning",
|
||||
globalizationHelper
|
||||
.getLocalizedTextsUtil(getBundle())
|
||||
.getText("bookmark.create.url.missing")
|
||||
);
|
||||
return showCreateStep();
|
||||
}
|
||||
|
||||
bookmark.setUrl(url);
|
||||
bookmark
|
||||
.getDescription()
|
||||
.addValue(new Locale(getInitialLocale()), bookmarkDescription);
|
||||
assetRepository.save(bookmark);
|
||||
|
||||
return String.format(
|
||||
"redirect:/%s/assets/%s/%s/@bookmark-edit",
|
||||
getContentSectionLabel(),
|
||||
getFolderPath(),
|
||||
getName()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package org.librecms.ui.contentsections.assets;
|
||||
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
|
|
@ -33,6 +32,8 @@ public class CmsAssetEditSteps implements MvcAssetEditSteps {
|
|||
final Set<Class<?>> classes = new HashSet<>();
|
||||
|
||||
classes.add(BookmarkEditStep.class);
|
||||
classes.add(ExternalAudioAssetEditStep.class);
|
||||
classes.add(ExternalVideoAssetEditStep.class);
|
||||
classes.add(FileAssetEditStep.class);
|
||||
classes.add(LegalMetadataEditStep.class);
|
||||
classes.add(OrganizationEditStep.class);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 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.librecms.assets.ExternalAudioAsset;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Named("CmsExternalAudioAssetCreateStep")
|
||||
public class ExternalAudioAssetCreateStep
|
||||
extends AbstractBookmarkCreateStep<ExternalAudioAsset> {
|
||||
|
||||
@Inject
|
||||
private GlobalizationHelper globalizationHelper;
|
||||
|
||||
@Override
|
||||
public String showCreateStep() {
|
||||
return "org/librecms/ui/contentsection/assets/external-audio-asset/create-external-audio-asset.xhtml";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return globalizationHelper
|
||||
.getLocalizedTextsUtil(getBundle())
|
||||
.getText("externalaudioasset.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return globalizationHelper
|
||||
.getLocalizedTextsUtil(getBundle())
|
||||
.getText("externalaudioasset.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<ExternalAudioAsset> getAssetClass() {
|
||||
return ExternalAudioAsset.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
/*
|
||||
* 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.api.Identifier;
|
||||
import org.libreccm.api.IdentifierParser;
|
||||
import org.libreccm.security.AuthorizationRequired;
|
||||
import org.librecms.assets.ExternalAudioAsset;
|
||||
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.Optional;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.mvc.Controller;
|
||||
import javax.mvc.Models;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
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;
|
||||
import javax.ws.rs.core.Context;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Path(MvcAssetEditSteps.PATH_PREFIX + "external-audio-asset-edit")
|
||||
@Controller
|
||||
@MvcAssetEditStepDef(
|
||||
bundle = MvcAssetStepsConstants.BUNDLE,
|
||||
descriptionKey = "externalaudioasset.editstep.description",
|
||||
labelKey = "externalaudioasset.editstep.label",
|
||||
supportedAssetType = ExternalAudioAsset.class
|
||||
)
|
||||
public class ExternalAudioAssetEditStep extends BookmarkEditStep {
|
||||
|
||||
@Inject
|
||||
private AssetStepsDefaultMessagesBundle messageBundle;
|
||||
|
||||
@Inject
|
||||
private AssetPermissionsChecker assetPermissionsChecker;
|
||||
|
||||
@Inject
|
||||
private AssetRepository assetRepo;
|
||||
|
||||
@Inject
|
||||
private AssetUi assetUi;
|
||||
|
||||
@Inject
|
||||
private ExternalAudioAssetEditStepModel editStepModel;
|
||||
|
||||
@Context
|
||||
private HttpServletRequest request;
|
||||
|
||||
@Inject
|
||||
private IdentifierParser identifierParser;
|
||||
|
||||
@Inject
|
||||
private Models models;
|
||||
|
||||
@Override
|
||||
protected void init() throws ContentSectionNotFoundException,
|
||||
AssetNotFoundException {
|
||||
super.init();;
|
||||
|
||||
if (getAsset() instanceof ExternalAudioAsset) {
|
||||
editStepModel.setLegalMetadata(
|
||||
getExternalAudioAsset().getLegalMetadata()
|
||||
);
|
||||
|
||||
final StringBuilder baseUrlBuilder = new StringBuilder();
|
||||
editStepModel.setBaseUrl(
|
||||
baseUrlBuilder
|
||||
.append(request.getScheme())
|
||||
.append("://")
|
||||
.append(request.getServerName())
|
||||
.append(addServerPortToBaseUrl())
|
||||
.append(addContextPathToBaseUrl())
|
||||
.toString()
|
||||
);
|
||||
} 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/external-audio-asset/edit-external-audio-asset.xhtml";
|
||||
} else {
|
||||
return assetUi.showAccessDenied(
|
||||
getContentSection(),
|
||||
getAsset(),
|
||||
messageBundle.get("asset.edit.denied"));
|
||||
}
|
||||
}
|
||||
|
||||
public ExternalAudioAsset getExternalAudioAsset() {
|
||||
return (ExternalAudioAsset) getBookmark();
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/legalmetadata")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String setLegalMetadata(
|
||||
@FormParam("legalMetadataIdentifier")
|
||||
final String legalMetadataIdentifier
|
||||
) {
|
||||
try {
|
||||
init();
|
||||
} catch (ContentSectionNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
} catch (AssetNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
}
|
||||
|
||||
final Identifier identifier = identifierParser
|
||||
.parseIdentifier(legalMetadataIdentifier);
|
||||
final Optional<LegalMetadata> legalMetadataResult;
|
||||
switch (identifier.getType()) {
|
||||
case ID:
|
||||
legalMetadataResult = assetRepo.findById(
|
||||
Long.parseLong(identifier.getIdentifier()),
|
||||
LegalMetadata.class
|
||||
);
|
||||
break;
|
||||
case UUID:
|
||||
legalMetadataResult = assetRepo.findByUuidAndType(
|
||||
identifier.getIdentifier(),
|
||||
LegalMetadata.class
|
||||
);
|
||||
break;
|
||||
default:
|
||||
legalMetadataResult = assetRepo
|
||||
.findByPath(identifier.getIdentifier())
|
||||
.map(result -> (LegalMetadata) result);
|
||||
break;
|
||||
}
|
||||
if (!legalMetadataResult.isPresent()) {
|
||||
return showLegalMetadataNotFound(legalMetadataIdentifier);
|
||||
}
|
||||
|
||||
final LegalMetadata legalMetadata = legalMetadataResult.get();
|
||||
|
||||
getExternalAudioAsset().setLegalMetadata(legalMetadata);
|
||||
assetRepo.save(getExternalAudioAsset());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/legalmetadata/@remove")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String removeLegalMetadata() {
|
||||
try {
|
||||
init();
|
||||
} catch (ContentSectionNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
} catch (AssetNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
}
|
||||
|
||||
getExternalAudioAsset().setLegalMetadata(null);
|
||||
assetRepo.save(getExternalAudioAsset());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
}
|
||||
|
||||
private String showLegalMetadataNotFound(
|
||||
final String legalMetadataIdentifer
|
||||
) {
|
||||
models.put("legalMetadataIdentifier", legalMetadataIdentifer);
|
||||
return "org/librecms/ui/contentsection/assets/external-audio-asset/legal-metadata-not-found.xhtml";
|
||||
}
|
||||
|
||||
private String addServerPortToBaseUrl() {
|
||||
if (request.getServerPort() == 80 || request.getServerPort() == 443) {
|
||||
return "";
|
||||
} else {
|
||||
return String.format(":%d", request.getServerPort());
|
||||
}
|
||||
}
|
||||
|
||||
private String addContextPathToBaseUrl() {
|
||||
if (request.getServletContext().getContextPath() == null
|
||||
|| request.getServletContext().getContextPath().isEmpty()) {
|
||||
return "/";
|
||||
} else {
|
||||
return request.getServletContext().getContextPath();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* 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.librecms.assets.LegalMetadata;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Named("CmsExternalAudioAssetEditStepModel")
|
||||
public class ExternalAudioAssetEditStepModel {
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
private LegalMetadata legalMetadata;
|
||||
|
||||
public LegalMetadata getLegalMetadata() {
|
||||
return legalMetadata;
|
||||
}
|
||||
|
||||
protected void setLegalMetadata(final LegalMetadata legalMetadata) {
|
||||
this.legalMetadata = legalMetadata;
|
||||
}
|
||||
|
||||
public String getLegalMetadataType() {
|
||||
return LegalMetadata.class.getName();
|
||||
}
|
||||
|
||||
public String getBaseUrl() {
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
protected void setBaseUrl(final String baseUrl) {
|
||||
this.baseUrl = baseUrl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 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.librecms.assets.ExternalVideoAsset;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Named("CmsExternalVideoAssetCreateStep")
|
||||
public class ExternalVideoAssetCreateStep
|
||||
extends AbstractBookmarkCreateStep<ExternalVideoAsset> {
|
||||
|
||||
@Inject
|
||||
private GlobalizationHelper globalizationHelper;
|
||||
|
||||
@Override
|
||||
public String showCreateStep() {
|
||||
return "org/librecms/ui/contentsection/assets/external-video-asset/create-external-video-asset.xhtml";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return globalizationHelper
|
||||
.getLocalizedTextsUtil(getBundle())
|
||||
.getText("externalvideoasset.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return globalizationHelper
|
||||
.getLocalizedTextsUtil(getBundle())
|
||||
.getText("externalvideoasset.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<ExternalVideoAsset> getAssetClass() {
|
||||
return ExternalVideoAsset.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
/*
|
||||
* 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.api.Identifier;
|
||||
import org.libreccm.api.IdentifierParser;
|
||||
import org.libreccm.security.AuthorizationRequired;
|
||||
import org.librecms.assets.ExternalVideoAsset;
|
||||
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.Optional;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.mvc.Controller;
|
||||
import javax.mvc.Models;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
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;
|
||||
import javax.ws.rs.core.Context;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Path(MvcAssetEditSteps.PATH_PREFIX + "external-video-asset-edit")
|
||||
@Controller
|
||||
@MvcAssetEditStepDef(
|
||||
bundle = MvcAssetStepsConstants.BUNDLE,
|
||||
descriptionKey = "externalvideoasset.editstep.description",
|
||||
labelKey = "externalvideoasset.editstep.label",
|
||||
supportedAssetType = ExternalVideoAsset.class
|
||||
)
|
||||
public class ExternalVideoAssetEditStep extends BookmarkEditStep {
|
||||
|
||||
@Inject
|
||||
private AssetStepsDefaultMessagesBundle messageBundle;
|
||||
|
||||
@Inject
|
||||
private AssetPermissionsChecker assetPermissionsChecker;
|
||||
|
||||
@Inject
|
||||
private AssetRepository assetRepo;
|
||||
|
||||
@Inject
|
||||
private AssetUi assetUi;
|
||||
|
||||
@Inject
|
||||
private ExternalVideoAssetEditStepModel editStepModel;
|
||||
|
||||
@Context
|
||||
private HttpServletRequest request;
|
||||
|
||||
@Inject
|
||||
private IdentifierParser identifierParser;
|
||||
|
||||
@Inject
|
||||
private Models models;
|
||||
|
||||
@Override
|
||||
protected void init() throws ContentSectionNotFoundException,
|
||||
AssetNotFoundException {
|
||||
super.init();;
|
||||
|
||||
if (getAsset() instanceof ExternalVideoAsset) {
|
||||
editStepModel.setLegalMetadata(
|
||||
getExternalVideoAsset().getLegalMetadata()
|
||||
);
|
||||
|
||||
final StringBuilder baseUrlBuilder = new StringBuilder();
|
||||
editStepModel.setBaseUrl(
|
||||
baseUrlBuilder
|
||||
.append(request.getScheme())
|
||||
.append("://")
|
||||
.append(request.getServerName())
|
||||
.append(addServerPortToBaseUrl())
|
||||
.append(addContextPathToBaseUrl())
|
||||
.toString()
|
||||
);
|
||||
} 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/external-video-asset/edit-external-video-asset.xhtml";
|
||||
} else {
|
||||
return assetUi.showAccessDenied(
|
||||
getContentSection(),
|
||||
getAsset(),
|
||||
messageBundle.get("asset.edit.denied"));
|
||||
}
|
||||
}
|
||||
|
||||
public ExternalVideoAsset getExternalVideoAsset() {
|
||||
return (ExternalVideoAsset) getBookmark();
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/legalmetadata")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String setLegalMetadata(
|
||||
@FormParam("legalMetadataIdentifier")
|
||||
final String legalMetadataIdentifier
|
||||
) {
|
||||
try {
|
||||
init();
|
||||
} catch (ContentSectionNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
} catch (AssetNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
}
|
||||
|
||||
final Identifier identifier = identifierParser
|
||||
.parseIdentifier(legalMetadataIdentifier);
|
||||
final Optional<LegalMetadata> legalMetadataResult;
|
||||
switch (identifier.getType()) {
|
||||
case ID:
|
||||
legalMetadataResult = assetRepo.findById(
|
||||
Long.parseLong(identifier.getIdentifier()),
|
||||
LegalMetadata.class
|
||||
);
|
||||
break;
|
||||
case UUID:
|
||||
legalMetadataResult = assetRepo.findByUuidAndType(
|
||||
identifier.getIdentifier(),
|
||||
LegalMetadata.class
|
||||
);
|
||||
break;
|
||||
default:
|
||||
legalMetadataResult = assetRepo
|
||||
.findByPath(identifier.getIdentifier())
|
||||
.map(result -> (LegalMetadata) result);
|
||||
break;
|
||||
}
|
||||
if (!legalMetadataResult.isPresent()) {
|
||||
return showLegalMetadataNotFound(legalMetadataIdentifier);
|
||||
}
|
||||
|
||||
final LegalMetadata legalMetadata = legalMetadataResult.get();
|
||||
|
||||
getExternalVideoAsset().setLegalMetadata(legalMetadata);
|
||||
assetRepo.save(getExternalVideoAsset());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/legalmetadata/@remove")
|
||||
@AuthorizationRequired
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String removeLegalMetadata() {
|
||||
try {
|
||||
init();
|
||||
} catch (ContentSectionNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
} catch (AssetNotFoundException ex) {
|
||||
return ex.showErrorMessage();
|
||||
}
|
||||
|
||||
getExternalVideoAsset().setLegalMetadata(null);
|
||||
assetRepo.save(getExternalVideoAsset());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
}
|
||||
|
||||
private String showLegalMetadataNotFound(
|
||||
final String legalMetadataIdentifer
|
||||
) {
|
||||
models.put("legalMetadataIdentifier", legalMetadataIdentifer);
|
||||
return "org/librecms/ui/contentsection/assets/external-video-asset/legal-metadata-not-found.xhtml";
|
||||
}
|
||||
|
||||
private String addServerPortToBaseUrl() {
|
||||
if (request.getServerPort() == 80 || request.getServerPort() == 443) {
|
||||
return "";
|
||||
} else {
|
||||
return String.format(":%d", request.getServerPort());
|
||||
}
|
||||
}
|
||||
|
||||
private String addContextPathToBaseUrl() {
|
||||
if (request.getServletContext().getContextPath() == null
|
||||
|| request.getServletContext().getContextPath().isEmpty()) {
|
||||
return "/";
|
||||
} else {
|
||||
return request.getServletContext().getContextPath();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* 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.librecms.assets.LegalMetadata;
|
||||
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Named("CmsExternalVideoAssetEditStepModel")
|
||||
public class ExternalVideoAssetEditStepModel {
|
||||
|
||||
private String baseUrl;
|
||||
|
||||
private LegalMetadata legalMetadata;
|
||||
|
||||
public LegalMetadata getLegalMetadata() {
|
||||
return legalMetadata;
|
||||
}
|
||||
|
||||
protected void setLegalMetadata(final LegalMetadata legalMetadata) {
|
||||
this.legalMetadata = legalMetadata;
|
||||
}
|
||||
|
||||
public String getBaseUrl() {
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
protected void setBaseUrl(final String baseUrl) {
|
||||
this.baseUrl = baseUrl;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<pre>#{CmsBookmarkEditStep.url}</pre>
|
||||
<!--<pre>#{CmsBookmarkEditStep.url}</pre>-->
|
||||
|
||||
<libreccm:localizedStringEditor
|
||||
addButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['bookmark.editstep.description.add_button.label']}"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
<!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["externalaudioasset.createform.title"]}</h1>
|
||||
|
||||
<c:forEach items="#{CmsExternalAudioAssetCreateStep.messages.entrySet()}"
|
||||
var="message">
|
||||
<div class="alert alert-#{message.key}" role="alert">
|
||||
#{message.value}
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
<form action="#{mvc.basePath}/#{CmsExternalAudioAssetCreateStep.contentSectionLabel}/assets/#{CmsExternalAudioAssetCreateStep.folderPath}@create/#{CmsExternalAudioAssetCreateStep.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="#{CmsExternalAudioAssetCreateStep.name}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupSelect
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.initial_locale.help']}"
|
||||
inputId="locale"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.initial_locale.label']}"
|
||||
name="locale"
|
||||
options="#{CmsExternalAudioAssetCreateStep.availableLocales}"
|
||||
required="true"
|
||||
selectedOptions="#{[CmsExternalAudioAssetCreateStep.initialLocale]}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.title.help']}"
|
||||
inputId="title"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.title.label']}"
|
||||
name="title"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupUrl
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.externalaudioasset.url.help']}"
|
||||
inputId="url"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.externalaudioasset.url.label']}"
|
||||
name="url"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupTextarea
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.externalaudioasset.description.help']}"
|
||||
inputId="description"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.externalaudioasset.description.label']}"
|
||||
name="description"
|
||||
/>
|
||||
|
||||
<a class="btn btn-warning"
|
||||
href="#{mvc.basePath}/#{CmsExternalAudioAssetCreateStep.contentSectionLabel}/assetfolders/#{CmsExternalAudioAssetCreateStep.folderPath}">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['createform.cancel']}
|
||||
</a>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['createform.submit']}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</ui:define>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,207 @@
|
|||
<!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:librecms="http://xmlns.jcp.org/jsf/composite/components/librecms"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||
|
||||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/assets/editstep.xhtml">
|
||||
|
||||
<ui:param name="stepControllerUrl"
|
||||
value="@external-audio-asset-edit"
|
||||
/>
|
||||
<ui:param name="title"
|
||||
value="#{CmsAssetsStepsDefaultMessagesBundle.getMessage('externalaudioasset.editstep.header', [MvcAssetEditStepModel.name])}"
|
||||
/>
|
||||
|
||||
<ui:define name="editStep">
|
||||
<h3>#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.url.header']}</h3>
|
||||
|
||||
<c:if test="#{MvcAssetEditStepModel.canEdit}">
|
||||
<div class="text-right">
|
||||
<button class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#url-edit-dialog"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.url.edit']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="url-edit-dialog-title"
|
||||
class="modal fade"
|
||||
id="url-edit-dialog"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-audio-asset-edit/properties"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"
|
||||
id="url-edit-dialog-title">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.url.edit.title']}
|
||||
</h4>
|
||||
<button
|
||||
aria-label="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.url.edit.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<bootstrap:formGroupUrl
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.url.edit.help']}"
|
||||
inputId="url"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.url.edit.label']}"
|
||||
name="url"
|
||||
required="true"
|
||||
value="#{CmsExternalAudioAssetEditStep.url}"/>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-warning"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.url.edit.close']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.url.edit.submit']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<!--<pre>#{CmsExternalAudioAssetEditStep.url}</pre>-->
|
||||
|
||||
<libreccm:localizedStringEditor
|
||||
addButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.add_button.label']}"
|
||||
addDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.add.cancel']}"
|
||||
addDialogLocaleSelectHelp="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.add.locale.help']}"
|
||||
addDialogLocaleSelectLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.add.locale.label']}"
|
||||
addDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.add.submit']}"
|
||||
addDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.add.title']}"
|
||||
addDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.add.value.help']}"
|
||||
addDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.add.value.label']}"
|
||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-audio-asset-edit/description/add"
|
||||
editButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.edit_button.label']}"
|
||||
editDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.edit.cancel']}"
|
||||
editDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.edit.submit']}"
|
||||
editDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.edit.title']}"
|
||||
editDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.edit.value.help']}"
|
||||
editDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.edit.value.label']}"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-audio-asset-edit/description/edit"
|
||||
editorId="description-editor"
|
||||
hasUnusedLocales="#{!CmsExternalAudioAssetEditStep.unusedDescriptionLocales.isEmpty()}"
|
||||
headingLevel="3"
|
||||
objectIdentifier="#{CmsSelectedAssetModel.assetPath}"
|
||||
readOnly="#{!MvcAssetEditStepModel.canEdit}"
|
||||
removeButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.remove_button.label']}"
|
||||
removeDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.remove.cancel']}"
|
||||
removeDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.remove.submit']}"
|
||||
removeDialogText="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.remove.text']}"
|
||||
removeDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.remove.title']}"
|
||||
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-audio-asset-edit/description/remove"
|
||||
title="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.description.title']}"
|
||||
unusedLocales="#{CmsExternalAudioAssetEditStep.unusedDescriptionLocales}"
|
||||
useTextarea="true"
|
||||
values="#{CmsExternalAudioAssetEditStep.descriptionValues}"
|
||||
/>
|
||||
|
||||
<h3>#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legalmetadata.title']}</h3>
|
||||
|
||||
<librecms:assetPicker
|
||||
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-audio-asset-edit/legalmetadata"
|
||||
assetType="#{CmsExternalAudioAssetEditStepModel.legalMetadataType}"
|
||||
assetPickerId="legalmetadata-picker"
|
||||
baseUrl="#{CmsExternalAudioAssetEditStepModel.baseUrl}"
|
||||
contentSection="#{ContentSectionModel.sectionName}"
|
||||
formParamName="legalMetadataIdentifier"
|
||||
/>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="#{CmsExternalAudioAssetEditStepModel.legalMetadata == null}">
|
||||
<div class="text-right">
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="legalmetadata-picker"
|
||||
buttonText="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legalmetadata.set']}"
|
||||
/>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="text-right">
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="legalmetadata-picker"
|
||||
buttonText="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legalmetadata.set']}"
|
||||
/>
|
||||
<button class="btn btn-danger"
|
||||
data-toggle="modal"
|
||||
data-target="#remove-legalmetdata-dialog"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legelmetadata.remove.close']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="remove-legalmetadata-dialog-title"
|
||||
class="modal fade"
|
||||
id="remove-legalmetadata-dialog"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-audio-asset-edit/legalmetadata/@remove"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"
|
||||
id="remove-legalmetadata-dialog-title">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legelmetadata.remove.title']}
|
||||
</h4>
|
||||
<button
|
||||
aria-label="#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legelmetadata.remove.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legelmetadata.remove.message']}
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legelmetadata.remove.close']}
|
||||
</button>
|
||||
<button class="btn btn-danger"
|
||||
type="submit">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legelmetadata.remove.submit']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<dl>
|
||||
<div>
|
||||
<dt> #{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legelmetadata.rightsholder']}</dt>
|
||||
<dd>#{CmsExternalAudioAssetEditStepModel.legalMetadata.rightsHolder}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt> #{CmsAssetsStepsDefaultMessagesBundle['externalaudioasset.editstep.legelmetadata.creator']}</dt>
|
||||
<dd>#{CmsExternalAudioAssetEditStepModel.legalMetadata.creator}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<!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["externalvideoasset.createform.title"]}</h1>
|
||||
|
||||
<c:forEach items="#{CmsExternalVideoAssetCreateStep.messages.entrySet()}"
|
||||
var="message">
|
||||
<div class="alert alert-#{message.key}" role="alert">
|
||||
#{message.value}
|
||||
</div>
|
||||
</c:forEach>
|
||||
|
||||
<form action="#{mvc.basePath}/#{CmsExternalVideoAssetCreateStep.contentSectionLabel}/assets/#{CmsExternalVideoAssetCreateStep.folderPath}@create/#{CmsExternalVideoAssetCreateStep.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="#{CmsExternalVideoAssetCreateStep.name}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupSelect
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.initial_locale.help']}"
|
||||
inputId="locale"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.initial_locale.label']}"
|
||||
name="locale"
|
||||
options="#{CmsExternalVideoAssetCreateStep.availableLocales}"
|
||||
required="true"
|
||||
selectedOptions="#{[CmsExternalVideoAssetCreateStep.initialLocale]}"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.title.help']}"
|
||||
inputId="title"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.title.label']}"
|
||||
name="title"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupUrl
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.externalvideoasset.url.help']}"
|
||||
inputId="url"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.externalvideoasset.url.label']}"
|
||||
name="url"
|
||||
required="true"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupTextarea
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.externalvideoasset.description.help']}"
|
||||
inputId="description"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.externalvideoasset.description.label']}"
|
||||
name="description"
|
||||
/>
|
||||
|
||||
<a class="btn btn-warning"
|
||||
href="#{mvc.basePath}/#{CmsExternalVideoAssetCreateStep.contentSectionLabel}/assetfolders/#{CmsExternalVideoAssetCreateStep.folderPath}">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['createform.cancel']}
|
||||
</a>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['createform.submit']}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</ui:define>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
<!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:librecms="http://xmlns.jcp.org/jsf/composite/components/librecms"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||
|
||||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/assets/editstep.xhtml">
|
||||
|
||||
<ui:param name="stepControllerUrl"
|
||||
value="@external-video-asset-edit"
|
||||
/>
|
||||
<ui:param name="title"
|
||||
value="#{CmsAssetsStepsDefaultMessagesBundle.getMessage('externalvideoasset.editstep.header', [MvcAssetEditStepModel.name])}"
|
||||
/>
|
||||
|
||||
<ui:define name="editStep">
|
||||
<h3>#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.url.header']}</h3>
|
||||
|
||||
<c:if test="#{MvcAssetEditStepModel.canEdit}">
|
||||
<div class="text-right">
|
||||
<button class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#url-edit-dialog"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.url.edit']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="url-edit-dialog-title"
|
||||
class="modal fade"
|
||||
id="url-edit-dialog"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-video-asset-edit/properties"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"
|
||||
id="url-edit-dialog-title">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.url.edit.title']}
|
||||
</h4>
|
||||
<button
|
||||
aria-label="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.url.edit.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<bootstrap:formGroupUrl
|
||||
help="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.url.edit.help']}"
|
||||
inputId="url"
|
||||
label="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.url.edit.label']}"
|
||||
name="url"
|
||||
required="true"
|
||||
value="#{CmsExternalVideoAssetEditStep.url}"/>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-warning"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.url.edit.close']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.url.edit.submit']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<!--<pre>#{CmsExternalVideoAssetEditStep.url}</pre>-->
|
||||
|
||||
<libreccm:localizedStringEditor
|
||||
addButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.add_button.label']}"
|
||||
addDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.add.cancel']}"
|
||||
addDialogLocaleSelectHelp="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.add.locale.help']}"
|
||||
addDialogLocaleSelectLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.add.locale.label']}"
|
||||
addDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.add.submit']}"
|
||||
addDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.add.title']}"
|
||||
addDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.add.value.help']}"
|
||||
addDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.add.value.label']}"
|
||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-video-asset-edit/description/add"
|
||||
editButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.edit_button.label']}"
|
||||
editDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.edit.cancel']}"
|
||||
editDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.edit.submit']}"
|
||||
editDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.edit.title']}"
|
||||
editDialogValueHelp="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.edit.value.help']}"
|
||||
editDialogValueLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.edit.value.label']}"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-video-asset-edit/description/edit"
|
||||
editorId="description-editor"
|
||||
hasUnusedLocales="#{!CmsExternalVideoAssetEditStep.unusedDescriptionLocales.isEmpty()}"
|
||||
headingLevel="3"
|
||||
objectIdentifier="#{CmsSelectedAssetModel.assetPath}"
|
||||
readOnly="#{!MvcAssetEditStepModel.canEdit}"
|
||||
removeButtonLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.remove_button.label']}"
|
||||
removeDialogCancelLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.remove.cancel']}"
|
||||
removeDialogSubmitLabel="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.remove.submit']}"
|
||||
removeDialogText="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.remove.text']}"
|
||||
removeDialogTitle="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.remove.title']}"
|
||||
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-video-asset-edit/description/remove"
|
||||
title="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.description.title']}"
|
||||
unusedLocales="#{CmsExternalVideoAssetEditStep.unusedDescriptionLocales}"
|
||||
useTextarea="true"
|
||||
values="#{CmsExternalVideoAssetEditStep.descriptionValues}"
|
||||
/>
|
||||
|
||||
<h3>#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legalmetadata.title']}</h3>
|
||||
|
||||
<librecms:assetPicker
|
||||
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-video-asset-edit/legalmetadata"
|
||||
assetType="#{CmsExternalVideoAssetEditStepModel.legalMetadataType}"
|
||||
assetPickerId="legalmetadata-picker"
|
||||
baseUrl="#{CmsExternalVideoAssetEditStepModel.baseUrl}"
|
||||
contentSection="#{ContentSectionModel.sectionName}"
|
||||
formParamName="legalMetadataIdentifier"
|
||||
/>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="#{CmsExternalVideoAssetEditStepModel.legalMetadata == null}">
|
||||
<div class="text-right">
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="legalmetadata-picker"
|
||||
buttonText="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legalmetadata.set']}"
|
||||
/>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="text-right">
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="legalmetadata-picker"
|
||||
buttonText="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legalmetadata.set']}"
|
||||
/>
|
||||
<button class="btn btn-danger"
|
||||
data-toggle="modal"
|
||||
data-target="#remove-legalmetdata-dialog"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
<span class="sr-only">#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legelmetadata.remove.close']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="remove-legalmetadata-dialog-title"
|
||||
class="modal fade"
|
||||
id="remove-legalmetadata-dialog"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@external-video-asset-edit/legalmetadata/@remove"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"
|
||||
id="remove-legalmetadata-dialog-title">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legelmetadata.remove.title']}
|
||||
</h4>
|
||||
<button
|
||||
aria-label="#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legelmetadata.remove.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legelmetadata.remove.message']}
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legelmetadata.remove.close']}
|
||||
</button>
|
||||
<button class="btn btn-danger"
|
||||
type="submit">
|
||||
#{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legelmetadata.remove.submit']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<dl>
|
||||
<div>
|
||||
<dt> #{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legelmetadata.rightsholder']}</dt>
|
||||
<dd>#{CmsExternalVideoAssetEditStepModel.legalMetadata.rightsHolder}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt> #{CmsAssetsStepsDefaultMessagesBundle['externalvideoasset.editstep.legelmetadata.creator']}</dt>
|
||||
<dd>#{CmsExternalVideoAssetEditStepModel.legalMetadata.creator}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
|
@ -289,3 +289,90 @@ organization.editstep.description=Edit an organization.
|
|||
organization.editstep.label=Edit organization
|
||||
organization.createform.title=Create new organization
|
||||
organization.editstep.header=Edit Organization {0}
|
||||
externalaudioasset.label=External Audio file
|
||||
externalaudioasset.description=An external audio file, for example a podcast.
|
||||
externalaudioasset.editstep.description=Edit external audio asset
|
||||
externalaudioasset.editstep.label=Edit external audio asset
|
||||
externalaudioasset.createform.title=Create new external audio asset
|
||||
externalaudioasset.editstep.header=Edit external audio asset {0}
|
||||
externalaudioasset.editstep.url.header=URL of the external audio file
|
||||
externalaudioasset.editstep.url.edit=Edit URL
|
||||
externalaudioasset.editstep.url.edit.title=Edit URL
|
||||
externalaudioasset.editstep.url.edit.close=Cancel
|
||||
externalaudioasset.editstep.url.edit.help=The URL of the external audio file
|
||||
externalaudioasset.editstep.url.edit.label=External Audio File URL
|
||||
externalaudioasset.editstep.url.edit.submit=Save
|
||||
externalaudioasset.editstep.description.add_button.label=Add localized description
|
||||
externalaudioasset.editstep.description.add.cancel=Cancel
|
||||
externalaudioasset.editstep.description.add.locale.help=The locale of the localized description.
|
||||
externalaudioasset.editstep.description.add.locale.label=Locale
|
||||
externalaudioasset.editstep.description.add.submit=Add localized description
|
||||
externalaudioasset.editstep.description.add.title=Add localized description
|
||||
externalaudioasset.editstep.description.add.value.help=The localized description text.
|
||||
externalaudioasset.editstep.description.add.value.label=Description
|
||||
externalaudioasset.editstep.description.edit_button.label=Edit localized description
|
||||
externalaudioasset.editstep.description.edit.cancel=Abbrechen
|
||||
externalaudioasset.editstep.description.edit.submit=Save
|
||||
externalaudioasset.editstep.description.edit.title=Edit localized description
|
||||
externalaudioasset.editstep.description.edit.value.help=The localized description text.
|
||||
externalaudioasset.editstep.description.edit.value.label=Description
|
||||
externalaudioasset.editstep.description.remove_button.label=Remove localized description
|
||||
externalaudioasset.editstep.description.remove.cancel=Cancel
|
||||
externalaudioasset.editstep.description.remove.submit=Remove localized description
|
||||
externalaudioasset.editstep.description.remove.text=Are you sure to remove the following localized description:
|
||||
externalaudioasset.editstep.description.remove.title=Remove localized description
|
||||
externalaudioasset.editstep.description.title=Localized Description
|
||||
externalaudioasset.editstep.legalmetadata.title=Legal Metadata
|
||||
externalaudioasset.editstep.legalmetadata.set=Set legal metadata
|
||||
externalaudioasset.editstep.legelmetadata.remove.close=Cancel
|
||||
externalaudioasset.editstep.legelmetadata.remove.title=Remove legel metadata
|
||||
externalaudioasset.editstep.legelmetadata.remove.message=Are you sure to remove the legal metadata?
|
||||
externalaudioasset.editstep.legelmetadata.remove.submit=Remove legal metadata
|
||||
externalaudioasset.editstep.legelmetadata.rightsholder=Rights Holder
|
||||
externalaudioasset.editstep.legelmetadata.creator=Creator
|
||||
externalvideoasset.label=External Audio File
|
||||
externalvideoasset.description=An external audio file, for example a podcast.
|
||||
externalvideoasset.label=External video
|
||||
externalvideoasset.description=An external video, for example a video on YouTube.
|
||||
externalvideoasset.editstep.description=Edit external audio asset
|
||||
externalvideoasset.editstep.label=Edit external audio asset
|
||||
externalvideoasset.editstep.description=Edit external video asset
|
||||
externalvideoasset.editstep.label=Edit external video asset
|
||||
externalvideoasset.createform.title=Create new external audio asset
|
||||
externalvideoasset.createform.title=Create new external video asset
|
||||
externalvideoasset.editstep.header=Edit external audio asset {0}
|
||||
externalvideoasset.editstep.url.header=URL of the external audio file
|
||||
externalvideoasset.editstep.url.edit=Edit URL
|
||||
externalvideoasset.editstep.url.edit.title=Edit URL
|
||||
externalvideoasset.editstep.url.edit.close=Cancel
|
||||
externalvideoasset.editstep.url.edit.help=The URL of the external audio file
|
||||
externalvideoasset.editstep.url.edit.label=External Audio File URL
|
||||
externalvideoasset.editstep.url.edit.submit=Save
|
||||
externalvideoasset.editstep.description.add_button.label=Add localized description
|
||||
externalvideoasset.editstep.description.add.cancel=Cancel
|
||||
externalvideoasset.editstep.description.add.locale.help=The locale of the localized description.
|
||||
externalvideoasset.editstep.description.add.locale.label=Locale
|
||||
externalvideoasset.editstep.description.add.submit=Add localized description
|
||||
externalvideoasset.editstep.description.add.title=Add localized description
|
||||
externalvideoasset.editstep.description.add.value.help=The localized description text.
|
||||
externalvideoasset.editstep.description.add.value.label=Description
|
||||
externalvideoasset.editstep.description.edit_button.label=Edit localized description
|
||||
externalvideoasset.editstep.description.edit.cancel=Abbrechen
|
||||
externalvideoasset.editstep.description.edit.submit=Save
|
||||
externalvideoasset.editstep.description.edit.title=Edit localized description
|
||||
externalvideoasset.editstep.description.edit.value.help=The localized description text.
|
||||
externalvideoasset.editstep.description.edit.value.label=Description
|
||||
externalvideoasset.editstep.description.remove_button.label=Remove localized description
|
||||
externalvideoasset.editstep.description.remove.cancel=Cancel
|
||||
externalvideoasset.editstep.description.remove.submit=Remove localized description
|
||||
externalvideoasset.editstep.description.remove.text=Are you sure to remove the following localized description:
|
||||
externalvideoasset.editstep.description.remove.title=Remove localized description
|
||||
externalvideoasset.editstep.description.title=Localized Description
|
||||
externalvideoasset.editstep.legalmetadata.title=Legal Metadata
|
||||
externalvideoasset.editstep.legalmetadata.set=Set legal metadata
|
||||
externalvideoasset.editstep.legelmetadata.remove.close=Cancel
|
||||
externalvideoasset.editstep.legelmetadata.remove.title=Remove legel metadata
|
||||
externalvideoasset.editstep.legelmetadata.remove.message=Are you sure to remove the legal metadata?
|
||||
externalvideoasset.editstep.legelmetadata.remove.submit=Remove legal metadata
|
||||
externalvideoasset.editstep.legelmetadata.rightsholder=Rights Holder
|
||||
externalvideoasset.editstep.legelmetadata.creator=Creator
|
||||
|
|
|
|||
|
|
@ -289,3 +289,90 @@ organization.editstep.description=Organization bearbeiten.
|
|||
organization.editstep.label=Organization bearbeiten
|
||||
organization.createform.title=Neue Organization anlegen
|
||||
organization.editstep.header=Organization {0} bearbeiten
|
||||
externalaudioasset.label=Externe Audio-Datei
|
||||
externalaudioasset.description=Eine externe Audio-Datei, z.B. ein Podcast.
|
||||
externalvideoasset.label=Externes Video
|
||||
externalvideoasset.description=Ein externes Video, z.B. auf YouTube.
|
||||
externalaudioasset.editstep.description=Externe Audio-Datei bearbeiten
|
||||
externalaudioasset.editstep.label=Externe Audio-Datei bearbeiten
|
||||
externalvideoasset.editstep.description=Externes Video bearbeiten
|
||||
externalvideoasset.editstep.label=Edit external video asset
|
||||
externalaudioasset.createform.title=Neue externe Audio-Datei anlegen
|
||||
externalvideoasset.createform.title=Neues externes Video anlegen
|
||||
externalaudioasset.editstep.header=Externes Audio Asset {0} bearbeiten
|
||||
externalaudioasset.editstep.url.header=URL der externen Audio-Datei
|
||||
externalaudioasset.editstep.url.edit=URL bearbeiten
|
||||
externalaudioasset.editstep.url.edit.title=URL bearbeiten
|
||||
externalaudioasset.editstep.url.edit.close=Abbrechen
|
||||
externalaudioasset.editstep.url.edit.help=Die URL der externen Audio-Datei.
|
||||
externalaudioasset.editstep.url.edit.label=Externe Audio-Datei URL
|
||||
externalaudioasset.editstep.url.edit.submit=Speichern
|
||||
externalaudioasset.editstep.description.add_button.label=Lokalisierte Beschreibung hinzuf\u00fcgen
|
||||
externalaudioasset.editstep.description.add.cancel=Abbrechen
|
||||
externalaudioasset.editstep.description.add.locale.help=Die Sprache der lokaliserten Beschreibung.
|
||||
externalaudioasset.editstep.description.add.locale.label=Sprache
|
||||
externalaudioasset.editstep.description.add.submit=Lokaliserte Beschreibung hinzuf\u00fcgen
|
||||
externalaudioasset.editstep.description.add.title=Lokalisierte Beschreibung hinzuf\u00fcgen
|
||||
externalaudioasset.editstep.description.add.value.help=Der Text der lokalisierten Beschreibung.
|
||||
externalaudioasset.editstep.description.add.value.label=Beschreibung
|
||||
externalaudioasset.editstep.description.edit_button.label=Lokaliserte Beschreibung bearbeiten
|
||||
externalaudioasset.editstep.description.edit.cancel=Abbrechen
|
||||
externalaudioasset.editstep.description.edit.submit=Speichern
|
||||
externalaudioasset.editstep.description.edit.title=Lokaliserte Beschreibung bearbeiten
|
||||
externalaudioasset.editstep.description.edit.value.help=Der Text der lokalisierten Beschreibung.
|
||||
externalaudioasset.editstep.description.edit.value.label=Beschreibung
|
||||
externalaudioasset.editstep.description.remove_button.label=Lokaliserte Beschreibung entfernen
|
||||
externalaudioasset.editstep.description.remove.cancel=Abbrechen
|
||||
externalaudioasset.editstep.description.remove.submit=Lokalisierte Beschreibung entfernen
|
||||
externalaudioasset.editstep.description.remove.text=Sind Sie sicher, dass Sie die folgende lokalisierte Beschreibung entfernen wollen:
|
||||
externalaudioasset.editstep.description.remove.title=Lokaliserte Beschreibung entfernen
|
||||
externalaudioasset.editstep.description.title=Lokaliserte Beschreibung
|
||||
externalaudioasset.editstep.legalmetadata.title=Rechtliche Informationen
|
||||
externalaudioasset.editstep.legalmetadata.set=Rechtliche Informationen setzen
|
||||
externalaudioasset.editstep.legelmetadata.remove.close=Abbrechen
|
||||
externalaudioasset.editstep.legelmetadata.remove.title=Rechtliche Informationen entfernen
|
||||
externalaudioasset.editstep.legelmetadata.remove.message=Sind Sie sicher, dass Sie die rechtlichen Informationen entfernen wollen?
|
||||
externalaudioasset.editstep.legelmetadata.remove.submit=Rechtliche Informationen entfernen
|
||||
externalaudioasset.editstep.legelmetadata.rightsholder=Rechte-Inhaber
|
||||
externalaudioasset.editstep.legelmetadata.creator=K\u00fcnstler
|
||||
externalvideoasset.label=Externes Video
|
||||
externalvideoasset.description=Eine externe Audio-Datei, z.B. ein Podcast.
|
||||
externalvideoasset.editstep.description=Externe Audio-Datei bearbeiten
|
||||
externalvideoasset.editstep.label=Externe Audio-Datei bearbeiten
|
||||
externalvideoasset.createform.title=Neue externe Audio-Datei anlegen
|
||||
externalvideoasset.editstep.header=Externes Audio Asset {0} bearbeiten
|
||||
externalvideoasset.editstep.url.header=URL der externen Audio-Datei
|
||||
externalvideoasset.editstep.url.edit=URL bearbeiten
|
||||
externalvideoasset.editstep.url.edit.title=URL bearbeiten
|
||||
externalvideoasset.editstep.url.edit.close=Abbrechen
|
||||
externalvideoasset.editstep.url.edit.help=Die URL der externen Audio-Datei.
|
||||
externalvideoasset.editstep.url.edit.label=Externe Audio-Datei URL
|
||||
externalvideoasset.editstep.url.edit.submit=Speichern
|
||||
externalvideoasset.editstep.description.add_button.label=Lokalisierte Beschreibung hinzuf\u00fcgen
|
||||
externalvideoasset.editstep.description.add.cancel=Abbrechen
|
||||
externalvideoasset.editstep.description.add.locale.help=Die Sprache der lokaliserten Beschreibung.
|
||||
externalvideoasset.editstep.description.add.locale.label=Sprache
|
||||
externalvideoasset.editstep.description.add.submit=Lokaliserte Beschreibung hinzuf\u00fcgen
|
||||
externalvideoasset.editstep.description.add.title=Lokalisierte Beschreibung hinzuf\u00fcgen
|
||||
externalvideoasset.editstep.description.add.value.help=Der Text der lokalisierten Beschreibung.
|
||||
externalvideoasset.editstep.description.add.value.label=Beschreibung
|
||||
externalvideoasset.editstep.description.edit_button.label=Lokaliserte Beschreibung bearbeiten
|
||||
externalvideoasset.editstep.description.edit.cancel=Abbrechen
|
||||
externalvideoasset.editstep.description.edit.submit=Speichern
|
||||
externalvideoasset.editstep.description.edit.title=Lokaliserte Beschreibung bearbeiten
|
||||
externalvideoasset.editstep.description.edit.value.help=Der Text der lokalisierten Beschreibung.
|
||||
externalvideoasset.editstep.description.edit.value.label=Beschreibung
|
||||
externalvideoasset.editstep.description.remove_button.label=Lokaliserte Beschreibung entfernen
|
||||
externalvideoasset.editstep.description.remove.cancel=Abbrechen
|
||||
externalvideoasset.editstep.description.remove.submit=Lokalisierte Beschreibung entfernen
|
||||
externalvideoasset.editstep.description.remove.text=Sind Sie sicher, dass Sie die folgende lokalisierte Beschreibung entfernen wollen:
|
||||
externalvideoasset.editstep.description.remove.title=Lokaliserte Beschreibung entfernen
|
||||
externalvideoasset.editstep.description.title=Lokaliserte Beschreibung
|
||||
externalvideoasset.editstep.legalmetadata.title=Rechtliche Informationen
|
||||
externalvideoasset.editstep.legalmetadata.set=Rechtliche Informationen setzen
|
||||
externalvideoasset.editstep.legelmetadata.remove.close=Abbrechen
|
||||
externalvideoasset.editstep.legelmetadata.remove.title=Rechtliche Informationen entfernen
|
||||
externalvideoasset.editstep.legelmetadata.remove.message=Sind Sie sicher, dass Sie die rechtlichen Informationen entfernen wollen?
|
||||
externalvideoasset.editstep.legelmetadata.remove.submit=Rechtliche Informationen entfernen
|
||||
externalvideoasset.editstep.legelmetadata.rightsholder=Rechte-Inhaber
|
||||
externalvideoasset.editstep.legelmetadata.creator=K\u00fcnstler
|
||||
|
|
|
|||
Loading…
Reference in New Issue