Fixed inconsistiency of canEdit usage in authoring steps
parent
5bafec04a3
commit
eef4210785
|
|
@ -133,6 +133,7 @@ public abstract class AbstractMvcAuthoringStep implements MvcAuthoringStep {
|
|||
)
|
||||
);
|
||||
documentModel.setContentItem(document);
|
||||
documentModel.setCanEdit(getCanEdit());
|
||||
|
||||
documentPath = itemManager.getItemPath(document);
|
||||
final Map<String, String> values = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import javax.enterprise.context.RequestScoped;
|
|||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.core.UriBuilder;
|
||||
|
||||
/**
|
||||
|
|
@ -140,6 +139,11 @@ public class SelectedDocumentModel {
|
|||
*/
|
||||
private boolean excludeDefaultAuthoringSteps;
|
||||
|
||||
/**
|
||||
* Can the current user edit the document.
|
||||
*/
|
||||
private boolean canEdit;
|
||||
|
||||
/**
|
||||
* The workflow assigned to the current content item.
|
||||
*/
|
||||
|
|
@ -186,6 +190,14 @@ public class SelectedDocumentModel {
|
|||
return excludeDefaultAuthoringSteps;
|
||||
}
|
||||
|
||||
public boolean getCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public void setCanEdit(final boolean canEdit) {
|
||||
this.canEdit = canEdit;
|
||||
}
|
||||
|
||||
public String getWorkflowName() {
|
||||
return workflowName;
|
||||
}
|
||||
|
|
@ -348,7 +360,7 @@ public class SelectedDocumentModel {
|
|||
) {
|
||||
final MvcAuthoringStepDef stepAnnotation = authoringStepClass
|
||||
.getAnnotation(MvcAuthoringStepDef.class);
|
||||
final LocalizedTextsUtil textsUtil = globalizationHelper
|
||||
final LocalizedTextsUtil textsUtil = globalizationHelper
|
||||
.getLocalizedTextsUtil(stepAnnotation.bundle());
|
||||
final AuthoringStepListEntry entry = new AuthoringStepListEntry();
|
||||
entry.setDescription(textsUtil.getText(stepAnnotation.descriptionKey()));
|
||||
|
|
|
|||
|
|
@ -127,8 +127,6 @@ public class MvcArticlePropertiesStep extends AbstractMvcAuthoringStep {
|
|||
|
||||
articlePropertiesStepModel.setName(getDocument().getDisplayName());
|
||||
|
||||
articlePropertiesStepModel.setCanEdit(getCanEdit());
|
||||
|
||||
final Set<Locale> titleLocales = getDocument()
|
||||
.getTitle()
|
||||
.getAvailableLocales();
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ public class MvcArticlePropertiesStepModel {
|
|||
|
||||
private String name;
|
||||
|
||||
private boolean canEdit;
|
||||
|
||||
private Map<String, String> titleValues;
|
||||
|
||||
private List<String> unusedTitleLocales;
|
||||
|
|
@ -55,14 +53,6 @@ public class MvcArticlePropertiesStepModel {
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean getCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public void setCanEdit(final boolean canEdit) {
|
||||
this.canEdit = canEdit;
|
||||
}
|
||||
|
||||
public Map<String, String> getTitleValues() {
|
||||
return Collections.unmodifiableMap(titleValues);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@
|
|||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="cms-editor-messages"></div>
|
||||
<c:if test="#{cc.attrs.hasUnusedLocales}">
|
||||
<c:if test="#{cc.attrs.hasUnusedLocales and cc.attrs.canEdit}">
|
||||
<div class="mb-2">
|
||||
<div class="text-right">
|
||||
<button
|
||||
|
|
|
|||
|
|
@ -7,81 +7,85 @@
|
|||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
||||
|
||||
<ui:param name="authoringStep" value="categorize" />
|
||||
|
||||
|
||||
<ui:define name="authoringStep">
|
||||
<h1>#{CmsDefaultStepsMessageBundle.getMessage('categorization.title', [CmsSelectedDocumentModel.itemTitle])}</h1>
|
||||
|
||||
|
||||
<c:forEach items="#{CmsCategorizationStep.categorizationTrees}"
|
||||
var="tree">
|
||||
<h2>#{tree.domainTitle}</h2>
|
||||
|
||||
<div class="d-flex mb-3">
|
||||
<span class="mr-2">#{CmsDefaultStepsMessageBundle['categorization.system.assigned.to']}</span>
|
||||
<button class="btn btn-primary"
|
||||
data-target="#edit-categorization-#{tree.domainKey}"
|
||||
data-toggle="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">
|
||||
#{CmsDefaultStepsMessageBundle['categorization.system.assigned.edit']}
|
||||
</span>
|
||||
</button>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<button class="btn btn-primary"
|
||||
data-target="#edit-categorization-#{tree.domainKey}"
|
||||
data-toggle="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">
|
||||
#{CmsDefaultStepsMessageBundle['categorization.system.assigned.edit']}
|
||||
</span>
|
||||
</button>
|
||||
</c:if>
|
||||
</div>
|
||||
<div aria-labelledby="edit-categorization-#{tree.domainKey}-title"
|
||||
aria-hidden="true"
|
||||
class="modal fade"
|
||||
id="edit-categorization-#{tree.domainKey}"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@categorization/domains/#{tree.domainKey}"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"
|
||||
id="edit-categorization-#{tree.domainKey}-title">
|
||||
#{CmsDefaultStepsMessageBundle.getMessage('categorization.edit.title', [tree.domainKey, CmsSelectedDocumentModel.itemTitle])}
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<div aria-labelledby="edit-categorization-#{tree.domainKey}-title"
|
||||
aria-hidden="true"
|
||||
class="modal fade"
|
||||
id="edit-categorization-#{tree.domainKey}"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@categorization/domains/#{tree.domainKey}"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"
|
||||
id="edit-categorization-#{tree.domainKey}-title">
|
||||
#{CmsDefaultStepsMessageBundle.getMessage('categorization.edit.title', [tree.domainKey, CmsSelectedDocumentModel.itemTitle])}
|
||||
|
||||
</h3>
|
||||
<button aria-label="#{CmsDefaultStepsMessageBundle['categorization.edit.cancel']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body categorizationtree">
|
||||
<ul class=""
|
||||
id="#{node.categoryUuid}-subcategories">
|
||||
<ui:include src="categorization-tree-node.xhtml">
|
||||
<ui:param name="node"
|
||||
value="#{tree.root}" />
|
||||
<ui:param name="isRoot"
|
||||
value="true" />
|
||||
</ui:include>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-warning"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsDefaultStepsMessageBundle['categorization.edit.cancel']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsDefaultStepsMessageBundle['categorization.edit.apply']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</h3>
|
||||
<button aria-label="#{CmsDefaultStepsMessageBundle['categorization.edit.cancel']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body categorizationtree">
|
||||
<ul class=""
|
||||
id="#{node.categoryUuid}-subcategories">
|
||||
<ui:include src="categorization-tree-node.xhtml">
|
||||
<ui:param name="node"
|
||||
value="#{tree.root}" />
|
||||
<ui:param name="isRoot"
|
||||
value="true" />
|
||||
</ui:include>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-warning"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsDefaultStepsMessageBundle['categorization.edit.cancel']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsDefaultStepsMessageBundle['categorization.edit.apply']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="#{tree.root.assigned or tree.root.subCategoryAssigned}">
|
||||
<ul>
|
||||
<c:forEach items="#{tree.assignedCategories}"
|
||||
var="assigned">
|
||||
<li>#{assigned}</li>
|
||||
</c:forEach>
|
||||
<c:forEach items="#{tree.assignedCategories}"
|
||||
var="assigned">
|
||||
<li>#{assigned}</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
|
|
@ -91,7 +95,6 @@
|
|||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
|
||||
</c:forEach>
|
||||
</ui:define>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
||||
|
||||
<ui:param name="authoringStep" value="media" />
|
||||
|
||||
|
||||
<ui:define name="authoringStep">
|
||||
<h1>#{CmsDefaultStepsMessageBundle.getMessage("media.title", [CmsSelectedDocumentModel.itemTitle])}</h1>
|
||||
|
||||
|
||||
<template id="cms-sort-media-error-general">
|
||||
<div class="alert alert-danger mt-3" role="alert">
|
||||
#{CmsDefaultStepsMessageBundle['media.sortmedia.errors.general']}
|
||||
|
|
@ -22,88 +22,92 @@
|
|||
#{CmsDefaultStepsMessageBundle['media.sortmedia.errors.save']}
|
||||
</div>
|
||||
</template>
|
||||
<div class="text-right">
|
||||
<button class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#add-media-list-dialog"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="plus-circle" />
|
||||
<span>#{CmsDefaultStepsMessageBundle['media.medialists.add.button.label']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="add-media-list-dialog-title"
|
||||
class="modal fade"
|
||||
id="add-media-list-dialog"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/@add"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"
|
||||
id="add-media-list-dialog-title">#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.title']}</h3>
|
||||
<button aria-label="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.name.help']}"
|
||||
inputId="#add-media-list-name"
|
||||
label="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.name.label']}"
|
||||
name="listName"
|
||||
pattern="[A-Za-z0-9\-_]*"
|
||||
required="true"
|
||||
/>
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.title.help']}"
|
||||
inputId="#add-media-list-title"
|
||||
label="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.title.label']}"
|
||||
name="listTitle"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupTextarea
|
||||
help="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.description.help']}"
|
||||
inputId="#add-media-list-name"
|
||||
label="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.description.label']}"
|
||||
name="listDescription"
|
||||
/>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-warning"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.close']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.add_list']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<div class="text-right">
|
||||
<button class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#add-media-list-dialog"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="plus-circle" />
|
||||
<span>#{CmsDefaultStepsMessageBundle['media.medialists.add.button.label']}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="add-media-list-dialog-title"
|
||||
class="modal fade"
|
||||
id="add-media-list-dialog"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/@add"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"
|
||||
id="add-media-list-dialog-title">#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.title']}</h3>
|
||||
<button aria-label="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.name.help']}"
|
||||
inputId="#add-media-list-name"
|
||||
label="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.name.label']}"
|
||||
name="listName"
|
||||
pattern="[A-Za-z0-9\-_]*"
|
||||
required="true"
|
||||
/>
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.title.help']}"
|
||||
inputId="#add-media-list-title"
|
||||
label="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.title.label']}"
|
||||
name="listTitle"
|
||||
/>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-secondary media-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">#{CmsDefaultStepsMessageBundle['media.medialists.order.save.inprogress']}</span>
|
||||
</span>
|
||||
<span>#{CmsDefaultStepsMessageBundle['media.medialists.order.save']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<bootstrap:formGroupTextarea
|
||||
help="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.description.help']}"
|
||||
inputId="#add-media-list-name"
|
||||
label="#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.description.label']}"
|
||||
name="listDescription"
|
||||
/>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-warning"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.close']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsDefaultStepsMessageBundle['media.medialists.add.dialog.add_list']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<div>
|
||||
<button class="btn btn-secondary media-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">#{CmsDefaultStepsMessageBundle['media.medialists.order.save.inprogress']}</span>
|
||||
</span>
|
||||
<span>#{CmsDefaultStepsMessageBundle['media.medialists.order.save']}</span>
|
||||
</button>
|
||||
</div>
|
||||
</c:if>
|
||||
<div id="messages"></div>
|
||||
<ul class="cms-media-lists mt-3 list-group"
|
||||
data-baseUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media-service/save-order">
|
||||
|
|
@ -114,28 +118,30 @@
|
|||
<div class="d-flex justify-content-between">
|
||||
<div>#{list.name}</div>
|
||||
<div class="cms-medialist-buttons d-flex">
|
||||
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="arrows-move" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['media.medialists.move.button']}"</span>
|
||||
</button>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="arrows-move" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['media.medialists.move.button']}"</span>
|
||||
</button>
|
||||
</c:if>
|
||||
<button class="btn btn-secondary mx-2"
|
||||
data-toggle="modal"
|
||||
data-target="#media-list-#{list.name}-info"
|
||||
data-target="#media-list-#{list.uuid}-info"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="info-circle" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['media.medialists.info.button']}"</span>
|
||||
</button>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="medialist-#{list.name}-info-title"
|
||||
aria-labelledby="medialist-#{list.uuid}-info-title"
|
||||
class="modal fade"
|
||||
id="media-list-#{list.name}-info"
|
||||
id="media-list-#{list.uuid}-info"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"
|
||||
id="medialist-#{list.name}-info-title">
|
||||
id="medialist-#{list.uuid}-info-title">
|
||||
#{CmsDefaultStepsMessageBundle.getMessage('media.medialists.info.dialog.title', [list.name])}
|
||||
</h3>
|
||||
<button
|
||||
|
|
@ -164,35 +170,37 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn btn-primary mx-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/#{list.name}/@details">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['media.medialists.edit.button']}"</span>
|
||||
</a>
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="attach-media-picker-#{list.uuid}"
|
||||
buttonIcon="file-earmark-plus"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['media.medialists.media.add.label']}"
|
||||
/>
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/#{list.name}/@remove"
|
||||
buttonLabelClass="sr-only"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['media.medialists.remove.label']}"
|
||||
buttonTextClass="ml-2"
|
||||
cancelLabel="#{CmsDefaultStepsMessageBundle['media.medialists.remove.cancel']}"
|
||||
confirmLabel="#{CmsDefaultStepsMessageBundle['media.medialists.remove.confirm']}"
|
||||
dialogId="medialist-delete-#{list.uuid}"
|
||||
dialogTitle="#{CmsDefaultStepsMessageBundle['media.medialists.remove.title']}"
|
||||
message="#{CmsDefaultStepsMessageBundle.getMessage('media.medialists.remove.message', [list.name])}"
|
||||
/>
|
||||
<librecms:assetPicker
|
||||
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/#{list.name}/media/@create"
|
||||
assetType="#{CmsMediaStep.audioAssetType},#{CmsMediaStep.externalAudioAssetType},#{CmsMediaStep.externalVideoAssetType},#{CmsMediaStep.imageType},#{CmsMediaStep.videoAssetType}"
|
||||
assetPickerId="attach-media-picker-#{list.uuid}"
|
||||
baseUrl="#{CmsMediaStep.mediaAssetPickerBaseUrl}"
|
||||
contentSection="#{CmsMediaStep.sectionName}"
|
||||
formParamName="mediaIdentifier"
|
||||
/>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<a class="btn btn-primary mx-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/#{list.name}/@details">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['media.medialists.edit.button']}"</span>
|
||||
</a>
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="attach-media-picker-#{list.uuid}"
|
||||
buttonIcon="file-earmark-plus"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['media.medialists.media.add.label']}"
|
||||
/>
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/#{list.name}/@remove"
|
||||
buttonLabelClass="sr-only"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['media.medialists.remove.label']}"
|
||||
buttonTextClass="ml-2"
|
||||
cancelLabel="#{CmsDefaultStepsMessageBundle['media.medialists.remove.cancel']}"
|
||||
confirmLabel="#{CmsDefaultStepsMessageBundle['media.medialists.remove.confirm']}"
|
||||
dialogId="medialist-delete-#{list.uuid}"
|
||||
dialogTitle="#{CmsDefaultStepsMessageBundle['media.medialists.remove.title']}"
|
||||
message="#{CmsDefaultStepsMessageBundle.getMessage('media.medialists.remove.message', [list.name])}"
|
||||
/>
|
||||
<librecms:assetPicker
|
||||
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/#{list.name}/media/@create"
|
||||
assetType="#{CmsMediaStep.audioAssetType},#{CmsMediaStep.externalAudioAssetType},#{CmsMediaStep.externalVideoAssetType},#{CmsMediaStep.imageType},#{CmsMediaStep.videoAssetType}"
|
||||
assetPickerId="attach-media-picker-#{list.uuid}"
|
||||
baseUrl="#{CmsMediaStep.mediaAssetPickerBaseUrl}"
|
||||
contentSection="#{CmsMediaStep.sectionName}"
|
||||
formParamName="mediaIdentifier"
|
||||
/>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="cms-medias mt-3 list-group"
|
||||
|
|
@ -234,11 +242,13 @@
|
|||
<span class="cms-media-label">#{media.title}</span>
|
||||
</div>
|
||||
<div class="cms-media-buttons d-flex">
|
||||
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="arrows-move" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['media.medialists.media.move.button']}"</span>
|
||||
</button>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="arrows-move" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['media.medialists.media.move.button']}"</span>
|
||||
</button>
|
||||
</c:if>
|
||||
<button class="btn btn-secondary mx-2"
|
||||
data-toggle="modal"
|
||||
data-target="#media-#{media.uuid}-info-dialog"
|
||||
|
|
@ -286,17 +296,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/#{list.name}/media/#{media.uuid}/@remove"
|
||||
buttonLabelClass="sr-only"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['media.medialists.media.remove.label']}"
|
||||
buttonTextClass="ml-2"
|
||||
cancelLabel="#{CmsDefaultStepsMessageBundle['media.medialists.media.remove.cancel']}"
|
||||
confirmLabel="#{CmsDefaultStepsMessageBundle['media.medialists.media.remove.confirm']}"
|
||||
dialogId="media-delete-#{media.uuid}"
|
||||
dialogTitle="#{CmsDefaultStepsMessageBundle['media.medialists.media.remove.title']}"
|
||||
message="#{CmsDefaultStepsMessageBundle.getMessage('media.medialists.media.remove.message', [list.name, media.title])}"
|
||||
/>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@media/medialists/#{list.name}/media/#{media.uuid}/@remove"
|
||||
buttonLabelClass="sr-only"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['media.medialists.media.remove.label']}"
|
||||
buttonTextClass="ml-2"
|
||||
cancelLabel="#{CmsDefaultStepsMessageBundle['media.medialists.media.remove.cancel']}"
|
||||
confirmLabel="#{CmsDefaultStepsMessageBundle['media.medialists.media.remove.confirm']}"
|
||||
dialogId="media-delete-#{media.uuid}"
|
||||
dialogTitle="#{CmsDefaultStepsMessageBundle['media.medialists.media.remove.title']}"
|
||||
message="#{CmsDefaultStepsMessageBundle.getMessage('media.medialists.media.remove.message', [list.name, media.title])}"
|
||||
/>
|
||||
</c:if>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
|
@ -305,22 +317,24 @@
|
|||
</c:forEach>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-secondary media-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">#{CmsDefaultStepsMessageBundle['media.medialists.order.save.inprogress']}</span>
|
||||
</span>
|
||||
<span>#{CmsDefaultStepsMessageBundle['media.medialists.order.save']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<div>
|
||||
<button class="btn btn-secondary media-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">#{CmsDefaultStepsMessageBundle['media.medialists.order.save.inprogress']}</span>
|
||||
</span>
|
||||
<span>#{CmsDefaultStepsMessageBundle['media.medialists.order.save']}</span>
|
||||
</button>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
<ui:composition template="/WEB-INF/views/org/librecms/ui/contentsection/documents/authoringstep.xhtml">
|
||||
|
||||
<ui:param name="authoringStep" value="relatedInfo" />
|
||||
|
||||
|
||||
<ui:define name="authoringStep">
|
||||
<h1>#{CmsDefaultStepsMessageBundle.getMessage("relatedinfo.title", [CmsSelectedDocumentModel.itemTitle])}</h1>
|
||||
|
||||
|
||||
<template id="cms-sort-attachments-error-general">
|
||||
<div class="alert alert-danger mt-3" role="alert">
|
||||
#{CmsDefaultStepsMessageBundle['relatedinfo.sortattachments.errors.general']}
|
||||
|
|
@ -22,88 +22,92 @@
|
|||
#{CmsDefaultStepsMessageBundle['relatedinfo.sortattachments.errors.save']}
|
||||
</div>
|
||||
</template>
|
||||
<div class="text-right">
|
||||
<button class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#add-attachment-list-dialog"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="plus-circle" />
|
||||
<span>#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.button.label']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="add-attachment-list-dialog-title"
|
||||
class="modal fade"
|
||||
id="add-attachment-list-dialog"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/@add"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"
|
||||
id="add-attachment-list-dialog-title">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.title']}</h3>
|
||||
<button aria-label="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.name.help']}"
|
||||
inputId="#add-attachment-list-name"
|
||||
label="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.name.label']}"
|
||||
name="listName"
|
||||
pattern="[A-Za-z0-9\-_]*"
|
||||
required="true"
|
||||
/>
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.title.help']}"
|
||||
inputId="#add-attachment-list-title"
|
||||
label="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.title.label']}"
|
||||
name="listTitle"
|
||||
/>
|
||||
|
||||
<bootstrap:formGroupTextarea
|
||||
help="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.description.help']}"
|
||||
inputId="#add-attachment-list-name"
|
||||
label="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.description.label']}"
|
||||
name="listDescription"
|
||||
/>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-warning"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.close']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.add_list']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<div class="text-right">
|
||||
<button class="btn btn-primary"
|
||||
data-toggle="modal"
|
||||
data-target="#add-attachment-list-dialog"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="plus-circle" />
|
||||
<span>#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.button.label']}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="add-attachment-list-dialog-title"
|
||||
class="modal fade"
|
||||
id="add-attachment-list-dialog"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/@add"
|
||||
class="modal-content"
|
||||
method="post">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"
|
||||
id="add-attachment-list-dialog-title">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.title']}</h3>
|
||||
<button aria-label="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.close']}"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="x-circle" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.name.help']}"
|
||||
inputId="#add-attachment-list-name"
|
||||
label="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.name.label']}"
|
||||
name="listName"
|
||||
pattern="[A-Za-z0-9\-_]*"
|
||||
required="true"
|
||||
/>
|
||||
<bootstrap:formGroupText
|
||||
help="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.title.help']}"
|
||||
inputId="#add-attachment-list-title"
|
||||
label="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.title.label']}"
|
||||
name="listTitle"
|
||||
/>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-secondary attachments-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">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.order.save.inprogress']}</span>
|
||||
</span>
|
||||
<span>#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.order.save']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<bootstrap:formGroupTextarea
|
||||
help="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.description.help']}"
|
||||
inputId="#add-attachment-list-name"
|
||||
label="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.description.label']}"
|
||||
name="listDescription"
|
||||
/>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-warning"
|
||||
data-dismiss="modal"
|
||||
type="button">
|
||||
#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.close']}
|
||||
</button>
|
||||
<button class="btn btn-success"
|
||||
type="submit">
|
||||
#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.add.dialog.add_list']}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<div>
|
||||
<button class="btn btn-secondary attachments-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">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.order.save.inprogress']}</span>
|
||||
</span>
|
||||
<span>#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.order.save']}</span>
|
||||
</button>
|
||||
</div>
|
||||
</c:if>
|
||||
<div id="messages"></div>
|
||||
<ul class="cms-attachment-lists mt-3 list-group"
|
||||
data-baseUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo-service/save-order">
|
||||
|
|
@ -114,28 +118,30 @@
|
|||
<div class="d-flex justify-content-between">
|
||||
<div>#{list.name}</div>
|
||||
<div class="cms-attachmentlist-buttons d-flex">
|
||||
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="arrows-move" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.move.button']}"</span>
|
||||
</button>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="arrows-move" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.move.button']}"</span>
|
||||
</button>
|
||||
</c:if>
|
||||
<button class="btn btn-secondary mx-2"
|
||||
data-toggle="modal"
|
||||
data-target="#attachment-list-#{list.name}-info"
|
||||
data-target="#attachment-list-#{list.uuid}-info"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="info-circle" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.info.button']}"</span>
|
||||
</button>
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="attachmentlist-#{list.name}-info-title"
|
||||
aria-labelledby="attachmentlist-#{list.uuid}-info-title"
|
||||
class="modal fade"
|
||||
id="attachment-list-#{list.name}-info"
|
||||
id="attachment-list-#{list.uuid}-info"
|
||||
tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title"
|
||||
id="attachmentlist-#{list.name}-info-title">
|
||||
id="attachmentlist-#{list.uuid}-info-title">
|
||||
#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.attachmentlists.info.dialog.title', [list.name])}
|
||||
</h3>
|
||||
<button
|
||||
|
|
@ -164,41 +170,43 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn btn-primary mx-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/@details">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.edit.button']}"</span>
|
||||
</a>
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="attach-file-picker-#{list.uuid}"
|
||||
buttonIcon="file-earmark-plus"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.attachment.add.label']}"
|
||||
/>
|
||||
<a class="btn btn-primary mx-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/links/@create"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="bookmark-plus" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.link.add.label']}</span>
|
||||
</a>
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/@remove"
|
||||
buttonLabelClass="sr-only"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.remove.label']}"
|
||||
buttonTextClass="ml-2"
|
||||
cancelLabel="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.remove.cancel']}"
|
||||
confirmLabel="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.remove.confirm']}"
|
||||
dialogId="attachmentlist-delete-#{list.uuid}"
|
||||
dialogTitle="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.remove.title']}"
|
||||
message="#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.attachmentlists.remove.message', [list.name])}"
|
||||
/>
|
||||
<librecms:assetPicker
|
||||
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/attachments/@create"
|
||||
assetType="#{CmsRelatedInfoStep.fileAssetType}"
|
||||
assetPickerId="attach-file-picker-#{list.uuid}"
|
||||
baseUrl="#{CmsRelatedInfoStep.fileAssetPickerBaseUrl}"
|
||||
contentSection="#{CmsRelatedInfoStep.sectionName}"
|
||||
formParamName="assetIdentifier"
|
||||
/>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<a class="btn btn-primary mx-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/@details">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.edit.button']}"</span>
|
||||
</a>
|
||||
<librecms:assetPickerButton
|
||||
assetPickerId="attach-file-picker-#{list.uuid}"
|
||||
buttonIcon="file-earmark-plus"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.attachment.add.label']}"
|
||||
/>
|
||||
<a class="btn btn-primary mx-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/links/@create"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="bookmark-plus" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.link.add.label']}</span>
|
||||
</a>
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/@remove"
|
||||
buttonLabelClass="sr-only"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.remove.label']}"
|
||||
buttonTextClass="ml-2"
|
||||
cancelLabel="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.remove.cancel']}"
|
||||
confirmLabel="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.remove.confirm']}"
|
||||
dialogId="attachmentlist-delete-#{list.uuid}"
|
||||
dialogTitle="#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.remove.title']}"
|
||||
message="#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.attachmentlists.remove.message', [list.name])}"
|
||||
/>
|
||||
<librecms:assetPicker
|
||||
actionUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/attachments/@create"
|
||||
assetType="#{CmsRelatedInfoStep.fileAssetType}"
|
||||
assetPickerId="attach-file-picker-#{list.uuid}"
|
||||
baseUrl="#{CmsRelatedInfoStep.fileAssetPickerBaseUrl}"
|
||||
contentSection="#{CmsRelatedInfoStep.sectionName}"
|
||||
formParamName="assetIdentifier"
|
||||
/>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="cms-attachments mt-3 list-group"
|
||||
|
|
@ -222,11 +230,13 @@
|
|||
<span class="cms-attachment-label">#{attachment.title}</span>
|
||||
</div>
|
||||
<div class="cms-attachment-buttons d-flex">
|
||||
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="arrows-move" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachments.move.button']}"</span>
|
||||
</button>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<button class="btn btn-secondary cms-sort-handle mr-2"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="arrows-move" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachments.move.button']}"</span>
|
||||
</button>
|
||||
</c:if>
|
||||
<button class="btn btn-secondary mx-2"
|
||||
data-toggle="modal"
|
||||
data-target="#attachment-#{attachment.uuid}-info-dialog"
|
||||
|
|
@ -274,25 +284,27 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="#{attachment.assetType.equals(CmsRelatedInfoStep.relatedLinkType)}">
|
||||
<a class="btn btn-primary mx-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/links/#{attachment.assetUuid}/@details"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachments.edit.button']}"</span>
|
||||
</a>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<c:if test="#{attachment.assetType.equals(CmsRelatedInfoStep.relatedLinkType)}">
|
||||
<a class="btn btn-primary mx-2"
|
||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/links/#{attachment.assetUuid}/@details"
|
||||
type="button">
|
||||
<bootstrap:svgIcon icon="pen" />
|
||||
<span class="sr-only">#{CmsDefaultStepsMessageBundle['relatedinfo.attachments.edit.button']}"</span>
|
||||
</a>
|
||||
</c:if>
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/attachments/#{attachment.uuid}/@remove"
|
||||
buttonLabelClass="sr-only"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['relatedinfo.attachment.remove.label']}"
|
||||
buttonTextClass="ml-2"
|
||||
cancelLabel="#{CmsDefaultStepsMessageBundle['relatedinfo.attachment.remove.cancel']}"
|
||||
confirmLabel="#{CmsDefaultStepsMessageBundle['relatedinfo.attachment.remove.confirm']}"
|
||||
dialogId="attachment-delete-#{attachment.uuid}"
|
||||
dialogTitle="#{CmsDefaultStepsMessageBundle['relatedinfo.attachment.remove.title']}"
|
||||
message="#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.attachment.remove.message', [list.name, attachment.title])}"
|
||||
/>
|
||||
</c:if>
|
||||
<libreccm:deleteDialog
|
||||
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@relatedinfo/attachmentlists/#{list.name}/attachments/#{attachment.uuid}/@remove"
|
||||
buttonLabelClass="sr-only"
|
||||
buttonText="#{CmsDefaultStepsMessageBundle['relatedinfo.attachment.remove.label']}"
|
||||
buttonTextClass="ml-2"
|
||||
cancelLabel="#{CmsDefaultStepsMessageBundle['relatedinfo.attachment.remove.cancel']}"
|
||||
confirmLabel="#{CmsDefaultStepsMessageBundle['relatedinfo.attachment.remove.confirm']}"
|
||||
dialogId="attachment-delete-#{attachment.uuid}"
|
||||
dialogTitle="#{CmsDefaultStepsMessageBundle['relatedinfo.attachment.remove.title']}"
|
||||
message="#{CmsDefaultStepsMessageBundle.getMessage('relatedinfo.attachment.remove.message', [list.name, attachment.title])}"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
|
@ -301,22 +313,24 @@
|
|||
</c:forEach>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-secondary attachments-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">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.order.save.inprogress']}</span>
|
||||
</span>
|
||||
<span>#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.order.save']}</span>
|
||||
</button>
|
||||
</div>
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<div>
|
||||
<button class="btn btn-secondary attachments-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">#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.order.save.inprogress']}</span>
|
||||
</span>
|
||||
<span>#{CmsDefaultStepsMessageBundle['relatedinfo.attachmentlists.order.save']}</span>
|
||||
</button>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
</ui:define>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<h3>#{CmsArticleMessageBundle.getMessage('basicproperties.name.header')}</h3>
|
||||
<div class="d-flex">
|
||||
<pre class="mr-2">#{CmsArticlePropertiesStep.name}</pre>
|
||||
<c:if test="#{CmsArticlePropertiesStep.canEdit}">
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<button class="btn btn-primary btn-sm"
|
||||
data-toggle="modal"
|
||||
data-target="#name-edit-dialog"
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
</c:if>
|
||||
</div>
|
||||
|
||||
<c:if test="#{CmsArticlePropertiesStep.canEdit}">
|
||||
<c:if test="#{CmsSelectedDocumentModel.canEdit}">
|
||||
<div aria-hidden="true"
|
||||
aria-labelledby="name-edit-dialog-title"
|
||||
class="modal fade"
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
hasUnusedLocales="#{!CmsArticlePropertiesStep.unusedTitleLocales.isEmpty()}"
|
||||
headingLevel="3"
|
||||
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||
readOnly="#{!CmsArticlePropertiesStep.canEdit}"
|
||||
readOnly="#{!CmsSelectedDocumentModel.canEdit}"
|
||||
removeButtonLabel="#{CmsArticleMessageBundle['basicproperties.title.remove']}"
|
||||
removeDialogCancelLabel="#{CmsArticleMessageBundle['basicproperties.title.remove.cancel']}"
|
||||
removeDialogSubmitLabel="#{CmsArticleMessageBundle['basicproperties.title.remove.submit']}"
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
hasUnusedLocales="#{!CmsArticlePropertiesStep.unusedDescriptionLocales.isEmpty()}"
|
||||
headingLevel="3"
|
||||
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||
readOnly="#{!CmsArticlePropertiesStep.canEdit}"
|
||||
readOnly="#{!CmsSelectedDocumentModel.canEdit}"
|
||||
removeButtonLabel="#{CmsArticleMessageBundle['basicproperties.description.remove']}"
|
||||
removeDialogCancelLabel="#{CmsArticleMessageBundle['basicproperties.description.remove.cancel']}"
|
||||
removeDialogSubmitLabel="#{CmsArticleMessageBundle['basicproperties.description.remove.submit']}"
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
<!DOCTYPE html [<!ENTITY times '×'>]>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:bootstrap="http://xmlns.jcp.org/jsf/composite/components/bootstrap"
|
||||
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
|
||||
xmlns:libreccm="http://xmlns.jcp.org/jsf/composite/components/libreccm"
|
||||
xmlns: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/documents/authoringstep.xhtml">
|
||||
|
||||
<ui:param name="authoringStep"
|
||||
value="/libreccm/@contentsections/info/documents/test-article/@article-text" />
|
||||
|
||||
<ui:define name="authoringStep">
|
||||
<h2>#{CmsArticleMessageBundle['textstep.header']}</h2>
|
||||
|
||||
<librecms:cmsEditor addButtonLabel="#{CmsArticleMessageBundle['text.editor.add_variant']}"
|
||||
addDialogLocaleSelectHelp="#{CmsAdminMessages['text.editor.add.locale.help']}"
|
||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@article-text/add"
|
||||
editDialogValueHelp="#{CmsAdminMessages['text.editor.edit.value.help']}"
|
||||
editDialogValueLabel="#{CmsAdminMessages['text.editor.edit.value.label']}"
|
||||
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@article-text/edit"
|
||||
editorId="article-text-editor"
|
||||
hasUnusedLocales="#{!CmsArticleTextBodyStep.unusedLocales.isEmpty()}"
|
||||
headingLevel="3"
|
||||
objectIdentifier="#{CmsSelectedDocumentModel.itemPath}"
|
||||
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@article-text/remove"
|
||||
title="#{CmsArticleMessageBundle['text.editor.header']}"
|
||||
unusedLocales="#{CmsArticleTextBodyStep.unusedLocales}"
|
||||
variantUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@article-text-resources/variants"
|
||||
variants="#{CmsArticleTextBodyStep.variants}"
|
||||
wordCountUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@article-text-resources/variants/wordcount"
|
||||
/>
|
||||
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="scripts">
|
||||
<script src="#{request.contextPath}/assets/@content-sections/cms-editor.js"></script>
|
||||
</ui:define>
|
||||
|
||||
</ui:composition>
|
||||
</html>
|
||||
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
addButtonLabel="#{CmsArticleMessageBundle['text.editor.add_variant']}"
|
||||
addDialogLocaleSelectHelp="#{CmsAdminMessages['text.editor.add.locale.help']}"
|
||||
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@article-text/add"
|
||||
canEdit="#{CmsSelectedDocumentModel.canEdit}"
|
||||
editorPageUrl="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@article-text/edit"
|
||||
hasUnusedLocales="#{!CmsArticleTextBodyStep.unusedLocales.isEmpty()}"
|
||||
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/documents/#{CmsSelectedDocumentModel.itemPath}/@article-text/remove"
|
||||
|
|
|
|||
Loading…
Reference in New Issue