UI for creating and editing Proceedings as Asset

pull/1/head
Jens Pelzetter 2022-06-04 19:34:26 +02:00
parent 8d1baa0b58
commit fc0efffe4d
14 changed files with 2349 additions and 40 deletions

View File

@ -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;
import org.hibernate.envers.Audited;

View File

@ -1,15 +1,13 @@
/*
* 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;
import org.hibernate.envers.Audited;
import org.librecms.assets.AssetType;
import org.librecms.contentsection.Asset;
import org.librecms.ui.contentsections.assets.MvcAssetEditKit;
import org.scientificcms.publications.Proceedings;
import org.scientificcms.publications.SciPublicationsConstants;
import org.scientificcms.publications.ui.assets.ProceedingsAssetCreateStep;
import org.scientificcms.publications.ui.assets.ProceedingsAssetEditStep;
import java.util.Objects;
@ -34,6 +32,10 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
descriptionBundle = SciPublicationsConstants.BUNDLE,
descriptionKey = "proceedings.description"
)
@MvcAssetEditKit(
createStep = ProceedingsAssetCreateStep.class,
editStep = ProceedingsAssetEditStep.class
)
public class ProceedingsAsset extends Asset {
private static final long serialVersionUID = 1L;

View File

@ -105,9 +105,6 @@ public class CollectedVolumeAssetEditStep extends AbstractMvcAssetEditStep {
@Inject
private PublisherManager publisherManager;
@Inject
private PublisherRepository publisherRepo;
@Inject
private CollectedVolumeAssetEditStepModel editStepModel;
@ -204,27 +201,6 @@ public class CollectedVolumeAssetEditStep extends AbstractMvcAssetEditStep {
}
}
protected CollectedVolumeAsset getCollectedVolumeAsset() {
return (CollectedVolumeAsset) getAsset();
}
protected CollectedVolume getCollectedVolume() {
return getCollectedVolumeAsset().getCollectedVolume();
}
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;
}
@GET
@Path("/")
@AuthorizationRequired
@ -553,6 +529,7 @@ public class CollectedVolumeAssetEditStep extends AbstractMvcAssetEditStep {
} else {
authorResult = Optional.of(result.get(0));
}
break;
}
}
@ -565,8 +542,8 @@ public class CollectedVolumeAssetEditStep extends AbstractMvcAssetEditStep {
}
final Person author = authorResult.get();
final boolean editor = "true".equals(editorParam)
|| "on".equals(editorParam);
final boolean editor = "true".equalsIgnoreCase(editorParam)
|| "on".equalsIgnoreCase(editorParam);
publicationManager.addAuthor(author, getCollectedVolume(), editor);
return buildRedirectPathForStep();
@ -618,8 +595,8 @@ public class CollectedVolumeAssetEditStep extends AbstractMvcAssetEditStep {
final Authorship authorship = authorshipResult.get();
authorship.setEditor(
"true".equals(editorParam)
|| "on".equals(editorParam)
"true".equalsIgnoreCase(editorParam)
|| "on".equalsIgnoreCase(editorParam)
);
publicationRepo.save(collectedVolume);
@ -793,6 +770,14 @@ public class CollectedVolumeAssetEditStep extends AbstractMvcAssetEditStep {
}
}
protected CollectedVolumeAsset getCollectedVolumeAsset() {
return (CollectedVolumeAsset) getAsset();
}
protected CollectedVolume getCollectedVolume() {
return getCollectedVolumeAsset().getCollectedVolume();
}
private String showAuthorNotFound(
final String sectionIdentifier,
final String assetPath,
@ -820,6 +805,19 @@ public class CollectedVolumeAssetEditStep extends AbstractMvcAssetEditStep {
return showStep(sectionIdentifier, assetPath);
}
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;
}
private AuthorsTableRow buildAuthorsTableRow(final Authorship authorship) {
final AuthorsTableRow row = new AuthorsTableRow();
row.setAuthorName(

View File

@ -0,0 +1,108 @@
package org.scientificcms.publications.ui.assets;
import org.librecms.contentsection.Asset;
import org.librecms.contentsection.AssetRepository;
import org.librecms.contentsection.ContentSection;
import org.librecms.ui.contentsections.ContentSectionsUi;
import org.librecms.ui.contentsections.assets.MvcAssetEditSteps;
import org.scientificcms.publications.Authorship;
import org.scientificcms.publications.Proceedings;
import org.scientificcms.publications.PublicationRepository;
import org.scientificcms.publications.assets.ProceedingsAsset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.transaction.Transactional;
import javax.ws.rs.Consumes;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@RequestScoped
@Path(MvcAssetEditSteps.PATH_PREFIX + "proceedings-edit-authors")
public class ProceedingsAssetAuthors {
@Inject
private AssetRepository assetRepo;
@Inject
private ContentSectionsUi sectionsUi;
@Inject
private PublicationRepository publicationRepo;
@POST
@Path("/save-order")
@Consumes(MediaType.APPLICATION_JSON)
@Transactional(Transactional.TxType.REQUIRED)
public Response saveOrder(
@PathParam(MvcAssetEditSteps.SECTION_IDENTIFIER_PATH_PARAM)
final String sectionIdentifier,
@PathParam(MvcAssetEditSteps.ASSET_PATH_PATH_PARAM_NAME)
final String assetPath,
final List<String> order
) {
final ContentSection section = sectionsUi
.findContentSection(sectionIdentifier)
.orElseThrow(
() -> new NotFoundException(
String.format(
"ContentSection %s not found.",
sectionIdentifier
)
)
);
final Asset asset = assetRepo
.findByPath(section, assetPath)
.orElseThrow(
() -> new NotFoundException(
String.format(
"Asset %s not found.",
assetPath
)
)
);
if (!(asset instanceof ProceedingsAsset)) {
throw new NotFoundException(
String.format(
"No ProceedingsAsset for path %s in section %s.",
assetPath,
section.getLabel()
)
);
}
final Map<Long, Long> orderMap = new HashMap<>();
for (int i = 0; i < order.size(); i++) {
orderMap.put(Long.parseLong(order.get(i)), (long) i);
}
final ProceedingsAsset proceedingsAsset = (ProceedingsAsset) asset;
final Proceedings proceedings = proceedingsAsset.getProceedings();
for(final Authorship authorship : proceedings.getAuthorships()) {
authorship.setAuthorOrder(
orderMap.get(
authorship.getAuthorshipId()
)
);
}
publicationRepo.save(proceedings);
return Response.ok().build();
}
}

View File

@ -0,0 +1,131 @@
package org.scientificcms.publications.ui.assets;
import org.libreccm.l10n.GlobalizationHelper;
import org.librecms.ui.contentsections.assets.AbstractMvcAssetCreateStep;
import org.scientificcms.publications.Proceedings;
import org.scientificcms.publications.PublicationRepository;
import org.scientificcms.publications.assets.ProceedingsAsset;
import org.scientificcms.publications.ui.SciPublicationsUiConstants;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;
import javax.transaction.Transactional;
/**
*
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
*/
@RequestScoped
@Named("SciCmsProceedingsAssetCreateStep")
public class ProceedingsAssetCreateStep
extends AbstractMvcAssetCreateStep<ProceedingsAsset> {
private static final String FORM_PARAMS_YEAR_OF_PUBLICATION
= "yearOfPublication";
private static final String FORM_PARAMS_SHORT_DESCRIPTION
= "shortDescription";
private int yearOfPublication;
private String shortDescription;
@Inject
private GlobalizationHelper globalizationHelper;
@Inject
private PublicationRepository publicationRepo;
@Override
public String showCreateStep() {
return "org/scientificcms/assets/proceedings/ui/create-proceedings.xhtml";
}
@Override
public String getLabel() {
return globalizationHelper
.getLocalizedTextsUtil(getBundle())
.getText("proceedings.label");
}
@Override
public String getDescription() {
return globalizationHelper
.getLocalizedTextsUtil(getBundle())
.getText("proceedings.description");
}
@Override
public String getBundle() {
return SciPublicationsUiConstants.BUNDLE;
}
@Override
public Class<ProceedingsAsset> getAssetClass() {
return ProceedingsAsset.class;
}
public int getYearOfPublication() {
return yearOfPublication;
}
public String getShortDescription() {
return shortDescription;
}
@Override
@Transactional(Transactional.TxType.REQUIRED)
protected String setAssetProperties(
final ProceedingsAsset proceedingsAsset,
final Map<String, String[]> formParams
) {
final Proceedings proceedings = new Proceedings();
final Locale locale = new Locale(getInitialLocale());
proceedings.getTitle().putValue(
locale,
proceedingsAsset.getTitle().getValue(locale)
);
shortDescription = Optional
.ofNullable(formParams.get(FORM_PARAMS_SHORT_DESCRIPTION))
.filter(value -> value.length > 0)
.map(value -> value[0])
.filter(value -> !value.isBlank())
.orElse(null);
if (shortDescription != null) {
proceedings.getShortDescription().putValue(
locale,
shortDescription
);
}
final String yearOfPublicationParam = Optional
.ofNullable(formParams.get(FORM_PARAMS_YEAR_OF_PUBLICATION))
.filter(value -> value.length > 0)
.map(value -> value[0])
.filter(value -> value.matches("\\d*"))
.orElse(null);
if (yearOfPublicationParam != null) {
proceedings.setYearOfPublication(
Integer.parseInt(yearOfPublicationParam)
);
}
publicationRepo.save(proceedings);
proceedingsAsset.setProceedings(proceedings);
return String.format(
"redirect:/%s/assets/%s/%s/@proceedings-edit",
getContentSectionLabel(),
getFolderPath(),
getName()
);
}
}

