{{'page.search'|_}}
+ +No posts found
+ {% endfor %} + +diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php index 38938fa3e..5a095db6e 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php @@ -32,7 +32,7 @@ class postsController extends Controller 'category' => input('category'), 'date' => input('date'), 'typePost' => input('typePost'), - 'group' => input('group'), + 'postGroup' => input('group'), 'published' => true, 'featured' => input('featured'), 'select' => ['id','title','slug','published_at',DB::raw("IF(featured_image<>'',concat('$path',featured_image),featured_image) as main_image")] diff --git a/plugins/rainlab/blog/components/Posts.php b/plugins/rainlab/blog/components/Posts.php index a7f0e98b8..5a1f4773a 100644 --- a/plugins/rainlab/blog/components/Posts.php +++ b/plugins/rainlab/blog/components/Posts.php @@ -229,7 +229,7 @@ class Posts extends ComponentBase 'perPage' => $this->property('postsPerPage'), 'featured' => $featured, 'typePost' => empty($this->property('typePost')) ? null : $this->property('typePost'), - 'group' => empty($this->property('categoryGroup')) ? null : $this->property('categoryGroup'), + 'postGroup' => empty($this->property('categoryGroup')) ? null : $this->property('categoryGroup'), 'search' => trim(input('q')), 'category' => $category, 'date' => input('date'), diff --git a/plugins/rainlab/blog/models/Post.php b/plugins/rainlab/blog/models/Post.php index 0c8179884..5b12bb81a 100644 --- a/plugins/rainlab/blog/models/Post.php +++ b/plugins/rainlab/blog/models/Post.php @@ -373,7 +373,7 @@ class Post extends Model 'select' => null, 'featured' => null, 'typePost' => null, - 'group' => null, + 'postGroup' => null, ], $options)); $searchableFields = ['title', 'slug', 'excerpt']; @@ -479,11 +479,11 @@ class Post extends Model /* * Category, including children */ - if ($group !== null) { + if ($postGroup !== null) { // dd($categories); - $query->whereHas('category_groups', function($q) use ($group) { - $q->where('rainlab_blog_post_cat_group.category_group_id', $group); + $query->whereHas('category_groups', function($q) use ($postGroup) { + $q->where('slug', $postGroup); }); } diff --git a/plugins/tps/reklama/models/group/columns.yaml b/plugins/tps/reklama/models/group/columns.yaml index 0ed3b3b87..2994b88c0 100644 --- a/plugins/tps/reklama/models/group/columns.yaml +++ b/plugins/tps/reklama/models/group/columns.yaml @@ -15,3 +15,7 @@ columns: sortable: true relation: adds_count valueFrom: count + id: + label: ID + type: number + sortable: true diff --git a/plugins/tps/tps/controllers/Media.php b/plugins/tps/tps/controllers/Media.php new file mode 100644 index 000000000..1939787e4 --- /dev/null +++ b/plugins/tps/tps/controllers/Media.php @@ -0,0 +1,18 @@ + + = e(trans('backend::lang.form.create')) ?> + + diff --git a/plugins/tps/tps/controllers/media/config_form.yaml b/plugins/tps/tps/controllers/media/config_form.yaml new file mode 100644 index 000000000..3458ddb0c --- /dev/null +++ b/plugins/tps/tps/controllers/media/config_form.yaml @@ -0,0 +1,10 @@ +name: Media +form: $/tps/tps/models/media/fields.yaml +modelClass: Tps\Tps\Models\Media +defaultRedirect: tps/tps/media +create: + redirect: 'tps/tps/media/update/:id' + redirectClose: tps/tps/media +update: + redirect: tps/tps/media + redirectClose: tps/tps/media diff --git a/plugins/tps/tps/controllers/media/config_list.yaml b/plugins/tps/tps/controllers/media/config_list.yaml new file mode 100644 index 000000000..ba6d48b8e --- /dev/null +++ b/plugins/tps/tps/controllers/media/config_list.yaml @@ -0,0 +1,12 @@ +list: $/tps/tps/models/media/columns.yaml +modelClass: Tps\Tps\Models\Media +title: Media +noRecordsMessage: 'backend::lang.list.no_records' +showSetup: true +showCheckboxes: true +recordsPerPage: 20 +toolbar: + buttons: list_toolbar + search: + prompt: 'backend::lang.list.search_prompt' +recordUrl: 'tps/tps/media/update/:id' diff --git a/plugins/tps/tps/controllers/media/create.htm b/plugins/tps/tps/controllers/media/create.htm new file mode 100644 index 000000000..9f166703e --- /dev/null +++ b/plugins/tps/tps/controllers/media/create.htm @@ -0,0 +1,46 @@ + +
= e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/tps/controllers/media/index.htm b/plugins/tps/tps/controllers/media/index.htm new file mode 100644 index 000000000..ea43a3636 --- /dev/null +++ b/plugins/tps/tps/controllers/media/index.htm @@ -0,0 +1 @@ += $this->listRender() ?> diff --git a/plugins/tps/tps/controllers/media/preview.htm b/plugins/tps/tps/controllers/media/preview.htm new file mode 100644 index 000000000..58fd0ac89 --- /dev/null +++ b/plugins/tps/tps/controllers/media/preview.htm @@ -0,0 +1,22 @@ + ++ + = e(trans('backend::lang.form.return_to_list')) ?> + +
\ No newline at end of file diff --git a/plugins/tps/tps/controllers/media/update.htm b/plugins/tps/tps/controllers/media/update.htm new file mode 100644 index 000000000..2b23e0163 --- /dev/null +++ b/plugins/tps/tps/controllers/media/update.htm @@ -0,0 +1,54 @@ + += e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/tps/models/Media.php b/plugins/tps/tps/models/Media.php new file mode 100644 index 000000000..39d4e8cec --- /dev/null +++ b/plugins/tps/tps/models/Media.php @@ -0,0 +1,30 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->timestamp('created_at')->nullable(); + $table->timestamp('updated_at')->nullable(); + $table->string('name')->nullable(); + $table->string('type')->nullable(); + $table->text('media_file')->nullable(); + $table->string('poster_file')->nullable(); + $table->text('note')->nullable(); + $table->timestamp('published_at')->nullable(); + }); + } + + public function down() + { + Schema::dropIfExists('tps_tps_media'); + } +} diff --git a/plugins/tps/tps/updates/version.yaml b/plugins/tps/tps/updates/version.yaml index 210a73f52..ff57b46e1 100644 --- a/plugins/tps/tps/updates/version.yaml +++ b/plugins/tps/tps/updates/version.yaml @@ -3,3 +3,6 @@ 1.0.2: - 'Created table tps_tps_afisha' - builder_table_create_tps_tps_afisha.php +1.0.3: + - 'Created table tps_tps_media' + - builder_table_create_tps_tps_media.php diff --git a/themes/modern2/layouts/new/master-inside.htm b/themes/modern2/layouts/new/master-inside.htm index 6849cd1cf..bc2dd4e47 100644 --- a/themes/modern2/layouts/new/master-inside.htm +++ b/themes/modern2/layouts/new/master-inside.htm @@ -84,14 +84,7 @@ random = 0 {% endif %} - + {% partial 'new/searchForm' %}No posts found
+ {% endfor %} + +