XHTML for basic properties step of SciProject

pull/1/head
Jens Pelzetter 2022-04-15 17:36:27 +02:00
parent 25aabab480
commit e93fcbe7a1
2 changed files with 283 additions and 7 deletions

View File

@ -57,13 +57,9 @@ public class SciProjectPropertiesStep extends AbstractMvcAuthoringStep {
@Inject
private ContentItemRepository itemRepo;
@Inject
private DocumentUi documentUi;
/**
* Provides functions for working with {@link LocalizedString}s.
*/

View File

@ -0,0 +1,280 @@
<!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/documents/authoringstep.xhtml">
</ui:composition>
<ui:param name="authoringStep"
value="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties" />
<ui:define name="authoringStep">
<h2>#{SciProjectMessageBundle.getMessage('basicproperties.header', [SciProjectPropertiesSteo.name])}</h2>
<h3>#{SciProjectMessageBundle['basicproperties.name.header']}</h3>
<div class="d-flex">
<pre class="mr-2">#{SciProjectPropertiesStep.name}</pre>
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
<button class="btn btn-primary btn-sm"
data-toggle="modal"
data-target="#name-edit-dialog"
type="button">
<bootstrap:svgIcon icon="pen" />
<span class="sr-only">
#{SciProjectMessageBundle['basicproperties.name.edit']}
</span>
</button>
</c:if>
</div>
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
<div aria-hidden="true"
aria-labelledby="name-edit-dialog-title"
class="modal fade"
id="name-edit-dialog"
tabindex="-1">
<div class="modal-dialog">
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/name"
class="modal-content"
method="post">
<div class="modal-header">
<h4 class="modal-title"
id="name-edit-dialog-title">
#{SciProjectMessageBundle['basicproperties.name.edit.title']}
</h4>
<button aria-label="#{SciProjectMessageBundle['basicproperties.name.edit.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<bootstrap:formGroupText
help="#{SciProjectMessageBundle['basicproperties.name.help']}"
inputId="name"
label="#{SciProjectMessageBundle['basicproperties.name.label']}"
name="name"
pattern="^([a-zA-Z0-9_-]*)$"
required="true"
value="#{SciProjectPropertiesStep.name}"/>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{SciProjectMessageBundle['basicproperties.name.edit.close']}
</button>
<button class="btn btn-success"
type="submit">
#{SciProjectMessageBundle['basicproperties.name.edit.submit']}
</button>
</div>
</form>
</div>
</div>
</c:if>
<libreccm:localizedStringEditor
addButtonLabel="#{SciProjectMessageBundle['basicproperties.title.add']}"
addDialogCancelLabel="#{SciProjectMessageBundle['basicproperties.title.add.cancel']}"
addDialogLocaleSelectHelp="#{SciProjectMessageBundle['basicproperties.title.add.locale.help']}"
addDialogLocaleSelectLabel="#{SciProjectMessageBundle['basicproperties.title.add.locale.label']}"
addDialogSubmitLabel="#{SciProjectMessageBundle['basicproperties.title.add.submit']}"
addDialogTitle="#{SciProjectMessageBundle['basicproperties.title.add.header']}"
addDialogValueHelp="#{SciProjectMessageBundle['basicproperties.title.add.value.help']}"
addDialogValueLabel="#{SciProjectMessageBundle['basicproperties.title.add.value.label']}"
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/title/@add"
editButtonLabel="#{SciProjectMessageBundle['basicproperties.title.edit']}"
editDialogCancelLabel="#{SciProjectMessageBundle['basicproperties.title.edit.cancel']}"
editDialogSubmitLabel="#{SciProjectMessageBundle['basicproperties.title.edit.submit']}"
editDialogTitle="#{SciProjectMessageBundle['basicproperties.title.edit.header']}"
editDialogValueHelp="#{SciProjectMessageBundle['basicproperties.title.edit.value.help']}"
editDialogValueLabel="#{SciProjectMessageBundle['basicproperties.title.edit.value.label']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/title/@edit"
editorId="title-editor"
hasUnusedLocales="#{!SciProjectPropertiesStep.unusedTitleLocales.isEmpty()}"
headingLevel="3"
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
readOnly="#{!CmsSelectedDocumentModel.canEdit}"
removeButtonLabel="#{SciProjectMessageBundle['basicproperties.title.remove']}"
removeDialogCancelLabel="#{SciProjectMessageBundle['basicproperties.title.remove.cancel']}"
removeDialogSubmitLabel="#{SciProjectMessageBundle['basicproperties.title.remove.submit']}"
removeDialogText="#{SciProjectMessageBundle['basicproperties.title.remove.text']}"
removeDialogTitle="#{SciProjectMessageBundle['basicproperties.title.remove.header']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/title/@remove"
title="#{SciProjectMessageBundle['basicproperties.title.header']}"
unusedLocales="#{SciProjectPropertiesStep.unusedTitleLocales}"
values="#{SciProjectPropertiesStep.titleValues}"
/>
<div class="d-flex">
<h3 class="mr-2">#{SciProjectMessageBundle['basicproperties.begin.header']}</h3>
<button class="btn btn-primary btn-sm"
data-toggle="modal"
data-target="#begin-edit-dialog"
type="button">
<bootstrap:svgIcon icon="pen" />
<span class="sr-only">
#{SciProjectMessageBundle['basicproperties.begin.edit']}
</span>
</button>
</div>
<dl>
<dt>#{SciProjectMessageBundle['basicproperties.begin.label']}</dt>
<dd>
#{SciProjectPropertiesStep.begin}
</dd>
</dl>
<div aria-hidden="true"
aria-labelledby="begin-edit-dialog-title"
class="modal fade"
id="begin-edit-dialog"
tabindex="-1">
<div class="modal-dialog">
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/begin"
class="modal-content"
method="post">
<div class="modal-header">
<h4 class="modal-title"
id="begin-edit-dialog-title">
#{SciProjectMessageBundle['basicproperties.begin.edit.dialog.title']}
</h4>
<button aria-label="#{SciProjectMessageBundle['basicproperties.begin.edit.dialog.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<bootstrap:formGroupDateTime
help="#{SciProjectMessageBundle['basicproperties.begin.edit.dialog.startdate.help']}"
inputId="startDateTime"
label="#{SciProjectMessageBundle['basicproperties.begin.edit.dialog.startdate.label']}"
name="begin"
required="true"
value="#{SciProjectPropertiesStep.startDateTime}"
/>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{SciProjectMessageBundle['basicproperties.begin.edit.dialog.close']}
</button>
<button class="btn btn-success"
type="submit">
#{SciProjectMessageBundle['basicproperties.begin.edit.dialog.submit']}
</button>
</div>
</form>
</div>
</div>
<div class="d-flex">
<h3 class="mr-2">#{SciProjectMessageBundle['basicproperties.end.header']}</h3>
<button class="btn btn-primary btn-sm"
data-toggle="modal"
data-target="#end-edit-dialog"
type="button">
<bootstrap:svgIcon icon="pen" />
<span class="sr-only">
#{SciProjectMessageBundle['basicproperties.end.edit']}
</span>
</button>
</div>
<dl>
<dt>#{SciProjectMessageBundle['basicproperties.end.label']}</dt>
<dd>
#{SciProjectPropertiesStep.end}
</dd>
</dl>
<div aria-hidden="true"
aria-labelledby="end-edit-dialog-title"
class="modal fade"
id="end-edit-dialog"
tabindex="-1">
<div class="modal-dialog">
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/end"
class="modal-content"
method="post">
<div class="modal-header">
<h4 class="modal-title"
id="end-edit-dialog-title">
#{SciProjectMessageBundle['basicproperties.end.edit.dialog.title']}
</h4>
<button aria-label="#{SciProjectMessageBundle['basicproperties.end.edit.dialog.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<bootstrap:formGroupDateTime
help="#{SciProjectMessageBundle['basicproperties.end.edit.dialog.startdate.help']}"
inputId="startDateTime"
label="#{SciProjectMessageBundle['basicproperties.end.edit.dialog.startdate.label']}"
name="end"
required="true"
value="#{SciProjectPropertiesStep.startDateTime}"
/>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{SciProjectMessageBundle['basicproperties.end.edit.dialog.close']}
</button>
<button class="btn btn-success"
type="submit">
#{SciProjectMessageBundle['basicproperties.end.edit.dialog.submit']}
</button>
</div>
</form>
</div>
</div>
<libreccm:localizedStringEditor
addButtonLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.add']}"
addDialogCancelLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.add.cancel']}"
addDialogLocaleSelectHelp="#{SciProjectMessageBundle['basicproperties.shortdescription.add.locale.help']}"
addDialogLocaleSelectLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.add.locale.label']}"
addDialogSubmitLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.add.submit']}"
addDialogTitle="#{SciProjectMessageBundle['basicproperties.shortdescription.add.header']}"
addDialogValueHelp="#{SciProjectMessageBundle['basicproperties.shortdescription.add.value.help']}"
addDialogValueLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.add.value.label']}"
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/short-description/@add"
editButtonLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.edit']}"
editDialogCancelLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.edit.cancel']}"
editDialogSubmitLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.edit.submit']}"
editDialogTitle="#{SciProjectMessageBundle['basicproperties.shortdescription.edit.header']}"
editDialogValueHelp="#{SciProjectMessageBundle['basicproperties.shortdescription.edit.value.help']}"
editDialogValueLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.edit.value.label']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/short-description/@edit"
editorId="title-editor"
hasUnusedLocales="#{!SciProjectPropertiesStep.unusedShortDescriptionLocales.isEmpty()}"
headingLevel="3"
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
readOnly="#{!CmsSelectedDocumentModel.canEdit}"
removeButtonLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.remove']}"
removeDialogCancelLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.remove.cancel']}"
removeDialogSubmitLabel="#{SciProjectMessageBundle['basicproperties.shortdescription.remove.submit']}"
removeDialogText="#{SciProjectMessageBundle['basicproperties.shortdescription.remove.text']}"
removeDialogTitle="#{SciProjectMessageBundle['basicproperties.shortdescription.remove.header']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@sciproject-basicproperties/short-description/@remove"
title="#{SciProjectMessageBundle['basicproperties.shortdescription.header']}"
unusedLocales="#{SciProjectPropertiesStep.unusedShortDescriptionLocales}"
values="#{SciProjectPropertiesStep.shortDescriptionValues}"
/>
</ui:define>
</html>