* @package block * @link https://www.zentao.net */ namespace zin; jsVar('delayInfo', $lang->project->delayInfo); foreach($projects as $project) $project->consumed .= $lang->execution->workHourUnit; if(!$longBlock) { unset($config->block->project->dtable->fieldList['PM']); unset($config->block->project->dtable->fieldList['status']); unset($config->block->project->dtable->fieldList['consumed']); unset($config->block->project->dtable->fieldList['storyCount']); unset($config->block->project->dtable->fieldList['leftTasks']); unset($config->block->project->dtable->fieldList['leftBugs']); } panel ( set('class', 'project-block list-block ' . ($longBlock ? 'block-long' : 'block-sm')), set('headingClass', 'border-b'), set::title($block->title), to::headingActions ( a ( set('class', 'text-gray'), set('href', createLink('project', 'browse', 'program=0&browseType=' . $block->params->type)), $lang->more, icon('caret-right') ) ), dtable ( set::id('project'), set::height(318), set::bordered(false), set::horzScrollbarPos('inside'), set::cols(array_values($config->block->project->dtable->fieldList)), set::data(array_values($projects)), set::userMap($users), set::onRenderCell(jsRaw('window.onRenderProjectNameCell')), ) ); render();