From 987df81e38070650152a5b9f2ce948e63653c3fa Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Mon, 5 May 2025 16:21:12 -0400 Subject: [PATCH 01/16] update controllers to use behavior default views --- controllers/Categories.php | 3 - controllers/Logs.php | 3 - controllers/Redirects.php | 11 ++- controllers/Statistics.php | 3 - controllers/categories/create.htm | 48 ----------- controllers/categories/index.htm | 2 - controllers/categories/update.htm | 56 ------------- controllers/logs/index.htm | 2 - .../{create.htm => _form_create_toolbar.php} | 26 ------ controllers/redirects/_reorder_toolbar.htm | 6 -- controllers/redirects/export.htm | 24 ------ controllers/redirects/import.htm | 22 ------ controllers/redirects/reorder.htm | 8 -- controllers/redirects/update.htm | 79 ------------------- 14 files changed, 9 insertions(+), 284 deletions(-) delete mode 100644 controllers/categories/create.htm delete mode 100644 controllers/categories/index.htm delete mode 100644 controllers/categories/update.htm delete mode 100644 controllers/logs/index.htm rename controllers/redirects/{create.htm => _form_create_toolbar.php} (66%) delete mode 100644 controllers/redirects/_reorder_toolbar.htm delete mode 100644 controllers/redirects/export.htm delete mode 100644 controllers/redirects/import.htm delete mode 100644 controllers/redirects/reorder.htm delete mode 100644 controllers/redirects/update.htm diff --git a/controllers/Categories.php b/controllers/Categories.php index 1df21b2..02eb6a8 100644 --- a/controllers/Categories.php +++ b/controllers/Categories.php @@ -6,7 +6,6 @@ use Backend\Behaviors; use Backend\Classes\Controller; -use BackendMenu; /** * @mixin Behaviors\FormController @@ -28,7 +27,5 @@ public function __construct() parent::__construct(); $this->addCss('/plugins/winter/redirect/assets/css/redirect.css'); - - BackendMenu::setContext('Winter.Redirect', 'redirect', 'categories'); } } diff --git a/controllers/Logs.php b/controllers/Logs.php index 748ec14..52eb928 100644 --- a/controllers/Logs.php +++ b/controllers/Logs.php @@ -8,7 +8,6 @@ use Backend\Behaviors\ListController; use Backend\Classes\Controller; -use BackendMenu; use Illuminate\Contracts\Translation\Translator; use Illuminate\Http\Request; use Winter\Storm\Flash\FlashBag; @@ -36,8 +35,6 @@ public function __construct(Request $request, Translator $translator, LoggerInte { parent::__construct(); - BackendMenu::setContext('Winter.Redirect', 'redirect', 'logs'); - $this->addCss('/plugins/winter/redirect/assets/css/redirect.css'); $this->request = $request; diff --git a/controllers/Redirects.php b/controllers/Redirects.php index e0cff38..85fa999 100644 --- a/controllers/Redirects.php +++ b/controllers/Redirects.php @@ -53,6 +53,8 @@ final class Redirects extends Controller public string $formConfig = 'config_form.yaml'; + public $formLayout = 'sidebar'; + public array $listConfig = [ 'list' => 'config_list.yaml', 'requestLog' => 'request-log/config_list.yaml', @@ -106,14 +108,19 @@ public function index(): void } } + public function create() + { + $this->formLayout = 'sidebar'; + + parent::create(); + } + /** * @throws ModelNotFoundException * @noinspection PhpStrictTypeCheckingInspection */ public function update($recordId = null, $context = null) { - $this->bodyClass = 'compact-container'; - /** @var Models\Redirect $redirect */ $redirect = Models\Redirect::query()->findOrFail($recordId); diff --git a/controllers/Statistics.php b/controllers/Statistics.php index b5dbcf3..db83390 100644 --- a/controllers/Statistics.php +++ b/controllers/Statistics.php @@ -6,7 +6,6 @@ use Backend\Classes\Controller; use Backend\Models\BrandSetting; -use BackendMenu; use Carbon\Carbon; use Carbon\Exceptions\InvalidFormatException; use JsonException; @@ -25,8 +24,6 @@ public function __construct() { parent::__construct(); - BackendMenu::setContext('Winter.Redirect', 'redirect', 'statistics'); - $this->pageTitle = 'winter.redirect::lang.title.statistics'; $this->addCss('/plugins/winter/redirect/assets/css/redirect.css'); diff --git a/controllers/categories/create.htm b/controllers/categories/create.htm deleted file mode 100644 index 7d7c7ac..0000000 --- a/controllers/categories/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']); ?> - -
- formRender(); ?> -
- -
-
- - - - - -
-
- - - - - -

fatalError); ?>

-

- - diff --git a/controllers/categories/index.htm b/controllers/categories/index.htm deleted file mode 100644 index e8b8aa9..0000000 --- a/controllers/categories/index.htm +++ /dev/null @@ -1,2 +0,0 @@ - -listRender(); ?> diff --git a/controllers/categories/update.htm b/controllers/categories/update.htm deleted file mode 100644 index 5542380..0000000 --- a/controllers/categories/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']); ?> - -
- formRender(); ?> -
- -
-
- - - - - - -
-
- - - - - -

fatalError); ?>

