<?php
global $lang, $app;

$config->risk->dtable = new stdclass();
$config->risk->dtable->fieldList['id']['name']     = 'id';
$config->risk->dtable->fieldList['id']['title']    = $lang->idAB;
$config->risk->dtable->fieldList['id']['type']     = 'checkID';
$config->risk->dtable->fieldList['id']['fixed']    = 'left';
$config->risk->dtable->fieldList['id']['sortType'] = true;
$config->risk->dtable->fieldList['id']['group']    = 1;

$config->risk->dtable->fieldList['name']['name']  = 'name';
$config->risk->dtable->fieldList['name']['title'] = $lang->risk->name;
$config->risk->dtable->fieldList['name']['type']  = 'title';
$config->risk->dtable->fieldList['name']['fixed'] = 'left';
$config->risk->dtable->fieldList['name']['link']  = array('module' => 'risk', 'method' => 'view', 'params' => "riskID={id}&from=" . ($app->tab == 'safe' ? 'pi' : $app->tab));
$config->risk->dtable->fieldList['name']['group'] = 1;

$config->risk->dtable->fieldList['pri']['name']     = 'pri';
$config->risk->dtable->fieldList['pri']['title']    = $lang->risk->priAB;
$config->risk->dtable->fieldList['pri']['type']     = 'pri';
$config->risk->dtable->fieldList['pri']['priList']  = $lang->risk->priList;
$config->risk->dtable->fieldList['pri']['minWidth'] = 80;
$config->risk->dtable->fieldList['pri']['group']    = 2;

$config->risk->dtable->fieldList['rate']['name']     = 'rate';
$config->risk->dtable->fieldList['rate']['title']    = $lang->risk->rate;
$config->risk->dtable->fieldList['rate']['type']     = 'number';
$config->risk->dtable->fieldList['rate']['minWidth'] = 100;
$config->risk->dtable->fieldList['rate']['group']    = 3;

$config->risk->dtable->fieldList['status']['name']      = 'status';
$config->risk->dtable->fieldList['status']['title']     = $lang->risk->status;
$config->risk->dtable->fieldList['status']['type']      = 'status';
$config->risk->dtable->fieldList['status']['statusMap'] = $lang->risk->statusList;
$config->risk->dtable->fieldList['status']['group']     = 4;

$config->risk->dtable->fieldList['strategy']['name']     = 'strategy';
$config->risk->dtable->fieldList['strategy']['title']    = $lang->risk->strategy;
$config->risk->dtable->fieldList['strategy']['type']     = 'category';
$config->risk->dtable->fieldList['strategy']['sortType'] = true;
$config->risk->dtable->fieldList['strategy']['group']    = 4;

$config->risk->dtable->fieldList['createdBy']['name']     = 'createdBy';
$config->risk->dtable->fieldList['createdBy']['title']    = $lang->risk->createdBy;
$config->risk->dtable->fieldList['createdBy']['type']     = 'user';
$config->risk->dtable->fieldList['createdBy']['sortType'] = true;
$config->risk->dtable->fieldList['createdBy']['group']    = 5;

$config->risk->dtable->fieldList['team']['name']  = 'team';
$config->risk->dtable->fieldList['team']['title'] = $lang->risk->team;
$config->risk->dtable->fieldList['team']['type']  = 'category';
$config->risk->dtable->fieldList['team']['group'] = 6;

$config->risk->dtable->fieldList['assignedTo']['name']  = 'assignedTo';
$config->risk->dtable->fieldList['assignedTo']['title'] = $lang->risk->assignedTo;
$config->risk->dtable->fieldList['assignedTo']['type']  = 'user';
$config->risk->dtable->fieldList['assignedTo']['group'] = 7;

$config->risk->dtable->fieldList['actions']['name']  = 'actions';
$config->risk->dtable->fieldList['actions']['title'] = $lang->actions;
$config->risk->dtable->fieldList['actions']['type']  = 'actions';
$config->risk->dtable->fieldList['actions']['fixed'] = 'right';
$config->risk->dtable->fieldList['actions']['list']  = $config->risk->actionList;
$config->risk->dtable->fieldList['actions']['menu']  = array('track', 'close', 'cancel', 'hangup', 'activate', 'effort', 'edit');

$config->risk->importfromlib = new stdclass();
$config->risk->importfromlib->dtable = new stdclass();
$config->risk->importfromlib->dtable->fieldList['id']       = $config->risk->dtable->fieldList['id'];
$config->risk->importfromlib->dtable->fieldList['name']     = $config->risk->dtable->fieldList['name'];
$config->risk->importfromlib->dtable->fieldList['strategy'] = $config->risk->dtable->fieldList['strategy'];
$config->risk->importfromlib->dtable->fieldList['rate']     = $config->risk->dtable->fieldList['rate'];
$config->risk->importfromlib->dtable->fieldList['pri']      = $config->risk->dtable->fieldList['pri'];
