{php} use app\model\Block; {/php} {layout name="manager/layout" /}
{notempty name="blocks"}

{if $groupId == 1} {/if}
{if $groupId == 1}
{/if}
{foreach $blocks as $block}
键值 | 标题 | 内容 | 状态 | 操作
{if $groupId == 1}
{/if}

{$block.keyword}

{$block.title}

{php} if($block['type'] == Block::BLOCK):{/php} {$block.value} {php} elseif($block['type'] == Block::IMG): if($block['width'] && $block['height']){ $imgSize = $block['width'].'像素 X '.$block['height'].'像素'; }else{ $imgSize = ''; } {/php} {:widget('manager.upload/image',['src' => $block.value??'', 'imgSize' => $imgSize, 'append' => "_img_" . $block['id']])} {php}elseif($block['type'] == Block::TEXT):{/php}
{$block.value??''}
{php} elseif($block['type'] == Block::GROUP): if($block['width'] && $block['height']){ $imgSize = $block['width'].'像素 X '.$block['height'].'像素'; }else{ $imgSize = ''; } {/php} {:widget('manager.upload/multi',['imgs' => $block.value??'', 'num' => $block.num??10, 'imgSize' => $imgSize, 'append' => "_group_" . $block['id']])} {php} elseif($block['type'] == Block::VIDEO): if($block['width'] && $block['height']){ $imgSize = $block['width'].'像素 X '.$block['height'].'像素'; }else{ $imgSize = ''; } {/php} {:widget('manager.upload/image',['src' => $block.img??'', 'imgSize' => $imgSize, 'append' => "_video_" . $block['id']])} {:widget('manager.upload/video',['src' => $block.value??'', 'append' => "_video_" . $block['id']])} {php} elseif($block['type'] == Block::CODE): {/php}
{$block.value??''}
{php}endif;{/php}

{$block['status'] ? '正常':'隐藏'}

向上 向下 编辑 {if $groupId == 1} 删除 {/if}

{/foreach}

{/notempty}
{if $groupId == 1}
添加图片 添加文字 添加富文本 添加组图 添加视频 添加代码
{/if} {if !empty($blocks)}
{/if}