-

- - diff --git a/controllers/logs/index.htm b/controllers/logs/index.htm deleted file mode 100644 index e8b8aa9..0000000 --- a/controllers/logs/index.htm +++ /dev/null @@ -1,2 +0,0 @@ - -listRender(); ?> diff --git a/controllers/redirects/create.htm b/controllers/redirects/_form_create_toolbar.php similarity index 66% rename from controllers/redirects/create.htm rename to controllers/redirects/_form_create_toolbar.php index 5646fd1..2515af3 100644 --- a/controllers/redirects/create.htm +++ b/controllers/redirects/_form_create_toolbar.php @@ -1,19 +1,3 @@ - - - - -fatalError): ?> - - 'layout']); ?> - -
- formRender(); ?> -
- -
-
- - - - - -

fatalError); ?>

-

- - diff --git a/controllers/redirects/_reorder_toolbar.htm b/controllers/redirects/_reorder_toolbar.htm deleted file mode 100644 index 6f7b303..0000000 --- a/controllers/redirects/_reorder_toolbar.htm +++ /dev/null @@ -1,6 +0,0 @@ -
- - - -
diff --git a/controllers/redirects/export.htm b/controllers/redirects/export.htm deleted file mode 100644 index 0845476..0000000 --- a/controllers/redirects/export.htm +++ /dev/null @@ -1,24 +0,0 @@ - - - - - 'layout']); ?> -
- exportRender(); ?> -
-
-
- -
-
- diff --git a/controllers/redirects/import.htm b/controllers/redirects/import.htm deleted file mode 100644 index d02e6f7..0000000 --- a/controllers/redirects/import.htm +++ /dev/null @@ -1,22 +0,0 @@ - - - - - 'layout']); ?> -
- importRender(); ?> -
-
- -
- diff --git a/controllers/redirects/reorder.htm b/controllers/redirects/reorder.htm deleted file mode 100644 index 39b91c9..0000000 --- a/controllers/redirects/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - - - - -reorderRender(); ?> diff --git a/controllers/redirects/update.htm b/controllers/redirects/update.htm deleted file mode 100644 index 61d0b72..0000000 --- a/controllers/redirects/update.htm +++ /dev/null @@ -1,79 +0,0 @@ - - - - -fatalError): ?> - - -
- -
- - makePartial('warning', ['warningMessage' => $warningMessage]); ?> - - formRenderOutsideFields() ?> - formRenderPrimaryTabs() ?> -
- -
-
- - - - - - -
-
-
- - - - -
- formRenderSecondaryTabs() ?> -
- - - - 'layout stretch']) ?> - makeLayout('form-with-sidebar') ?> - - - - - -
- -
-
-

fatalError); ?>

-

