* @package block * @link https://www.zentao.net */ namespace zin; /** * 展示流程图。 * Print flow chart. */ function printFlowchart() { global $lang, $app; $isEn = $app->getClientLang() == 'en'; $charts = array(); foreach($lang->block->flowchart as $flowName => $flow) { $items = array(); $index = 0; foreach ($flow as $flowItem) { $items[] = div ( set('class', "flow-item flow-item-$index " . ($index >= 1 ? 'flow-item-arrow' : '')), $isEn ? set::style(array('flex' => '0 1 15.5%', 'padding-left' => '8px')) : null, div ( set('class', 'flow-item-display'), $isEn ? set::title($flowItem) : null, $isEn ? set::style(array('font-size' => '11px')) : null, $flowItem ) ); $index ++; } $charts[] = div ( set('class', 'row flow-chart-row row-' . $flowName), $items ); } return div(set('class', 'flowchart p-6'), $charts); }