neam/yii-relations-ui
Composer 安装命令:
composer require neam/yii-relations-ui
包简介
To simplify editing relations in a Yii 1 app
关键字:
README 文档
README
To simplify editing relations in a Yii 1 app.
Current widget
Has-many relation input based on Handsontable.
Use in a Yii 1 app as follows:
$this->widget('\neam\yii_relations_ui\widgets\HasManyHandsontableInput', [ 'model' => $model, 'relation' => 'routes', ]);
Use any customized columns and handsontable settings:
$this->widget('\neam\yii_relations_ui\widgets\HasManyHandsontableInput', [ 'model' => $model, 'relation' => 'routes', 'settings' => [ 'columns' => [ (object) ['data' => 'id'], (object) ['data' => 'route'], (object) ['data' => 'canonical', 'type' => 'checkbox', 'checkedTemplate' => 1, 'uncheckedTemplate' => 0], // example of using checkbox to save an attribute of type BOOLEAN NOT NULL (object) ['data' => 'route_type_id'], (object) ['data' => 'node_id'], (object) ['special' => 'delete_checkbox'], // special virtual column to mark which items should be deleted ] ] ]);
Note: This widget requires Yii <- Yii 2 bridge available at https://github.com/neam/yii-yii2-bridge
Screenshot 1 - A hasMany relation "routes" displayed in handsontable

Screenshot 2 - A new route being added
Screenshot 3 - The new route after saving
统计信息
- 总下载量: 193
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-12-08