-
- - From 1125c97bec7e842d8c06582f64074acf2488dab8 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Mon, 5 May 2025 17:55:15 -0400 Subject: [PATCH 02/16] update workflow tests --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 568be7f..dc6b934 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,7 @@ jobs: key: ${{ env.cacheKey }} - name: Cache extensions - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.extcache.outputs.dir }} key: ${{ steps.extcache.outputs.key }} @@ -68,7 +68,7 @@ jobs: run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composercache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} From 039dc5e81a9ad3236e19d1880afcd42bf17aca9b Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Mon, 5 May 2025 17:57:31 -0400 Subject: [PATCH 03/16] update php versions --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc6b934..0b1db30 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 6 matrix: - phpVersion: ['8.0', '8.1', '8.2'] + phpVersion: ['8.1', '8.2', '8.3', '8.4'] winterRelease: ['develop'] winterReleaseDir: ['develop'] fail-fast: false From c8dd525494d61fd6474d0ba37f45fa152dbcc15a Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Tue, 6 May 2025 13:12:54 -0400 Subject: [PATCH 04/16] use proper layout in create mode --- controllers/Redirects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/Redirects.php b/controllers/Redirects.php index 85fa999..c74b4f7 100644 --- a/controllers/Redirects.php +++ b/controllers/Redirects.php @@ -110,7 +110,7 @@ public function index(): void public function create() { - $this->formLayout = 'sidebar'; + $this->formLayout = 'standard'; parent::create(); } From 75ce03f2840d2c572a980f23e87cf3e627a1635a Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Tue, 6 May 2025 14:16:11 -0400 Subject: [PATCH 05/16] moved create_and_new to core --- controllers/Redirects.php | 12 ------- .../redirects/_form_create_toolbar.php | 31 ------------------- lang/en/lang.php | 1 - lang/es/lang.php | 1 - lang/fr/lang.php | 1 - lang/nl/lang.php | 1 - lang/pl/lang.php | 1 - lang/ru/lang.php | 1 - lang/sv/lang.php | 1 - 9 files changed, 50 deletions(-) delete mode 100644 controllers/redirects/_form_create_toolbar.php diff --git a/controllers/Redirects.php b/controllers/Redirects.php index c74b4f7..75988c4 100644 --- a/controllers/Redirects.php +++ b/controllers/Redirects.php @@ -177,18 +177,6 @@ public function getCacheManager(): CacheManagerInterface return $this->cacheManager; } - public function create_onSave(?string $context = null): RedirectResponse - { - /** @noinspection PhpPossiblePolymorphicInvocationInspection */ - $redirect = parent::create_onSave($context); - - if ($this->request->has('new')) { - return Backend::redirect('winter/redirect/redirects/create'); - } - - return $redirect; - } - public function index_onDelete(): array { $redirectIds = $this->getCheckedIds(); diff --git a/controllers/redirects/_form_create_toolbar.php b/controllers/redirects/_form_create_toolbar.php deleted file mode 100644 index 2515af3..0000000 --- a/controllers/redirects/_form_create_toolbar.php +++ /dev/null @@ -1,31 +0,0 @@ -
- - - - - - -
diff --git a/lang/en/lang.php b/lang/en/lang.php index 22f5a14..28cf0e8 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -224,7 +224,6 @@ 'new_redirect' => 'New redirect', 'create_redirects' => 'Create redirects', 'create_redirect' => 'Create redirect', - 'create_and_new' => 'Create and new', 'delete' => 'Delete', 'enable' => 'Enable', 'disable' => 'Disable', diff --git a/lang/es/lang.php b/lang/es/lang.php index a983462..033f477 100644 --- a/lang/es/lang.php +++ b/lang/es/lang.php @@ -221,7 +221,6 @@ 'new_redirect' => 'Nueva redirección', // changed since 2.0.3 'create_redirects' => 'Crear redirecciones', // since 2.0.3 'create_redirect' => 'Crear redirección', - 'create_and_new' => 'Crear y nuevo', 'delete' => 'Borrar', 'enable' => 'Activar', 'disable' => 'Desactivar', diff --git a/lang/fr/lang.php b/lang/fr/lang.php index a7041e4..3c8a3a4 100644 --- a/lang/fr/lang.php +++ b/lang/fr/lang.php @@ -226,7 +226,6 @@ 'new_redirect' => 'Ajouter', 'create_redirects' => 'Créer redirection', 'create_redirect' => 'Créer une redirection', - 'create_and_new' => 'Créer et nouveau', 'delete' => 'Supprimer', 'enable' => 'Activer', 'disable' => 'Désactiver', diff --git a/lang/nl/lang.php b/lang/nl/lang.php index e93cc0f..76b377c 100644 --- a/lang/nl/lang.php +++ b/lang/nl/lang.php @@ -222,7 +222,6 @@ 'new_redirect' => 'Nieuwe redirect', 'create_redirects' => 'Maak redirects', 'create_redirect' => 'Maak redirect', - 'create_and_new' => 'Maken en nieuw', 'delete' => 'Verwijderen', 'enable' => 'Inschakelen', 'disable' => 'Uitschakelen', diff --git a/lang/pl/lang.php b/lang/pl/lang.php index 4f052b9..140b16b 100644 --- a/lang/pl/lang.php +++ b/lang/pl/lang.php @@ -224,7 +224,6 @@ 'new_redirect' => 'Nowe przekierowanie', 'create_redirects' => 'Utwórz przekierowania', 'create_redirect' => 'Utwórz przekierowanie', - 'create_and_new' => 'Utwórz i nowe', 'delete' => 'Usuń', 'enable' => 'Włącz', 'disable' => 'Wyłącz', diff --git a/lang/ru/lang.php b/lang/ru/lang.php index efb8330..334edaf 100644 --- a/lang/ru/lang.php +++ b/lang/ru/lang.php @@ -224,7 +224,6 @@ 'new_redirect' => 'Новый редирект', 'create_redirects' => 'Создание редиректов', 'create_redirect' => 'Создать редирект', - 'create_and_new' => 'Создать и новый', 'delete' => 'Удалить', 'enable' => 'Включить', 'disable' => 'Отключить', diff --git a/lang/sv/lang.php b/lang/sv/lang.php index 44e12ce..5a982d5 100755 --- a/lang/sv/lang.php +++ b/lang/sv/lang.php @@ -216,7 +216,6 @@ 'new_redirect' => 'Ny ompekning', 'create_redirects' => 'Skapa ompekning', 'create_redirect' => 'Create redirect', // TODO - 'create_and_new' => 'Create and new', // TODO 'delete' => 'Radera', 'enable' => 'Aktivera', 'disable' => 'Inaktivera', From ba80992f592092baa051074d03b5e7c4eae5deb8 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Wed, 7 May 2025 00:32:11 -0400 Subject: [PATCH 06/16] move main partials to php ext --- controllers/categories/{_list_toolbar.htm => _list_toolbar.php} | 0 controllers/logs/{_list_toolbar.htm => _list_toolbar.php} | 0 controllers/redirects/{_list_toolbar.htm => _list_toolbar.php} | 0 controllers/redirects/{index.htm => index.php} | 0 .../request-log/{_list_toolbar.htm => _list_toolbar.php} | 0 controllers/statistics/{index.htm => index.php} | 0 controllers/testlab/{index.htm => index.php} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename controllers/categories/{_list_toolbar.htm => _list_toolbar.php} (100%) rename controllers/logs/{_list_toolbar.htm => _list_toolbar.php} (100%) rename controllers/redirects/{_list_toolbar.htm => _list_toolbar.php} (100%) rename controllers/redirects/{index.htm => index.php} (100%) rename controllers/redirects/request-log/{_list_toolbar.htm => _list_toolbar.php} (100%) rename controllers/statistics/{index.htm => index.php} (100%) rename controllers/testlab/{index.htm => index.php} (100%) diff --git a/controllers/categories/_list_toolbar.htm b/controllers/categories/_list_toolbar.php similarity index 100% rename from controllers/categories/_list_toolbar.htm rename to controllers/categories/_list_toolbar.php diff --git a/controllers/logs/_list_toolbar.htm b/controllers/logs/_list_toolbar.php similarity index 100% rename from controllers/logs/_list_toolbar.htm rename to controllers/logs/_list_toolbar.php diff --git a/controllers/redirects/_list_toolbar.htm b/controllers/redirects/_list_toolbar.php similarity index 100% rename from controllers/redirects/_list_toolbar.htm rename to controllers/redirects/_list_toolbar.php diff --git a/controllers/redirects/index.htm b/controllers/redirects/index.php similarity index 100% rename from controllers/redirects/index.htm rename to controllers/redirects/index.php diff --git a/controllers/redirects/request-log/_list_toolbar.htm b/controllers/redirects/request-log/_list_toolbar.php similarity index 100% rename from controllers/redirects/request-log/_list_toolbar.htm rename to controllers/redirects/request-log/_list_toolbar.php diff --git a/controllers/statistics/index.htm b/controllers/statistics/index.php similarity index 100% rename from controllers/statistics/index.htm rename to controllers/statistics/index.php diff --git a/controllers/testlab/index.htm b/controllers/testlab/index.php similarity index 100% rename from controllers/testlab/index.htm rename to controllers/testlab/index.php From de96c4a49e899b70cc71c1bf41da31cfaf6bf900 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Wed, 7 May 2025 00:49:00 -0400 Subject: [PATCH 07/16] rename last htm partials to php --- .../redirects/{_field_statistics.htm => _field_statistics.php} | 0 controllers/redirects/{_popup_actions.htm => _popup_actions.php} | 0 controllers/redirects/{_redirect_test.htm => _redirect_test.php} | 0 .../{_redirect_test_result.htm => _redirect_test_result.php} | 0 controllers/redirects/{_sparkline.htm => _sparkline.php} | 0 .../redirects/{_status_code_info.htm => _status_code_info.php} | 0 controllers/redirects/{_tab_logs.htm => _tab_logs.php} | 0 controllers/redirects/{_warning.htm => _warning.php} | 0 controllers/redirects/request-log/{_modal.htm => _modal.php} | 0 controllers/statistics/{_hits-per-day.htm => _hits-per-day.php} | 0 .../statistics/{_loading-indicator.htm => _loading-indicator.php} | 0 ...{_redirect-hits-per-month.htm => _redirect-hits-per-month.php} | 0 controllers/statistics/{_score-board.htm => _score-board.php} | 0 ...{_top-crawlers-this-month.htm => _top-crawlers-this-month.php} | 0 ...top-redirects-this-month.htm => _top-redirects-this-month.php} | 0 controllers/testlab/{_test_button.htm => _test_button.php} | 0 controllers/testlab/{_tester_failed.htm => _tester_failed.php} | 0 controllers/testlab/{_tester_result.htm => _tester_result.php} | 0 .../{_tester_result_items.htm => _tester_result_items.php} | 0 19 files changed, 0 insertions(+), 0 deletions(-) rename controllers/redirects/{_field_statistics.htm => _field_statistics.php} (100%) rename controllers/redirects/{_popup_actions.htm => _popup_actions.php} (100%) rename controllers/redirects/{_redirect_test.htm => _redirect_test.php} (100%) rename controllers/redirects/{_redirect_test_result.htm => _redirect_test_result.php} (100%) rename controllers/redirects/{_sparkline.htm => _sparkline.php} (100%) rename controllers/redirects/{_status_code_info.htm => _status_code_info.php} (100%) rename controllers/redirects/{_tab_logs.htm => _tab_logs.php} (100%) rename controllers/redirects/{_warning.htm => _warning.php} (100%) rename controllers/redirects/request-log/{_modal.htm => _modal.php} (100%) rename controllers/statistics/{_hits-per-day.htm => _hits-per-day.php} (100%) rename controllers/statistics/{_loading-indicator.htm => _loading-indicator.php} (100%) rename controllers/statistics/{_redirect-hits-per-month.htm => _redirect-hits-per-month.php} (100%) rename controllers/statistics/{_score-board.htm => _score-board.php} (100%) rename controllers/statistics/{_top-crawlers-this-month.htm => _top-crawlers-this-month.php} (100%) rename controllers/statistics/{_top-redirects-this-month.htm => _top-redirects-this-month.php} (100%) rename controllers/testlab/{_test_button.htm => _test_button.php} (100%) rename controllers/testlab/{_tester_failed.htm => _tester_failed.php} (100%) rename controllers/testlab/{_tester_result.htm => _tester_result.php} (100%) rename controllers/testlab/{_tester_result_items.htm => _tester_result_items.php} (100%) diff --git a/controllers/redirects/_field_statistics.htm b/controllers/redirects/_field_statistics.php similarity index 100% rename from controllers/redirects/_field_statistics.htm rename to controllers/redirects/_field_statistics.php diff --git a/controllers/redirects/_popup_actions.htm b/controllers/redirects/_popup_actions.php similarity index 100% rename from controllers/redirects/_popup_actions.htm rename to controllers/redirects/_popup_actions.php diff --git a/controllers/redirects/_redirect_test.htm b/controllers/redirects/_redirect_test.php similarity index 100% rename from controllers/redirects/_redirect_test.htm rename to controllers/redirects/_redirect_test.php diff --git a/controllers/redirects/_redirect_test_result.htm b/controllers/redirects/_redirect_test_result.php similarity index 100% rename from controllers/redirects/_redirect_test_result.htm rename to controllers/redirects/_redirect_test_result.php diff --git a/controllers/redirects/_sparkline.htm b/controllers/redirects/_sparkline.php similarity index 100% rename from controllers/redirects/_sparkline.htm rename to controllers/redirects/_sparkline.php diff --git a/controllers/redirects/_status_code_info.htm b/controllers/redirects/_status_code_info.php similarity index 100% rename from controllers/redirects/_status_code_info.htm rename to controllers/redirects/_status_code_info.php diff --git a/controllers/redirects/_tab_logs.htm b/controllers/redirects/_tab_logs.php similarity index 100% rename from controllers/redirects/_tab_logs.htm rename to controllers/redirects/_tab_logs.php diff --git a/controllers/redirects/_warning.htm b/controllers/redirects/_warning.php similarity index 100% rename from controllers/redirects/_warning.htm rename to controllers/redirects/_warning.php diff --git a/controllers/redirects/request-log/_modal.htm b/controllers/redirects/request-log/_modal.php similarity index 100% rename from controllers/redirects/request-log/_modal.htm rename to controllers/redirects/request-log/_modal.php diff --git a/controllers/statistics/_hits-per-day.htm b/controllers/statistics/_hits-per-day.php similarity index 100% rename from controllers/statistics/_hits-per-day.htm rename to controllers/statistics/_hits-per-day.php diff --git a/controllers/statistics/_loading-indicator.htm b/controllers/statistics/_loading-indicator.php similarity index 100% rename from controllers/statistics/_loading-indicator.htm rename to controllers/statistics/_loading-indicator.php diff --git a/controllers/statistics/_redirect-hits-per-month.htm b/controllers/statistics/_redirect-hits-per-month.php similarity index 100% rename from controllers/statistics/_redirect-hits-per-month.htm rename to controllers/statistics/_redirect-hits-per-month.php diff --git a/controllers/statistics/_score-board.htm b/controllers/statistics/_score-board.php similarity index 100% rename from controllers/statistics/_score-board.htm rename to controllers/statistics/_score-board.php diff --git a/controllers/statistics/_top-crawlers-this-month.htm b/controllers/statistics/_top-crawlers-this-month.php similarity index 100% rename from controllers/statistics/_top-crawlers-this-month.htm rename to controllers/statistics/_top-crawlers-this-month.php diff --git a/controllers/statistics/_top-redirects-this-month.htm b/controllers/statistics/_top-redirects-this-month.php similarity index 100% rename from controllers/statistics/_top-redirects-this-month.htm rename to controllers/statistics/_top-redirects-this-month.php diff --git a/controllers/testlab/_test_button.htm b/controllers/testlab/_test_button.php similarity index 100% rename from controllers/testlab/_test_button.htm rename to controllers/testlab/_test_button.php diff --git a/controllers/testlab/_tester_failed.htm b/controllers/testlab/_tester_failed.php similarity index 100% rename from controllers/testlab/_tester_failed.htm rename to controllers/testlab/_tester_failed.php diff --git a/controllers/testlab/_tester_result.htm b/controllers/testlab/_tester_result.php similarity index 100% rename from controllers/testlab/_tester_result.htm rename to controllers/testlab/_tester_result.php diff --git a/controllers/testlab/_tester_result_items.htm b/controllers/testlab/_tester_result_items.php similarity index 100% rename from controllers/testlab/_tester_result_items.htm rename to controllers/testlab/_tester_result_items.php From 9db654b6867b5a5afeea0edbaa1519a2887570ce Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Thu, 8 May 2025 10:06:33 -0400 Subject: [PATCH 08/16] adjust partial path --- controllers/redirects/{_tab_logs.php => _field_tab_logs.php} | 0 models/redirect/fields.yaml | 1 + 2 files changed, 1 insertion(+) rename controllers/redirects/{_tab_logs.php => _field_tab_logs.php} (100%) diff --git a/controllers/redirects/_tab_logs.php b/controllers/redirects/_field_tab_logs.php similarity index 100% rename from controllers/redirects/_tab_logs.php rename to controllers/redirects/_field_tab_logs.php diff --git a/models/redirect/fields.yaml b/models/redirect/fields.yaml index 8e95d4a..fb71e4b 100644 --- a/models/redirect/fields.yaml +++ b/models/redirect/fields.yaml @@ -227,6 +227,7 @@ tabs: tab_logs: tab: winter.redirect::lang.tab.tab_logs type: partial + path: field_tab_logs # # Advanced # From 8d2529597b767b4767e56f2e33b16d7ed1dda103 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 4 Jun 2025 15:32:49 -0600 Subject: [PATCH 09/16] Remove unnecessary properties --- controllers/Redirects.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/controllers/Redirects.php b/controllers/Redirects.php index 75988c4..ed6a2ed 100644 --- a/controllers/Redirects.php +++ b/controllers/Redirects.php @@ -51,8 +51,6 @@ final class Redirects extends Controller Behaviors\RelationController::class, ]; - public string $formConfig = 'config_form.yaml'; - public $formLayout = 'sidebar'; public array $listConfig = [ @@ -60,10 +58,6 @@ final class Redirects extends Controller 'requestLog' => 'request-log/config_list.yaml', ]; - public string $reorderConfig = 'config_reorder.yaml'; - public string $importExportConfig = 'config_import_export.yaml'; - public string $relationConfig = 'config_relation.yaml'; - public $requiredPermissions = ['winter.redirect.access_redirects']; private Request $request; From a8e502864b153056197b8fe1eab0046636dfc62b Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 4 Jun 2025 15:33:11 -0600 Subject: [PATCH 10/16] Remove duplicate relation --- models/Redirect.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/models/Redirect.php b/models/Redirect.php index d5fd2f1..3f6d085 100644 --- a/models/Redirect.php +++ b/models/Redirect.php @@ -209,11 +209,6 @@ public function isMatchTypeRegex(): bool return $this->attributes['match_type'] === self::TYPE_REGEX; } - public function clients(): HasMany - { - return $this->hasMany(Client::class); - } - public function setSortableOrder($itemIds, array $itemOrders = null): void { $itemIds = array_map(static function ($itemId) { From 935ed874cbe38dd8482b28d46a8c1a4104f30a4c Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 4 Jun 2025 15:33:52 -0600 Subject: [PATCH 11/16] Style fix --- models/Redirect.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/models/Redirect.php b/models/Redirect.php index 3f6d085..7ab4631 100644 --- a/models/Redirect.php +++ b/models/Redirect.php @@ -14,7 +14,6 @@ use Winter\Storm\Support\Arr; use Winter\Storm\Database\Builder; use Winter\Storm\Database\Model; -use Winter\Storm\Database\Relations\HasMany; use Winter\Storm\Database\Traits\Sortable; use Winter\Storm\Database\Traits\Validation; @@ -346,7 +345,6 @@ public function beforeSave(): void $this->setAttribute('to_url', null); $this->setAttribute('cms_page', null); break; - } } From db9487355922635fa55ee778b5134220c31aa2a6 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 4 Jun 2025 15:35:03 -0600 Subject: [PATCH 12/16] Remove unnecessary property --- controllers/Logs.php | 1 - 1 file changed, 1 deletion(-) diff --git a/controllers/Logs.php b/controllers/Logs.php index 52eb928..d294a5e 100644 --- a/controllers/Logs.php +++ b/controllers/Logs.php @@ -25,7 +25,6 @@ final class Logs extends Controller ]; public $requiredPermissions = ['winter.redirect.access_redirects']; - public string $listConfig = 'config_list.yaml'; private Request $request; private Translator $translator; private FlashBag $flash; From ce353345c50b5de0a363c907ce1c3b131d2c2d7c Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 4 Jun 2025 15:35:31 -0600 Subject: [PATCH 13/16] Remove unnecessary properties --- controllers/Categories.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/controllers/Categories.php b/controllers/Categories.php index 02eb6a8..b62fbb2 100644 --- a/controllers/Categories.php +++ b/controllers/Categories.php @@ -19,8 +19,6 @@ final class Categories extends Controller ]; public $requiredPermissions = ['winter.redirect.access_redirects']; - public string $formConfig = 'config_form.yaml'; - public string $listConfig = 'config_list.yaml'; public function __construct() { From ea59519a4d1ced07396ba5399b5368737ccd578c Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 4 Jun 2025 15:36:09 -0600 Subject: [PATCH 14/16] Condense redirect selected bulk actions into dropdown --- controllers/redirects/_list_toolbar.php | 117 +++++++++++++++--------- 1 file changed, 75 insertions(+), 42 deletions(-) diff --git a/controllers/redirects/_list_toolbar.php b/controllers/redirects/_list_toolbar.php index cb5ba16..54a75b9 100644 --- a/controllers/redirects/_list_toolbar.php +++ b/controllers/redirects/_list_toolbar.php @@ -20,53 +20,86 @@ class="btn btn-default wn-icon-plus" -
- - - -
- + data-toggle="dropdown" + > + + + +