public function getPermissionLabel() { return AlbumModule::getPermissionLabel($this->permission); }
<?php echo $form->labelEx($model, 'description'); ?> <?php echo $form->textArea($model, 'description', array('class' => 'span12')); ?> <?php echo $form->error($model, 'description'); ?> <?php echo $form->labelEx($model, 'album_id'); ?> <?php echo $form->dropDownList($model, 'album_id', AlbumModule::albumsAsListData(!empty($model->target_id) ? $model->target_id : $target_id), array('class' => 'span12')); ?> <?php echo $form->error($model, 'album_id'); ?> <?php echo $form->labelEx($model, 'permission'); ?> <?php echo $form->dropDownList($model, 'permission', array('Всем', 'Только зарегистрированным пользователям', 'Только мне'), array('class' => 'span12', 'disabled' => !empty($model->album) ? 'disabled' : false)); ?> <?php echo $form->error($model, 'permission'); ?>
<?php echo $form->labelEx($model, 'description'); ?> <?php echo $form->textArea($model, 'description', array('class' => 'span12')); ?> <?php echo $form->error($model, 'description'); ?> <?php echo $form->labelEx($model, 'album_id'); ?> <?php echo $form->dropDownList($model, 'album_id', AlbumModule::albumsAsListData(!empty($model->target_id) ? $model->target_id : $target_id, $model instanceof Video ? 'VideoAlbum' : 'Album'), array('class' => 'span12')); ?> <?php echo $form->error($model, 'album_id'); ?> <?php echo $form->labelEx($model, 'permission'); ?> <?php echo $form->dropDownList($model, 'permission', array('Всем', 'Только зарегистрированным пользователям', 'Только мне'), array('class' => 'span12', 'disabled' => !$model->isNewRecord && !empty($model->album) ? 'disabled' : false)); ?> <?php echo $form->error($model, 'permission'); ?>
} define('ACTION_NAME', $action); require dirname(__FILE__) . '/core/fanwe.php'; $fanwe =& FanweService::instance(); $fanwe->cache_list[] = 'albums'; $fanwe->initialize(); require fimport('module/album'); $_FANWE['nav_title'] = lang('common', 'album'); switch (ACTION_NAME) { case 'index': AlbumModule::index(); break; case 'show': AlbumModule::show(); break; case 'category': AlbumModule::category(); break; case 'tag': AlbumModule::tag(); break; case 'create': AlbumModule::create(); break; case 'edit': AlbumModule::edit(); break; case 'save': AlbumModule::save(); break; }