Refactor output document / 0016759: Output Document pmGrids 0016760: Output Document Variables

Se agrego "Grid variables" a las opciones de Type Variable en el pmVariablePicker, que despliega los campos de las grillas que tiene en el proceso
This commit is contained in:
marcelo.cuiza
2015-05-15 14:44:27 -04:00
parent d00b8a0dff
commit eabfe30c0c
2 changed files with 25 additions and 12 deletions

View File

@@ -428,6 +428,7 @@ function getDynaformsVars ($sProcessUID, $typeVars = 'all', $bIncMulSelFields =
$oData->next();
while ($aRowd = $oData->getRow()) {
$dynaform = G::json_decode($aRowd['DYN_CONTENT'],true);
if(is_array($dynaform) && sizeof($dynaform)) {
$items = $dynaform['items'][0]['items'];
foreach($items as $key => $val){
if($val[0]['type'] == 'grid'){
@@ -443,6 +444,7 @@ function getDynaformsVars ($sProcessUID, $typeVars = 'all', $bIncMulSelFields =
}
}
}
}
$oData->next();
}
}

View File

@@ -66,7 +66,18 @@ $html .= '<select name="type_variables" id="type_variables">';
$html .= '<option value="all">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_ALL_VARIABLES' )).'</option>';
$html .= '<option value="system">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_SYSTEM_VARIABLES' )).'</option>';
$html .= '<option value="process">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_PROCESS_VARIABLES' )).'</option>';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(BpmnProjectPeer::PRJ_UID);
$oCriteria->add(BpmnProjectPeer::PRJ_UID, $_REQUEST['sProcess']);
$oDataset = ProcessPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$row = $oDataset->getRow();
if (isset($row["PRJ_UID"])) {
$html .= '<option value="grid">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_GRID_VARIABLES' )).'</option>';
}
$html .= '</select> &nbsp;&nbsp;&nbsp;&nbsp;';
$html .= '</td>';