<?php
global $app, $lang;
$config->deploy->dtable = new stdclass();
$config->deploy->dtable->fieldList['service']['title'] = $lang->deploy->service;
$config->deploy->dtable->fieldList['service']['type']  = 'title';

$config->deploy->dtable->fieldList['hosts']['title']     = $lang->deploy->hadHost;
$config->deploy->dtable->fieldList['hosts']['type']      = 'text';
$config->deploy->dtable->fieldList['hosts']['group']     = '1';
$config->deploy->dtable->fieldList['hosts']['delimiter'] = ',';

$config->deploy->dtable->fieldList['remove']['title']     = $lang->deploy->removeHost;
$config->deploy->dtable->fieldList['remove']['type']      = 'text';
$config->deploy->dtable->fieldList['remove']['group']     = '2';
$config->deploy->dtable->fieldList['remove']['delimiter'] = ',';

$config->deploy->dtable->fieldList['add']['title']     = $lang->deploy->addHost;
$config->deploy->dtable->fieldList['add']['type']      = 'text';
$config->deploy->dtable->fieldList['add']['group']     = '3';
$config->deploy->dtable->fieldList['add']['delimiter'] = ',';

$app->loadLang('testcase');
$app->loadLang('testtask');
$config->deploy->dtable->cases = new stdclass();
$config->deploy->dtable->cases->fieldList['ID']['title'] = $lang->idAB;
$config->deploy->dtable->cases->fieldList['ID']['type']  = 'checkID';
$config->deploy->dtable->cases->fieldList['ID']['name']  = 'id';
$config->deploy->dtable->cases->fieldList['ID']['sortType'] = false;

$config->deploy->dtable->cases->fieldList['pri']['title']    = $lang->pri;
$config->deploy->dtable->cases->fieldList['pri']['type']     = 'pri';
$config->deploy->dtable->cases->fieldList['pri']['name']     = 'pri';
$config->deploy->dtable->cases->fieldList['pri']['sortType'] = false;

$config->deploy->dtable->cases->fieldList['title']['title'] = $lang->testcase->title;
$config->deploy->dtable->cases->fieldList['title']['type']  = 'text';
$config->deploy->dtable->cases->fieldList['title']['name']  = 'title';
$config->deploy->dtable->cases->fieldList['title']['link']  = array('module' => 'testcase', 'method' => 'view', 'params' => "id={id}");
$config->deploy->dtable->cases->fieldList['title']['hint']  = true;

$config->deploy->dtable->cases->fieldList['type']['title']    = $lang->testcase->type;
$config->deploy->dtable->cases->fieldList['type']['type']     = 'type';
$config->deploy->dtable->cases->fieldList['type']['name']     = 'type';
$config->deploy->dtable->cases->fieldList['type']['sortType'] = false;
$config->deploy->dtable->cases->fieldList['type']['map']      = $lang->testcase->typeList;

$config->deploy->dtable->cases->actionList = array();
$config->deploy->dtable->cases->actionList['unlinkCase']['icon']         = 'unlink';
$config->deploy->dtable->cases->actionList['unlinkCase']['text']         = $lang->unlink;
$config->deploy->dtable->cases->actionList['unlinkCase']['hint']         = $lang->unlink;
$config->deploy->dtable->cases->actionList['unlinkCase']['ajaxSubmit']   = true;
$config->deploy->dtable->cases->actionList['unlinkCase']['data-confirm'] = $lang->testtask->confirmUnlinkCase;

$config->deploy->dtable->cases->fieldList['actions']['name']  = 'actions';
$config->deploy->dtable->cases->fieldList['actions']['type']  = 'actions';
$config->deploy->dtable->cases->fieldList['actions']['title'] = $lang->actions;
$config->deploy->dtable->cases->fieldList['actions']['fixed'] = 'right';
$config->deploy->dtable->cases->fieldList['actions']['menu']  = array('unlinkCase');
$config->deploy->dtable->cases->fieldList['actions']['list']  = $config->deploy->dtable->cases->actionList;
