UI for Journal asset
parent
99eac9dbfa
commit
9900ff6465
|
|
@ -9,8 +9,11 @@ package org.scientificcms.publications.assets;
|
||||||
import org.hibernate.envers.Audited;
|
import org.hibernate.envers.Audited;
|
||||||
import org.librecms.assets.AssetType;
|
import org.librecms.assets.AssetType;
|
||||||
import org.librecms.contentsection.Asset;
|
import org.librecms.contentsection.Asset;
|
||||||
|
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
|
||||||
import org.scientificcms.publications.Journal;
|
import org.scientificcms.publications.Journal;
|
||||||
import org.scientificcms.publications.SciPublicationsConstants;
|
import org.scientificcms.publications.SciPublicationsConstants;
|
||||||
|
import org.scientificcms.publications.ui.assets.JournalAssetCreateStep;
|
||||||
|
import org.scientificcms.publications.ui.assets.JournalAssetEditStep;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -36,6 +39,10 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
descriptionBundle = SciPublicationsConstants.BUNDLE,
|
descriptionBundle = SciPublicationsConstants.BUNDLE,
|
||||||
descriptionKey = "journal.description"
|
descriptionKey = "journal.description"
|
||||||
)
|
)
|
||||||
|
@MvcAssetEditKit(
|
||||||
|
createStep = JournalAssetCreateStep.class,
|
||||||
|
editStep = JournalAssetEditStep.class
|
||||||
|
)
|
||||||
public class JournalAsset extends Asset {
|
public class JournalAsset extends Asset {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,3 @@
|
||||||
/*
|
|
||||||
* To change this license header, choose License Headers in Project Properties.
|
|
||||||
* To change this template file, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
package org.scientificcms.publications.assets;
|
package org.scientificcms.publications.assets;
|
||||||
|
|
||||||
import org.hibernate.envers.Audited;
|
import org.hibernate.envers.Audited;
|
||||||
|
|
@ -11,8 +6,8 @@ import org.librecms.contentsection.Asset;
|
||||||
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
|
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
|
||||||
import org.scientificcms.publications.Publisher;
|
import org.scientificcms.publications.Publisher;
|
||||||
import org.scientificcms.publications.SciPublicationsConstants;
|
import org.scientificcms.publications.SciPublicationsConstants;
|
||||||
import org.scientificcms.publications.ui.assets.PublisherCreateStep;
|
import org.scientificcms.publications.ui.assets.PublisherAssetCreateStep;
|
||||||
import org.scientificcms.publications.ui.assets.PublisherEditStep;
|
import org.scientificcms.publications.ui.assets.PublisherAssetEditStep;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -40,8 +35,8 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||||
descriptionKey = "publisher.description"
|
descriptionKey = "publisher.description"
|
||||||
)
|
)
|
||||||
@MvcAssetEditKit(
|
@MvcAssetEditKit(
|
||||||
createStep = PublisherCreateStep.class,
|
createStep = PublisherAssetCreateStep.class,
|
||||||
editStep = PublisherEditStep.class
|
editStep = PublisherAssetEditStep.class
|
||||||
)
|
)
|
||||||
public class PublisherAsset extends Asset {
|
public class PublisherAsset extends Asset {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
package org.scientificcms.publications.ui.assets;
|
||||||
|
|
||||||
|
import com.arsdigita.kernel.KernelConfig;
|
||||||
|
|
||||||
|
import org.libreccm.configuration.ConfigurationManager;
|
||||||
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.librecms.ui.contentsections.assets.AbstractMvcAssetCreateStep;
|
||||||
|
import org.scientificcms.publications.Journal;
|
||||||
|
import org.scientificcms.publications.JournalRepository;
|
||||||
|
import org.scientificcms.publications.assets.JournalAsset;
|
||||||
|
import org.scientificcms.publications.ui.SciPublicationsUiConstants;
|
||||||
|
|
||||||
|
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("SciCmsJournalAssetCreateStep")
|
||||||
|
public class JournalAssetCreateStep
|
||||||
|
extends AbstractMvcAssetCreateStep<JournalAsset> {
|
||||||
|
|
||||||
|
private static final String FORM_PARAMS_JOURNAL_TITLE = "journalTitle";
|
||||||
|
|
||||||
|
private String journalTitle;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ConfigurationManager confManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private GlobalizationHelper globalizationHelper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private JournalRepository journalRepo;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String showCreateStep() {
|
||||||
|
return "org/scientificcms/assets/journal/ui/create-journal.xhtml";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLabel() {
|
||||||
|
return globalizationHelper
|
||||||
|
.getLocalizedTextsUtil(getBundle())
|
||||||
|
.getText("journal.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
|
return globalizationHelper
|
||||||
|
.getLocalizedTextsUtil(getBundle())
|
||||||
|
.getText("journal.description");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getBundle() {
|
||||||
|
return SciPublicationsUiConstants.BUNDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Class<JournalAsset> getAssetClass() {
|
||||||
|
return JournalAsset.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJournalTitle() {
|
||||||
|
return journalTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
@Override
|
||||||
|
public String createAsset(final Map<String, String[]> formParams) {
|
||||||
|
if (!formParams.containsKey(FORM_PARAMS_JOURNAL_TITLE)
|
||||||
|
|| formParams.get(FORM_PARAMS_JOURNAL_TITLE) == null
|
||||||
|
|| formParams.get(FORM_PARAMS_JOURNAL_TITLE).length == 0) {
|
||||||
|
addMessage(
|
||||||
|
"danger",
|
||||||
|
globalizationHelper
|
||||||
|
.getLocalizedTextsUtil(getBundle())
|
||||||
|
.getText("journal.createstep.journaltitle.error.missing")
|
||||||
|
);
|
||||||
|
return showCreateStep();
|
||||||
|
}
|
||||||
|
|
||||||
|
formParams.put("title", formParams.get(FORM_PARAMS_JOURNAL_TITLE));
|
||||||
|
|
||||||
|
final KernelConfig kernelConfig = confManager
|
||||||
|
.findConfiguration(KernelConfig.class);
|
||||||
|
formParams.put(
|
||||||
|
"locale",
|
||||||
|
new String[]{kernelConfig.getDefaultLocale().toString()}
|
||||||
|
);
|
||||||
|
|
||||||
|
return super.createAsset(formParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
protected String setAssetProperties(
|
||||||
|
final JournalAsset journalAsset,
|
||||||
|
final Map<String, String[]> formParams
|
||||||
|
) {
|
||||||
|
journalTitle = Optional
|
||||||
|
.ofNullable(formParams.get(FORM_PARAMS_JOURNAL_TITLE))
|
||||||
|
.filter(value -> value.length > 0)
|
||||||
|
.map(value -> value[0])
|
||||||
|
.orElse(null);
|
||||||
|
|
||||||
|
final Journal journal = new Journal();
|
||||||
|
journal.setTitle(journalTitle);
|
||||||
|
journalRepo.save(journal);
|
||||||
|
|
||||||
|
journalAsset.setJournal(journal);
|
||||||
|
|
||||||
|
return String.format(
|
||||||
|
"redirect:/%s/assets/%s/%s/@journal-edit",
|
||||||
|
getContentSectionLabel(),
|
||||||
|
getFolderPath(),
|
||||||
|
getName()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,367 @@
|
||||||
|
package org.scientificcms.publications.ui.assets;
|
||||||
|
|
||||||
|
import com.arsdigita.kernel.KernelConfig;
|
||||||
|
|
||||||
|
import org.libreccm.configuration.ConfigurationManager;
|
||||||
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
|
import org.librecms.contentsection.AssetRepository;
|
||||||
|
import org.librecms.ui.contentsections.AssetPermissionsChecker;
|
||||||
|
import org.librecms.ui.contentsections.ContentSectionNotFoundException;
|
||||||
|
import org.librecms.ui.contentsections.assets.AbstractMvcAssetEditStep;
|
||||||
|
import org.librecms.ui.contentsections.assets.AssetNotFoundException;
|
||||||
|
import org.librecms.ui.contentsections.assets.AssetStepsDefaultMessagesBundle;
|
||||||
|
import org.librecms.ui.contentsections.assets.AssetUi;
|
||||||
|
import org.librecms.ui.contentsections.assets.MvcAssetEditStep;
|
||||||
|
import org.librecms.ui.contentsections.assets.MvcAssetEditStepDef;
|
||||||
|
import org.librecms.ui.contentsections.assets.MvcAssetEditSteps;
|
||||||
|
import org.librecms.ui.contentsections.documents.CmsEditorLocaleVariantRow;
|
||||||
|
import org.scientificcms.publications.Journal;
|
||||||
|
import org.scientificcms.publications.JournalRepository;
|
||||||
|
import org.scientificcms.publications.assets.JournalAsset;
|
||||||
|
import org.scientificcms.publications.ui.SciPublicationsUiConstants;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.StringTokenizer;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import javax.enterprise.context.RequestScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.mvc.Controller;
|
||||||
|
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 + "journal-edit")
|
||||||
|
@Controller
|
||||||
|
@MvcAssetEditStepDef(
|
||||||
|
bundle = SciPublicationsUiConstants.BUNDLE,
|
||||||
|
descriptionKey = "joural.editstep.description",
|
||||||
|
labelKey = "journal.editstep.label",
|
||||||
|
supportedAssetType = JournalAsset.class
|
||||||
|
)
|
||||||
|
public class JournalAssetEditStep extends AbstractMvcAssetEditStep {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetPermissionsChecker assetPermissionsChecker;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetStepsDefaultMessagesBundle messageBundle;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetRepository assetRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private AssetUi assetUi;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ConfigurationManager confManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private GlobalizationHelper globalizationHelper;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private JournalRepository journalRepo;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private JournalAssetEditStepModel editStepModel;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<? extends MvcAssetEditStep> getStepClass() {
|
||||||
|
return JournalAssetEditStep.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
protected void init() throws ContentSectionNotFoundException,
|
||||||
|
AssetNotFoundException {
|
||||||
|
super.init();
|
||||||
|
|
||||||
|
if (getAsset() instanceof JournalAsset) {
|
||||||
|
final Journal journal = getJournal();
|
||||||
|
editStepModel.setFirstYear(journal.getFirstYear());
|
||||||
|
editStepModel.setIssn(journal.getIssn());
|
||||||
|
editStepModel.setJournalTitle(journal.getTitle());
|
||||||
|
editStepModel.setLastYear(journal.getLastYear());
|
||||||
|
|
||||||
|
editStepModel.setDescriptionValues(
|
||||||
|
getJournal()
|
||||||
|
.getDescription()
|
||||||
|
.getValues()
|
||||||
|
.entrySet()
|
||||||
|
.stream()
|
||||||
|
.collect(
|
||||||
|
Collectors.toMap(
|
||||||
|
entry -> entry.getKey().toString(),
|
||||||
|
entry -> entry.getValue()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
final Set<Locale> descriptionLocales = getJournal()
|
||||||
|
.getDescription()
|
||||||
|
.getAvailableLocales();
|
||||||
|
editStepModel.setUnusedDescriptionLocales(
|
||||||
|
globalizationHelper
|
||||||
|
.getAvailableLocales()
|
||||||
|
.stream()
|
||||||
|
.filter(locale -> !descriptionLocales.contains(locale))
|
||||||
|
.map(Locale::toString)
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
);
|
||||||
|
|
||||||
|
editStepModel.setVariants(
|
||||||
|
getJournal()
|
||||||
|
.getDescription()
|
||||||
|
.getValues()
|
||||||
|
.entrySet()
|
||||||
|
.stream()
|
||||||
|
.map(this::buildVariantRow)
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
} else {
|
||||||
|
throw new AssetNotFoundException(
|
||||||
|
assetUi.showAssetNotFound(
|
||||||
|
getContentSection(), getAssetPath()
|
||||||
|
),
|
||||||
|
String.format(
|
||||||
|
"No JournalAsset for path %s found in section %s.",
|
||||||
|
getAssetPath(),
|
||||||
|
getContentSection().getLabel()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected JournalAsset getJournalAsset() {
|
||||||
|
return (JournalAsset) getAsset();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Journal getJournal() {
|
||||||
|
return getJournalAsset().getJournal();
|
||||||
|
}
|
||||||
|
|
||||||
|
@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/scientificcms/assets/journal/ui/edit-journal.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("journalTitle")
|
||||||
|
final String journalTitle,
|
||||||
|
@FormParam("firstYear")
|
||||||
|
final String firstYearParam,
|
||||||
|
@FormParam("lastYear")
|
||||||
|
final String lastYearParam,
|
||||||
|
@FormParam("issn")
|
||||||
|
final String issn
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (ContentSectionNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
} catch (AssetNotFoundException ex) {
|
||||||
|
return ex.showErrorMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (assetPermissionsChecker.canEditAsset(getAsset())) {
|
||||||
|
final JournalAsset journalAsset = getJournalAsset();
|
||||||
|
final Journal journal = getJournal();
|
||||||
|
|
||||||
|
final KernelConfig kernelConfig = confManager.findConfiguration(
|
||||||
|
KernelConfig.class
|
||||||
|
);
|
||||||
|
|
||||||
|
journalAsset
|
||||||
|
.getTitle()
|
||||||
|
.putValue(kernelConfig.getDefaultLocale(), journalTitle);
|
||||||
|
journal.setTitle(journalTitle);
|
||||||
|
|
||||||
|
if (firstYearParam != null) {
|
||||||
|
if (firstYearParam.isBlank()) {
|
||||||
|
journal.setFirstYear(null);
|
||||||
|
} else {
|
||||||
|
journal.setFirstYear(Integer.parseInt(firstYearParam));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastYearParam != null) {
|
||||||
|
if (lastYearParam.isBlank()) {
|
||||||
|
journal.setLastYear(null);
|
||||||
|
} else {
|
||||||
|
journal.setLastYear(Integer.parseInt(lastYearParam));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
journal.setIssn(issn);
|
||||||
|
|
||||||
|
assetRepo.save(journalAsset);
|
||||||
|
journalRepo.save(journal);
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/description/add")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String addDescriptionValue(
|
||||||
|
@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);
|
||||||
|
getJournal().getDescription().putValue(locale, value);
|
||||||
|
journalRepo.save(getJournal());
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
}else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/description/edit/{locale}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String editDescriptionValue(
|
||||||
|
@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);
|
||||||
|
getJournal().getDescription().putValue(locale, value);
|
||||||
|
journalRepo.save(getJournal());
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
}else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/description/remove/{locale}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String removeDescriptionValue(
|
||||||
|
@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);
|
||||||
|
getJournal().getDescription().removeValue(locale);
|
||||||
|
journalRepo.save(getJournal());
|
||||||
|
|
||||||
|
return buildRedirectPathForStep();
|
||||||
|
} else {
|
||||||
|
return assetUi.showAccessDenied(
|
||||||
|
getContentSection(),
|
||||||
|
getAsset(),
|
||||||
|
messageBundle.get("asset.edit.denied"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private CmsEditorLocaleVariantRow buildVariantRow(
|
||||||
|
final Map.Entry<Locale, String> entry
|
||||||
|
) {
|
||||||
|
final CmsEditorLocaleVariantRow variant
|
||||||
|
= new CmsEditorLocaleVariantRow();
|
||||||
|
variant.setLocale(entry.getKey().toString());
|
||||||
|
variant.setWordCount(
|
||||||
|
new StringTokenizer(entry.getValue()).countTokens()
|
||||||
|
);
|
||||||
|
|
||||||
|
return variant;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
package org.scientificcms.publications.ui.assets;
|
||||||
|
|
||||||
|
import org.librecms.ui.contentsections.documents.CmsEditorLocaleVariantRow;
|
||||||
|
|
||||||
|
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("SciCmsJournalAssetEditStepModel")
|
||||||
|
public class JournalAssetEditStepModel {
|
||||||
|
|
||||||
|
private String journalTitle;
|
||||||
|
|
||||||
|
private Integer firstYear;
|
||||||
|
|
||||||
|
private Integer lastYear;
|
||||||
|
|
||||||
|
private String issn;
|
||||||
|
|
||||||
|
private Map<String, String> descriptionValues;
|
||||||
|
|
||||||
|
private List<CmsEditorLocaleVariantRow> variants;
|
||||||
|
|
||||||
|
private List<String> unusedDescriptionLocales;
|
||||||
|
|
||||||
|
public String getJournalTitle() {
|
||||||
|
return journalTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJournalTitle(final String journalTitle) {
|
||||||
|
this.journalTitle = journalTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFirstYear() {
|
||||||
|
return firstYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstYear(final Integer firstYear) {
|
||||||
|
this.firstYear = firstYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLastYear() {
|
||||||
|
return lastYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastYear(final Integer lastYear) {
|
||||||
|
this.lastYear = lastYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIssn() {
|
||||||
|
return issn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIssn(final String issn) {
|
||||||
|
this.issn = issn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getDescriptionValues() {
|
||||||
|
return Collections.unmodifiableMap(descriptionValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescriptionValues(
|
||||||
|
final Map<String, String> descriptionValues
|
||||||
|
) {
|
||||||
|
this.descriptionValues = new HashMap<>(descriptionValues);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CmsEditorLocaleVariantRow> getVariants() {
|
||||||
|
return Collections.unmodifiableList(variants);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVariants(final List<CmsEditorLocaleVariantRow> variants) {
|
||||||
|
this.variants = new ArrayList<>(variants);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getUnusedDescriptionLocales() {
|
||||||
|
return Collections.unmodifiableList(unusedDescriptionLocales);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnusedDescriptionLocales(
|
||||||
|
final List<String> unusedDescriptionLocales
|
||||||
|
) {
|
||||||
|
this.unusedDescriptionLocales = new ArrayList<>(
|
||||||
|
unusedDescriptionLocales
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -42,8 +42,8 @@ import javax.transaction.Transactional;
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Named("SciCmsPublisherCreateStep")
|
@Named("SciCmsPublisherAssetCreateStep")
|
||||||
public class PublisherCreateStep
|
public class PublisherAssetCreateStep
|
||||||
extends AbstractMvcAssetCreateStep<PublisherAsset> {
|
extends AbstractMvcAssetCreateStep<PublisherAsset> {
|
||||||
|
|
||||||
private static final String FORM_PARAMS_PUBLISHER_NAME = "publisherName";
|
private static final String FORM_PARAMS_PUBLISHER_NAME = "publisherName";
|
||||||
|
|
@ -60,7 +60,7 @@ import javax.ws.rs.PathParam;
|
||||||
labelKey = "publisher.editstep.label",
|
labelKey = "publisher.editstep.label",
|
||||||
supportedAssetType = PublisherAsset.class
|
supportedAssetType = PublisherAsset.class
|
||||||
)
|
)
|
||||||
public class PublisherEditStep extends AbstractMvcAssetEditStep {
|
public class PublisherAssetEditStep extends AbstractMvcAssetEditStep {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AssetPermissionsChecker assetPermissionsChecker;
|
private AssetPermissionsChecker assetPermissionsChecker;
|
||||||
|
|
@ -81,11 +81,11 @@ public class PublisherEditStep extends AbstractMvcAssetEditStep {
|
||||||
private PublisherRepository publisherRepo;
|
private PublisherRepository publisherRepo;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PublisherEditStepModel editStepModel;
|
private PublisherAssetEditStepModel editStepModel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends MvcAssetEditStep> getStepClass() {
|
public Class<? extends MvcAssetEditStep> getStepClass() {
|
||||||
return PublisherEditStep.class;
|
return PublisherAssetEditStep.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -8,8 +8,8 @@ import javax.inject.Named;
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@Named("SciCmsPublisherEditStepModel")
|
@Named("SciCmsPublisherAssetEditStepModel")
|
||||||
public class PublisherEditStepModel {
|
public class PublisherAssetEditStepModel {
|
||||||
|
|
||||||
private String publisherName;
|
private String publisherName;
|
||||||
|
|
||||||
|
|
@ -16,7 +16,8 @@ public class SciPublicationsAssetSteps implements MvcAssetEditSteps {
|
||||||
@Override
|
@Override
|
||||||
public Set<Class<?>> getClasses() {
|
public Set<Class<?>> getClasses() {
|
||||||
return Set.of(
|
return Set.of(
|
||||||
PublisherEditStep.class
|
JournalAssetEditStep.class,
|
||||||
|
PublisherAssetEditStep.class
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
<!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>#{SciPublicationsUiMessageBundle['journal.createform.title']}</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<c:forEach items="#{SciCmsJournalAssetCreateStep.messages.entrySet()}"
|
||||||
|
var="messages">
|
||||||
|
<div class="alert alert-#{message.key}" role="alert">
|
||||||
|
#{message.value}
|
||||||
|
</div>
|
||||||
|
</c:forEach>
|
||||||
|
|
||||||
|
<form action="#{mvc.basePath}/#{SciCmsJournalAssetCreateStep.contentSectionLabel}/assets/#{SciCmsJournalAssetCreateStep.folderPath}@create/#{SciCmsJournalAssetCreateStep.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="#{SciCmsJournalAssetCreateStep.name}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{SciPublicationsUiMessageBundle['journal.createform.journaltitle.help']}"
|
||||||
|
inputId="journalTitle"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['journal.createform.journaltitle.label']}"
|
||||||
|
name="journalTitle"
|
||||||
|
required="true"
|
||||||
|
value="#{SciCmsJournalAssetCreateStep.journalTitle}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<a class="btn btn-warning"
|
||||||
|
href="#{mvc.basePath}/#{SciCmsJournalAssetCreateStep.contentSectionLabel}/assetsfolders/#{SciCmsJournalAssetCreateStep.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,158 @@
|
||||||
|
<!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:param name="stepControllerUrl"
|
||||||
|
value="@journal-edit"
|
||||||
|
/>
|
||||||
|
<ui:param name="title"
|
||||||
|
value="#{SciPublicationsUiMessageBundle.getMessage('journal.editstep.header', [MvcAssetEditStepModel.name])}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ui:define name="editStep">
|
||||||
|
<h3>#{SciPublicationsUiMessageBundle['journal.editstep.properties.header']}</h3>
|
||||||
|
|
||||||
|
<c:if test="#{MvcAssetEditStepModel.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">#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit']}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div aria-hidden="true"
|
||||||
|
aria-labelledby="properties-edit-dialog-title"
|
||||||
|
class="modal fade"
|
||||||
|
id="properties-edit-dialog"
|
||||||
|
tabindex="-1">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@journal-edit/properties"
|
||||||
|
class="modal-content"
|
||||||
|
method="post">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title"
|
||||||
|
id="properties-edit-dialog-title">
|
||||||
|
#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.title']}
|
||||||
|
</h4>
|
||||||
|
<button
|
||||||
|
aria-label="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.close']}"
|
||||||
|
class="close"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
<bootstrap:svgIcon icon="x" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.journaltitle.help']}"
|
||||||
|
inputId="journalTitle"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.journaltitle.label']}"
|
||||||
|
name="journalTitle"
|
||||||
|
value="#{SciCmsJournalAssetEditStepModel.journalTitle}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupNumber
|
||||||
|
help="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.firstyear.help']}"
|
||||||
|
inputId="firstYear"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.firstyear.label']}"
|
||||||
|
name="firstYear"
|
||||||
|
value="#{SciCmsJournalAssetEditStepModel.firstYear}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<bootstrap:formGroupNumber
|
||||||
|
help="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.lastyear.help']}"
|
||||||
|
inputId="firstYear"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.lastyear.label']}"
|
||||||
|
name="lastYear"
|
||||||
|
value="#{SciCmsJournalAssetEditStepModel.lastYear}"
|
||||||
|
/>
|
||||||
|
<bootstrap:formGroupText
|
||||||
|
help="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.issn.help']}"
|
||||||
|
inputId="issn"
|
||||||
|
label="#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.issn.label']}"
|
||||||
|
maxlength="9"
|
||||||
|
name="issn"
|
||||||
|
value="#{SciCmsJournalAssetEditStepModel.issn}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-warning"
|
||||||
|
data-dismiss="modal"
|
||||||
|
type="button">
|
||||||
|
#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.close']}
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
type="submit">
|
||||||
|
#{SciPublicationsUiMessageBundle['journal.editstep.properties.edit.submit']}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<dl>
|
||||||
|
<div>
|
||||||
|
<dt>#{SciPublicationsUiMessageBundle['journal.editstep.properties.journaltitle.label']}</dt>
|
||||||
|
<dd>#{SciCmsJournalAssetEditStepModel.journalTitle}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{SciPublicationsUiMessageBundle['journal.editstep.properties.firstyear.label']}</dt>
|
||||||
|
<dd>#{SciCmsJournalAssetEditStepModel.firstYear}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{SciPublicationsUiMessageBundle['journal.editstep.properties.lastyear.label']}</dt>
|
||||||
|
<dd>#{SciCmsJournalAssetEditStepModel.lastYear}</dd>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<dt>#{SciPublicationsUiMessageBundle['journal.editstep.properties.issn.label']}</dt>
|
||||||
|
<dd>#{SciCmsJournalAssetEditStepModel.issn}</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<libreccm:localizedStringEditor
|
||||||
|
addButtonLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.add.label']}"
|
||||||
|
addDialogCancelLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.add.cancel']}"
|
||||||
|
addDialogLocaleSelectHelp="#{SciPublicationsUiMessageBundle['journal.editstep.description.add.locale.help']}"
|
||||||
|
addDialogLocaleSelectLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.add.locale.label']}"
|
||||||
|
addDialogSubmitLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.add.submit.label']}"
|
||||||
|
addDialogTitle="#{SciPublicationsUiMessageBundle['journal.editstep.description.add.title']}"
|
||||||
|
addDialogValueHelp="#{SciPublicationsUiMessageBundle['journal.editstep.description.add.value.help']}"
|
||||||
|
addDialogValueLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.add.value.label']}"
|
||||||
|
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@journal-edit/description/add"
|
||||||
|
editButtonLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.edit.label']}"
|
||||||
|
editDialogCancelLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.edit.cancel']}"
|
||||||
|
editDialogSubmitLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.edit.submit']}"
|
||||||
|
editDialogTitle="#{SciPublicationsUiMessageBundle['journal.editstep.description.edit.title']}"
|
||||||
|
editDialogValueHelp="#{SciPublicationsUiMessageBundle['journal.editstep.description.edit.help']}"
|
||||||
|
editDialogValueLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.edit.label']}"
|
||||||
|
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@journal-edit/description/edit"
|
||||||
|
editorId="journal-description-editor"
|
||||||
|
hasUnusedLocales="#{!SciCmsJournalAssetEditStepModel.unusedDescriptionLocales.isEmpty()}"
|
||||||
|
headingLevel="3"
|
||||||
|
objectIdentifier="#{CmsSelectedAssetModel.assetPath}"
|
||||||
|
readOnly="#{!MvcAssetEditStepModel.canEdit}"
|
||||||
|
removeButtonLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.remove.label']}"
|
||||||
|
removeDialogCancelLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.remove.cancel']}"
|
||||||
|
removeDialogSubmitLabel="#{SciPublicationsUiMessageBundle['journal.editstep.description.remove.submit']}"
|
||||||
|
removeDialogText="#{SciPublicationsUiMessageBundle['journal.editstep.description.remove.text']}"
|
||||||
|
removeDialogTitle="#{SciPublicationsUiMessageBundle['journal.editstep.description.remove.title']}"
|
||||||
|
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@journal-edit/description/remove"
|
||||||
|
title="#{SciPublicationsUiMessageBundle['journal.editstep.description.title']}"
|
||||||
|
unusedLocales="#{SciCmsJournalAssetEditStepModel.unusedDescriptionLocales}"
|
||||||
|
useTextarea="true"
|
||||||
|
values="#{SciCmsJournalAssetEditStepModel.descriptionValues}"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</ui:define>
|
||||||
|
|
||||||
|
</ui:composition>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -10,14 +10,14 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>#{SciPublicationsUiMessageBundle['publisher.createform.title']}</h1>
|
<h1>#{SciPublicationsUiMessageBundle['publisher.createform.title']}</h1>
|
||||||
|
|
||||||
<c:forEach items="#{SciCmsPublisherCreateStep.messages.entrySet()}"
|
<c:forEach items="#{SciCmsPublisherAssetCreateStep.messages.entrySet()}"
|
||||||
var="messages">
|
var="messages">
|
||||||
<div class="alert alert-#{message.key}" role="alert">
|
<div class="alert alert-#{message.key}" role="alert">
|
||||||
#{message.value}
|
#{message.value}
|
||||||
</div>
|
</div>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|
||||||
<form action="#{mvc.basePath}/#{SciCmsPublisherCreateStep.contentSectionLabel}/assets/#{SciCmsPublisherCreateStep.folderPath}@create/#{SciCmsPublisherCreateStep.assetType}"
|
<form action="#{mvc.basePath}/#{SciCmsPublisherAssetCreateStep.contentSectionLabel}/assets/#{SciCmsPublisherAssetCreateStep.folderPath}@create/#{SciCmsPublisherAssetCreateStep.assetType}"
|
||||||
method="post">
|
method="post">
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupText
|
||||||
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.name.help']}"
|
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.name.help']}"
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
name="name"
|
name="name"
|
||||||
pattern="^([a-zA-Z0-9_-]*)$"
|
pattern="^([a-zA-Z0-9_-]*)$"
|
||||||
required="true"
|
required="true"
|
||||||
value="#{SciCmsPublisherCreateStep.name}"
|
value="#{SciCmsPublisherAssetCreateStep.name}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- <bootstrap:formGroupSelect
|
<!-- <bootstrap:formGroupSelect
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
label="#{SciPublicationsUiMessageBundle['publisher.createform.publishername.label']}"
|
label="#{SciPublicationsUiMessageBundle['publisher.createform.publishername.label']}"
|
||||||
name="publisherName"
|
name="publisherName"
|
||||||
required="true"
|
required="true"
|
||||||
value="#{SciCmsPublisherCreateStep.publisherName}"
|
value="#{SciCmsPublisherAssetCreateStep.publisherName}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupText
|
||||||
|
|
@ -53,11 +53,11 @@
|
||||||
inputId="publisherName"
|
inputId="publisherName"
|
||||||
label="#{SciPublicationsUiMessageBundle['publisher.createform.place.label']}"
|
label="#{SciPublicationsUiMessageBundle['publisher.createform.place.label']}"
|
||||||
name="place"
|
name="place"
|
||||||
value="#{SciCmsPublisherCreateStep.place}"
|
value="#{SciCmsPublisherAssetCreateStep.place}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<a class="btn btn-warning"
|
<a class="btn btn-warning"
|
||||||
href="#{mvc.basePath}/#{SciCmsPublisherCreateStep.contentSectionLabel}/assetsfolders/#{SciCmsPublisherCreateStep.folderPath}">
|
href="#{mvc.basePath}/#{SciCmsPublisherAssetCreateStep.contentSectionLabel}/assetsfolders/#{SciCmsPublisherAssetCreateStep.folderPath}">
|
||||||
#{CmsAssetsStepsDefaultMessagesBundle['createform.cancel']}
|
#{CmsAssetsStepsDefaultMessagesBundle['createform.cancel']}
|
||||||
</a>
|
</a>
|
||||||
<button class="btn btn-success"
|
<button class="btn btn-success"
|
||||||
|
|
|
||||||
|
|
@ -55,14 +55,14 @@
|
||||||
inputId="publisherName"
|
inputId="publisherName"
|
||||||
label="#{SciPublicationsUiMessageBundle['publisher.editstep.properties.edit.publishername.label']}"
|
label="#{SciPublicationsUiMessageBundle['publisher.editstep.properties.edit.publishername.label']}"
|
||||||
name="publisherName"
|
name="publisherName"
|
||||||
value="#{SciCmsPublisherEditStepModel.publisherName}"
|
value="#{SciCmsPublisherAssetEditStepModel.publisherName}"
|
||||||
/>
|
/>
|
||||||
<bootstrap:formGroupText
|
<bootstrap:formGroupText
|
||||||
help="#{SciPublicationsUiMessageBundle['publisher.editstep.properties.edit.place.help']}"
|
help="#{SciPublicationsUiMessageBundle['publisher.editstep.properties.edit.place.help']}"
|
||||||
inputId="place"
|
inputId="place"
|
||||||
label="#{SciPublicationsUiMessageBundle['publisher.editstep.properties.edit.place.label']}"
|
label="#{SciPublicationsUiMessageBundle['publisher.editstep.properties.edit.place.label']}"
|
||||||
name="place"
|
name="place"
|
||||||
value="#{SciCmsPublisherEditStepModel.place}"
|
value="#{SciCmsPublisherAssetEditStepModel.place}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|
@ -83,11 +83,11 @@
|
||||||
<dl>
|
<dl>
|
||||||
<div>
|
<div>
|
||||||
<dt>#{SciPublicationsUiMessageBundle['publisher.editstep.properties.publishername.label']}</dt>
|
<dt>#{SciPublicationsUiMessageBundle['publisher.editstep.properties.publishername.label']}</dt>
|
||||||
<dd>#{SciCmsPublisherEditStepModel.publisherName}</dd>
|
<dd>#{SciCmsPublisherAssetEditStepModel.publisherName}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<dt>#{SciPublicationsUiMessageBundle['publisher.editstep.properties.place.label']}</dt>
|
<dt>#{SciPublicationsUiMessageBundle['publisher.editstep.properties.place.label']}</dt>
|
||||||
<dd>#{SciCmsPublisherEditStepModel.place}</dd>
|
<dd>#{SciCmsPublisherAssetEditStepModel.place}</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,45 @@ publisher.editstep.properties.edit.place.label=Place
|
||||||
publisher.editstep.properties.edit.submit=Save
|
publisher.editstep.properties.edit.submit=Save
|
||||||
publisher.editstep.properties.publishername.label=Publisher name
|
publisher.editstep.properties.publishername.label=Publisher name
|
||||||
publisher.editstep.properties.place.label=Place
|
publisher.editstep.properties.place.label=Place
|
||||||
|
journal.createform.title=Create a new journal
|
||||||
|
journal.createform.journaltitle.help=The title of the journal.
|
||||||
|
journal.createform.journaltitle.label=Journal title
|
||||||
|
journal.editstep.header=Edit journal {0}
|
||||||
|
journal.editstep.properties.header=Properties
|
||||||
|
journal.editstep.properties.edit=Edit properties
|
||||||
|
journal.editstep.properties.edit.title=Edit properties
|
||||||
|
journal.editstep.properties.edit.close=Cancel
|
||||||
|
journal.editstep.properties.edit.journaltitle.help=The title of the journal.
|
||||||
|
journal.editstep.properties.edit.journaltitle.label=Journal title
|
||||||
|
journal.editstep.properties.edit.firstyear.help=The first year is which the journal was published.
|
||||||
|
journal.editstep.properties.edit.firstyear.label=First year
|
||||||
|
journal.editstep.properties.edit.lastyear.help=The last year in which the journal was published.
|
||||||
|
journal.editstep.properties.edit.lastyear.label=Last year
|
||||||
|
journal.editstep.properties.edit.issn.help=The ISSN of the journal, if available.
|
||||||
|
journal.editstep.properties.edit.issn.label=ISSN
|
||||||
|
journal.editstep.properties.edit.submit=Save
|
||||||
|
journal.editstep.properties.journaltitle.label=Journal title
|
||||||
|
journal.editstep.properties.firstyear.label=First Year
|
||||||
|
journal.editstep.properties.lastyear.label=Last year
|
||||||
|
journal.editstep.properties.issn.label=ISSN
|
||||||
|
journal.editstep.description.add.label=Add localized description
|
||||||
|
journal.editstep.description.add.cancel=Cancel
|
||||||
|
journal.editstep.description.add.locale.help=The locale to add.
|
||||||
|
journal.editstep.description.add.locale.label=Locale
|
||||||
|
journal.editstep.description.add.submit.label=Add locale
|
||||||
|
journal.editstep.description.add.title=Add localized description
|
||||||
|
journal.editstep.description.add.value.help=The localized value to add.
|
||||||
|
journal.editstep.description.add.value.label=Description
|
||||||
|
journal.editstep.description.edit.label=Edit localized description
|
||||||
|
journal.editstep.description.edit.cancel=Cancel
|
||||||
|
journal.editstep.description.edit.submit=Save
|
||||||
|
journal.editstep.description.edit.title=Edit localized description
|
||||||
|
journal.editstep.description.edit.help=The localized description of the journal.
|
||||||
|
journal.editstep.description.remove.label=Remove localized description
|
||||||
|
journal.editstep.description.remove.cancel=Cancel
|
||||||
|
journal.editstep.description.remove.submit=Remove
|
||||||
|
journal.editstep.description.remove.text=Are you sure to remove the following localized description:
|
||||||
|
journal.editstep.description.remove.title=Remove localized description
|
||||||
|
journal.editstep.description.title=Description of the journal
|
||||||
|
journal.label=Journal
|
||||||
|
journal.description=Creates a new journal
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,45 @@ publisher.editstep.properties.edit.place.label=Ort
|
||||||
publisher.editstep.properties.edit.submit=Speichern
|
publisher.editstep.properties.edit.submit=Speichern
|
||||||
publisher.editstep.properties.publishername.label=Name des Verlages
|
publisher.editstep.properties.publishername.label=Name des Verlages
|
||||||
publisher.editstep.properties.place.label=Ort
|
publisher.editstep.properties.place.label=Ort
|
||||||
|
journal.createform.title=Neue Zeitschrift anlegen
|
||||||
|
journal.createform.journaltitle.help=Der Titel der Zeitschrift.
|
||||||
|
journal.createform.journaltitle.label=Titel der Zeitschrift
|
||||||
|
journal.editstep.header=Zeitschrift {0} bearbeiten
|
||||||
|
journal.editstep.properties.header=Eigenschaften
|
||||||
|
journal.editstep.properties.edit=Eigenschaften bearbeiten
|
||||||
|
journal.editstep.properties.edit.title=Eigenschaften bearbeiten
|
||||||
|
journal.editstep.properties.edit.close=Abbrechen
|
||||||
|
journal.editstep.properties.edit.journaltitle.help=Der Titel der Zeitschrift.
|
||||||
|
journal.editstep.properties.edit.journaltitle.label=Titel der Zeitschrift
|
||||||
|
journal.editstep.properties.edit.firstyear.help=Das erste Jahr, in dem die Zeitschrift erschienen ist.
|
||||||
|
journal.editstep.properties.edit.firstyear.label=Erstes Jahr
|
||||||
|
journal.editstep.properties.edit.lastyear.help=Das letzte Jahr, in dem die Zeitschrift erschienen ist.
|
||||||
|
journal.editstep.properties.edit.lastyear.label=Letztes Jahr
|
||||||
|
journal.editstep.properties.edit.issn.help=Die ISSN der Zeitschrift, wenn verf\u00fcgbar.
|
||||||
|
journal.editstep.properties.edit.issn.label=ISSN
|
||||||
|
journal.editstep.properties.edit.submit=Speichern
|
||||||
|
journal.editstep.properties.journaltitle.label=Titel der Zeitschrift
|
||||||
|
journal.editstep.properties.firstyear.label=Erstes Jahr
|
||||||
|
journal.editstep.properties.lastyear.label=Letztes Jahr
|
||||||
|
journal.editstep.properties.issn.label=ISSN
|
||||||
|
journal.editstep.description.add.label=Lokalisierte Beschreibung hinzuf\u00fcgen
|
||||||
|
journal.editstep.description.add.cancel=Abbrechen
|
||||||
|
journal.editstep.description.add.locale.help=Die Sprache, die hinzugef\u00fcgt werden soll.
|
||||||
|
journal.editstep.description.add.locale.label=Sprache
|
||||||
|
journal.editstep.description.add.submit.label=Sprache hinzuf\u00fcgen
|
||||||
|
journal.editstep.description.add.title=Lokalisierte Beschreibung hinzuf\u00fcgen
|
||||||
|
journal.editstep.description.add.value.help=Die lokalisierte Beschreibung, die hinzugef\u00fcgt werden soll.
|
||||||
|
journal.editstep.description.add.value.label=Beschreibung
|
||||||
|
journal.editstep.description.edit.label=Lokalisierte Beschreibung bearbeiten
|
||||||
|
journal.editstep.description.edit.cancel=Abbrechen
|
||||||
|
journal.editstep.description.edit.submit=Speichern
|
||||||
|
journal.editstep.description.edit.title=Lokaliserte Beschreibung bearbeiten
|
||||||
|
journal.editstep.description.edit.help=Die lokaliserte Beschreibung der Zeitschrift.
|
||||||
|
journal.editstep.description.remove.label=Remove localized description
|
||||||
|
journal.editstep.description.remove.cancel=Abbrechen
|
||||||
|
journal.editstep.description.remove.submit=Entfernen
|
||||||
|
journal.editstep.description.remove.text=Sind Sie sicher, dass Sie die folgende lokalisierte Beschreibung entfernen wollen?
|
||||||
|
journal.editstep.description.remove.title=Lokalisierte Beschreibung entfernen
|
||||||
|
journal.editstep.description.title=Beschreibung der Zeitschrift
|
||||||
|
journal.label=Zeitschrift
|
||||||
|
journal.description=Neue Zeitschrift anlegen
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue