From af0208bbe170e7a9b5b03b786a6b88af2d95e971 Mon Sep 17 00:00:00 2001 From: HungDV2022 <110375578+HungDV2022@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:16:55 +0700 Subject: [PATCH 1/7] =?UTF-8?q?BcThemeConfigServiceProvider::services=20?= =?UTF-8?q?=E3=81=AE=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=20(#2764)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Đỗ Văn Hùng --- .../BcThemeConfigServiceProvider.php | 1 + .../BcThemeConfigServiceProviderTest.php | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100755 plugins/bc-theme-config/tests/TestCase/ServiceProvider/BcThemeConfigServiceProviderTest.php diff --git a/plugins/bc-theme-config/src/ServiceProvider/BcThemeConfigServiceProvider.php b/plugins/bc-theme-config/src/ServiceProvider/BcThemeConfigServiceProvider.php index 46e0032858..fdc6813445 100755 --- a/plugins/bc-theme-config/src/ServiceProvider/BcThemeConfigServiceProvider.php +++ b/plugins/bc-theme-config/src/ServiceProvider/BcThemeConfigServiceProvider.php @@ -39,6 +39,7 @@ class BcThemeConfigServiceProvider extends ServiceProvider * @param \Cake\Core\ContainerInterface $container * @checked * @noTodo + * @unitTest */ public function services($container): void { diff --git a/plugins/bc-theme-config/tests/TestCase/ServiceProvider/BcThemeConfigServiceProviderTest.php b/plugins/bc-theme-config/tests/TestCase/ServiceProvider/BcThemeConfigServiceProviderTest.php new file mode 100755 index 0000000000..0a653319bd --- /dev/null +++ b/plugins/bc-theme-config/tests/TestCase/ServiceProvider/BcThemeConfigServiceProviderTest.php @@ -0,0 +1,58 @@ + + * Copyright (c) NPO baser foundation + * + * @copyright Copyright (c) NPO baser foundation + * @link https://basercms.net baserCMS Project + * @since 5.0.0 + * @license https://basercms.net/license/index.html MIT License + */ + +namespace BcThemeConfig\Test\TestCase\ServiceProvider; + +use BaserCore\TestSuite\BcTestCase; +use BcThemeConfig\Service\ThemeConfigsServiceInterface; +use BcThemeConfig\ServiceProvider\BcThemeConfigServiceProvider; +use Cake\Core\Container; + +/** + * Class BcThemeConfigServiceProviderTest + * @property BcThemeConfigServiceProvider $BcThemeConfigServiceProvider + */ +class BcThemeConfigServiceProviderTest extends BcTestCase +{ + + /** + * Set Up + * + * @return void + */ + public function setUp(): void + { + parent::setUp(); + $this->BcThemeConfigServiceProvider = new BcThemeConfigServiceProvider(); + } + + /** + * Tear Down + * + * @return void + */ + public function tearDown(): void + { + unset($this->BcThemeConfigServiceProvider); + parent::tearDown(); + } + + /** + * @test services + * @return void + */ + public function testServices() + { + $container = new Container(); + $this->BcThemeConfigServiceProvider->services($container); + $this->assertTrue($container->has(ThemeConfigsServiceInterface::class)); + } +} From 09f5e18987cf01d22596736ec10513e70c7d82a0 Mon Sep 17 00:00:00 2001 From: HungDV2022 <110375578+HungDV2022@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:17:11 +0700 Subject: [PATCH 2/7] =?UTF-8?q?ThemeFilesController::add=20=E3=81=AE?= =?UTF-8?q?=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=20(#2765)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Đỗ Văn Hùng --- .../src/Controller/Api/Admin/ThemeFilesController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/bc-theme-file/src/Controller/Api/Admin/ThemeFilesController.php b/plugins/bc-theme-file/src/Controller/Api/Admin/ThemeFilesController.php index a24e4e9582..d59d2f4d09 100644 --- a/plugins/bc-theme-file/src/Controller/Api/Admin/ThemeFilesController.php +++ b/plugins/bc-theme-file/src/Controller/Api/Admin/ThemeFilesController.php @@ -31,6 +31,9 @@ class ThemeFilesController extends BcAdminApiController * [API] テーマファイル ファイル新規追加 * * @param ThemeFilesServiceInterface $service + * @checked + * @noTodo + * @unitTest */ public function add(ThemeFilesServiceInterface $service) { From c0f7963f208d0ebb71ec87bf6f8e8bfcebf9d829 Mon Sep 17 00:00:00 2001 From: nghiem-mb <127474186+nghiem-mb@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:18:00 +0700 Subject: [PATCH 3/7] CustomLinksTableTest-setTreeScope (#2766) --- .../bc-custom-content/src/Model/Table/CustomLinksTable.php | 3 +++ .../tests/TestCase/Model/Table/CustomLinksTableTest.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/bc-custom-content/src/Model/Table/CustomLinksTable.php b/plugins/bc-custom-content/src/Model/Table/CustomLinksTable.php index fc6c10eb0f..bf2511c626 100644 --- a/plugins/bc-custom-content/src/Model/Table/CustomLinksTable.php +++ b/plugins/bc-custom-content/src/Model/Table/CustomLinksTable.php @@ -113,6 +113,9 @@ public function implementedEvents(): array * ツリービヘイビアのスコープを設定する * * @param int $tableId + * @noTodo + * @checked + * @unitTest */ public function setTreeScope(int $tableId): void { diff --git a/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomLinksTableTest.php b/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomLinksTableTest.php index ab01525ecb..634e48498b 100644 --- a/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomLinksTableTest.php +++ b/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomLinksTableTest.php @@ -106,7 +106,9 @@ public function test_implementedEvents() */ public function test_setTreeScope() { - + $this->CustomLinksTable->setTreeScope(1); + $result = $this->CustomLinksTable->getBehavior('Tree')->getConfig('scope'); + $this->assertEquals(['custom_table_id' => 1], $result); } /** From 22c236de799ef4f8890745b4e748decd5300ca47 Mon Sep 17 00:00:00 2001 From: HungDV2022 <110375578+HungDV2022@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:18:52 +0700 Subject: [PATCH 4/7] =?UTF-8?q?ThemeFoldersController::batch=20=E3=81=AE?= =?UTF-8?q?=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=20(#2767)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Đỗ Văn Hùng --- .../Api/Admin/ThemeFoldersController.php | 1 + .../Api/Admin/ThemeFoldersControllerTest.php | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/plugins/bc-theme-file/src/Controller/Api/Admin/ThemeFoldersController.php b/plugins/bc-theme-file/src/Controller/Api/Admin/ThemeFoldersController.php index 097c1171e4..c482410958 100644 --- a/plugins/bc-theme-file/src/Controller/Api/Admin/ThemeFoldersController.php +++ b/plugins/bc-theme-file/src/Controller/Api/Admin/ThemeFoldersController.php @@ -37,6 +37,7 @@ class ThemeFoldersController extends BcAdminApiController * @param ThemeFoldersService $service * @checked * @noTodo + * @unitTest */ public function batch(ThemeFoldersServiceInterface $service) { diff --git a/plugins/bc-theme-file/tests/TestCase/Controller/Api/Admin/ThemeFoldersControllerTest.php b/plugins/bc-theme-file/tests/TestCase/Controller/Api/Admin/ThemeFoldersControllerTest.php index b0672b8e5a..2467784eff 100644 --- a/plugins/bc-theme-file/tests/TestCase/Controller/Api/Admin/ThemeFoldersControllerTest.php +++ b/plugins/bc-theme-file/tests/TestCase/Controller/Api/Admin/ThemeFoldersControllerTest.php @@ -52,6 +52,36 @@ public function tearDown(): void parent::tearDown(); } + /** + * test batch + */ + public function test_batch() + { + $fullpath = BASER_PLUGINS . 'BcThemeSample' . '/templates/layout/'; + (new Folder())->create($fullpath . 'delete_folder', 0777); + //APIをコール + $this->post('/baser/api/admin/bc-theme-file/theme_folders/batch.json?token=' . $this->accessToken, + [ + 'batch' => 'delete', + 'batch_targets' => [$fullpath] + ]); + //レスポンスコードを確認 + $this->assertResponseSuccess(); + //戻る値を確認 + $result = json_decode((string)$this->_response->getBody()); + $this->assertEquals('一括処理が完了しました。', $result->message); + //実際にフォルダが削除されいてるか確認すること + $this->assertFalse(file_exists($fullpath . 'delete_folder')); + + //$allowMethodは削除ではない場合、 + $this->post('/baser/api/admin/bc-theme-file/theme_folders/batch.json?token=' . $this->accessToken, + [ + 'batch' => 'create', + 'batch_targets' => [$fullpath] + ]); + $this->assertResponseCode(500); + } + /** * [API] テーマフォルダ 一覧取得 */ From cec99d20b8a04f986ac59dea73d10e1eef1255ff Mon Sep 17 00:00:00 2001 From: HungDV2022 <110375578+HungDV2022@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:19:13 +0700 Subject: [PATCH 5/7] =?UTF-8?q?ThemeFilesController::=5F=5Fconstruct?= =?UTF-8?q?=E3=80=80=E3=81=AE=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=20(#2770)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Đỗ Văn Hùng --- .../Controller/Admin/ThemeFilesController.php | 4 + .../Admin/ThemeFilesControllerTest.php | 163 ++++++++++++------ 2 files changed, 110 insertions(+), 57 deletions(-) diff --git a/plugins/bc-theme-file/src/Controller/Admin/ThemeFilesController.php b/plugins/bc-theme-file/src/Controller/Admin/ThemeFilesController.php index 905aedc253..4910184a51 100644 --- a/plugins/bc-theme-file/src/Controller/Admin/ThemeFilesController.php +++ b/plugins/bc-theme-file/src/Controller/Admin/ThemeFilesController.php @@ -50,6 +50,10 @@ class ThemeFilesController extends BcAdminAppController * @param string|null $name * @param EventManagerInterface|null $eventManager * @param ComponentRegistry|null $components + * + * @checked + * @noTodo + * @unitTest */ public function __construct( ?ServerRequest $request = null, diff --git a/plugins/bc-theme-file/tests/TestCase/Controller/Admin/ThemeFilesControllerTest.php b/plugins/bc-theme-file/tests/TestCase/Controller/Admin/ThemeFilesControllerTest.php index e42d5b91c7..da52c9655d 100644 --- a/plugins/bc-theme-file/tests/TestCase/Controller/Admin/ThemeFilesControllerTest.php +++ b/plugins/bc-theme-file/tests/TestCase/Controller/Admin/ThemeFilesControllerTest.php @@ -1,17 +1,20 @@ - * Copyright (c) baserCMS Users Community + * Copyright (c) NPO baser foundation * - * @copyright Copyright (c) baserCMS Users Community - * @link https://basercms.net baserCMS Project - * @since baserCMS v 4.0.9 - * @license https://basercms.net/license/index.html + * @copyright Copyright (c) NPO baser foundation + * @link https://basercms.net baserCMS Project + * @since 5.0.0 + * @license https://basercms.net/license/index.html MIT License */ -App::uses('ThemeFilesController', 'Controller'); +namespace BcThemeFile\Test\TestCase\Controller\Admin; +use BaserCore\Test\Scenario\InitAppScenario; +use BaserCore\TestSuite\BcTestCase; +use BaserCore\Utility\BcContainerTrait; +use BcThemeFile\Controller\Admin\ThemeFilesController; +use CakephpFixtureFactories\Scenario\ScenarioAwareTrait; /** * Class ThemeFilesControllerTest @@ -20,15 +23,22 @@ */ class ThemeFilesControllerTest extends BcTestCase { + /** + * Trait + */ + use ScenarioAwareTrait; + use BcContainerTrait; /** * set up * * @return void */ - public function setUp() + public function setUp(): void { parent::setUp(); + $this->loadFixtureScenario(InitAppScenario::class); + $this->ThemeFilesController = new ThemeFilesController($this->loginAdmin($this->getRequest())); } /** @@ -36,131 +46,170 @@ public function setUp() * * @return void */ - public function tearDown() + public function tearDown(): void { + unset($this->ThemeFilesController); parent::tearDown(); } /** - * テーマファイル一覧 + * test __construct */ - public function testAdmin_index() + public function test__construct() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $_tempalteTypesExpected = [ + 'Layouts' => 'レイアウトテンプレート', + 'Elements' => 'エレメントテンプレート', + 'Emails' => 'Eメールテンプレート', + 'etc' => 'コンテンツテンプレート', + 'css' => 'スタイルシート', + 'js' => 'Javascript', + 'img' => 'イメージ' + ]; + $this->assertEquals($_tempalteTypesExpected, $this->ThemeFilesController->_tempalteTypes); } /** - * テーマファイル作成 + * test beforeRender */ - public function testAdmin_add() + public function test_beforeRender() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * テーマファイル編集 + * test index */ - public function testAdmin_edit() + public function test_index() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * ファイルを削除する + * test add */ - public function testAdmin_del() + public function test_add() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * ファイルを削除する (ajax) + * test edit */ - public function testAdmin_ajax_del() + public function test_edit() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * テーマファイル表示 + * test delete */ - public function testAdmin_view() + public function test_delete() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * テーマファイルをコピーする + * test delete_folder */ - public function testAdmin_ajax_copy() + public function test_delete_folder() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * ファイルをアップロードする + * test view */ - public function testAdmin_upload() + public function test_view() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * フォルダ追加 + * test copy */ - public function testAdmin_add_folder() + public function test_copy() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * フォルダ編集 + * test copy_folder */ - public function testAdmin_edit_folder() + public function test_copy_folder() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * フォルダ表示 + * test upload */ - public function testAdmin_view_folder() + public function test_upload() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * コアファイルを現在のテーマにコピーする + * test add_folder */ - public function testAdmin_copy_to_theme() + public function test_add_folder() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * コアファイルのフォルダを現在のテーマにコピーする + * test edit_folder */ - public function testAdmin_copy_folder_to_theme() + public function test_edit_folder() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * 画像を表示する - * コアの画像等も表示可 + * test view_folder */ - public function testAdmin_img() + public function test_view_folder() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } /** - * 画像を表示する - * コアの画像等も表示可 + * test copy_to_theme */ - public function testAdmin_img_thumb() + public function test_copy_to_theme() { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); + $this->markTestIncomplete('このテストは未実装です。'); } + /** + * test copy_folder_to_theme + */ + public function test_copy_folder_to_theme() + { + $this->markTestIncomplete('このテストは未実装です。'); + } + + /** + * test img + */ + public function test_img() + { + $this->markTestIncomplete('このテストは未実装です。'); + } + + /** + * test img_thumb + */ + public function test_img_thumb() + { + $this->markTestIncomplete('このテストは未実装です。'); + } + + /** + * test parseArgs + */ + public function test_parseArgs() + { + $this->markTestIncomplete('このテストは未実装です。'); + } } From fc1feebeed3089d3bf488e7a6808d62aeef3f70f Mon Sep 17 00:00:00 2001 From: nghiem-mb <127474186+nghiem-mb@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:20:46 +0700 Subject: [PATCH 6/7] CustomEntriesTableTest get/set table name (#2772) --- .../src/Model/Table/CustomEntriesTable.php | 4 ++ .../Model/Table/CustomEntriesTableTest.php | 42 ++++++++++++++----- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/plugins/bc-custom-content/src/Model/Table/CustomEntriesTable.php b/plugins/bc-custom-content/src/Model/Table/CustomEntriesTable.php index 4974794c7c..f7114da921 100644 --- a/plugins/bc-custom-content/src/Model/Table/CustomEntriesTable.php +++ b/plugins/bc-custom-content/src/Model/Table/CustomEntriesTable.php @@ -168,6 +168,7 @@ public function setUp(int $tableId, array $postData = []) * @param int $tableId * @checked * @noTodo + * @unitTest */ public function setUseTable(int $tableId) { @@ -179,6 +180,9 @@ public function setUseTable(int $tableId) * * @param int $tableId * @return string + * @noTodo + * @checked + * @unitTest */ public function getTableName(int $tableId, string $name = ''): string { diff --git a/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomEntriesTableTest.php b/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomEntriesTableTest.php index 3a79055da0..7cb3d20fc2 100644 --- a/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomEntriesTableTest.php +++ b/plugins/bc-custom-content/tests/TestCase/Model/Table/CustomEntriesTableTest.php @@ -296,12 +296,20 @@ public function test_setUp() public function test_setUseTable() { //準備 - - //正常系実行 - - //異常系実行 - - + $dataBaseService = $this->getService(BcDatabaseServiceInterface::class); + $customTable = $this->getService(CustomTablesServiceInterface::class); + $customTable->create([ + 'id' => 1, + 'name' => 'recruit', + 'title' => '求人情報', + 'type' => '1', + 'display_field' => 'title', + ]); + $this->CustomEntriesTable->setUseTable(1); + $result = $this->CustomEntriesTable->getTable(); + $this->assertEquals('custom_entry_1_recruit', $result); + //不要なテーブルを削除 + $dataBaseService->dropTable('custom_entry_1_recruit'); } /** @@ -310,11 +318,23 @@ public function test_setUseTable() public function test_getTableName() { //準備 - - //正常系実行 - - //異常系実行 - + $dataBaseService = $this->getService(BcDatabaseServiceInterface::class); + $customTable = $this->getService(CustomTablesServiceInterface::class); + $customTable->create([ + 'id' => 1, + 'name' => 'recruit', + 'title' => '求人情報', + 'type' => '1', + 'display_field' => 'title', + ]); + //正常系実行: name パラメータなし + $result = $this->CustomEntriesTable->getTableName(1); + $this->assertEquals('custom_entry_1_recruit', $result); + //正常系実行: name パラメータあり + $result = $this->CustomEntriesTable->getTableName(1, 'Nghiem'); + $this->assertEquals('custom_entry_1_Nghiem', $result); + //不要なテーブルを削除 + $dataBaseService->dropTable('custom_entry_1_recruit'); } From 38ae07d890a9805e8a17fa144ff74b4919a2a585 Mon Sep 17 00:00:00 2001 From: HungDV2022 <110375578+HungDV2022@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:23:14 +0700 Subject: [PATCH 7/7] =?UTF-8?q?fix=20#1915=20=E3=80=90=E3=83=86=E3=83=BC?= =?UTF-8?q?=E3=83=9E=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=91=E3=82=B5=E3=83=96=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=81=AE=E3=82=A2=E3=82=B3=E3=83=BC=E3=83=87=E3=82=A3=E3=82=AA?= =?UTF-8?q?=E3=83=B3=E8=AA=BF=E6=95=B4=20(#2776)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Đỗ Văn Hùng --- .../js/admin/theme_files/submenus.js | 5 ++-- .../Admin/element/ThemeFiles/submenus.php | 23 +++++++++++++------ .../js/admin/theme_files/submenus.bundle.js | 4 ++-- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/plugins/bc-admin-third/src/bc_theme_file/js/admin/theme_files/submenus.js b/plugins/bc-admin-third/src/bc_theme_file/js/admin/theme_files/submenus.js index bf115f5142..a455d4f26f 100644 --- a/plugins/bc-admin-third/src/bc_theme_file/js/admin/theme_files/submenus.js +++ b/plugins/bc-admin-third/src/bc_theme_file/js/admin/theme_files/submenus.js @@ -8,10 +8,11 @@ * @license https://basercms.net/license/index.html MIT License */ -$(function (){ +$(function () { $('#ThemeFilesMenu').accordion({ collapsible: true, - heightStyle: "content" + heightStyle: "content", + active: parseInt($('.selected-plugin').attr("data-id")) }); }); diff --git a/plugins/bc-admin-third/templates/plugin/BcThemeFile/Admin/element/ThemeFiles/submenus.php b/plugins/bc-admin-third/templates/plugin/BcThemeFile/Admin/element/ThemeFiles/submenus.php index d4fa26c896..d2585d8dbb 100755 --- a/plugins/bc-admin-third/templates/plugin/BcThemeFile/Admin/element/ThemeFiles/submenus.php +++ b/plugins/bc-admin-third/templates/plugin/BcThemeFile/Admin/element/ThemeFiles/submenus.php @@ -15,6 +15,7 @@ * @var \BaserCore\View\BcAdminAppView $this * @var bool $isDefaultTheme * @var string $theme + * @var string $plugin */ $types = [ 'layout' => __d('baser_core', 'レイアウト'), @@ -38,17 +39,25 @@
- - -

- + $pluginVal): ?> + + + +

+

    $type): ?>
  • - - BcBaser->link(sprintf(__d('baser_core', '%s 一覧'), $type), ['action' => 'index', $theme, $plugin['name'], $key]) ?> + + BcBaser->link(sprintf(__d('baser_core', '%s 一覧'), $type), ['action' => 'index', $theme, $pluginVal['name'], $key]) ?> BcBaser->link(sprintf(__d('baser_core', '%s 一覧'), $type), ['action' => 'index', $theme, $key]) ?> diff --git a/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js b/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js index 7fb53ee251..25c26005c4 100644 --- a/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js +++ b/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js @@ -7,5 +7,5 @@ * @since 5.0.0 * @license https://basercms.net/license/index.html MIT License */ -$((function(){$("#ThemeFilesMenu").accordion({collapsible:!0,heightStyle:"content"})})); -//# sourceMappingURL=submenus.bundle.js.map \ No newline at end of file +$((function(){$("#ThemeFilesMenu").accordion({collapsible:!0,heightStyle:"content",active:parseInt($('.selected-plugin').attr("data-id"))})})); +//# sourceMappingURL=submenus.bundle.js.map