use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; use components\helpers\TStringHelper; use components\widgets\Tabs; $options = '<option value="0">根节点</option>'; foreach ($this->channels as $row) { $style = ''; if ($row['is_leaf']) { $style = ' disabled="disabled" style="color:red;"'; } else { if ($model['parent_id'] == intval($row['id'])) { $style = ' selected'; } } $options .= '<option value="' . $row['id'] . '"' . $style . '>' . TStringHelper::blank($row['level']) . $row['name_alias'] . '</option>'; } ?> <div class="channel-form"> <?php $isLeafEnable = $model['is_leaf'] ? 'disabled' : null; $disabled = $model->isNewRecord ? null : 'disabled'; $form = ActiveForm::begin(['fieldConfig' => $this->getDefaultFieldConfig()]); ?> <?php Tabs::begin(['items' => [['label' => '基本信息', 'contentId' => 'tableBasic'], ['label' => '模型\\模板', 'contentId' => 'tableModel'], ['label' => 'SEO设置', 'contentId' => 'tableSEO']]]); ?> <div id="tableBasic" class="tab-pane active">
<div class="tbox"> <div class="hd"> <h2>内容管理</h2> </div> <div class="bd"> <ul> <?php foreach ($this->channels as $channel) { $txt = ''; if ($channel['is_leaf']) { $txt = '<a href="admin.php?r=content/manager&chnid=' . $channel['id'] . '" target="mainFrame">' . $channel['name'] . '</a>'; } else { $txt = $channel['name']; } $txt = TStringHelper::blank($channel['level']) . $txt; echo '<li>' . $txt . '</li>'; } ?> </ul> </div> </div>