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

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

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

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

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

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

$config->release->artifact->dtable->fieldList['build']['title']    = $lang->build->common;
$config->release->artifact->dtable->fieldList['build']['name']     = 'build';
$config->release->artifact->dtable->fieldList['build']['type']     = 'text';
$config->release->artifact->dtable->fieldList['build']['width']    = '100';
$config->release->artifact->dtable->fieldList['build']['order']    = '40';
$config->release->artifact->dtable->fieldList['build']['sortType'] = true;

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

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