97 lines
2.9 KiB
Plaintext
97 lines
2.9 KiB
Plaintext
<%@language = "javascript" %>
|
|
<% /*
|
|
$Revision$
|
|
$Id$
|
|
|
|
File: mld_workflow.asp
|
|
|
|
Description: Beheren van mld_workflowstep
|
|
Individuele meldingen van een workflowschema
|
|
|
|
Context: start_key is altijd bekend
|
|
|
|
Notes:
|
|
*/
|
|
%>
|
|
<!-- #include file="../scf/scaffolding.inc" -->
|
|
<!-- #include file="../mgt/mgt_tools.inc" -->
|
|
<!-- #include file="../api2/model_mld_workflowstep.inc" -->
|
|
<%
|
|
|
|
var prevstep = getQParamInt("prevstep", -1);
|
|
if (prevstep > 0)
|
|
var mystart_key = Oracle.Get("COALESCE(mld_workflowstep_start_key, mld_workflowstep_key)", "mld_workflowstep", prevstep);
|
|
else
|
|
var mystart_key = getQParamInt("mystart"); // De parameter zit er niet op als we in een include-model zitten
|
|
|
|
var this_model = new model_mld_workflowstep(mystart_key);
|
|
|
|
var mode = getQParam("mode", "");
|
|
if (mode == 'list')
|
|
{
|
|
this_model.REST_POST = false; // Doen we via inline action
|
|
}
|
|
|
|
if ((mode == "edit" || mode == "save") && getQParam("id", -1) < 0) // Toevoegmode.
|
|
{
|
|
// Forceer dat ook een 'vorige stap' gekozen wordt
|
|
// Overigens geven we die in mld_workflowstep.js mee als default
|
|
this_model.fields.prevstep = this_model.includes.rules.model.fields.prevstep;
|
|
delete this_model.fields.prevstep.uniquewith;
|
|
this_model.fields.jointype.hidden_fld = true; // deze nog even verbergen
|
|
this_model.fields.stdmelding.label = L("mld_workflowrule_step_next");
|
|
this_model.record_title = L("mld_workflowrule_step_next");
|
|
this_model.fields["_hint"] = {
|
|
"dbs": "",
|
|
"label": "",
|
|
"typ": "label",
|
|
"labelvalue": L("mld_workflow_next_in_details")
|
|
}
|
|
}
|
|
|
|
var scf_params =
|
|
{
|
|
"list": {
|
|
"columns": [
|
|
//"id",
|
|
"level",
|
|
"stdmelding",
|
|
"rules.nextstep"
|
|
],
|
|
"requires": {
|
|
js: ["./mld_workflowstep.js"]
|
|
},
|
|
"actionscol": "rules.nextstep",
|
|
"actions":
|
|
[{ action: "add_step", caption: L("lcl_add") }]
|
|
},
|
|
"edit":{
|
|
"addmodal": true
|
|
},
|
|
"transit": {
|
|
"mystart": mystart_key
|
|
},
|
|
"included": {
|
|
"rules": {
|
|
"edit": {
|
|
"requires": {
|
|
js: ["./mld_workflowstep.js"]
|
|
},
|
|
"buttons": [{ title: L("mld_workflowrule_condition"), action: "build_expression(" + prevstep + ")"}]
|
|
},
|
|
"list": {
|
|
"columns": [
|
|
"id",
|
|
"nextstep",
|
|
"condition"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
};
|
|
|
|
//xxscf_params.list.orderby = ["level", "stdmelding"];
|
|
|
|
scaffolding(this_model, scf_params)
|
|
%> |