UI for managing lifecycles and workflows for content sections

Former-commit-id: 14ed70a7896bec6282388a121345dd4fa35cbabc
pull/10/head
Jens Pelzetter 2021-03-06 22:01:03 +01:00
parent d7dd75dfe0
commit e3df86ca21
14 changed files with 492 additions and 317 deletions

View File

@ -49,6 +49,9 @@ public class ConfigurationLifecyclesController {
@Inject
private ContentSectionManager sectionManager;
@Inject
private ContentSectionModel sectionModel;
@Inject
private ContentSectionsUi sectionsUi;
@ -89,6 +92,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -120,6 +124,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -127,10 +132,10 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
section, lifecycleIdentiferParam
);
}
final LifecycleDefinition definition = definitionResult.get();
@ -204,6 +209,7 @@ public class ConfigurationLifecyclesController {
@POST
@Path("/@add")
@AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED)
public String addLifecycleDefinition(
@PathParam("sectionIdentifier") final String sectionIdentifierParam,
@FormParam("label") final String label
@ -214,6 +220,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -224,6 +231,7 @@ public class ConfigurationLifecyclesController {
definition
.getLabel()
.addValue(globalizationHelper.getNegotiatedLocale(), label);
definitionRepo.save(definition);
sectionManager.addLifecycleDefinitionToContentSection(
definition, section
);
@ -247,6 +255,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -254,7 +263,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -287,6 +296,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -294,7 +304,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -327,6 +337,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -334,7 +345,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -366,6 +377,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -373,7 +385,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -406,6 +418,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -413,7 +426,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -446,6 +459,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -453,7 +467,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -485,6 +499,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -492,7 +507,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -530,6 +545,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -537,7 +553,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -562,6 +578,8 @@ public class ConfigurationLifecyclesController {
phaseDefinition
.getLabel()
.addValue(globalizationHelper.getNegotiatedLocale(), label);
phaseDefinititionRepo.save(phaseDefinition);
lifecycleManager.addPhaseDefinition(definition, phaseDefinition);
return String.format(
@ -586,6 +604,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -593,7 +612,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -608,7 +627,7 @@ public class ConfigurationLifecyclesController {
selectedLifecycleDefModel.setUuid(definition.getUuid());
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -707,6 +726,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -714,7 +734,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -722,7 +742,7 @@ public class ConfigurationLifecyclesController {
}
final LifecycleDefinition definition = definitionResult.get();
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -769,6 +789,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -776,7 +797,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -784,7 +805,7 @@ public class ConfigurationLifecyclesController {
}
final LifecycleDefinition definition = definitionResult.get();
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -797,10 +818,9 @@ public class ConfigurationLifecyclesController {
phaseDefinititionRepo.delete(phaseDefinition);
return String.format(
"redirect:/%s/configuration/lifecycles/%s/phases/%s",
"redirect:/%s/configuration/lifecycles/%s",
sectionIdentifierParam,
lifecycleIdentiferParam,
phaseIdentifierParam
lifecycleIdentiferParam
);
}
@ -821,6 +841,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -828,7 +849,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -836,7 +857,7 @@ public class ConfigurationLifecyclesController {
}
final LifecycleDefinition definition = definitionResult.get();
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -873,6 +894,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -880,7 +902,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -888,7 +910,7 @@ public class ConfigurationLifecyclesController {
}
final LifecycleDefinition definition = definitionResult.get();
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -910,7 +932,8 @@ public class ConfigurationLifecyclesController {
@POST
@Path(
"/{lifecycleIdentifier}/phases/{phaseIdentifier}/label/@remove/{locale}")
"/{lifecycleIdentifier}/phases/{phaseIdentifier}/label/@remove/{locale}"
)
@AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED)
public String removePhaseLabel(
@ -925,6 +948,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -932,7 +956,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -940,7 +964,7 @@ public class ConfigurationLifecyclesController {
}
final LifecycleDefinition definition = definitionResult.get();
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -977,6 +1001,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -984,7 +1009,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -992,7 +1017,7 @@ public class ConfigurationLifecyclesController {
}
final LifecycleDefinition definition = definitionResult.get();
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -1016,7 +1041,8 @@ public class ConfigurationLifecyclesController {
@POST
@Path(
"/{lifecycleIdentifier}/phases/{phaseIdentifier}/description/@edit/{locale}")
"/{lifecycleIdentifier}/phases/{phaseIdentifier}/description/@edit/{locale}"
)
@AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED)
public String editPhaseDescription(
@ -1032,6 +1058,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -1039,7 +1066,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -1047,7 +1074,7 @@ public class ConfigurationLifecyclesController {
}
final LifecycleDefinition definition = definitionResult.get();
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -1071,7 +1098,8 @@ public class ConfigurationLifecyclesController {
@POST
@Path(
"/{lifecycleIdentifier}/phases/{phaseIdentifier}/description/@remove/{locale}")
"/{lifecycleIdentifier}/phases/{phaseIdentifier}/description/@remove/{locale}"
)
@AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED)
public String removePhaseDescription(
@ -1086,6 +1114,7 @@ public class ConfigurationLifecyclesController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -1093,7 +1122,7 @@ public class ConfigurationLifecyclesController {
}
final Optional<LifecycleDefinition> definitionResult
= findLifecycleDefinition(section, sectionIdentifierParam);
= findLifecycleDefinition(section, lifecycleIdentiferParam);
if (!definitionResult.isPresent()) {
return showLifecycleDefinitionNotFound(
section, sectionIdentifierParam
@ -1101,7 +1130,7 @@ public class ConfigurationLifecyclesController {
}
final LifecycleDefinition definition = definitionResult.get();
final Optional<PhaseDefinition> phaseDefinitionResult
= findPhaseDefinition(definition, sectionIdentifierParam);
= findPhaseDefinition(definition, phaseIdentifierParam);
if (!phaseDefinitionResult.isPresent()) {
return showPhaseDefinitionNotFound(
section,
@ -1207,7 +1236,7 @@ public class ConfigurationLifecyclesController {
.stream()
.filter(
definition -> definition.getDefinitionId() == Long
.parseLong(phaseDefinitionIdentifierParam)
.parseLong(phaseDefinitionIdentifierParam.substring(3))
).findAny();
}

View File

@ -51,6 +51,9 @@ public class ConfigurationWorkflowController {
@Inject
private ContentSectionManager sectionManager;
@Inject
private ContentSectionModel sectionModel;
@Inject
private ContentSectionsUi sectionsUi;
@ -94,6 +97,7 @@ public class ConfigurationWorkflowController {
return sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerWorkflows(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -125,6 +129,7 @@ public class ConfigurationWorkflowController {
return sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerWorkflows(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -212,6 +217,7 @@ public class ConfigurationWorkflowController {
@POST
@Path("/@add")
@AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED)
public String addWorkflowTemplate(
@PathParam("sectionIdentifier") final String sectionIdentifierParam,
@FormParam("label") final String label
@ -222,6 +228,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -233,6 +240,7 @@ public class ConfigurationWorkflowController {
template.getName().addValue(
globalizationHelper.getNegotiatedLocale(), label
);
workflowRepo.save(template);
sectionManager.addWorkflowTemplateToContentSection(template, section);
return String.format(
@ -254,6 +262,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -293,6 +302,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -332,6 +342,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -372,6 +383,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -411,6 +423,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -450,6 +463,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -489,6 +503,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -513,7 +528,7 @@ public class ConfigurationWorkflowController {
}
@GET
@Path("/{workflowIdentifier}/tasks")
@Path("/{workflowIdentifier}/tasks/{taskIdentifier}")
@AuthorizationRequired
@Transactional(Transactional.TxType.REQUIRED)
public String showTask(
@ -527,6 +542,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -673,6 +689,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -690,6 +707,8 @@ public class ConfigurationWorkflowController {
task.getLabel().addValue(
globalizationHelper.getNegotiatedLocale(), label
);
taskRepo.save(task);
taskManager.addTask(workflow, task);
return String.format(
@ -714,6 +733,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -763,6 +783,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -813,6 +834,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -863,6 +885,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -913,6 +936,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -964,6 +988,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -1014,6 +1039,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -1064,6 +1090,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -1132,6 +1159,7 @@ public class ConfigurationWorkflowController {
sectionsUi.showContentSectionNotFound(sectionIdentifierParam);
}
final ContentSection section = sectionResult.get();
sectionModel.setSection(section);
if (!adminPermissionsChecker.canAdministerLifecycles(section)) {
return sectionsUi.showAccessDenied(
"sectionIdentifier", sectionIdentifierParam
@ -1251,7 +1279,7 @@ public class ConfigurationWorkflowController {
models.put("sectionIdentifier", section.getLabel());
models.put("workflowTemplateIdentifier", workflowTemplateIdentifier);
models.put("workflowTaskTemplateIdentifier", taskTemplateIdentifier);
return "org/librecms/ui/contentsection/configuration/workflowtask-not-found.xhtml";
return "org/librecms/ui/contentsection/configuration/workflow-task-not-found.xhtml";
}
private WorkflowTemplateListModel buildWorkflowTemplateListModel(
@ -1276,22 +1304,6 @@ public class ConfigurationWorkflowController {
) {
final WorkflowTaskTemplateListModel model
= new WorkflowTaskTemplateListModel();
model.setBlockedTasks(
task
.getBlockedTasks()
.stream()
.map(dependency -> dependency.getBlockedTask())
.map(this::buildWorkflowTaskTemplateListModel)
.collect(Collectors.toList())
);
model.setBlockingTasks(
task
.getBlockingTasks()
.stream()
.map(dependency -> dependency.getBlockingTask())
.map(this::buildWorkflowTaskTemplateListModel)
.collect(Collectors.toList())
);
model.setDescription(
globalizationHelper.getValueFromLocalizedString(
task.getDescription()

View File

@ -28,7 +28,9 @@ public class ContentSectionApplication extends Application {
classes.add(CategoriesController.class);
classes.add(ConfigurationController.class);
classes.add(ConfigurationDocumentTypesController.class);
classes.add(ConfigurationLifecyclesController.class);
classes.add(ConfigurationRolesController.class);
classes.add(ConfigurationWorkflowController.class);
classes.add(ContentSectionController.class);
classes.add(DocumentFolderController.class);
classes.add(IsAuthenticatedFilter.class);

View File

@ -25,10 +25,6 @@ public class WorkflowTaskTemplateListModel {
private String description;
private List<WorkflowTaskTemplateListModel> blockedTasks;
private List<WorkflowTaskTemplateListModel> blockingTasks;
public long getTaskId() {
return taskId;
}
@ -45,26 +41,6 @@ public class WorkflowTaskTemplateListModel {
this.uuid = uuid;
}
public List<WorkflowTaskTemplateListModel> getBlockedTasks() {
return Collections.unmodifiableList(blockedTasks);
}
public void setBlockedTasks(
final List<WorkflowTaskTemplateListModel> blockedTasks
) {
this.blockedTasks = new ArrayList<>(blockedTasks);
}
public List< WorkflowTaskTemplateListModel> getBlockingTasks() {
return Collections.unmodifiableList(blockingTasks);
}
public void setBlockingTasks(
final List<WorkflowTaskTemplateListModel> blockingTasks
) {
this.blockingTasks = new ArrayList<>(blockingTasks);
}
public String getLabel() {
return label;
}

View File

@ -58,7 +58,9 @@
#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.default_delay.label']}
</dt>
<dd>
#{SelectedPhaseDefinitionModel.defaultDelay}
#{SelectedPhaseDefinitionModel.defaultDelay.days} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.days']}
#{SelectedPhaseDefinitionModel.defaultDelay.hours} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.hours']}
#{SelectedPhaseDefinitionModel.defaultDelay.minutes} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.minutes']}
</dd>
</div>
<div>
@ -66,7 +68,9 @@
#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.default_duration.label']}
</dt>
<dd>
#{SelectedPhaseDefinitionModel.defaultDuration}
#{SelectedPhaseDefinitionModel.defaultDuration.days} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.days']}
#{SelectedPhaseDefinitionModel.defaultDuration.hours} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.hours']}
#{SelectedPhaseDefinitionModel.defaultDuration.minutes} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.minutes']}
</dd>
</div>
</dl>
@ -102,20 +106,56 @@
</button>
</div>
<div class="modal-content">
<bootstrap:formGroupNumber
help="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.help']}"
inputId="add-phase-dialog-default-delay"
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.label']}"
name="defaultDelay"
value="#{SelectedPhaseDefinitionModel.defaultDelay}"
/>
<bootstrap:formGroupNumber
help="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.help']}"
inputId="add-phase-dialog-default-duration"
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.label']}"
name="defaultDuration"
value="#{SelectedPhaseDefinitionModel.defaultDuration}"
/>
<fieldset>
<legend>#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.label']}</legend>
<small class="text-muted">#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.help']}</small>
<bootstrap:formGroupNumber
help="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.days.help']}"
inputId="add-phase-dialog-default-delay-days"
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.days.label']}"
name="defaultDelayDays"
value="0"
/>
<bootstrap:formGroupNumber
help="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.hours.help']}"
inputId="add-phase-dialog-default-delay-hours"
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.hours.label']}"
name="defaultDelayHours"
value="0"
/>
<bootstrap:formGroupNumber
help="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.minutes.help']}"
inputId="add-phase-dialog-default-delay-minutes"
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.minutes.label']}"
name="defaultDelayDays"
value="0"
/>
</fieldset>
<fieldset>
<legend>#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.label']}</legend>
<small class="text-muted">#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.help']}</small>
<bootstrap:formGroupNumber
help="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.help.days']}"
inputId="add-phase-dialog-default-duration-days"
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.label.days']}"
name="defaultDurationDays"
value="0"
/>
<bootstrap:formGroupNumber
help="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.help.hours']}"
inputId="add-phase-dialog-default-duration-hours"
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.label.hours']}"
name="defaultDurationHours"
value="0"
/>
<bootstrap:formGroupNumber
help="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.help.minutes']}"
inputId="add-phase-dialog-default-duration-minutes"
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_duration.label.minutes']}"
name="defaultDurationMinutes"
value="0"
/>
</fieldset>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
@ -151,7 +191,7 @@
editDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.label.edit.value.label']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/lifecycles/UUID-#{SelectedLifecycleDefinitionModel.uuid}/phases/ID-#{SelectedPhaseDefinitionModel.definitionId}/label/@edit"
editorId="lifecycle-label"
hasUnusedLocales="#{SelectedLifecycleDefinitionModel.hasUnusedLabelLocales}"
hasUnusedLocales="#{SelectedPhaseDefinitionModel.hasUnusedLabelLocales}"
objectIdentifier="ID-#{SelectedPhaseDefinitionModel.definitionId}"
removeButtonLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.label.remove.button']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.label.remove.cancel']}"
@ -160,8 +200,8 @@
removeDialogTitle="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.label.remove.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/lifecycles/UUID-#{SelectedLifecycleDefinitionModel.uuid}/phases/ID-#{SelectedPhaseDefinitionModel.definitionId}/label/@remove"
title="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.label.title']}"
unusedLocales="#{SelectedLifecycleDefinitionModel.unusedLabelLocales}"
values="#{SelectedLifecycleDefinitionModel.label}"
unusedLocales="#{SelectedPhaseDefinitionModel.unusedLabelLocales}"
values="#{SelectedPhaseDefinitionModel.label}"
/>
<libreccm:localizedStringEditor
@ -182,7 +222,7 @@
editDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.description.edit.value.description']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/lifecycles/UUID-#{SelectedLifecycleDefinitionModel.uuid}/phases/ID-#{SelectedPhaseDefinitionModel.definitionId}/description/@edit"
editorId="lifecycle-description"
hasUnusedLocales="#{SelectedLifecycleDefinitionModel.hasUnusedLabelLocales}"
hasUnusedLocales="#{SelectedPhaseDefinitionModel.hasUnusedDescriptionLocales}"
objectIdentifier="ID-#{SelectedPhaseDefinitionModel.definitionId}"
removeButtonLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.description.remove.button']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.description.remove.cancel']}"
@ -191,8 +231,8 @@
removeDialogTitle="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.description.remove.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/lifecycles/UUID-#{SelectedLifecycleDefinitionModel.uuid}/phases/ID-#{SelectedPhaseDefinitionModel.definitionId}/description/@remove"
title="#{CmsAdminMessages['contentsection.configuration.lifecycles.phase_details.description.title']}"
unusedLocales="#{SelectedLifecycleDefinitionModel.unusedLabelLocales}"
values="#{SelectedLifecycleDefinitionModel.description}"
unusedLocales="#{SelectedPhaseDefinitionModel.unusedDescriptionLocales}"
values="#{SelectedPhaseDefinitionModel.description}"
/>
</div>

View File

@ -92,7 +92,7 @@
editDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.lifecycle_details.description.edit.value.description']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/lifecycles/UUID-#{SelectedLifecycleDefinitionModel.uuid}/description/@edit"
editorId="lifecycle-description"
hasUnusedLocales="#{SelectedLifecycleDefinitionModel.hasUnusedLabelLocales}"
hasUnusedLocales="#{SelectedLifecycleDefinitionModel.hasUnusedDescriptionLocales}"
objectIdentifier="UUID-#{SelectedLifecycleDefinitionModel.uuid}"
removeButtonLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.lifecycle_details.description.remove.button']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.lifecycles.lifecycle_details.description.remove.cancel']}"
@ -101,7 +101,7 @@
removeDialogTitle="#{CmsAdminMessages['contentsection.configuration.lifecycles.lifecycle_details.description.remove.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/lifecycles/UUID-#{SelectedLifecycleDefinitionModel.uuid}/description/@remove"
title="#{CmsAdminMessages['contentsection.configuration.lifecycles.lifecycle_details.description.title']}"
unusedLocales="#{SelectedLifecycleDefinitionModel.unusedLabelLocales}"
unusedLocales="#{SelectedÜ.unusedDescriptionLocales}"
useTextarea="true"
values="#{SelectedLifecycleDefinitionModel.description}"
/>
@ -110,7 +110,7 @@
<div class="mb-2">
<div class="text-right">
<button class="btn btn-primary"
<button class="btn btn-secondary"
data-toggle="modal"
data-target="#add-phase-dialog"
type="button">
@ -147,7 +147,7 @@
label="#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.label.label']}"
name="label"
/>
<fieldset class="form-group row">
<fieldset>
<legend>#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.label']}</legend>
<small class="text-muted">#{CmsAdminMessages['contentsection.configuration.lifecycle.phases.add.dialog.default_delay.help']}</small>
<bootstrap:formGroupNumber
@ -239,8 +239,16 @@
#{phaseDef.label}
</a>
</td>
<td>#{phaseDef.defaultDelay}</td>
<td>#{phaseDef.defaultDuration}</td>
<td>
#{phaseDef.defaultDelay.days} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.days']}
#{phaseDef.defaultDelay.hours} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.hours']}
#{phaseDef.defaultDelay.minutes} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.minutes']}
</td>
<td>
#{phaseDef.defaultDuration.days} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.days']}
#{phaseDef.defaultDuration.hours} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.hours']}
#{phaseDef.defaultDuration.minutes} #{CmsAdminMessages['contentsection.configuration.lifecycle.phases.duration.minutes']}
</td>
<td>
<button class="btn btn-info"
data-toggle="modal"

View File

@ -92,13 +92,13 @@
</div>
</div>
</div>
<table class="table table-hover">
<table class="table table-hover lifecycles-table">
<thead>
<tr>
<th scope="col">
#{CmsAdminMessages['contentsection.configuration.lifecycles.table.cols.label']}
</th>
<th colspan="2">
<th class="text-center" colspan="2">
#{CmsAdminMessages['contentsection.configuration.lifecycles.table.cols.actions']}
</th>
</tr>
@ -112,7 +112,7 @@
#{lifecycleDef.label}
</a>
</td>
<td>
<td class="info-col">
<button
class="btn btn-info"
data-toggle="modal"
@ -132,7 +132,7 @@
<div class="modal-content">
<div class="modal-header">
<h2 id="lifecycle-#{lifecycleDef.uuid}-info-dialog-title">
#{CmsAdminMessages.getMessage('contentsection.configuration.lifecycles.info.dialog.title', lifecycleDef.label)}
#{CmsAdminMessages.getMessage('contentsection.configuration.lifecycles.info.dialog.title', [lifecycleDef.label])}
</h2>
<button aria-label="#{CmsAdminMessages['contentsection.configuration.lifecycles.info.dialog.close']}"
class="close"
@ -157,7 +157,7 @@
</div>
</div>
</td>
<td>
<td class="del-col">
<libreccm:deleteDialog
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/lifecycles/UUID-#{lifecycleDef.uuid}/@delete"
buttonText="#{CmsAdminMessages['contentsection.configuration.lifecycles.delete_button.label']}"

View File

@ -49,7 +49,7 @@
</c:forEach>
</c:if>
<h1>#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.task_details.title', [SelectedWorkflowTemplateModel.displayName ,SelectedWorkflowTaskTemplateModel.displayLabel])}</h1>
<h1>#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.task_details.title', [ContentSectionModel.sectionName, SelectedWorkflowTemplate.displayName ,SelectedWorkflowTaskTemplateModel.displayLabel])}</h1>
<libreccm:localizedStringEditor
addButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.task_details.label.add.button']}"
@ -147,7 +147,7 @@
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-content">
<div class="modal-body">
<bootstrap:formGroupSelect
help="#{CmsAdminMessages['contentsection.configuration.workflow.task_details.blocking_tasks.add.dialog.task_select.help']}"
inputId="add-blocking-task-dialog-task-select"
@ -171,6 +171,87 @@
</div>
</div>
</div>
<table class="table table-hover workflow-tasks-table">
<thead>
<tr>
<th scope="col">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.cols.label']}
</th>
<th colspan="2">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.cols.actions']}
</th>
</tr>
</thead>
<tbody>
<c:forEach items="#{SelectedWorkflowTaskTemplateModel.blockingTasks}"
var="task">
<tr>
<td>
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/tasks/UUID-#{task.uuid}">
#{task.label}
</a>
</td>
<td class="info-col">
<button class="btn btn-info"
data-toggle="modal"
data-target="#task-#{task.uuid}-info-dialog"
type="button">
<bootstrap:svgIcon icon="info-circle" />
<span class="sr-only">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.info_button.label']}
</span>
</button>
<div aria-hidden="true"
aria-labelledby="task-#{task.uuid}-info-dialog-title"
class="modal fade"
id="task-#{task.uuid}-info-dialog"
tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title"
id="task-#{task.uuid}-info-dialog-title">
#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.tasks.info.dialog.title', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.displayName, task.label])}
</h2>
<button aria-label="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.info.dialog.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<p>
#{task.description}
</p>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.info.dialog.close']}
</button>
</div>
</div>
</div>
</div>
</td>
<td class="del-col">
<libreccm:deleteDialog
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/tasks/UUID-#{SelectedWorkflowTaskTemplateModel.uuid}/blockingTasks/#{task.uuid}/@remove"
buttonText="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.button.label']}"
cancelLabel="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.close']}"
confirmLabel="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.confirm']}"
dialogId="task-#{task.taskId}-remove-dialog"
dialogTitle="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.title']}"
message="#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.tasks.remove.dialog.message', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.displayName, task.label])}"
/>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</ui:define>

View File

@ -41,211 +41,212 @@
</c:forEach>
</c:if>
<h1>#{CmsAdminMessages.getMessage('contentsection.configuration.workflows.workflow_details.title', [SelectedWorkflowTemplateModel.displayName])}</h1>
</div>
<h1>#{CmsAdminMessages.getMessage('contentsection.configuration.workflows.workflow_details.title', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.displayName])}</h1>
<libreccm:localizedStringEditor
addButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.button']}"
addDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.cancel']}"
addDialogLocaleSelectHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.locale.help']}"
addDialogLocaleSelectLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.locale.label']}"
addDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.locale.add.submit']}"
addDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.title']}"
addDialogValueHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.value.help']}"
addDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.value.label']}"
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/label/@add"
editButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.button']}"
editDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.cancel']}"
editDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.submit']}"
editDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.title']}"
editDialogValueHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.value.help']}"
editDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.value.label']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/label/@edit"
editorId="workflow-label"
hasUnusedLocales="#{SelectedWorkflowTemplateModel.hasUnusedNameLocales}"
objectIdentifier="UUID-#{SelectedWorkflowTemplateModel.uuid}"
removeButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.button']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.cancel']}"
removeDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.submit']}"
removeDialogText="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.text']}"
removeDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/label/@remove"
title="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.title']}"
unusedLocales="#{SelectedWorkflowTemplateModel.unusedNameLocales}"
values="#{SelectedWorkflowTemplateModel.label}"
/>
<libreccm:localizedStringEditor
addButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.button']}"
addDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.cancel']}"
addDialogLocaleSelectHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.locale.help']}"
addDialogLocaleSelectLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.locale.label']}"
addDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.locale.add.submit']}"
addDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.title']}"
addDialogValueHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.value.help']}"
addDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.value.label']}"
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/description/@add"
editButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.button']}"
editDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.cancel']}"
editDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.submit']}"
editDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.title']}"
editDialogValueHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.value.help']}"
editDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.value.description']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/description/@edit"
editorId="workflow-description"
hasUnusedLocales="#{SelectedWorkflowTemplateModel.hasUnusedLabelLocales}"
objectIdentifier="UUID-#{SelectedWorkflowTemplateModel.uuid}"
removeButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.button']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.cancel']}"
removeDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.submit']}"
removeDialogText="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.text']}"
removeDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/description/@remove"
title="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.title']}"
unusedLocales="#{SelectedWorkflowTemplateModel.unusedLabelLocales}"
useTextarea="true"
values="#{SelectedWorkflowTemplateModel.description}"
/>
<libreccm:localizedStringEditor
addButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.button']}"
addDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.cancel']}"
addDialogLocaleSelectHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.locale.help']}"
addDialogLocaleSelectLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.locale.label']}"
addDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.locale.add.submit']}"
addDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.title']}"
addDialogValueHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.value.help']}"
addDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.add.value.label']}"
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/label/@add"
editButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.button']}"
editDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.cancel']}"
editDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.submit']}"
editDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.title']}"
editDialogValueHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.value.help']}"
editDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.edit.value.label']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/label/@edit"
editorId="workflow-label"
hasUnusedLocales="#{SelectedWorkflowTemplateModel.hasUnusedNameLocales}"
objectIdentifier="UUID-#{SelectedWorkflowTemplateModel.uuid}"
removeButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.button']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.cancel']}"
removeDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.submit']}"
removeDialogText="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.text']}"
removeDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.remove.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/label/@remove"
title="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.name.title']}"
unusedLocales="#{SelectedWorkflowTemplateModel.unusedNameLocales}"
values="#{SelectedWorkflowTemplateModel.name}"
/>
<h2>#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.tasks.title']}</h2>
<libreccm:localizedStringEditor
addButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.button']}"
addDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.cancel']}"
addDialogLocaleSelectHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.locale.help']}"
addDialogLocaleSelectLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.locale.label']}"
addDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.locale.add.submit']}"
addDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.title']}"
addDialogValueHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.value.help']}"
addDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.add.value.label']}"
addMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/description/@add"
editButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.button']}"
editDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.cancel']}"
editDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.submit']}"
editDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.title']}"
editDialogValueHelp="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.value.help']}"
editDialogValueLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.edit.value.description']}"
editMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/description/@edit"
editorId="workflow-description"
hasUnusedLocales="#{SelectedWorkflowTemplateModel.hasUnusedDescriptionLocales}"
objectIdentifier="UUID-#{SelectedWorkflowTemplateModel.uuid}"
removeButtonLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.button']}"
removeDialogCancelLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.cancel']}"
removeDialogSubmitLabel="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.submit']}"
removeDialogText="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.text']}"
removeDialogTitle="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.remove.title']}"
removeMethod="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/description/@remove"
title="#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.description.title']}"
unusedLocales="#{SelectedWorkflowTemplateModel.unusedDescriptionLocales}"
useTextarea="true"
values="#{SelectedWorkflowTemplateModel.description}"
/>
<div class="mb-2">
<div class="text-right">
<button class="btn btn-primary"
data-toggle="modal"
data-target="#add-task-dialog"
type="button">
<bootstrap:svgIcon icon="plus-circle" />
<span>#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add']}</span>
</button>
</div>
<h2>#{CmsAdminMessages['contentsection.configuration.workflows.workflow_details.tasks.title']}</h2>
<div aria-hidden="true"
aria-labelledby="add-task-dialog-title"
class="modal fade"
id="add-task-dialog"
tabindex="-1">
<div class="modal-dialog">
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/tasks/@add"
class="modal-content"
method="post">
<div class="modal-header">
<h2 class="modal-title"
id="add-task-dialog-title">
#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.tasks.add.dialog.title', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.displayName])}
</h2>
<button aria-label="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<bootstrap:formGroupText
help="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.label.help']}"
inputId="add-task-dialog-label"
label="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.label.label']}"
name="label"
/>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.close']}
</button>
<button class="btn btn-primary"
type="submit" >
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.submit']}
</button>
</div>
</form>
<div class="mb-2">
<div class="text-right">
<button class="btn btn-primary"
data-toggle="modal"
data-target="#add-task-dialog"
type="button">
<bootstrap:svgIcon icon="plus-circle" />
<span>#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add']}</span>
</button>
</div>
</div>
<table class="table table-hover">
<thead>
<tr>
<th scope="col">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.cols.label']}
</th>
<th colspan="2">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.cols.actions']}
</th>
</tr>
</thead>
<tbody>
<c:forEach items="#{SelectedWorkflowTemplateModel.tasks}"
var="task">
<tr>
<td>
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/tasks/UUID-#{task.uuid}">
#{task.label}
</a>
</td>
<td>
<button class="btn btn-info"
data-toggle="modal"
data-target="#task-#{task.uuid}-info-dialog"
<div aria-hidden="true"
aria-labelledby="add-task-dialog-title"
class="modal fade"
id="add-task-dialog"
tabindex="-1">
<div class="modal-dialog">
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/tasks/@add"
class="modal-content"
method="post">
<div class="modal-header">
<h2 class="modal-title"
id="add-task-dialog-title">
#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.tasks.add.dialog.title', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.displayName])}
</h2>
<button aria-label="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="info-circle" />
<span class="sr-only">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.info_button.label']}
</span>
<bootstrap:svgIcon icon="x" />
</button>
<div aria-hidden="true"
aria-labelledby="task-#{task.uuid}-info-dialog-title"
class="modal fade"
id="task-#{task.uuid}-info-dialog"
tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title"
id="task-#{task.uuid}-info-dialog-title">
#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.tasks.info.dialog.title', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.label, task.label])}
</h2>
<button aria-label="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.info.dialog.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<p>
#{task.description}
</p>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.info.dialog.close']}
</button>
</div>
<div class="modal-body">
<bootstrap:formGroupText
help="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.label.help']}"
inputId="add-task-dialog-label"
label="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.label.label']}"
name="label"
/>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.close']}
</button>
<button class="btn btn-primary"
type="submit" >
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.add.dialog.submit']}
</button>
</div>
</form>
</div>
</div>
<table class="table table-hover workflow-tasks-table">
<thead>
<tr>
<th scope="col">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.cols.label']}
</th>
<th colspan="2">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.cols.actions']}
</th>
</tr>
</thead>
<tbody>
<c:forEach items="#{SelectedWorkflowTemplateModel.tasks}"
var="task">
<tr>
<td>
<a href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/tasks/UUID-#{task.uuid}">
#{task.label}
</a>
</td>
<td class="info-col">
<button class="btn btn-info"
data-toggle="modal"
data-target="#task-#{task.uuid}-info-dialog"
type="button">
<bootstrap:svgIcon icon="info-circle" />
<span class="sr-only">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.table.info_button.label']}
</span>
</button>
<div aria-hidden="true"
aria-labelledby="task-#{task.uuid}-info-dialog-title"
class="modal fade"
id="task-#{task.uuid}-info-dialog"
tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title"
id="task-#{task.uuid}-info-dialog-title">
#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.tasks.info.dialog.title', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.displayName, task.label])}
</h2>
<button aria-label="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.info.dialog.close']}"
class="close"
data-dismiss="modal"
type="button">
<bootstrap:svgIcon icon="x" />
</button>
</div>
<div class="modal-body">
<p>
#{task.description}
</p>
</div>
<div class="modal-footer">
<button class="btn btn-warning"
data-dismiss="modal"
type="button">
#{CmsAdminMessages['contentsection.configuration.workflow.tasks.info.dialog.close']}
</button>
</div>
</div>
</div>
</div>
</div>
</td>
<td>
<libreccm:deleteDialog
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/tasks/UUID-#{task.uuid}/@remove"
buttonText="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.button.label']}"
cancelLabel="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.close']}"
confirmLabel="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.confirm']}"
dialogId="task-#{task.definitionId}-remove-dialog"
dialogTitle="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.title']}"
message="#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.tasks.remove.dialog.message', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.displayName, task.label])}"
/>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td>
<td class="del-col">
<libreccm:deleteDialog
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{SelectedWorkflowTemplateModel.uuid}/tasks/UUID-#{task.uuid}/@remove"
buttonText="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.button.label']}"
cancelLabel="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.close']}"
confirmLabel="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.confirm']}"
dialogId="task-#{task.taskId}-remove-dialog"
dialogTitle="#{CmsAdminMessages['contentsection.configuration.workflow.tasks.remove.dialog.title']}"
message="#{CmsAdminMessages.getMessage('contentsection.configuration.workflow.tasks.remove.dialog.message', [ContentSectionModel.sectionName, SelectedWorkflowTemplateModel.displayName, task.label])}"
/>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</ui:define>
</ui:composition>

View File

@ -75,7 +75,8 @@
help="#{CmsAdminMessages['contentsection.configuration.workflows.add.dialog.label.help']}"
inputId="add-workflow-dialog-label"
label="#{CmsAdminMessages['contentsection.configuration.workflows.add.dialog.label.label']}"
name="label" />
name="label"
required="true" />
</div>
<div class="modal-footer">
<button class="btn btn-warning"
@ -92,7 +93,7 @@
</div>
</div>
</div>
<table class="table table-hover">
<table class="table table-hover workflows-table">
<thead>
<tr>
<th scope="col">
@ -112,7 +113,7 @@
#{workflowTemplate.name}
</a>
</td>
<td>
<td class="info-col">
<button
class="btn btn-info"
data-toggle="modal"
@ -132,7 +133,7 @@
<div class="modal-content">
<div class="modal-header">
<h2 id="workflow-#{workflowTemplate.uuid}-info-dialog-title">
#{CmsAdminMessages.getMessage('contentsection.configuration.workflows.info.dialog.title', workflowTemplate.name)}
#{CmsAdminMessages.getMessage('contentsection.configuration.workflows.info.dialog.title', [workflowTemplate.name])}
</h2>
<button aria-label="#{CmsAdminMessages['contentsection.configuration.workflows.info.dialog.close']}"
class="close"
@ -157,7 +158,7 @@
</div>
</div>
</td>
<td>
<td class="del-col">
<libreccm:deleteDialog
actionTarget="#{mvc.basePath}/#{ContentSectionModel.sectionName}/configuration/workflows/UUID-#{workflowTemplate.uuid}/@delete"
buttonText="#{CmsAdminMessages['contentsection.configuration.workflows.delete_button.label']}"

View File

@ -426,7 +426,6 @@ contentsection.configuration.documenttypes.remove_dialog.title=Confirm Document
contentsection.configuration.documenttypes.remove_dialog.message=Are you sure to remove the document type {1} from content section {0}?
contentsection.configuration.lifecycles.add=Add lifecycle definition
contentsection.configuration.lifecycles.add.dialog.title=Add a lifecycle definition to content section {0}
'contentsection.configuration.lifecycles.add.dialog.close=Cancel
contentsection.configuration.lifecycles.add.dialog.label.help=Label for the new lifecycle definition
contentsection.configuration.lifecycles.add.dialog.label.label=Label
contentsection.configuration.lifecycles.add.dialog.submit=Add lifecycle definition
@ -438,7 +437,7 @@ contentsection.configuration.lifecycles.info.dialog.close=Close
contentsection.configuration.lifecycles.delete_button.label=Delete
contentsection.configuration.lifecycles.delete_dialog.cancel=Cancel
contentsection.configuration.lifecycles.delete_dialog.confirm=Delete lifecycle definition
'contentsection.configuration.lifecycles.delete_dialog.title=Confirm lifecycle definition deletion
contentsection.configuration.lifecycles.delete_dialog.title=Confirm lifecycle definition deletion
contentsection.configuration.lifecycles.delete_dialog.message=Are your sure to delete the lifecycle definition {1} for Content Section {0}?
contentsection.configuration.lifecycles.lifecycle_details.title=Details of Lifecycle Definition {0}
contentsection.configuration.lifecycles.lifecycle_details.label.add.button=Add localized label
@ -617,7 +616,6 @@ contentsection.configuration.workflows.workflow_details.description.edit.title=E
contentsection.configuration.workflows.workflow_details.description.edit.value.help=The localized description
contentsection.configuration.workflows.workflow_details.description.edit.value.description=Description
contentsection.configuration.workflows.workflow_details.description.remove.button=Remove
contentsection.configuration.workflows.workflow_details.description.remove.cancelq=Cancel
contentsection.configuration.workflows.workflow_details.description.remove.submit=Remove
contentsection.configuration.workflows.workflow_details.description.remove.text=Are you sure to remove this localized description?
contentsection.configuration.workflows.workflow_details.description.remove.title=Confirm removal of localized description
@ -690,3 +688,11 @@ contentsection.configuration.workflow.task_details.blocking_tasks.add.dialog.sub
contentsection.workflow.tasks.circular_dependency=Adding the task {3} as blocking task to task {2} of workflow {1} of Content Section {0} would create a circular dependency.
contentsection.workflow.not_found=Content Section {0} has not workflow {1}.
contentsection.workflow_tasks.not_found=No task {2} found for workflow {1} of Content Section {0}.
contentsection.configuration.lifecycles.add.dialog.close=Cancel
contentsection.configuration.lifecycles.lifecycle_details.phases.title=Phases
contentsection.configuration.lifecycle.phases.duration.days=d
contentsection.configuration.lifecycle.phases.duration.hours=h
contentsection.configuration.lifecycle.phases.duration.minutes=min
contentsection.configuration.workflows.workflow_details.description.remove.cancel=Cancel
contentsection.configuration.workflow.tasks.add.dialog.title=Add task to workflow {1} of Content Section {0}
contentsection.configuration.lifecycles.phases.title=Phases

View File

@ -427,7 +427,6 @@ contentsection.configuration.documenttypes.remove_dialog.title=Entfernen des Dok
contentsection.configuration.documenttypes.remove_dialog.message=Sind Sie sicher, dass Sie den Dokumenttyp {1} aus der Content Section {0} entfernen wollen?
contentsection.configuration.lifecycles.add=Lebenszyklus-Definition hinzuf\u00fcgen
contentsection.configuration.lifecycles.add.dialog.title=Einen Lebenszyklus-Definition der Content Section {0} hinzuf\u00fcgen
'contentsection.configuration.lifecycles.add.dialog.close=Abbrechen
contentsection.configuration.lifecycles.add.dialog.label.help=Bezeichnung der neuen Lebenszyklus-Definition
contentsection.configuration.lifecycles.add.dialog.label.label=Bezeichnung
contentsection.configuration.lifecycles.add.dialog.submit=Lebenszyklus-Definition hinzf\u00fcgen
@ -439,7 +438,7 @@ contentsection.configuration.lifecycles.info.dialog.close=Schlie\u00dfen
contentsection.configuration.lifecycles.delete_button.label=L\u00f6schen
contentsection.configuration.lifecycles.delete_dialog.cancel=Abbrechen
contentsection.configuration.lifecycles.delete_dialog.confirm=Lebenszyklus-Definition l\u00f6schen
'contentsection.configuration.lifecycles.delete_dialog.title=L\u00f6schen der Lebenszyklus-Definition best\u00e4tigen
contentsection.configuration.lifecycles.delete_dialog.title=L\u00f6schen der Lebenszyklus-Definition best\u00e4tigen
contentsection.configuration.lifecycles.delete_dialog.message=Sind Sie sicher, dass Sie die Lebenszyklus-Definition {1} f\u00fcr die Content Section {0} l\u00f6schen wollen?
contentsection.configuration.lifecycles.lifecycle_details.title=Details der Lebenszyklus Definition {0}
contentsection.configuration.lifecycles.lifecycle_details.label.add.button=Lokalisierte Beschreibung hinzuf\u00fcgen
@ -618,7 +617,6 @@ contentsection.configuration.workflows.workflow_details.description.edit.title=L
contentsection.configuration.workflows.workflow_details.description.edit.value.help=Die lokaliserte Beschreibung
contentsection.configuration.workflows.workflow_details.description.edit.value.description=Beschreibung
contentsection.configuration.workflows.workflow_details.description.remove.button=Entfernen
contentsection.configuration.workflows.workflow_details.description.remove.cancelq=Abbrechen
contentsection.configuration.workflows.workflow_details.description.remove.submit=Entfernen
contentsection.configuration.workflows.workflow_details.description.remove.text=Sind Sie sicher, dass Sie diese lokalisierte Beschreibung entfernen wollen?
contentsection.configuration.workflows.workflow_details.description.remove.title=Entfernen einer lokaliserten Beschreibung best\u00e4tigen
@ -691,3 +689,11 @@ contentsection.configuration.workflow.task_details.blocking_tasks.add.dialog.sub
contentsection.workflow.tasks.circular_dependency=Das Hinzuf\u00fcgen der Aufgabe {3} als blockierende Aufgabe zur Aufgabe {2} des Arbeitsablaufs {1} der Content Section {0} w\u00fcrde eine zirkul\u00e4re Abh\u00e4nigkeit erzeugen.
contentsection.workflow.not_found=Keine Arbeitsablauf {1} f\u00fcr Content Section {0} gefunden.
contentsection.workflow_tasks.not_found=Arbeitsablauf {1} der Content Section {0} hat keine Aufgabe {2}.
contentsection.configuration.lifecycles.add.dialog.close=Abbrechen
contentsection.configuration.lifecycles.lifecycle_details.phases.title=Phasen
contentsection.configuration.lifecycle.phases.duration.days=d
contentsection.configuration.lifecycle.phases.duration.hours=h
contentsection.configuration.lifecycle.phases.duration.minutes=min
contentsection.configuration.workflows.workflow_details.description.remove.cancel=Abbrechen
contentsection.configuration.workflow.tasks.add.dialog.title=Aufgabe zum Arbeitsablauf {1} der Content Section {0} hinzuf\u00fcgen
contentsection.configuration.lifecycles.phases.title=Phasen

View File

@ -114,3 +114,15 @@ table.contentsection-roles-table {
width: 11em;
}
}
table.lifecycles-table,
table.workflows-table,
table.workflow-tasks-table {
td.info-col {
width: 3em;
}
td.del-col {
width: 9em;
}
}

View File

@ -141,6 +141,7 @@ public class TaskManager implements Serializable {
}
final TaskDependency dependency = new TaskDependency();
dependency.setUuid(UUID.randomUUID().toString());
dependency.setBlockedTask(blockedTask);
dependency.setBlockingTask(blockingTask);