* @package block * @link https://www.zentao.net */ namespace zin; $cards = array(); foreach($projects as $projectID => $project) { $viewLink = $this->createLink('project', 'index', "projectID=$project->id"); $execution = empty($project->executions) ? '' : end($project->executions); $cards[] = cell ( setClass('p-2', $longBlock ? 'w-1/3' : 'w-full'), div ( setClass('border rounded-sm h-full p-4'), div ( setClass('mb-4'), a ( set('class', 'font-bold text-fore text-md'), set('href', $viewLink), $project->name ) ), div ( ($project->multiple && $execution) ? array ( setClass('space-y-3'), div ( span ( set('class', 'text-gray mr-1'), $execution->type == 'kanban' ? $lang->project->lastKanban : $lang->project->lastIteration . ': ' ), a ( set('href', createLink('execution', 'task', "executionID={$execution->id}")), $execution->name ), label ( set('class', 'label warning-pale circle ml-2'), $lang->execution->statusList[$execution->status] ) ), div ( span ( set('class', 'text-gray mr-1'), $lang->block->projectMember . ': ', ), sprintf($lang->block->totalMember, $project->teamCount) ), div ( span ( set('class', 'text-gray mr-1'), $lang->project->end . ': ' ), $project->end ) ) : null ) ) ); } blockPanel ( set::bodyClass('row flex-wrap justify-between p-1.5'), $cards ); render();