Some Bugfixes
parent
6f026f99a7
commit
6b48c5deec
|
|
@ -48,8 +48,8 @@ public class MultiPartArticleSectionManager {
|
||||||
|
|
||||||
article.addSection(section);
|
article.addSection(section);
|
||||||
section.setRank(article.getSections().size() - 1);
|
section.setRank(article.getSections().size() - 1);
|
||||||
itemRepo.save(article);
|
|
||||||
sectionRepo.save(section);
|
sectionRepo.save(section);
|
||||||
|
itemRepo.save(article);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ public class MvcMpaSectionsStep extends AbstractMvcAuthoringStep {
|
||||||
final String sectionIdentifier,
|
final String sectionIdentifier,
|
||||||
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
@PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME)
|
||||||
final String documentPath,
|
final String documentPath,
|
||||||
@FormParam("initialLocal") @DefaultValue("")
|
@FormParam("initialLocale") @DefaultValue("")
|
||||||
final String initialLocaleParam,
|
final String initialLocaleParam,
|
||||||
@FormParam("title") @DefaultValue("")
|
@FormParam("title") @DefaultValue("")
|
||||||
final String title,
|
final String title,
|
||||||
|
|
@ -662,7 +662,7 @@ public class MvcMpaSectionsStep extends AbstractMvcAuthoringStep {
|
||||||
}
|
}
|
||||||
row.setTitle(
|
row.setTitle(
|
||||||
globalizationHelper.getValueFromLocalizedString(
|
globalizationHelper.getValueFromLocalizedString(
|
||||||
section.getText()
|
section.getTitle()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,24 @@
|
||||||
<ui:define name="authoringStep">
|
<ui:define name="authoringStep">
|
||||||
<h2>#{CmsMpaMessageBundle.getMessage('sectionsstep.header', [CmsMpaSectionsStep.articleTitle])}</h2>
|
<h2>#{CmsMpaMessageBundle.getMessage('sectionsstep.header', [CmsMpaSectionsStep.articleTitle])}</h2>
|
||||||
|
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="#{initialLocaleMissing}">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
#{CmsMpaMessageBundle['sectionsstep.error.initial_locale_missing']}
|
||||||
|
</div>
|
||||||
|
</c:when>
|
||||||
|
<c:when test="#{titleMissing}">
|
||||||
|
<div>
|
||||||
|
#{CmsMpaMessageBundle['sectionsstep.error.title_missing']}
|
||||||
|
</div>
|
||||||
|
</c:when>
|
||||||
|
</c:choose>
|
||||||
|
|
||||||
<c:if test="#{CmsMpaSectionsStep.canEdit}">
|
<c:if test="#{CmsMpaSectionsStep.canEdit}">
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<button
|
<button
|
||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
data-target="add-section-dialog"
|
data-target="#add-section-dialog"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
|
@ -50,12 +63,12 @@
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-content">
|
<div class="modal-body">
|
||||||
<bootstrap:formGroupSelect
|
<bootstrap:formGroupSelect
|
||||||
help="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.initial_locale.help']}"
|
help="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.initial_locale.help']}"
|
||||||
inputId="locale"
|
inputId="locale"
|
||||||
label="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.initial_locale.label']}"
|
label="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.initial_locale.label']}"
|
||||||
name="locale"
|
name="initialLocale"
|
||||||
options="#{CmsMpaCreateStep.availableLocales}"
|
options="#{CmsMpaCreateStep.availableLocales}"
|
||||||
required="true"
|
required="true"
|
||||||
selectedOptions="#{[CmsMpaCreateStep.initialLocale]}" />
|
selectedOptions="#{[CmsMpaCreateStep.initialLocale]}" />
|
||||||
|
|
@ -65,16 +78,18 @@
|
||||||
inputId="title"
|
inputId="title"
|
||||||
label="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.title.label']}"
|
label="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.title.label']}"
|
||||||
name="title"
|
name="title"
|
||||||
required="true" />
|
required="true"
|
||||||
|
value="#{title}" />
|
||||||
|
|
||||||
<bootstrap:formGroupTextarea
|
<bootstrap:formGroupTextarea
|
||||||
cols="80"
|
cols="80"
|
||||||
help="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.text.help']}"
|
help="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.text.help']}"
|
||||||
inputId="summary"
|
inputId="summary"
|
||||||
label="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.text.label']}"
|
label="#{CmsMpaMessageBundle['sectionsstep.sections.add.dialog.text.label']}"
|
||||||
name="summary"
|
name="text"
|
||||||
required="true"
|
required="true"
|
||||||
rows="16"
|
rows="10"
|
||||||
|
value="#{text}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -102,13 +117,13 @@
|
||||||
</p>
|
</p>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<table>
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#{CmsMpaMessageBundle['sectionsstep.sections.section.title']}</th>
|
<th>#{CmsMpaMessageBundle['sectionsstep.sections.section.title']}</th>
|
||||||
<th>#{CmsMpaMessageBundle['sectionsstep.sections.text']}</th>
|
<th>#{CmsMpaMessageBundle['sectionsstep.sections.text']}</th>
|
||||||
<th>#{CmsMpaMessageBundle['sectionsstep.sections.pagebreak']}</th>
|
<th>#{CmsMpaMessageBundle['sectionsstep.sections.pagebreak']}</th>
|
||||||
<th>#{CmsMpaMessageBundle['sectionsstep.sections.actions']}</th>
|
<th colspan="2">#{CmsMpaMessageBundle['sectionsstep.sections.actions']}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
@ -140,6 +155,8 @@
|
||||||
<bootstrap:svgIcon icon="eye" />
|
<bootstrap:svgIcon icon="eye" />
|
||||||
<span class="sr-only">#{CmsMpaMessageBundle['sectionsstep.sections.section.show_details']}</span>
|
<span class="sr-only">#{CmsMpaMessageBundle['sectionsstep.sections.section.show_details']}</span>
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<c:if test="#{CmsMpaSectionsStep.canEdit}">
|
<c:if test="#{CmsMpaSectionsStep.canEdit}">
|
||||||
<libreccm:deleteDialog
|
<libreccm:deleteDialog
|
||||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@mpa-sections/#{section.sectionId}/@remove"
|
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@mpa-sections/#{section.sectionId}/@remove"
|
||||||
|
|
|
||||||
|
|
@ -114,3 +114,5 @@ sectionstep.textstep.header.edit=Edit text for locale {2} of section {1} of mult
|
||||||
sectionstep.textstep.text.editor.header=Text
|
sectionstep.textstep.text.editor.header=Text
|
||||||
authoringsteps.sections.label=Sections
|
authoringsteps.sections.label=Sections
|
||||||
sectionsstep.sections.empty=This multipart article has no sections yet.
|
sectionsstep.sections.empty=This multipart article has no sections yet.
|
||||||
|
sectionsstep.error.initial_locale_missing=Initial locale is missing.
|
||||||
|
sectionsstep.error.title_missing=Title for the new section is missing.
|
||||||
|
|
|
||||||
|
|
@ -114,3 +114,5 @@ sectionstep.textstep.header.edit=Text f\u00fcr Sprache {2} des Abschnitts {1} de
|
||||||
sectionstep.textstep.text.editor.header=Text
|
sectionstep.textstep.text.editor.header=Text
|
||||||
authoringsteps.sections.label=Abschnitte
|
authoringsteps.sections.label=Abschnitte
|
||||||
sectionsstep.sections.empty=Diese mehrteilige Artikel hat noch keine Abschnitte.
|
sectionsstep.sections.empty=Diese mehrteilige Artikel hat noch keine Abschnitte.
|
||||||
|
sectionsstep.error.initial_locale_missing=Es wurde keine initiale Sprache f\u00fcr den neuen Abschnitt angegeben.
|
||||||
|
sectionsstep.error.title_missing=Der Titel f\u00fcr den neuen Abschnitt wurde nicht angegeben.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue