<?php
global $lang, $app;

$app->loadLang('story');
$config->charter->dtable = new stdclass();
$config->charter->dtable->fieldList = array();
$config->charter->dtable->fieldList['id']['name'] = 'id';
$config->charter->dtable->fieldList['id']['type'] = 'id';

$config->charter->dtable->fieldList['name']['name']  = 'name';
$config->charter->dtable->fieldList['name']['fixed'] = 'left';
$config->charter->dtable->fieldList['name']['type']  = 'title';
$config->charter->dtable->fieldList['name']['link']  = array('module' => 'charter', 'method' => 'view', 'params' => "charterID={id}");

$config->charter->dtable->fieldList['level']['name'] = 'level';
$config->charter->dtable->fieldList['level']['type'] = 'pri';
$config->charter->dtable->fieldList['level']['maps'] = $lang->charter->levelList;

$config->charter->dtable->fieldList['status']['name']      = 'status';
$config->charter->dtable->fieldList['status']['type']      = 'status';
$config->charter->dtable->fieldList['status']['statusMap'] = $lang->charter->statusList;

$config->charter->dtable->fieldList['category']['name'] = 'category';
$config->charter->dtable->fieldList['category']['type'] = 'category';
$config->charter->dtable->fieldList['category']['map']  = $lang->charter->categoryList;

$config->charter->dtable->fieldList['market']['name'] = 'market';
$config->charter->dtable->fieldList['market']['type'] = 'category';
$config->charter->dtable->fieldList['market']['map']  = $lang->charter->marketList;

$config->charter->dtable->fieldList['budget']['name'] = 'budget';
$config->charter->dtable->fieldList['budget']['type'] = 'money';

$config->charter->dtable->fieldList['appliedBy']['name'] = 'appliedBy';
$config->charter->dtable->fieldList['appliedBy']['type'] = 'user';

$config->charter->dtable->fieldList['appliedDate']['name'] = 'appliedDate';
$config->charter->dtable->fieldList['appliedDate']['type'] = 'date';

$config->charter->dtable->fieldList['actions']['name']     = 'actions';
$config->charter->dtable->fieldList['actions']['title']    = $lang->actions;
$config->charter->dtable->fieldList['actions']['type']     = 'actions';
$config->charter->dtable->fieldList['actions']['sortType'] = false;
$config->charter->dtable->fieldList['actions']['width']    = '';
$config->charter->dtable->fieldList['actions']['list']     = $config->charter->actionList;
$config->charter->dtable->fieldList['actions']['menu']     = array('activate|close', 'edit', 'review');

$config->charter->roadmapStory = new stdclass();
$config->charter->roadmapStory->fieldList = array();
$config->charter->roadmapStory->fieldList['id']['name']     = 'id';
$config->charter->roadmapStory->fieldList['id']['type']     = 'id';
$config->charter->roadmapStory->fieldList['id']['sortType'] = false;

$config->charter->roadmapStory->fieldList['pri']['name']     = 'pri';
$config->charter->roadmapStory->fieldList['pri']['type']     = 'pri';
$config->charter->roadmapStory->fieldList['pri']['sortType'] = false;

$config->charter->roadmapStory->fieldList['title']['name']         = 'title';
$config->charter->roadmapStory->fieldList['title']['title']        = $lang->story->name;
$config->charter->roadmapStory->fieldList['title']['type']         = 'title';
$config->charter->roadmapStory->fieldList['title']['nestedToggle'] = true;
$config->charter->roadmapStory->fieldList['title']['link']         = array('module' => 'story', 'method' => 'storyView', 'params' => "storyID={id}&version={version}&param=0&storyType={type}");
$config->charter->roadmapStory->fieldList['title']['sortType']     = false;

$config->charter->roadmapStory->fieldList['roadmap']['name']  = 'roadmap';
$config->charter->roadmapStory->fieldList['roadmap']['title'] = $lang->story->roadmap;
$config->charter->roadmapStory->fieldList['roadmap']['type']  = 'category';

$config->charter->roadmapStory->fieldList['module']['name']  = 'module';
$config->charter->roadmapStory->fieldList['module']['title'] = $lang->story->module;
$config->charter->roadmapStory->fieldList['module']['type']  = 'category';

$config->charter->roadmapStory->fieldList['status']['name']      = 'status';
$config->charter->roadmapStory->fieldList['status']['title']     = $lang->story->status;
$config->charter->roadmapStory->fieldList['status']['type']      = 'status';
$config->charter->roadmapStory->fieldList['status']['sortType']  = false;
$config->charter->roadmapStory->fieldList['status']['statusMap'] = $lang->story->statusList;
