title="Главная страница"; $newsDataProvider = new \yii\data\ActiveDataProvider( [ "query"=>\app\models\Design::find()->orderBy(["order"=>SORT_ASC]), "pagination" => false ] ); ?>
getModels() as $item ){ // print_r($item); //return; $strbage = ''; switch($item->type){ case 'story': $model = Story::findOne($item->parent_id); break; case 'topic': $model = NewsTopic::findOne($item->parent_id); break; case 'tag': $model = Tags::findOne($item->parent_id); break; default: $title = $item->title; $model = null; break; } if( $model ){ $title = (trim($item->title) == '')?$model->title:$item->title; }else{ $strbage .= 'Дохлый элемент
'; } $mark = ''; if( $item->active == 'N' ){ $mark = ' class="table-dark"'; $strbage .= 'Спрятано
'; } switch($item->design){ case 1: $strbage .= ''; break; case 2: $strbage .= ''; break; case 3: $strbage .= ''; break; case 4: $strbage .= ''; break; case 5: $strbage .= ''; break; case 6: $strbage .= ''; break; default: $strbage .= 'неопределён дизайн'; break; } ?> class="ui-sortable" id="item_id?>"> // print_r($item); // ?>
# заголовок статусы управление
id?>
description)?$model->description:''?>
user->can('admin') ){ ?>
getModels());