Beispiel #1
0
 public function run()
 {
     $category_left = LuxTree::model()->findByAttributes(array('type' => Constants::LUX_TYPE_HOME_PAGE_1, 'status' => Constants::STATUS_VISIBLE));
     $category_right = LuxTree::model()->findByAttributes(array('type' => Constants::LUX_TYPE_HOME_PAGE_2, 'status' => Constants::STATUS_VISIBLE));
     if ($category_left != null) {
         $left_blocks = LuxContentUnit::model()->findAllByAttributes(array('tree_id' => $category_left->id));
     } else {
         $left_blocks = array();
     }
     if ($category_right != null) {
         $right_blocks = LuxContentUnit::model()->findAllByAttributes(array('tree_id' => $category_right->id));
     } else {
         $right_blocks = array();
     }
     $this->render('title_part', array('left_blocks' => $left_blocks, 'right_blocks' => $right_blocks, 'part' => $this->part));
 }
Beispiel #2
0
echo AdminFunctions::GetAdminActionUrl('inlux', 'updatetree');
?>
" method="post" enctype="multipart/form-data">

        <?php 
if ($item != null) {
    ?>
            <input type="hidden" name="id" value="<?php 
    echo $item->id;
    ?>
">
        <?php 
} else {
    ?>
            <?php 
    $item = new LuxTree();
    ?>
        <?php 
}
?>


        <label class="top-field-label">Метка:</label>
        <div class="field-container-long"><input type="text" name="label" class="input-main float-left" value="<?php 
echo $item->label;
?>
"></div>
        <div class="hr"></div>

        <label class="top-field-label">Выбор состояния:</label>
        <div class="select-box">
 public function actionEditPage()
 {
     //get if frm request
     $id = Yii::app()->request->getParam('id', null);
     //get list of categories
     $criteria = new CDbCriteria();
     //        $criteria->addInCondition('type',array(Constants::TYPE_TEXT_PAGE_1_ARRINGTON, Constants::TYPE_TEXT_PAGE_2_ARRINGTON, Constants::TYPE_TITLE_PAGE_ARRINGTON));
     $all_categories = LuxTree::model()->findAll($criteria);
     //find item
     $item = LuxContentUnit::model()->findByPk($id);
     //if not found - send to 404
     if ($item == null) {
         $this->redirect($this->createUrl('/admin/inlux/error/404'));
     }
     //render list
     $this->render('pages_edit', array('categories' => $all_categories, 'item' => $item));
 }