Some more bugfixes for event.
parent
84c2f9a858
commit
dbbb57b1ad
|
|
@ -52,7 +52,7 @@ import javax.ws.rs.PathParam;
|
|||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@RequestScoped
|
||||
@Path(MvcAuthoringSteps.PATH_PREFIX + "@event-info")
|
||||
@Path(MvcAuthoringSteps.PATH_PREFIX + "event-info")
|
||||
@Controller
|
||||
@MvcAuthoringStepDef(
|
||||
bundle = EventStepsConstants.BUNDLE,
|
||||
|
|
@ -277,7 +277,7 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
|
||||
if (itemPermissionChecker.canEditItem(getEvent())) {
|
||||
final Locale locale = new Locale(localeParam);
|
||||
getEvent().getText().removeValue(locale);
|
||||
getEvent().getEventDate().removeValue(locale);
|
||||
itemRepo.save(getEvent());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
|
|
@ -510,7 +510,7 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
);
|
||||
}
|
||||
final Locale locale = new Locale(localeParam);
|
||||
getEvent().getText().putValue(locale, value);
|
||||
getEvent().getMainContributor().putValue(locale, value);
|
||||
itemRepo.save(getEvent());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
|
|
@ -557,9 +557,9 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
}
|
||||
|
||||
@POST
|
||||
@Path("/main-contributor/add")
|
||||
@Path("/main-contributor/edit/{locale}")
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String addMainContributorValue(
|
||||
public String editMainContributorValue(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
final String sectionIdentifier,
|
||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||
|
|
@ -675,7 +675,7 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
);
|
||||
}
|
||||
final Locale locale = new Locale(localeParam);
|
||||
getEvent().getEventDate().putValue(locale, value);
|
||||
getEvent().getEventType().putValue(locale, value);
|
||||
itemRepo.save(getEvent());
|
||||
|
||||
return buildRedirectPathForStep();
|
||||
|
|
@ -689,7 +689,7 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
}
|
||||
|
||||
@GET
|
||||
@Path("/eventdate/edit/{locale}")
|
||||
@Path("/eventtype/edit/{locale}")
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String editEventTypeValue(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
|
|
@ -720,7 +720,7 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
}
|
||||
|
||||
@POST
|
||||
@Path("/eventdate/edit/{locale}")
|
||||
@Path("/eventtype/edit/{locale}")
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String editEventTypeValue(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
|
|
@ -754,7 +754,7 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
}
|
||||
|
||||
@POST
|
||||
@Path("/eventdate/remove/{locale}")
|
||||
@Path("/eventtype/remove/{locale}")
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String removeEventTypeValue(
|
||||
@PathParam(MvcAuthoringSteps.SECTION_IDENTIFIER_PATH_PARAM)
|
||||
|
|
@ -845,7 +845,7 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
);
|
||||
locationModel.setVariants(
|
||||
getEvent()
|
||||
.getEventDate()
|
||||
.getLocation()
|
||||
.getValues()
|
||||
.entrySet()
|
||||
.stream()
|
||||
|
|
@ -902,36 +902,36 @@ public class MvcEventInfoStep extends AbstractMvcAuthoringStep {
|
|||
eventTypeModel.setCanEdit(canEdit);
|
||||
eventTypeModel.setEventTypeValues(
|
||||
getEvent()
|
||||
.getEventType()
|
||||
.getValues()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.collect(
|
||||
Collectors.toMap(
|
||||
entry -> entry.getKey().toString(),
|
||||
Map.Entry::getValue
|
||||
.getEventType()
|
||||
.getValues()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.collect(
|
||||
Collectors.toMap(
|
||||
entry -> entry.getKey().toString(),
|
||||
Map.Entry::getValue
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
eventTypeModel.setVariants(
|
||||
getEvent()
|
||||
.getEventType()
|
||||
.getValues()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.map(CmsEditorUtil::buildVariantRow)
|
||||
.collect(Collectors.toList())
|
||||
.getEventType()
|
||||
.getValues()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.map(CmsEditorUtil::buildVariantRow)
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
final Set<Locale> eventTypeLocales = getEvent()
|
||||
.getEventType()
|
||||
.getAvailableLocales();
|
||||
eventTypeModel.setUnusedLocales(
|
||||
globalizationHelper
|
||||
.getAvailableLocales()
|
||||
.stream()
|
||||
.filter(locale -> !eventTypeLocales.contains(locale))
|
||||
.map(Locale::toString)
|
||||
.collect(Collectors.toList())
|
||||
.getAvailableLocales()
|
||||
.stream()
|
||||
.filter(locale -> !eventTypeLocales.contains(locale))
|
||||
.map(Locale::toString)
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public class MvcEventInfoStepResources {
|
|||
|
||||
// Location
|
||||
@GET
|
||||
@Path("/eventdate/wordcount/{locale}")
|
||||
@Path("/location/wordcount/{locale}")
|
||||
@Produces(MediaType.TEXT_HTML)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String getLocationWordCount(
|
||||
|
|
@ -181,7 +181,7 @@ public class MvcEventInfoStepResources {
|
|||
}
|
||||
|
||||
@GET
|
||||
@Path("/eventdate/{locale}")
|
||||
@Path("/location/{locale}")
|
||||
@Produces(MediaType.TEXT_HTML)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String viewLocationValue(
|
||||
|
|
@ -217,7 +217,7 @@ public class MvcEventInfoStepResources {
|
|||
|
||||
// Main Contributor
|
||||
@GET
|
||||
@Path("/eventdate/wordcount/{locale}")
|
||||
@Path("/main-contributor/wordcount/{locale}")
|
||||
@Produces(MediaType.TEXT_HTML)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String getMainContributorWordCount(
|
||||
|
|
@ -259,7 +259,7 @@ public class MvcEventInfoStepResources {
|
|||
}
|
||||
|
||||
@GET
|
||||
@Path("/eventdate/{locale}")
|
||||
@Path("/main-contributor/{locale}")
|
||||
@Produces(MediaType.TEXT_HTML)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String viewMainContributorValue(
|
||||
|
|
@ -295,7 +295,7 @@ public class MvcEventInfoStepResources {
|
|||
|
||||
// Event Type
|
||||
@GET
|
||||
@Path("/eventdate/wordcount/{locale}")
|
||||
@Path("/eventtype/wordcount/{locale}")
|
||||
@Produces(MediaType.TEXT_HTML)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String getEventTypeWordCount(
|
||||
|
|
@ -337,7 +337,7 @@ public class MvcEventInfoStepResources {
|
|||
}
|
||||
|
||||
@GET
|
||||
@Path("/eventdate/{locale}")
|
||||
@Path("/eventtype/{locale}")
|
||||
@Produces(MediaType.TEXT_HTML)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public String viewEventTypeValue(
|
||||
|
|
|
|||
|
|
@ -189,6 +189,13 @@
|
|||
shortDescription="Info about the available variants. Must be a List of CmsEditorLocaleVariantRow objects."
|
||||
type="java.util.List"
|
||||
/>
|
||||
<cc:attribute
|
||||
name="variantsId"
|
||||
default=""
|
||||
required="false"
|
||||
shortDescription="ID for the variants component. Required if multiple instances of this component are used on the same page."
|
||||
type="String"
|
||||
/>
|
||||
<cc:attribute
|
||||
name="viewPageUrl"
|
||||
required="true"
|
||||
|
|
@ -227,7 +234,7 @@
|
|||
<div class="text-right">
|
||||
<button
|
||||
class="btn btn-secondary"
|
||||
data-target="##{cc.attrs.editorId}-dialog"
|
||||
data-target="##{cc.attrs.variantsId}-dialog"
|
||||
data-toggle="modal"
|
||||
type="button"
|
||||
>
|
||||
|
|
@ -236,10 +243,10 @@
|
|||
</button>
|
||||
</div>
|
||||
<div
|
||||
aria-labelledby="#{cc.attrs.editorId}-dialog-title"
|
||||
aria-labelledby="#{cc.attrs.variantsId}-dialog-title"
|
||||
aria-hidden="true"
|
||||
class="modal fade"
|
||||
id="#{cc.attrs.editorId}-dialog"
|
||||
id="#{cc.attrs.variantsId}-dialog"
|
||||
tabindex="-1"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
|
|
@ -255,7 +262,7 @@
|
|||
>
|
||||
<h2
|
||||
class="modal-title"
|
||||
id="#{cc.attrs.editorId}-dialog-title"
|
||||
id="#{cc.attrs.variantsId}-dialog-title"
|
||||
>
|
||||
#{cc.attrs.addDialogTitle}
|
||||
</h2>
|
||||
|
|
@ -265,7 +272,7 @@
|
|||
>
|
||||
<h3
|
||||
class="modal-title"
|
||||
id="#{cc.attrs.editorId}-dialog-title"
|
||||
id="#{cc.attrs.variantsId}-dialog-title"
|
||||
>
|
||||
#{cc.attrs.addDialogTitle}
|
||||
</h3>
|
||||
|
|
@ -275,7 +282,7 @@
|
|||
>
|
||||
<h4
|
||||
class="modal-title"
|
||||
id="#{cc.attrs.editorId}-dialog-title"
|
||||
id="#{cc.attrs.variantsId}-dialog-title"
|
||||
>
|
||||
#{cc.attrs.addDialogTitle}
|
||||
</h4>
|
||||
|
|
@ -285,7 +292,7 @@
|
|||
>
|
||||
<h5
|
||||
class="modal-title"
|
||||
id="#{cc.attrs.editorId}-dialog-title"
|
||||
id="#{cc.attrs.variantsId}-dialog-title"
|
||||
>
|
||||
#{cc.attrs.addDialogTitle}
|
||||
</h5>
|
||||
|
|
@ -295,7 +302,7 @@
|
|||
>
|
||||
<h6
|
||||
class="modal-title"
|
||||
id="#{cc.attrs.editorId}-dialog-title"
|
||||
id="#{cc.attrs.variantsId}-dialog-title"
|
||||
>
|
||||
#{cc.attrs.addDialogTitle}
|
||||
</h6>
|
||||
|
|
@ -320,13 +327,13 @@
|
|||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label
|
||||
for="#{cc.attrs.editorId}-form-locale-select"
|
||||
for="#{cc.attrs.variantsId}-form-locale-select"
|
||||
>
|
||||
#{cc.attrs.addDialogLocaleSelectLabel}
|
||||
</label>
|
||||
<select
|
||||
aria-describedby="#{cc.attrs.editorId}-form-locale-select-help"
|
||||
id="#{cc.attrs.editorId}-form-locale-select"
|
||||
aria-describedby="#{cc.attrs.variantsId}-form-locale-select-help"
|
||||
id="#{cc.attrs.variantsId}-form-locale-select"
|
||||
name="locale"
|
||||
required="true"
|
||||
>
|
||||
|
|
@ -341,7 +348,7 @@
|
|||
</select>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
id="#{cc.attrs.editorId}-form-locale-select-help"
|
||||
id="#{cc.attrs.variantsId}-form-locale-select-help"
|
||||
>
|
||||
#{cc.attrs.addDialogLocaleSelectHelp}
|
||||
</small>
|
||||
|
|
@ -423,7 +430,7 @@
|
|||
</a>
|
||||
<button
|
||||
class="btn btn-danger"
|
||||
data-target="##{cc.attrs.editorId}-#{variant.locale}-remove-dialog"
|
||||
data-target="##{cc.attrs.variantsId}-#{variant.locale}-remove-dialog"
|
||||
data-toggle="modal"
|
||||
type="button"
|
||||
>
|
||||
|
|
@ -435,11 +442,11 @@
|
|||
</span>
|
||||
</button>
|
||||
<div
|
||||
aria-describedby="#{cc.attrs.editorId}-#{variant.locale}-remove-dialog-title"
|
||||
aria-describedby="#{cc.attrs.variantsId}-#{variant.locale}-remove-dialog-title"
|
||||
aria-hidden="true"
|
||||
class="modal fade"
|
||||
data-backdrop="static"
|
||||
id="#{cc.attrs.editorId}-#{variant.locale}-remove-dialog"
|
||||
id="#{cc.attrs.variantsId}-#{variant.locale}-remove-dialog"
|
||||
tabindex="-1"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<librecms:cmsEditorVariants
|
||||
addButtonLabel="#{CmsEventMessageBundle['eventdate.editor.add_variant']}"
|
||||
addDialogLocaleSelectHelp="#{CmsAdminMessages['text.editor.add.locale.help']}"
|
||||
addDialogLocaleSelectHelp="#{CmsEventMessageBundle['text.editor.add.locale.help']}"
|
||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/eventdate/add"
|
||||
canEdit="#{CmsSelectedDocumentModel.canEdit}"
|
||||
editorPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/eventdate/edit"
|
||||
|
|
@ -26,12 +26,13 @@
|
|||
title="#{CmsEventMessageBundle['eventdate.editor.header']}"
|
||||
unusedLocales="#{CmsEventInfoStepEventDate.unusedLocales}"
|
||||
variants="#{CmsEventInfoStepEventDate.variants}"
|
||||
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/view"
|
||||
variantsId="eventdate"
|
||||
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/eventdate/view"
|
||||
/>
|
||||
|
||||
<librecms:cmsEditorVariants
|
||||
addButtonLabel="#{CmsEventMessageBundle['location.editor.add_variant']}"
|
||||
addDialogLocaleSelectHelp="#{CmsAdminMessages['text.editor.add.locale.help']}"
|
||||
addDialogLocaleSelectHelp="#{CmsEventMessageBundle['text.editor.add.locale.help']}"
|
||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/location/add"
|
||||
canEdit="#{CmsSelectedDocumentModel.canEdit}"
|
||||
editorPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/location/edit"
|
||||
|
|
@ -41,12 +42,13 @@
|
|||
title="#{CmsEventMessageBundle['location.editor.header']}"
|
||||
unusedLocales="#{CmsEventInfoStepLocation.unusedLocales}"
|
||||
variants="#{CmsEventInfoStepLocation.variants}"
|
||||
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/view"
|
||||
variantsId="location"
|
||||
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/location/view"
|
||||
/>
|
||||
|
||||
<librecms:cmsEditorVariants
|
||||
addButtonLabel="#{CmsEventMessageBundle['main_contributor.editor.add_variant']}"
|
||||
addDialogLocaleSelectHelp="#{CmsAdminMessages['text.editor.add.locale.help']}"
|
||||
addDialogLocaleSelectHelp="#{CmsEventMessageBundle['text.editor.add.locale.help']}"
|
||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/main-contributor/add"
|
||||
canEdit="#{CmsSelectedDocumentModel.canEdit}"
|
||||
editorPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/main-contributor/edit"
|
||||
|
|
@ -56,12 +58,13 @@
|
|||
title="#{CmsEventMessageBundle['main_contributor.editor.header']}"
|
||||
unusedLocales="#{CmsEventInfoStepMainContributor.unusedLocales}"
|
||||
variants="#{CmsEventInfoStepMainContributor.variants}"
|
||||
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/view"
|
||||
variantsId="maincontributor"
|
||||
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/main-contributor/view"
|
||||
/>
|
||||
|
||||
<librecms:cmsEditorVariants
|
||||
addButtonLabel="#{CmsEventMessageBundle['eventtype.editor.add_variant']}"
|
||||
addDialogLocaleSelectHelp="#{CmsAdminMessages['text.editor.add.locale.help']}"
|
||||
addDialogLocaleSelectHelp="#{CmsEventMessageBundle['text.editor.add.locale.help']}"
|
||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/eventtype/add"
|
||||
canEdit="#{CmsSelectedDocumentModel.canEdit}"
|
||||
editorPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/eventtype/edit"
|
||||
|
|
@ -71,7 +74,8 @@
|
|||
title="#{CmsEventMessageBundle['eventtype.editor.header']}"
|
||||
unusedLocales="#{CmsEventInfoStepEventType.unusedLocales}"
|
||||
variants="#{CmsEventInfoStepEventType.variants}"
|
||||
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/view"
|
||||
variantsId="eventtype"
|
||||
viewPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info/eventtype/view"
|
||||
/>
|
||||
|
||||
</ui:define>
|
||||
|
|
|
|||
|
|
@ -8,23 +8,23 @@
|
|||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
||||
|
||||
<ui:define name="authoringStep">
|
||||
<div class="d-flex">
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-secondary btn-sm align-self-center mr-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info">
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info">
|
||||
<bootstrap:svgIcon icon="caret-left-fill" />
|
||||
<span class="sr-only">#{CmsEventMessageBundle['eventinfo_step.back']}</span>
|
||||
</a>
|
||||
|
||||
|
||||
<h2>#{CmsEventMessageBundle.getMessage('eventinfo_step.eventdate.header.edit',[CmsSelectedDocumentModel.itemName, CmsEventInfoStepEventDate.selectedLocale])}</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<c:if test="#{CmsEventInfoStepEventDate.canEdit}">
|
||||
<librecms:cmsEditor
|
||||
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info"
|
||||
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info"
|
||||
baseUrl="#{mvc.basePath}"
|
||||
canEdit="#{CmsEventInfoStepEventDate.canEdit}"
|
||||
contentSection="#{ContentSectionModel.sectionName}"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info/eventdate/edit"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info/eventdate/edit"
|
||||
editorId="cms-event-eventdate-editor"
|
||||
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||
selectedLocale="#{CmsEventInfoStepEventDate.selectedLocale}"
|
||||
|
|
@ -32,13 +32,13 @@
|
|||
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info-resources/eventdate"
|
||||
/>
|
||||
</c:if>
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/article-text-step.js"></script>
|
||||
|
||||
</ui:define>
|
||||
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/event-info-step-eventdate.js"></script>
|
||||
</ui:define>
|
||||
|
||||
|
||||
</ui:composition>
|
||||
|
||||
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<ui:define name="authoringStep">
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-secondary btn-sm align-self-center mr-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info">
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info">
|
||||
<bootstrap:svgIcon icon="caret-left-fill" />
|
||||
<span class="sr-only">#{CmsEventMessageBundle['eventinfo_step.back']}</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -8,23 +8,23 @@
|
|||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
||||
|
||||
<ui:define name="authoringStep">
|
||||
<div class="d-flex">
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-secondary btn-sm align-self-center mr-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info">
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info">
|
||||
<bootstrap:svgIcon icon="caret-left-fill" />
|
||||
<span class="sr-only">#{CmsEventMessageBundle['eventinfo_step.back']}</span>
|
||||
</a>
|
||||
|
||||
|
||||
<h2>#{CmsEventMessageBundle.getMessage('eventinfo_step.eventtype.header.edit',[CmsSelectedDocumentModel.itemName, CmsEventInfoStepEventType.selectedLocale])}</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<c:if test="#{CmsEventInfoStepEventType.canEdit}">
|
||||
<librecms:cmsEditor
|
||||
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info"
|
||||
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info"
|
||||
baseUrl="#{mvc.basePath}"
|
||||
canEdit="#{CmsEventInfoStepEventType.canEdit}"
|
||||
contentSection="#{ContentSectionModel.sectionName}"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info/eventtype/edit"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info/eventtype/edit"
|
||||
editorId="cms-event-eventtype-editor"
|
||||
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||
selectedLocale="#{CmsEventInfoStepEventType.selectedLocale}"
|
||||
|
|
@ -32,14 +32,14 @@
|
|||
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info-resources/eventtype"
|
||||
/>
|
||||
</c:if>
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/article-text-step.js"></script>
|
||||
|
||||
</ui:define>
|
||||
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/event-info-step-eventtype.js"></script>
|
||||
</ui:define>
|
||||
|
||||
|
||||
</ui:composition>
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<ui:define name="authoringStep">
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-secondary btn-sm align-self-center mr-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info">
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info">
|
||||
<bootstrap:svgIcon icon="caret-left-fill" />
|
||||
<span class="sr-only">#{CmsEventMessageBundle['eventinfo_step.back']}</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -8,23 +8,23 @@
|
|||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
||||
|
||||
<ui:define name="authoringStep">
|
||||
<div class="d-flex">
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-secondary btn-sm align-self-center mr-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info">
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info">
|
||||
<bootstrap:svgIcon icon="caret-left-fill" />
|
||||
<span class="sr-only">#{CmsEventMessageBundle['eventinfo_step.back']}</span>
|
||||
</a>
|
||||
|
||||
|
||||
<h2>#{CmsEventMessageBundle.getMessage('eventinfo_step.location.header.edit',[CmsSelectedDocumentModel.itemName, CmsEventInfoStepLocation.selectedLocale])}</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<c:if test="#{CmsEventInfoStepLocation.canEdit}">
|
||||
<librecms:cmsEditor
|
||||
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info"
|
||||
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info"
|
||||
baseUrl="#{mvc.basePath}"
|
||||
canEdit="#{CmsEventInfoStepLocation.canEdit}"
|
||||
contentSection="#{ContentSectionModel.sectionName}"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info/location/edit"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info/location/edit"
|
||||
editorId="cms-event-location-editor"
|
||||
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||
selectedLocale="#{CmsEventInfoStepLocation.selectedLocale}"
|
||||
|
|
@ -32,14 +32,14 @@
|
|||
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info-resources/location"
|
||||
/>
|
||||
</c:if>
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/article-text-step.js"></script>
|
||||
|
||||
</ui:define>
|
||||
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/event-info-step-location.js"></script>
|
||||
</ui:define>
|
||||
|
||||
|
||||
</ui:composition>
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<ui:define name="authoringStep">
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-secondary btn-sm align-self-center mr-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info">
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info">
|
||||
<bootstrap:svgIcon icon="caret-left-fill" />
|
||||
<span class="sr-only">#{CmsEventMessageBundle['eventinfo_step.back']}</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -8,23 +8,23 @@
|
|||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
||||
|
||||
<ui:define name="authoringStep">
|
||||
<div class="d-flex">
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-secondary btn-sm align-self-center mr-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info">
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info">
|
||||
<bootstrap:svgIcon icon="caret-left-fill" />
|
||||
<span class="sr-only">#{CmsEventMessageBundle['eventinfo_step.back']}</span>
|
||||
</a>
|
||||
|
||||
|
||||
<h2>#{CmsEventMessageBundle.getMessage('eventinfo_step.main_contributor.header.edit',[CmsSelectedDocumentModel.itemName, CmsEventInfoStepMainContributor.selectedLocale])}</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<c:if test="#{CmsEventInfoStepMainContributor.canEdit}">
|
||||
<librecms:cmsEditor
|
||||
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info"
|
||||
backUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info"
|
||||
baseUrl="#{mvc.basePath}"
|
||||
canEdit="#{CmsEventInfoStepMainContributor.canEdit}"
|
||||
contentSection="#{ContentSectionModel.sectionName}"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info/main-contributor/edit"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info/main-contributor/edit"
|
||||
editorId="cms-event-maincontributor-editor"
|
||||
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||
selectedLocale="#{CmsEventInfoStepMainContributor.selectedLocale}"
|
||||
|
|
@ -32,14 +32,14 @@
|
|||
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@event-info-resources/main-contributor"
|
||||
/>
|
||||
</c:if>
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/article-text-step.js"></script>
|
||||
|
||||
</ui:define>
|
||||
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/event-info-step-maincontributor.js"></script>
|
||||
</ui:define>
|
||||
|
||||
|
||||
</ui:composition>
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<ui:define name="authoringStep">
|
||||
<div class="d-flex">
|
||||
<a class="btn btn-secondary btn-sm align-self-center mr-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemTitle}/@event-info">
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemName}/@event-info">
|
||||
<bootstrap:svgIcon icon="caret-left-fill" />
|
||||
<span class="sr-only">#{CmsEventMessageBundle['eventinfo_step.back']}</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -114,3 +114,4 @@ basicproperties.eventdatetime.edit.dialog.startdate.label=Start
|
|||
basicproperties.eventdatetime.edit.dialog.enddate.help=The end of the event (date and time)
|
||||
basicproperties.eventdatetime.edit.dialog.enddate.label=End
|
||||
basicproperties.eventdatetime.edit.dialog.submit=Submit
|
||||
text.editor.add.locale.help=The language to add.
|
||||
|
|
|
|||
|
|
@ -114,3 +114,4 @@ basicproperties.eventdatetime.edit.dialog.startdate.label=Beginn
|
|||
basicproperties.eventdatetime.edit.dialog.enddate.help=Ende der Veranstaltung (Datum und Uhrzeit)
|
||||
basicproperties.eventdatetime.edit.dialog.enddate.label=Ende
|
||||
basicproperties.eventdatetime.edit.dialog.submit=Speichern
|
||||
text.editor.add.locale.help=Die Sprache, die hinzugef\u00fcgt werden soll.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
import { CmsEditorBuilder, CmsEditor } from "./cms-editor";
|
||||
|
||||
document.addEventListener("DOMContentLoaded", (event) => {
|
||||
const editorElem = document.querySelector("#cms-event-eventdate-editor");
|
||||
|
||||
if (editorElem) {
|
||||
const saveUrl = editorElem.getAttribute("data-save-url");
|
||||
const variantUrl = editorElem.getAttribute("data-variant-url");
|
||||
|
||||
if (!saveUrl) {
|
||||
console.error("saveUrl is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!variantUrl) {
|
||||
console.error("variantUrl is null");
|
||||
return;
|
||||
}
|
||||
|
||||
const builder = new CmsEditorBuilder(
|
||||
editorElem as HTMLElement,
|
||||
saveUrl,
|
||||
variantUrl
|
||||
);
|
||||
|
||||
builder
|
||||
.buildEditor()
|
||||
.then((editor) => {
|
||||
const submitButton = document.querySelector(
|
||||
".cms-editor-save-button"
|
||||
);
|
||||
|
||||
if (submitButton) {
|
||||
submitButton.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
console.log("HTML output of editor: ");
|
||||
console.log(editor.getEditor().getHTML());
|
||||
});
|
||||
} else {
|
||||
console.error("Save button not found.")
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
console.trace(error);
|
||||
});
|
||||
} else {
|
||||
console.error("Editor element not found.")
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
import { CmsEditorBuilder, CmsEditor } from "./cms-editor";
|
||||
|
||||
document.addEventListener("DOMContentLoaded", (event) => {
|
||||
const editorElem = document.querySelector("#cms-event-eventtype-editor");
|
||||
|
||||
if (editorElem) {
|
||||
const saveUrl = editorElem.getAttribute("data-save-url");
|
||||
const variantUrl = editorElem.getAttribute("data-variant-url");
|
||||
|
||||
if (!saveUrl) {
|
||||
console.error("saveUrl is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!variantUrl) {
|
||||
console.error("variantUrl is null");
|
||||
return;
|
||||
}
|
||||
|
||||
const builder = new CmsEditorBuilder(
|
||||
editorElem as HTMLElement,
|
||||
saveUrl,
|
||||
variantUrl
|
||||
);
|
||||
|
||||
builder
|
||||
.buildEditor()
|
||||
.then((editor) => {
|
||||
const submitButton = document.querySelector(
|
||||
".cms-editor-save-button"
|
||||
);
|
||||
|
||||
if (submitButton) {
|
||||
submitButton.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
console.log("HTML output of editor: ");
|
||||
console.log(editor.getEditor().getHTML());
|
||||
});
|
||||
} else {
|
||||
console.error("Save button not found.")
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
console.trace(error);
|
||||
});
|
||||
} else {
|
||||
console.error("Editor element not found.")
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
import { CmsEditorBuilder, CmsEditor } from "./cms-editor";
|
||||
|
||||
document.addEventListener("DOMContentLoaded", (event) => {
|
||||
const editorElem = document.querySelector("#cms-event-location-editor");
|
||||
|
||||
if (editorElem) {
|
||||
const saveUrl = editorElem.getAttribute("data-save-url");
|
||||
const variantUrl = editorElem.getAttribute("data-variant-url");
|
||||
|
||||
if (!saveUrl) {
|
||||
console.error("saveUrl is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!variantUrl) {
|
||||
console.error("variantUrl is null");
|
||||
return;
|
||||
}
|
||||
|
||||
const builder = new CmsEditorBuilder(
|
||||
editorElem as HTMLElement,
|
||||
saveUrl,
|
||||
variantUrl
|
||||
);
|
||||
|
||||
builder
|
||||
.buildEditor()
|
||||
.then((editor) => {
|
||||
const submitButton = document.querySelector(
|
||||
".cms-editor-save-button"
|
||||
);
|
||||
|
||||
if (submitButton) {
|
||||
submitButton.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
console.log("HTML output of editor: ");
|
||||
console.log(editor.getEditor().getHTML());
|
||||
});
|
||||
} else {
|
||||
console.error("Save button not found.")
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
console.trace(error);
|
||||
});
|
||||
} else {
|
||||
console.error("Editor element not found.")
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
import { CmsEditorBuilder, CmsEditor } from "./cms-editor";
|
||||
|
||||
document.addEventListener("DOMContentLoaded", (event) => {
|
||||
const editorElem = document.querySelector("#cms-event-maincontributor-editor");
|
||||
|
||||
if (editorElem) {
|
||||
const saveUrl = editorElem.getAttribute("data-save-url");
|
||||
const variantUrl = editorElem.getAttribute("data-variant-url");
|
||||
|
||||
if (!saveUrl) {
|
||||
console.error("saveUrl is null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!variantUrl) {
|
||||
console.error("variantUrl is null");
|
||||
return;
|
||||
}
|
||||
|
||||
const builder = new CmsEditorBuilder(
|
||||
editorElem as HTMLElement,
|
||||
saveUrl,
|
||||
variantUrl
|
||||
);
|
||||
|
||||
builder
|
||||
.buildEditor()
|
||||
.then((editor) => {
|
||||
const submitButton = document.querySelector(
|
||||
".cms-editor-save-button"
|
||||
);
|
||||
|
||||
if (submitButton) {
|
||||
submitButton.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
console.log("HTML output of editor: ");
|
||||
console.log(editor.getEditor().getHTML());
|
||||
});
|
||||
} else {
|
||||
console.error("Save button not found.")
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
console.trace(error);
|
||||
});
|
||||
} else {
|
||||
console.error("Editor element not found.")
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -7,6 +7,10 @@ module.exports = {
|
|||
entry: {
|
||||
"cms-admin": "./src/main/typescript/content-sections/cms-admin.ts",
|
||||
"article-text-step": "./src/main/typescript/content-sections/article-text-step.ts",
|
||||
"event-info-step-eventdate": "./src/main/typescript/content-sections/event-info-step-eventdate.ts",
|
||||
"event-info-step-eventtype": "./src/main/typescript/content-sections/event-info-step-eventtype.ts",
|
||||
"event-info-step-location": "./src/main/typescript/content-sections/event-info-step-location.ts",
|
||||
"event-info-step-maincontributor": "./src/main/typescript/content-sections/event-info-step-maincontributor.ts",
|
||||
"mpa-section-edit-text": "./src/main/typescript/content-sections/mpa-section-edit-text.ts"
|
||||
},
|
||||
output: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue