<?php
global $app;
$app->loadLang('artifactrepo');
$config->build->actionList['unlinkArtifact']['icon']         = 'unlink';
$config->build->actionList['unlinkArtifact']['text']         = $lang->build->artifactRepo->unlinkArtifact;
$config->build->actionList['unlinkArtifact']['hint']         = $lang->build->artifactRepo->unlinkArtifact;
$config->build->actionList['unlinkArtifact']['url']          = array('module' => 'build', 'method' => 'unlinkArtifact', 'params' => 'parentID={parent}&linkBuildID={build}&artifactID={id}');
$config->build->actionList['unlinkArtifact']['ajaxSubmit']   = true;
$config->build->actionList['unlinkArtifact']['data-confirm'] = $lang->build->artifactRepo->unlinkArtifactConfirm;

$config->build->actionList['download']['icon']   = 'download';
$config->build->actionList['download']['text']   = $lang->build->artifactRepo->download;
$config->build->actionList['download']['hint']   = $lang->build->artifactRepo->download;
$config->build->actionList['download']['url']    = '{url}';
$config->build->actionList['download']['target'] = '_blank';

$config->build->actionList['copyCommand']['icon']      = 'copy';
$config->build->actionList['copyCommand']['text']      = $lang->build->artifactRepo->copy;
$config->build->actionList['copyCommand']['hint']      = $lang->build->artifactRepo->copy;
$config->build->actionList['copyCommand']['className'] = 'ajax-submit';
$config->build->actionList['copyCommand']['url']       = array('module' => 'build', 'method' => 'copyCommand', 'params' => 'command={command}');

$config->build->artifact = new stdclass();
$config->build->artifact->dtable = new stdclass();
$config->build->artifact->dtable->fieldList['name']['title']    = $lang->artifactrepo->fileName;
$config->build->artifact->dtable->fieldList['name']['name']     = 'name';
$config->build->artifact->dtable->fieldList['name']['type']     = 'text';
$config->build->artifact->dtable->fieldList['name']['width']    = 600;
$config->build->artifact->dtable->fieldList['name']['order']    = 10;
$config->build->artifact->dtable->fieldList['name']['sortType'] = true;

$config->build->artifact->dtable->fieldList['type']['title']    = $lang->artifactrepo->type;
$config->build->artifact->dtable->fieldList['type']['name']     = 'type';
$config->build->artifact->dtable->fieldList['type']['type']     = 'text';
$config->build->artifact->dtable->fieldList['type']['order']    = 20;
$config->build->artifact->dtable->fieldList['type']['width']    = 100;
$config->build->artifact->dtable->fieldList['type']['sortType'] = true;
$config->build->artifact->dtable->fieldList['type']['map']      = $lang->artifactrepo->artifactType;

$config->build->artifact->dtable->fieldList['size']['title']    = $lang->artifactrepo->size;
$config->build->artifact->dtable->fieldList['size']['name']     = 'size';
$config->build->artifact->dtable->fieldList['size']['type']     = 'text';
$config->build->artifact->dtable->fieldList['size']['order']    = 30;
$config->build->artifact->dtable->fieldList['size']['width']    = 100;
$config->build->artifact->dtable->fieldList['size']['sortType'] = true;

$config->build->artifact->dtable->fieldList['createDate']['title']      = $lang->artifactrepo->editedDate;
$config->build->artifact->dtable->fieldList['createDate']['name']       = 'createDate';
$config->build->artifact->dtable->fieldList['createDate']['type']       = 'datetime';
$config->build->artifact->dtable->fieldList['createDate']['formatDate'] = 'YYYY-MM-dd hh:mm';
$config->build->artifact->dtable->fieldList['createDate']['order']      = 50;

$config->build->artifact->dtable->fieldList['actions']['title'] = $lang->actions;
$config->build->artifact->dtable->fieldList['actions']['name']  = 'actions';
$config->build->artifact->dtable->fieldList['actions']['type']  = 'actions';
$config->build->artifact->dtable->fieldList['actions']['list']  = $config->build->actionList;
$config->build->artifact->dtable->fieldList['actions']['menu']  = array();