View File

@ -0,0 +1,217 @@
package org.scientificcms.publications.ui.assets;
import org.librecms.assets.Organization;
import org.librecms.assets.Person;
import org.librecms.ui.contentsections.documents.CmsEditorLocaleVariantRow;
import org.scientificcms.publications.assets.PublisherAsset;
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("SciCmsProceedingsAssetEditStepModel")
public class ProceedingsAssetEditStepModel {
private String baseUrl;
private List<AuthorsTableRow> authors;
private int yearOfPublication;
private String publisherUuid;
private String publisherName;
private String publisherPlace;
private Map<String, String> shortDescriptionValues;
private List<CmsEditorLocaleVariantRow> shortDescriptionVariants;
private List<String> unusedShortDescriptionLocales;
private Integer volume;
private Integer numberOfVolumes;
private String nameOfConference;
private String placeOfConference;
private String startDate;
private String endDate;
private String organzierUuid;
private String organizerName;
public String getBaseUrl() {
return baseUrl;
}
protected void setBaseUrl(final String baseUrl) {
this.baseUrl = baseUrl;
}
public List<AuthorsTableRow> getAuthors() {
return Collections.unmodifiableList(authors);
}
public void setAuthors(final List<AuthorsTableRow> authors) {
this.authors = authors;
}
public int getYearOfPublication() {
return yearOfPublication;
}
public void setYearOfPublication(final int yearOfPublication) {
this.yearOfPublication = yearOfPublication;
}
public String getPublisherUuid() {
return publisherUuid;
}
public void setPublisherUuid(final String publisherUuid) {
this.publisherUuid = publisherUuid;
}
public String getPublisherName() {
return publisherName;
}
public void setPublisherName(final String publisherName) {
this.publisherName = publisherName;
}
public String getPublisherPlace() {
return publisherPlace;
}
public void setPublisherPlace(final String publisherPlace) {
this.publisherPlace = publisherPlace;
}
public Map<String, String> getShortDescriptionValues() {
return Collections.unmodifiableMap(shortDescriptionValues);
}
public void setShortDescriptionValues(
final Map<String, String> shortDescriptionValues
) {
this.shortDescriptionValues = new HashMap<>(shortDescriptionValues);
}
public List<CmsEditorLocaleVariantRow> getShortDescriptionVariants() {
return Collections.unmodifiableList(shortDescriptionVariants);
}
public void setShortDescriptionVariants(
final List<CmsEditorLocaleVariantRow> shortDescriptionVariants
) {
this.shortDescriptionVariants = new ArrayList<>(
shortDescriptionVariants
);
}
public List<String> getUnusedShortDescriptionLocales() {
return Collections.unmodifiableList(unusedShortDescriptionLocales);
}
public void setUnusedShortDescriptionLocales(
final List<String> unusedShortDescriptionLocales
) {
this.unusedShortDescriptionLocales = new ArrayList<>(
unusedShortDescriptionLocales
);
}
public Integer getVolume() {
return volume;
}
public void setVolume(final Integer volume) {
this.volume = volume;
}
public Integer getNumberOfVolumes() {
return numberOfVolumes;
}
public void setNumberOfVolumes(final Integer numberOfVolumes) {
this.numberOfVolumes = numberOfVolumes;
}
public String getAuthorType() {
return Person.class.getName();
}
public String getOrganizerType() {
return Organization.class.getName();
}
public String getPublisherType() {
return PublisherAsset.class.getName();
}
public String getNameOfConference() {
return nameOfConference;
}
public void setNameOfConference(final String nameOfConference) {
this.nameOfConference = nameOfConference;
}
public String getPlaceOfConference() {
return placeOfConference;
}
public void setPlaceOfConference(final String placeOfConference) {
this.placeOfConference = placeOfConference;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(final String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(final String endDate) {
this.endDate = endDate;
}
public String getOrganzierUuid() {
return organzierUuid;
}
public void setOrganzierUuid(final String organzierUuid) {
this.organzierUuid = organzierUuid;
}
public String getOrganizerName() {
return organizerName;
}
public void setOrganizerName(final String organizerName) {
this.organizerName = organizerName;
}
}

View File

@ -18,6 +18,7 @@ public class SciPublicationsAssetSteps implements MvcAssetEditSteps {
return Set.of(
CollectedVolumeAssetEditStep.class,
JournalAssetEditStep.class,
ProceedingsAssetEditStep.class,
PublisherAssetEditStep.class,
SeriesAssetEditStep.class
);
@ -26,7 +27,8 @@ public class SciPublicationsAssetSteps implements MvcAssetEditSteps {
@Override
public Set<Class<?>> getResourceClasses() {
return Set.of(
CollectedVolumeAssetAuthors.class
CollectedVolumeAssetAuthors.class,
ProceedingsAssetAuthors.class
);
}
}

View File

@ -0,0 +1,79 @@
<!DOCTYPE html [<!ENTITY times '&#215;'>]>
<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['proceedings.createform.title']}</h1>
<c:forEach items="#{SciCmsProceedingsAssetCreateStep.messages.entrySet()}"
var="message">
<div class="alert alert-#{message.key}" role="alert">
#{message.value}
</div>
</c:forEach>
<form action="#{mvc.basePath}/#{SciCmsProceedingsAssetCreateStep.contentSectionLabel}/assets/#{SciCmsProceedingsAssetCreateStep.folderPath}@create/#{SciCmsProceedingsAssetCreateStep.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="#{SciCmsProceedingsAssetCreateStep.name}"
/>
<bootstrap:formGroupSelect
help="#{CmsAssetsStepsDefaultMessagesBundle['createform.initial_locale.help']}"
inputId="locale"
label="#{CmsAssetsStepsDefaultMessagesBundle['createform.initial_locale.label']}"
name="locale"
options="#{SciCmsProceedingsAssetCreateStep.availableLocales}"
required="true"
selectedOptions="#{[SciCmsProceedingsAssetCreateStep.initialLocale]}"
/>
<bootstrap:formGroupText
help="#{SciPublicationsUiMessageBundle['proceedings.createform.title.help']}"
inputId="title"
label="#{SciPublicationsUiMessageBundle['proceedings.createform.title.label']}"
name="title"
required="true"
value="#{SciCmsProceedingsAssetCreateStep.title}"
/>
<bootstrap:formGroupNumber
help="#{SciPublicationsUiMessageBundle['proceedings.createform.yearofpublication.help']}"
inputId="yearOfPublication"
label="#{SciPublicationsUiMessageBundle['proceedings.createform.yearofpublication.label']}"
name="yearOfPublication"
/>
<bootstrap:formGroupTextarea
cols="80"
help="#{SciPublicationsUiMessageBundle['proceedings.createform.shortdescription.help']}"
inputId="shortDescription"
label="#{SciPublicationsUiMessageBundle['proceedings.createform.shortdescription.label']}"
name="shortDescription"
rows="20"
/>
<a class="btn btn-warning"
href="#{mvc.basePath}/#{SciCmsProceedingsAssetCreateStep.contentSectionLabel}/assetsfolders/#{SciCmsProceedingsAssetCreateStep.folderPath}">
#{CmsAssetsStepsDefaultMessagesBundle['createform.cancel']}
</a>
<button class="btn btn-success"
type="submit">
#{CmsAssetsStepsDefaultMessagesBundle['createform.submit']}
</button>
</form>
</div>
</ui:define>
</ui:composition>
</html>

View File

@ -0,0 +1,433 @@
<!DOCTYPE html [<!ENTITY times '&#215;'>]>
<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="@proceedings-edit"
/>
<ui:param name="title"
value="#{SciPublicationsUiMessageBundle.getMessage('proceedings.editstep.header', [MvcAssetEditStepModel.name])}"
/>
<ui:define name="editStep">
<c:if test="#{authorNotFound != null}">
<div class="alert alert-warning" role="alert">
#{SciPublicationsUiMessageBundle.getMessage('proceedings.editstep.errors.author_not_found', [authorNotFound])}
</div>
</c:if>
<c:if test="#{authorshipNotFound != null}">
<div class="alert alert-warning" role="alert">
#{SciPublicationsUiMessageBundle.getMessage('proceedings.editstep.errors.authorship_not_found', [authorshipNotFound])}
</div>
</c:if>
<c:if test="#{publisherNotFound != null}">
<div class="alert alert-warning" role="alert">
#{SciPublicationsUiMessageBundle.getMessage('proceedings.editstep.errors.publisher_not_found', [publisherNotFound])}
</div>
</c:if>
<c:if test="#{organizierNotFound != null}">
<div class="alert alert-warning" role="alert">
#{SciPublicationsUiMessageBundle.getMessage('proceedings.editstep.errors.organizer_not_found', [organizerNotFound])}
</div>
</c:if>
<template id="authors-sort-error-general">
<div class="alert alert-warning mt-3" role="alert">
#{SciPublicationsUiMessageBundle['proceedings.editstep.errors.authors.sort.general']}
</div>
</template>
<template id="authors-sort-error-save">
<div class="alert alert-warning mt-3" role="alert">
#{SciPublicationsUiMessageBundle['proceedings.editstep.errors.authors.sort.save']}
</div>
</template>
<c:if test="#{MvcAssetEditStepModel.canEdit}">
<h3>#{SciPublicationsUiMessageBundle['proceedings.editstep.authors']}</h3>
<div class="mb-2">
<div class="text-right">
<librecms:assetPickerButton
assetPickerId="authors-picker"
buttonIcon="plus-circle"
buttonText="#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.add.label']}"
/>
</div>
</div>
<librecms:assetPicker
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/authors"
assetType="#{SciCmsProceedingsAssetEditStepModel.authorType}"
assetPickerId="authors-picker"
baseUrl="#{SciCmsProceedingsAssetEditStepModel.baseUrl}"
contentSection="#{ContentSectionModel.sectionName}"
dialogTitle="#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.add.dialog.title']}"
formParamName="authorIdentifier"
>
<bootstrap:formCheck
inputId="authors-picker-editor"
label="#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.editor.label']}"
name="editor"
/>
</librecms:assetPicker>
<button class="btn btn-secondary authors-save-order-button"
disabled="disabled"
type="button">
<span class="save-icon">
<bootstrap:svgIcon icon="save" />
</span>
<span class="save-spinner d-none">
<span aria-hidden="true"
class="spinner-border spinner-border-sm"
role="status"></span>
<span class="sr-only">#{SciPublicationsUiMessageBundle['authors.order.save.inprogress']}</span>
</span>
<span>#{SciPublicationsUiMessageBundle['authors.order.save']}</span>
</button>
<table id="authors-table"
data-saveUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit-authors/save-order">
<thead>
<tr>
<th>#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.table.name']}</th>
<th>
#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.table.editor']}
</th>
<th colspan="2">
#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.table.actions']}
</th>
</tr>
</thead>
<tbody>
<c:forEach items="#{SciCmsProceedingsAssetEditStepModel.authors}"
var="author">
<tr class="proceedings-author"
id="#{author.authorshipId}"
data-id="#{author.authorshipId}">
<td>
<button class="btn btn-secondary cms-sort-handle mr-2"
type="button">
<bootstrap:svgIcon icon="arrows-move" />
<span class="sr-only">#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.move']}</span>
</button>
#{author.authorName}
</td>
<td>
<c:choose>
<c:when test="#{author.editor}">
#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.table.editor.yes']}
</c:when>
<c:otherwise>
#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.table.editor.no']}
</c:otherwise>
</c:choose>
</td>
<td>
<button class="btn btn-secondary"
data-toggle="modal"
data-target="#authorship-edit-#{author.authorshipUuid}"
type="button">
<bootstrap:svgIcon icon="pen" />
<span class="sr-only">
#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.edit.label']}
</span>
</button>
<div aria-hidden="true"
aria-labelledby="authorship-edit-#{author.authorshipUuid}-title"
class="modal fade"
id="authorship-edit-#{author.authorshipUuid}"
tabindex="-1">
<div class="modal-dialog">
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/authors/#{author.authorshipUuid}"
class="modal-content"
method="post">
<div class="modal-header">
<h4 class="modal-title"
id="authorship-edit-#{author.authorshipUuid}-title">
#{SciPublicationsUiMessageBundle.getMessage('proceedings.editstep.authors.editdialog.title', [author.authorName])}
</h4>
<button aria-label="{SciPublicationsUiMessageBundle['proceedings.editstep.authors.editdialog.cancel']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<bootstrap:formCheck
checked="#{author.editor}"
inputId="#{author.authorshipUuid}-editor"
label="#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.editdialog.editor.label']}"
name="editor"
value="true"
/>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.editdialog.cancel']}
</button>
<button class="btn btn-success"
type="submit">
#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.editdialog.submit']}
</button>
</div>
</form>
</div>
</div>
</td>
<td>
<libreccm:deleteDialog
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/authors/#{author.authorshipUuid}/remove"
buttonText="#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.remove.label']}"
cancelLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.remove.cancel']}"
confirmLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.authors.remove.confirm']}"
dialogId="remove-author-#{author.authorshipUuid}"
dialogTitle="#{SciPublicationsUiMessageBundle.getMessage('proceedings.editstep.authors.remove.title', [author.authorName])}"
message="#{SciPublicationsUiMessageBundle.getMessage('proceedings.editstep.authors.remove.text', [author.authorName])}"
/>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<h3>#{SciPublicationsUiMessageBundle['proceedings.editstep.publisher']}</h3>
<div class="mb-2">
<div class="text-right">
<librecms:assetPickerButton
assetPickerId="publisher-picker"
buttonIcon="plus-circle"
buttonText="#{SciPublicationsUiMessageBundle['proceedings.editstep.publisher.set.label']}"
/>
</div>
</div>
<librecms:assetPicker
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/publisher"
assetType="#{SciCmsProceedingsAssetEditStepModel.publisherType}"
assetPickerId="publisher-picker"
baseUrl="#{SciCmsProceedingsAssetEditStepModel.baseUrl}"
contentSection="#{ContentSectionModel.sectionName}"
dialogTitle="#{SciPublicationsUiMessageBundle['proceedings.editstep.publisher.select.dialog.title']}"
formParamName="publisherIdentifier"
/>
<p>
<c:choose>
<c:when test="#{SciCmsProceedingsAssetEditStepModel.publisherPlace != null}">
#{SciCmsProceedingsAssetEditStepModel.publisherName}, #{SciCmsProceedingsAssetEditStepModel.publisherPlace}
</c:when>
<c:otherwise>
#{SciCmsProceedingsAssetEditStepModel.publisherName}
</c:otherwise>
</c:choose>
<c:if test="#{SciCmsProceedingsAssetEditStepModel.publisherUuid != null}">
<libreccm:deleteDialog
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/publisher/@remove"
buttonText="#{SciPublicationsUiMessageBundle['proceedings.editstep.publisher.remove.label']}"
cancelLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.publisher.cancel']}"
confirmLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.publisher.confirm']}"
dialogId="publisher-remove"
dialogTitle="#{SciPublicationsUiMessageBundle['proceedings.editstep.publisher.title']}"
message="#{SciPublicationsUiMessageBundle['proceedings.editstep.publisher.message']}"
/>
</c:if>
</p>
<h3>#{SciPublicationsUiMessageBundle['proceedings.editstep.properties']}</h3>
<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['proceedings.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}/@proceedings-edit/properties"
class="modal-content"
method="post">
<div class="modal-header">
<h4 class="modal-title"
id="properties-edit-dialog-title">
#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.edit.title']}
</h4>
<button
aria-label="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.edit.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<bootstrap:formGroupNumber
help="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.yearofpublication.help']}"
inputId="yearOfPublication"
label="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.yearofpublication.label']}"
name="yearOfPublication"
value="#{SciCmsProceedingsAssetEditStepModel.yearOfPublication}"
/>
<bootstrap:formGroupNumber
help="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.volume.help']}"
inputId="volume"
label="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.volume.label']}"
name="volume"
value="#{SciCmsProceedingsAssetEditStepModel.volume}"
/>
<bootstrap:formGroupNumber
help="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.numberofvolumes.help']}"
inputId="numberOfVolumes"
label="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.numberofvolumes.label']}"
name="numberOfVolumes"
value="#{SciCmsProceedingsAssetEditStepModel.numberOfVolumes}"
/>
<bootstrap:formGroupText
help="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.nameofconference.help']}"
inputId="nameOfConference"
label="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.nameofconference.label']}"
name="nameOfConference"
value="#{SciCmsProceedingsAssetEditStepModel.nameOfConference}"
/>
<bootstrap:formGroupText
help="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.placeofconference.help']}"
inputId="placeOfConference"
label="#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.placeofconference.label']}"
name="placeOfConference"
value="#{SciCmsProceedingsAssetEditStepModel.placeOfConference}"
/>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.edit.close']}
</button>
<button class="btn btn-success"
type="submit">
#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.edit.submit']}
</button>
</div>
</form>
</div>
</div>
<dl>
<div>
<dt>#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.yearofpublication.label']}</dt>
<dd>#{SciCmsProceedingsAssetEditStepModel.yearOfPublication}</dd>
</div>
<div>
<dt>#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.volume.label']}</dt>
<dd>#{SciCmsProceedingsAssetEditStepModel.volume}</dd>
</div>
<div>
<dt>#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.numberofvolumes.label']}</dt>
<dd>#{SciCmsProceedingsAssetEditStepModel.numberOfVolumes}</dd>
</div>
<div>
<dt>#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.nameofconference.label']}</dt>
<dd>#{SciCmsProceedingsAssetEditStepModel.nameOfConference}</dd>
</div>
<div>
<dt>#{SciPublicationsUiMessageBundle['proceedings.editstep.properties.placeofconference.label']}</dt>
<dd>#{SciCmsProceedingsAssetEditStepModel.placeOfConference}</dd>
</div>
</dl>
<h3>#{SciPublicationsUiMessageBundle['proceedings.editstep.organizer']}</h3>
<div class="mb-2">
<div class="text-right">
<librecms:assetPickerButton
assetPickerId="organizer-picker"
buttonIcon="plus-circle"
buttonText="#{SciPublicationsUiMessageBundle['proceedings.editstep.organizer.set.label']}"
/>
</div>
</div>
<librecms:assetPicker
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/organizer"
assetType="#{SciCmsProceedingsAssetEditStepModel.organizerType}"
assetPickerId="organizer-picker"
baseUrl="#{SciCmsProceedingsAssetEditStepModel.baseUrl}"
contentSection="#{ContentSectionModel.sectionName}"
dialogTitle="#{SciPublicationsUiMessageBundle['proceedings.editstep.organizer.select.dialog.title']}"
formParamName="organizerIdentifier"
/>
<p>
#{SciCmsProceedingsAssetEditStepModel.organizerName}
</p>
<c:if test="#{SciCmsProceedingsAssetEditStepModel.organzierUuid != null}">
<libreccm:deleteDialog
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/organizer/@remove"
buttonText="#{SciPublicationsUiMessageBundle['proceedings.editstep.organizer.remove.label']}"
cancelLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.organizer.cancel']}"
confirmLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.organizer.confirm']}"
dialogId="organizer-remove"
dialogTitle="#{SciPublicationsUiMessageBundle['proceedings.editstep.organizer.title']}"
message="#{SciPublicationsUiMessageBundle['proceedings.editstep.organizer.message']}"
/>
</c:if>
<libreccm:localizedStringEditor
addButtonLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.add.label']}"
addDialogCancelLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.add.cancel']}"
addDialogLocaleSelectHelp="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.add.locale.help']}"
addDialogLocaleSelectLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.add.locale.label']}"
addDialogSubmitLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.add.submit']}"
addDialogTitle="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.add.title']}"
addDialogValueHelp="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.add.value.help']}"
addDialogValueLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.add.value.label']}"
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/shortdescription/add"
editButtonLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.edit.label']}"
editDialogCancelLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.edit.cancel']}"
editDialogSubmitLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.edit.submit']}"
editDialogTitle="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.edit.title']}"
editDialogValueHelp="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.edit.value.help']}"
editDialogValueLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.edit.value.label']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/shortdescription/edit"
editorId="shortdescription-editor"
hasUnusedLocales="#{!SciCmsProceedingsAssetEditStepModel.unusedShortDescriptionLocales.isEmpty()}"
headingLevel="4"
objectIdentifier="#{CmsSelectedAssetModel.assetPath}"
readOnly="#{!MvcAssetEditStepModel.canEdit}"
removeButtonLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.remove.label']}"
removeDialogCancelLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.remove.cancel']}"
removeDialogSubmitLabel="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.remove.submit']}"
removeDialogText="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.remove.text']}"
removeDialogTitle="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.remove.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/assets/#{CmsSelectedAssetModel.assetPath}/@proceedings-edit/shortdescription/remove"
title="#{SciPublicationsUiMessageBundle['proceedings.editstep.shortdescription.title']}"
unusedLocales="#{SciCmsProceedingsAssetEditStepModel.unusedShortDescriptionLocales}"
useTextarea="true"
values="#{SciCmsProceedingsAssetEditStepModel.shortDescriptionValues}"
/>
</c:if>
</ui:define>
<ui:define name="scripts">
<script src="#{request.contextPath}/assets/@scipublications/proceedings-asset-authors.js" />
</ui:define>
</ui:composition>
</html>

View File

@ -164,3 +164,92 @@ collectedvolume.createform.yearofpublication.label=Year of publication
createstep.title.error.missing=No title for the collected volume was provided.
authors.order.save=Save order
collectedvolume.editstep.authors.move=Sort authors
proceedings.label=Proceedings
proceedings.description=Proceedings of a conference or similar event.
proceedings.editstep.description=Proceedings of a conference or similar event.
proceedings.editstep.label=Proceedings
proceedings.createform.title=Create new proceedings
proceedings.createform.title.help=The title of the proceedings.
proceedings.createform.title.label=Title
proceedings.createform.yearofpublication.help=The year of publication of the proceedings.
proceedings.createform.yearofpublication.label=Year of publication
proceedings.createform.shortdescription.help=A short description of the proceedings.
proceedings.createform.shortdescription.label=Description
proceedings.editstep.header=Edit proceedings {0}
proceedings.editstep.errors.author_not_found=No person identified by {0} was found.
proceedings.editstep.errors.authorship_not_found=Authorship with ID {0} not found.
proceedings.editstep.errors.publisher_not_found=No publisher identified by {0} found.
proceedings.editstep.errors.organizer_not_found=No organization identified by {0} found.
proceedings.editstep.errors.authors.sort.general=Failed to sort authors of proceedings.
proceedings.editstep.errors.authors.sort.save=Error while saving sorting of authors.
proceedings.editstep.authors=Authors
proceedings.editstep.authors.add.label=Add author
proceedings.editstep.authors.add.dialog.title=Add author
proceedings.editstep.authors.editor.label=Editor?
proceedings.editstep.authors.table.name=Name
proceedings.editstep.authors.table.editor=Editor?
proceedings.editstep.authors.table.actions=Actions
proceedings.editstep.authors.move=Move author
proceedings.editstep.authors.table.editor.yes=Yes
proceedings.editstep.authors.table.editor.no=No
proceedings.editstep.authors.edit.label=Edit
proceedings.editstep.authors.editdialog.title=Edit authorship of {0}
proceedings.editstep.authors.editdialog.cancel=Cancel
proceedings.editstep.authors.editdialog.editor.label=Editor?
proceedings.editstep.authors.editdialog.submit=Save
proceedings.editstep.authors.remove.label=Remove author
proceedings.editstep.authors.remove.cancel=Cancel
proceedings.editstep.authors.remove.confirm=Remove
proceedings.editstep.authors.remove.title=Confirm removal of author {0}
proceedings.editstep.authors.remove.text=Are you sure to remove the author {0} from this publication?
proceedings.editstep.publisher=Publisher
proceedings.editstep.publisher.set.label=Select publisher
proceedings.editstep.publisher.select.dialog.title=Select publisher
proceedings.editstep.publisher.remove.label=Remove publisher
proceedings.editstep.publisher.cancel=Cancel
proceedings.editstep.publisher.confirm=Remove
proceedings.editstep.publisher.title=Confirm removal of publisher
proceedings.editstep.publisher.message=Are you sure to remove the publisher from these proceedings?
proceedings.editstep.properties=Properties
proceedings.editstep.properties.edit=Edit
proceedings.editstep.properties.edit.title=Edit properties
proceedings.editstep.properties.edit.close=Cancel
proceedings.editstep.properties.yearofpublication.help=The year of publication of the proceedings.
proceedings.editstep.properties.yearofpublication.label=Year of publication
proceedings.editstep.properties.volume.help=The volume.
proceedings.editstep.properties.volume.label=Volume
proceedings.editstep.properties.numberofvolumes.help=The number of volumes of the publication.
proceedings.editstep.properties.numberofvolumes.label=Number of volumes
proceedings.editstep.properties.nameofconference.help=The name of the conference.
proceedings.editstep.properties.nameofconference.label=Name of conference
proceedings.editstep.properties.placeofconference.help=The place of the conference.
proceedings.editstep.properties.placeofconference.label=Place of conference
proceedings.editstep.organizer=Organizer
proceedings.editstep.organizer.set.label=Select organizer
proceedings.editstep.organizer.select.dialog.title=Select organizer
proceedings.editstep.organizer.remove.label=Remove organizer
proceedings.editstep.organizer.cancel=Cancel
proceedings.editstep.organizer.confirm=Remove
proceedings.editstep.organizer.title=Confirm removal of organizer
proceedings.editstep.organizer.message=Are you sure to remove the organizer from these proceedings?
proceedings.editstep.shortdescription.add.label=Add
proceedings.editstep.shortdescription.add.cancel=Cancel
proceedings.editstep.shortdescription.add.locale.help=The langugage of the short description to add.
proceedings.editstep.shortdescription.add.locale.label=Locale
proceedings.editstep.shortdescription.add.submit=Add
proceedings.editstep.shortdescription.add.title=Add localized description
proceedings.editstep.shortdescription.add.value.help=The description of the proceedings.
proceedings.editstep.shortdescription.add.value.label=Description
proceedings.editstep.shortdescription.edit.label=Edit
proceedings.editstep.shortdescription.edit.cancel=Cancel
proceedings.editstep.shortdescription.edit.submit=Save
proceedings.editstep.shortdescription.edit.title=Edit localized description
proceedings.editstep.shortdescription.edit.value.help=The description of the proceedings.
proceedings.editstep.shortdescription.edit.value.label=Description
proceedings.editstep.shortdescription.remove.label=Remove
proceedings.editstep.shortdescription.remove.cancel=Cancel
proceedings.editstep.shortdescription.remove.submit=Remove
proceedings.editstep.shortdescription.remove.text=Are you sure to remove the following localized description:
proceedings.editstep.shortdescription.remove.title=Confirm removal of localized description
proceedings.editstep.shortdescription.title=Description
proceedings.editstep.properties.edit.submit=Save

View File

@ -164,3 +164,92 @@ collectedvolume.createform.yearofpublication.label=Erscheinungsjahr
createstep.title.error.missing=Es wurde kein Titel f\u00fcr den Sammelband angegeben.
authors.order.save=Sortierung speichern
collectedvolume.editstep.authors.move=Autoren sortieren
proceedings.label=Tagungsband
proceedings.description=Tagungsband einer Konferenz oder \u00e4hnlichen Veranstaltung.
proceedings.editstep.description=Tagungsband einer Konferenz oder \u00e4hnlichen Veranstaltung.
proceedings.editstep.label=Tagungsband
proceedings.createform.title=Neuen Tagungsband anlegen
proceedings.createform.title.help=Der Titel des Tagungsbandes.
proceedings.createform.title.label=Titel
proceedings.createform.yearofpublication.help=Das Erscheinungsjahr des Tagungsbandes.
proceedings.createform.yearofpublication.label=Erscheinungsjahr
proceedings.createform.shortdescription.help=Eine kurze Beschreibung des Tagungsbandes.
proceedings.createform.shortdescription.label=Beschreibung
proceedings.editstep.header=Tagungsband {0} bearbeiten
proceedings.editstep.errors.author_not_found=Es wurde keine Person f\u00fcr den Identifier {0} gefunden.
proceedings.editstep.errors.authorship_not_found=Autorenschaft mit ID {0} wurde nicht gefunden.
proceedings.editstep.errors.publisher_not_found=Es wurde keine Verlag mit dem Identifier {0} gefunden.
proceedings.editstep.errors.organizer_not_found=Es wurde keine Organisation mit dem Identifier {0} gefunden.
proceedings.editstep.errors.authors.sort.general=Sortieren der Autoren des Tagungsbandes fehlgeschlagen.
proceedings.editstep.errors.authors.sort.save=Fehler beim Speichern der Sortierung der Autoren.
proceedings.editstep.authors=Autoren
proceedings.editstep.authors.add.label=Autor hinzuf\u00fcgen
proceedings.editstep.authors.add.dialog.title=Autor hinzuf\u00fcgen
proceedings.editstep.authors.editor.label=Herausgeber?
proceedings.editstep.authors.table.name=Name
proceedings.editstep.authors.table.editor=Herausgeber?
proceedings.editstep.authors.table.actions=Aktionen
proceedings.editstep.authors.move=Autor verschieben
proceedings.editstep.authors.table.editor.yes=Ja
proceedings.editstep.authors.table.editor.no=Nein
proceedings.editstep.authors.edit.label=Bearbeiten
proceedings.editstep.authors.editdialog.title=Autorenschaft von {0} bearbeiten
proceedings.editstep.authors.editdialog.cancel=Abbrechen
proceedings.editstep.authors.editdialog.editor.label=Herausgeber?
proceedings.editstep.authors.editdialog.submit=Speichern
proceedings.editstep.authors.remove.label=Autor entfernen
proceedings.editstep.authors.remove.cancel=Abbrechen
proceedings.editstep.authors.remove.confirm=Entfernen
proceedings.editstep.authors.remove.title=Entfernen des Autors {0} best\u00e4tigen
proceedings.editstep.authors.remove.text=Sind Sie sicher, dass Sie den Autor {0} von dieser Publikation entfernen wollen?
proceedings.editstep.publisher=Verlag
proceedings.editstep.publisher.set.label=Verlag ausw\u00e4hlen
proceedings.editstep.publisher.select.dialog.title=Verlag ausw\u00e4hlen
proceedings.editstep.publisher.remove.label=Verlag entfernen
proceedings.editstep.publisher.cancel=Abbrechen
proceedings.editstep.publisher.confirm=Entfernen
proceedings.editstep.publisher.title=Entfernen des Verlages best\u00e4tigen
proceedings.editstep.publisher.message=Sind Sie sicher, dass Sie den Verlag von diesem Tagungsband entfernen wollen?
proceedings.editstep.properties=Eigenschaften
proceedings.editstep.properties.edit=Bearbeiten
proceedings.editstep.properties.edit.title=Eigenschaften bearbeiten
proceedings.editstep.properties.edit.close=Abbrechen
proceedings.editstep.properties.yearofpublication.help=Das Erscheinungsjahr des Tagungsbandes.
proceedings.editstep.properties.yearofpublication.label=Erscheinungsjahr
proceedings.editstep.properties.volume.help=Der Band.
proceedings.editstep.properties.volume.label=Band
proceedings.editstep.properties.numberofvolumes.help=Die Anzahl der B\u00e4nde der Publikation.
proceedings.editstep.properties.numberofvolumes.label=Anzahl der B\u00e4nde
proceedings.editstep.properties.nameofconference.help=Der Name der Konferenz.
proceedings.editstep.properties.nameofconference.label=Name der Konferenz
proceedings.editstep.properties.placeofconference.help=Der Ort der Konferenz.
proceedings.editstep.properties.placeofconference.label=Tagungsort
proceedings.editstep.organizer=Veranstalter
proceedings.editstep.organizer.set.label=Veranstalter ausw\u00e4hlen
proceedings.editstep.organizer.select.dialog.title=Veranstalter ausw\u00e4hlen
proceedings.editstep.organizer.remove.label=Veranstalter entfernen
proceedings.editstep.organizer.cancel=Abbrechen
proceedings.editstep.organizer.confirm=Entfernen
proceedings.editstep.organizer.title=Entfernen des Veranstalter best\u00e4tigen
proceedings.editstep.organizer.message=Sind Sie sicher, dass Sie den Veranstalter von diesem Tagungsband entfernen wollen?
proceedings.editstep.shortdescription.add.label=Hinzuf\u00fcgen
proceedings.editstep.shortdescription.add.cancel=Abbrechen
proceedings.editstep.shortdescription.add.locale.help=Die Sprache in der die Kurzbeschreibung hinzugef\u00fcgt wird.
proceedings.editstep.shortdescription.add.locale.label=Sprache
proceedings.editstep.shortdescription.add.submit=Hinzuf\u00fcgen
proceedings.editstep.shortdescription.add.title=Lokalisierte Beschreibung hinzuf\u00fcgen
proceedings.editstep.shortdescription.add.value.help=Beschreibung des Tagungsbandes.
proceedings.editstep.shortdescription.add.value.label=Beschreibung
proceedings.editstep.shortdescription.edit.label=Bearbeiten
proceedings.editstep.shortdescription.edit.cancel=Abbrechen
proceedings.editstep.shortdescription.edit.submit=Speichern
proceedings.editstep.shortdescription.edit.title=Lokalisierte Beschreibung bearbeiten
proceedings.editstep.shortdescription.edit.value.help=Beschreibung des Tagungsbandes.
proceedings.editstep.shortdescription.edit.value.label=Beschreibung
proceedings.editstep.shortdescription.remove.label=Entfernen
proceedings.editstep.shortdescription.remove.cancel=Abbrechen
proceedings.editstep.shortdescription.remove.submit=Entfernen
proceedings.editstep.shortdescription.remove.text=Sind Sie sicher, dass Sie die folgende lokalisierte Beschreibung entfernen wollen:
proceedings.editstep.shortdescription.remove.title=Entfernen einer lokalisierten Beschreibung best\u00e4tigen
proceedings.editstep.shortdescription.title=Beschreibung
proceedings.editstep.properties.edit.submit=Speichern

View File

@ -0,0 +1,148 @@
import Sortable, { SortableEvent } from "sortablejs";
let authorsSortable: Sortable;
document.addEventListener("DOMContentLoaded", function(event) {
const authorsTable = document.querySelector("#authors-table tbody");
if (authorsTable) {
authorsSortable = initAuthorsTable(authorsTable as HTMLElement);
}
const saveOrderButton = document.querySelectorAll(
".authors-save-order-button"
);
for (let i = 0; i < saveOrderButton.length; i++) {
saveOrderButton[i].addEventListener("click", saveOrder);
}
});
function initAuthorsTable(authorsTable: HTMLElement): Sortable {
return new Sortable(authorsTable, {
animation: 150,
group: "proceedings-author",
handle: ".cms-sort-handle",
onEnd: enableSaveButton,
});
}
function enableSaveButton(event: SortableEvent) {
const saveOrderButtons = document.querySelectorAll(
".authors-save-order-button"
);
for (let i = 0; i < saveOrderButtons.length; i++) {
const saveOrderButton: HTMLButtonElement = saveOrderButtons[
i
] as HTMLButtonElement;
saveOrderButton.disabled = false;
}
}
function saveOrder() {
const authorsTable = document.querySelector("#authors-table");
if (!authorsTable) {
showGeneralError();
throw Error("authors-table not found");
}
const saveUrl = authorsTable.getAttribute("data-saveUrl");
if (!saveUrl) {
showGeneralError();
throw Error("data-saveUrl on authors-table is missing or empty.");
}
const saveOrderButtons = document.querySelectorAll(
".authors-save-order-button"
);
for (let i = 0; i < saveOrderButtons.length; i++) {
const saveOrderButton: HTMLButtonElement = saveOrderButtons[
i
] as HTMLButtonElement;
saveOrderButton.disabled = true;
const saveIcon = saveOrderButton.querySelector(".save-icon");
const spinner = saveOrderButton.querySelector(".save-spinner");
saveIcon?.classList.toggle("d-none");
spinner?.classList.toggle("d-none");
}
const headers = new Headers();
headers.append("Content-Type", "application/json");
fetch(saveUrl, {
credentials: "include",
body: JSON.stringify(authorsSortable.toArray()),
headers,
method: "POST",
})
.then((response) => {
if (response.ok) {
for (let i = 0; i < saveOrderButtons.length; i++) {
const saveOrderButton: HTMLButtonElement = saveOrderButtons[
i
] as HTMLButtonElement;
saveOrderButton.disabled = true;
const saveIcon =
saveOrderButton.querySelector(".save-icon");
const spinner =
saveOrderButton.querySelector(".save-spinner");
saveIcon?.classList.toggle("d-none");
spinner?.classList.toggle("d-none");
}
} else {
showSaveError();
for (let i = 0; i < saveOrderButtons.length; i++) {
const saveOrderButton: HTMLButtonElement = saveOrderButtons[
i
] as HTMLButtonElement;
saveOrderButton.disabled = true;
const saveIcon =
saveOrderButton.querySelector(".save-icon");
const spinner =
saveOrderButton.querySelector(".save-spinner");
saveIcon?.classList.toggle("d-none");
spinner?.classList.toggle("d-none");
}
throw Error(
`Failed to save authors order. Response status: ${response.status}, statusText: ${response.statusText}`
);
}
})
.catch((error) => {
showSaveError();
for (let i = 0; i < saveOrderButtons.length; i++) {
const saveOrderButton: HTMLButtonElement = saveOrderButtons[
i
] as HTMLButtonElement;
saveOrderButton.disabled = true;
const saveIcon = saveOrderButton.querySelector(".save-icon");
const spinner = saveOrderButton.querySelector(".save-spinner");
saveIcon?.classList.toggle("d-none");
spinner?.classList.toggle("d-none");
}
throw new Error(`Failed to save authors order: ${error}`);
});
}
function showGeneralError(): void {
const alertTemplate = document.querySelector(
"#authors-sort-error-general"
) as HTMLTemplateElement;
const alert = alertTemplate.content.cloneNode(true) as Element;
const container = document.querySelector("#messages");
if (container) {
container.appendChild(alert);
}
}
function showSaveError(): void {
const alertTemplate = document.querySelector(
"#authors-sort-error-save"
) as HTMLTemplateElement;
const alert = alertTemplate.content.cloneNode(true) as Element;
const container = document.querySelector("#messages");
if (container) {
container.appendChild(alert);
}
}

View File

@ -5,7 +5,8 @@ module.exports = {
chunkIds: false
},
entry: {
"collectedvolume-asset-authors": "./src/main/typescript/collectedvolume-asset-authors.ts"
"collectedvolume-asset-authors": "./src/main/typescript/collectedvolume-asset-authors.ts",
"proceedings-asset-authors": "./src/main/typescript/proceedings-asset-authors.ts"
},
output: {
filename: "[name].js",