Skip to content

Commit

Permalink
アップロードファイル・カテゴリ ページネーション調整
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 committed Jun 26, 2024
1 parent 84b2f2c commit 1652c4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use BaserCore\Annotation\NoTodo;
use BaserCore\Annotation\Checked;
use BaserCore\Annotation\UnitTest;
use BaserCore\Utility\BcSiteConfig;
use BcUploader\Service\UploaderCategoriesService;
use BcUploader\Service\UploaderCategoriesServiceInterface;
use Cake\ORM\Exception\PersistenceFailedException;
Expand All @@ -37,6 +38,11 @@ class UploaderCategoriesController extends BcAdminAppController
*/
public function index(UploaderCategoriesServiceInterface $service)
{
$this->setViewConditions('UploadCategory', [
'default' => [
'query' => [
'limit' => BcSiteConfig::get('admin_list_num'),
]]]);
$this->set(['uploaderCategories' => $this->paginate($service->getIndex())]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function index(UploaderFilesAdminServiceInterface $service)
$this->setViewConditions('UploadFile', [
'default' => [
'query' => [
'num' => BcSiteConfig::get('admin_list_num'),
'limit' => BcSiteConfig::get('admin_list_num'),
'uploader_type' => 'all'
]]]);
$this->setRequest($this->getRequest()->withParsedBody($this->getRequest()->getQueryParams()));
Expand Down Expand Up @@ -99,7 +99,7 @@ public function ajax_list(UploaderFilesAdminServiceInterface $service, int $id =
$this->setViewConditions('UploadFile', [
'default' => [
'query' => [
'num' => BcSiteConfig::get('admin_list_num')
'limit' => BcSiteConfig::get('admin_list_num'),
]],
'type' => 'get'
]);
Expand Down

0 comments on commit 1652c4e

Please sign in to comment.