add blocktypes.json and fix blocks name

This commit is contained in:
cuileon
2018-04-09 11:46:50 +08:00
parent 8b1a79ae84
commit 79a9a70bc2
67 changed files with 250 additions and 244 deletions

View File

@ -333,7 +333,7 @@ echo GridView::widget([
### 数据排序
> 注意:这部分正在开发中。
> Note: 这部分正在开发中。
>
> - https://github.com/yiisoft/yii2/issues/1576
@ -397,7 +397,7 @@ class PostSearch extends Post
}
```
> 提示:See [Query Builder](db-query-builder.md) and especially [Filter Conditions](db-query-builder.md#filter-conditions)
> Tip: See [Query Builder](db-query-builder.md) and especially [Filter Conditions](db-query-builder.md#filter-conditions)
> to learn how to build filtering query.
你可以在控制器中使用如下方法为网格视图获取数据提供者:
@ -465,7 +465,7 @@ and include it in `index.php` view like so:
<?= $this->render('_search', ['model' => $searchModel]) ?>
```
> 注意:if you use Gii to generate CRUD code, the separate filter form (`_search.php`) is generated by default,
> Note: if you use Gii to generate CRUD code, the separate filter form (`_search.php`) is generated by default,
but is commented in `index.php` view. Uncomment it and it's ready to use!
Separate filter form is useful when you need to filter by fields, that are not displayed in GridView
@ -557,7 +557,7 @@ public function rules()
$query->andFilterWhere(['LIKE', 'author.name', $this->getAttribute('author.name')]);
```
> 信息:在上面的代码中,我们使用相同的字符串作为关联名称和表别名;
> Info: 在上面的代码中,我们使用相同的字符串作为关联名称和表别名;
> 然而,当你的表别名和关联名称不相同的时候,你得注意在哪使用你的别名,在哪使用你的关联名称。
> 一个简单的规则是在每个构建数据库查询的地方使用别名,而在所有其他和定义相关的诸如:
>`attributes()` 和 `rules()` 等地方使用关联名称。
@ -592,7 +592,7 @@ $query->andFilterWhere(['LIKE', 'author.name', $this->getAttribute('author.name'
> $dataProvider->sort->defaultOrder = ['author.name' => SORT_ASC];
> ```
> 信息:更多关于 `joinWith` 和在后台执行查询的相关信息,
> Info: 更多关于 `joinWith` 和在后台执行查询的相关信息,
> 可以查看 [active record docs on joining with relations](db-active-record.md#joining-with-relations)。
#### SQL视图用于过滤、排序和显示数据