From 4db13de97fbc4776b884027ccd0d1d3f776be486 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Tue, 6 May 2025 12:23:21 -0400 Subject: [PATCH 01/13] update controllers to use default views --- controllers/Cities.php | 8 --- controllers/Countries.php | 3 - controllers/Galleries.php | 8 --- controllers/Locations.php | 8 --- controllers/Pages.php | 31 +-------- controllers/People.php | 8 --- controllers/Posts.php | 3 - controllers/Records.php | 10 +-- controllers/Reviews.php | 8 --- controllers/Trees.php | 8 --- controllers/Users.php | 8 --- controllers/categories/_reorder_toolbar.htm | 5 -- controllers/categories/create.htm | 48 -------------- controllers/categories/preview.htm | 19 ------ controllers/categories/reorder.htm | 8 --- controllers/categories/update.htm | 56 ---------------- controllers/channels/_reorder_toolbar.htm | 5 -- controllers/channels/create.htm | 48 -------------- controllers/channels/preview.htm | 19 ------ controllers/channels/reorder.htm | 8 --- controllers/channels/update.htm | 56 ---------------- controllers/cities/_list_toolbar.htm | 21 ------ controllers/cities/config_list.yaml | 2 +- controllers/cities/create.htm | 48 -------------- controllers/cities/index.htm | 2 - controllers/cities/preview.htm | 19 ------ controllers/cities/update.htm | 56 ---------------- .../{_list_toolbar.htm => _list_toolbar.php} | 2 +- controllers/countries/config_form.yaml | 8 +-- controllers/countries/config_list.yaml | 2 +- controllers/countries/create.htm | 48 -------------- controllers/countries/preview.htm | 19 ------ controllers/countries/update.htm | 56 ---------------- controllers/galleries/_list_toolbar.htm | 7 -- controllers/galleries/config_list.yaml | 2 +- controllers/galleries/create.htm | 48 -------------- controllers/galleries/index.htm | 2 - controllers/galleries/preview.htm | 19 ------ controllers/galleries/update.htm | 58 ----------------- controllers/locations/_list_toolbar.htm | 21 ------ controllers/locations/config_list.yaml | 4 +- controllers/locations/create.htm | 48 -------------- controllers/locations/index.htm | 2 - controllers/locations/preview.htm | 19 ------ controllers/locations/update.htm | 56 ---------------- controllers/members/create.htm | 48 -------------- controllers/members/preview.htm | 19 ------ controllers/members/update.htm | 56 ---------------- controllers/pages/_list_toolbar.htm | 21 ------ controllers/pages/config_list.yaml | 2 +- controllers/pages/create.htm | 50 -------------- controllers/pages/preview.htm | 19 ------ controllers/pages/update.htm | 57 ---------------- .../{_list_toolbar.htm => _list_toolbar.php} | 0 controllers/people/config_form.yaml | 6 +- controllers/people/config_list.yaml | 2 +- controllers/phones/_list_toolbar.htm | 3 - controllers/phones/config_list.yaml | 2 +- controllers/plugins/_list_toolbar.htm | 7 -- controllers/plugins/config_list.yaml | 2 +- controllers/plugins/create.htm | 48 -------------- controllers/plugins/index.htm | 2 - controllers/plugins/preview.htm | 19 ------ controllers/plugins/update.htm | 56 ---------------- controllers/posts/config_comment_form.yaml | 6 +- controllers/posts/config_post_form.yaml | 6 +- controllers/posts/config_tag_form.yaml | 6 +- controllers/posts/preview.htm | 19 ------ controllers/records/_form_toolbar.php | 65 ------------------- controllers/records/_list_toolbar.php | 21 ------ controllers/records/config_list.yaml | 2 +- controllers/records/create.php | 25 ------- controllers/records/index.php | 1 - controllers/records/preview.php | 19 ------ controllers/records/update.php | 25 ------- .../{_list_toolbar.htm => _list_toolbar.php} | 0 controllers/reviews/config_list.yaml | 2 +- controllers/reviews/create.htm | 48 -------------- controllers/themes/_list_toolbar.htm | 7 -- controllers/themes/config_list.yaml | 2 +- controllers/themes/create.htm | 48 -------------- controllers/themes/preview.htm | 19 ------ controllers/themes/update.htm | 56 ---------------- .../trees/_list_categories_toolbar.htm | 6 +- controllers/trees/_list_channels_toolbar.htm | 6 +- controllers/trees/_list_members_toolbar.htm | 4 +- controllers/trees/config_channels_list.yaml | 2 +- controllers/users/_list_toolbar.htm | 3 - controllers/users/config_form.yaml | 6 +- controllers/users/config_list.yaml | 2 +- lang/en/lang.php | 52 +++++++++++++++ models/CustomFile.php | 8 +-- models/meta/fields.yaml | 1 - models/page/_toolbar.htm | 20 ------ models/page/fields.yaml | 1 - models/record/fields.yaml | 7 +- 96 files changed, 103 insertions(+), 1755 deletions(-) delete mode 100644 controllers/categories/_reorder_toolbar.htm delete mode 100644 controllers/categories/create.htm delete mode 100644 controllers/categories/preview.htm delete mode 100644 controllers/categories/reorder.htm delete mode 100644 controllers/categories/update.htm delete mode 100644 controllers/channels/_reorder_toolbar.htm delete mode 100644 controllers/channels/create.htm delete mode 100644 controllers/channels/preview.htm delete mode 100644 controllers/channels/reorder.htm delete mode 100644 controllers/channels/update.htm delete mode 100644 controllers/cities/_list_toolbar.htm delete mode 100644 controllers/cities/create.htm delete mode 100644 controllers/cities/index.htm delete mode 100644 controllers/cities/preview.htm delete mode 100644 controllers/cities/update.htm rename controllers/countries/{_list_toolbar.htm => _list_toolbar.php} (99%) delete mode 100644 controllers/countries/create.htm delete mode 100644 controllers/countries/preview.htm delete mode 100644 controllers/countries/update.htm delete mode 100644 controllers/galleries/_list_toolbar.htm delete mode 100644 controllers/galleries/create.htm delete mode 100644 controllers/galleries/index.htm delete mode 100644 controllers/galleries/preview.htm delete mode 100644 controllers/galleries/update.htm delete mode 100644 controllers/locations/_list_toolbar.htm delete mode 100644 controllers/locations/create.htm delete mode 100644 controllers/locations/index.htm delete mode 100644 controllers/locations/preview.htm delete mode 100644 controllers/locations/update.htm delete mode 100644 controllers/members/create.htm delete mode 100644 controllers/members/preview.htm delete mode 100644 controllers/members/update.htm delete mode 100644 controllers/pages/_list_toolbar.htm delete mode 100644 controllers/pages/create.htm delete mode 100644 controllers/pages/preview.htm delete mode 100644 controllers/pages/update.htm rename controllers/people/{_list_toolbar.htm => _list_toolbar.php} (100%) delete mode 100644 controllers/phones/_list_toolbar.htm delete mode 100644 controllers/plugins/_list_toolbar.htm delete mode 100644 controllers/plugins/create.htm delete mode 100644 controllers/plugins/index.htm delete mode 100644 controllers/plugins/preview.htm delete mode 100644 controllers/plugins/update.htm delete mode 100644 controllers/posts/preview.htm delete mode 100644 controllers/records/_form_toolbar.php delete mode 100644 controllers/records/_list_toolbar.php delete mode 100644 controllers/records/create.php delete mode 100644 controllers/records/index.php delete mode 100644 controllers/records/preview.php delete mode 100644 controllers/records/update.php rename controllers/reviews/{_list_toolbar.htm => _list_toolbar.php} (100%) delete mode 100644 controllers/reviews/create.htm delete mode 100644 controllers/themes/_list_toolbar.htm delete mode 100644 controllers/themes/create.htm delete mode 100644 controllers/themes/preview.htm delete mode 100644 controllers/themes/update.htm delete mode 100644 controllers/users/_list_toolbar.htm delete mode 100644 models/page/_toolbar.htm diff --git a/controllers/Cities.php b/controllers/Cities.php index 0dcaca7..5fc6e85 100644 --- a/controllers/Cities.php +++ b/controllers/Cities.php @@ -1,6 +1,5 @@ addJs('/modules/system/assets/js/framework.extras.js'); $this->addJs('/modules/system/assets/css/framework.extras.css'); } diff --git a/controllers/Galleries.php b/controllers/Galleries.php index 1de7e01..0611fe7 100644 --- a/controllers/Galleries.php +++ b/controllers/Galleries.php @@ -1,6 +1,5 @@ asExtension('ListController')->index(); - - $this->bodyClass = 'compact-container'; - } + public $formLayout = 'fancy'; - public function create() - { - $this->bodyClass = 'fancy-layout compact-container breadcrumb-flush breadcrumb-fancy'; - - $this->asExtension('FormController')->create(); - } - - public function update($recordId) - { - $this->bodyClass = 'fancy-layout compact-container breadcrumb-flush breadcrumb-fancy'; - - $this->asExtension('FormController')->update($recordId); - } + public $requiredPermissions = ['winter.test.access_plugin']; } diff --git a/controllers/People.php b/controllers/People.php index 2d003cd..588b420 100644 --- a/controllers/People.php +++ b/controllers/People.php @@ -2,7 +2,6 @@ use Mail; use Flash; -use BackendMenu; use Winter\Test\Models\Phone; use Backend\Classes\FormField; use Backend\Classes\Controller; @@ -21,13 +20,6 @@ class People extends Controller public $requiredPermissions = ['winter.test.access_plugin']; - public function __construct() - { - parent::__construct(); - - BackendMenu::setContext('Winter.Test', 'test', 'people'); - } - public function onSendTestEmail() { $data = ['msg' => 'Hello world']; diff --git a/controllers/Posts.php b/controllers/Posts.php index 30691d3..4e3692b 100644 --- a/controllers/Posts.php +++ b/controllers/Posts.php @@ -1,6 +1,5 @@ - - Return to Trees - - diff --git a/controllers/categories/create.htm b/controllers/categories/create.htm deleted file mode 100644 index b38bd08..0000000 --- a/controllers/categories/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to categories list

- - \ No newline at end of file diff --git a/controllers/categories/preview.htm b/controllers/categories/preview.htm deleted file mode 100644 index 1060b57..0000000 --- a/controllers/categories/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to categories list

- - \ No newline at end of file diff --git a/controllers/categories/reorder.htm b/controllers/categories/reorder.htm deleted file mode 100644 index 78c7061..0000000 --- a/controllers/categories/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - - - - -reorderRender() ?> diff --git a/controllers/categories/update.htm b/controllers/categories/update.htm deleted file mode 100644 index c3b0a26..0000000 --- a/controllers/categories/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to categories list

- - \ No newline at end of file diff --git a/controllers/channels/_reorder_toolbar.htm b/controllers/channels/_reorder_toolbar.htm deleted file mode 100644 index 7f5f40d..0000000 --- a/controllers/channels/_reorder_toolbar.htm +++ /dev/null @@ -1,5 +0,0 @@ -
- - Return to Trees - -
diff --git a/controllers/channels/create.htm b/controllers/channels/create.htm deleted file mode 100644 index 22397f4..0000000 --- a/controllers/channels/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to channels list

- - \ No newline at end of file diff --git a/controllers/channels/preview.htm b/controllers/channels/preview.htm deleted file mode 100644 index 85cbe79..0000000 --- a/controllers/channels/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to channels list

- - \ No newline at end of file diff --git a/controllers/channels/reorder.htm b/controllers/channels/reorder.htm deleted file mode 100644 index 78c7061..0000000 --- a/controllers/channels/reorder.htm +++ /dev/null @@ -1,8 +0,0 @@ - - - - -reorderRender() ?> diff --git a/controllers/channels/update.htm b/controllers/channels/update.htm deleted file mode 100644 index d29347c..0000000 --- a/controllers/channels/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to channels list

- - \ No newline at end of file diff --git a/controllers/cities/_list_toolbar.htm b/controllers/cities/_list_toolbar.htm deleted file mode 100644 index 7bfe0b0..0000000 --- a/controllers/cities/_list_toolbar.htm +++ /dev/null @@ -1,21 +0,0 @@ -
- - New City - - - -
diff --git a/controllers/cities/config_list.yaml b/controllers/cities/config_list.yaml index d779102..c67c057 100644 --- a/controllers/cities/config_list.yaml +++ b/controllers/cities/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/city/columns.yaml modelClass: Winter\Test\Models\City # List Title -title: Manage Cities +title: winter.test::lang.models.city.label_plural # Link URL for each record recordUrl: winter/test/cities/update/:id diff --git a/controllers/cities/create.htm b/controllers/cities/create.htm deleted file mode 100644 index 9dbd19b..0000000 --- a/controllers/cities/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to cities list

- - diff --git a/controllers/cities/index.htm b/controllers/cities/index.htm deleted file mode 100644 index 766877d..0000000 --- a/controllers/cities/index.htm +++ /dev/null @@ -1,2 +0,0 @@ - -listRender() ?> diff --git a/controllers/cities/preview.htm b/controllers/cities/preview.htm deleted file mode 100644 index ed6fa53..0000000 --- a/controllers/cities/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to cities list

- - diff --git a/controllers/cities/update.htm b/controllers/cities/update.htm deleted file mode 100644 index 6a2e9ef..0000000 --- a/controllers/cities/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to cities list

- - diff --git a/controllers/countries/_list_toolbar.htm b/controllers/countries/_list_toolbar.php similarity index 99% rename from controllers/countries/_list_toolbar.htm rename to controllers/countries/_list_toolbar.php index ffbc30f..798da8b 100644 --- a/controllers/countries/_list_toolbar.htm +++ b/controllers/countries/_list_toolbar.php @@ -14,4 +14,4 @@ } }); - \ No newline at end of file + diff --git a/controllers/countries/config_form.yaml b/controllers/countries/config_form.yaml index 543993c..636ee1d 100644 --- a/controllers/countries/config_form.yaml +++ b/controllers/countries/config_form.yaml @@ -3,7 +3,7 @@ # =================================== # Record name -name: Country +name: winter.test::lang.models.country.label # Model Form Field configuration form: ~/plugins/winter/test/models/country/fields.yaml @@ -16,16 +16,16 @@ defaultRedirect: winter/test/countries # Create page create: - title: Create Countries + title: Create Country redirect: winter/test/countries/update/:id redirectClose: winter/test/countries # Update page update: - title: Edit Countries + title: Edit Country redirect: winter/test/countries redirectClose: winter/test/countries # Preview page preview: - title: Preview Countries \ No newline at end of file + title: Preview Country diff --git a/controllers/countries/config_list.yaml b/controllers/countries/config_list.yaml index 0f348e1..8770e58 100644 --- a/controllers/countries/config_list.yaml +++ b/controllers/countries/config_list.yaml @@ -9,7 +9,7 @@ list: ~/plugins/winter/test/models/country/columns.yaml modelClass: Winter\Test\Models\Country # List Title -title: Manage Countries +title: winter.test::lang.models.country.label_plural # Link URL for each record recordUrl: winter/test/countries/update/:id diff --git a/controllers/countries/create.htm b/controllers/countries/create.htm deleted file mode 100644 index 6fe436c..0000000 --- a/controllers/countries/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError)) ?>

-

Return to countries list

- - \ No newline at end of file diff --git a/controllers/countries/preview.htm b/controllers/countries/preview.htm deleted file mode 100644 index 88e322f..0000000 --- a/controllers/countries/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError)) ?>

-

Return to countries list

- - \ No newline at end of file diff --git a/controllers/countries/update.htm b/controllers/countries/update.htm deleted file mode 100644 index 35d548b..0000000 --- a/controllers/countries/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError)) ?>

-

Return to countries list

- - \ No newline at end of file diff --git a/controllers/galleries/_list_toolbar.htm b/controllers/galleries/_list_toolbar.htm deleted file mode 100644 index 4b1a3dc..0000000 --- a/controllers/galleries/_list_toolbar.htm +++ /dev/null @@ -1,7 +0,0 @@ -
- - New Gallery - -
diff --git a/controllers/galleries/config_list.yaml b/controllers/galleries/config_list.yaml index ba247c0..ce5f1d4 100644 --- a/controllers/galleries/config_list.yaml +++ b/controllers/galleries/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/gallery/columns.yaml modelClass: Winter\Test\Models\Gallery # List Title -title: Manage Galleries +title: winter.test::lang.models.gallery.label_plural # Link URL for each record recordUrl: winter/test/galleries/update/:id diff --git a/controllers/galleries/create.htm b/controllers/galleries/create.htm deleted file mode 100644 index b4303ad..0000000 --- a/controllers/galleries/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to galleries list

- - diff --git a/controllers/galleries/index.htm b/controllers/galleries/index.htm deleted file mode 100644 index 766877d..0000000 --- a/controllers/galleries/index.htm +++ /dev/null @@ -1,2 +0,0 @@ - -listRender() ?> diff --git a/controllers/galleries/preview.htm b/controllers/galleries/preview.htm deleted file mode 100644 index 34f06fd..0000000 --- a/controllers/galleries/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to galleries list

- - diff --git a/controllers/galleries/update.htm b/controllers/galleries/update.htm deleted file mode 100644 index ba73b6b..0000000 --- a/controllers/galleries/update.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to galleries list

- - diff --git a/controllers/locations/_list_toolbar.htm b/controllers/locations/_list_toolbar.htm deleted file mode 100644 index a2db429..0000000 --- a/controllers/locations/_list_toolbar.htm +++ /dev/null @@ -1,21 +0,0 @@ -
- - New Location - - - -
diff --git a/controllers/locations/config_list.yaml b/controllers/locations/config_list.yaml index 092ad8c..f9c2dea 100644 --- a/controllers/locations/config_list.yaml +++ b/controllers/locations/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/location/columns.yaml modelClass: Winter\Test\Models\Location # List Title -title: Manage Locations +title: winter.test::lang.models.location.label_plural # Link URL for each record recordUrl: winter/test/locations/update/:id @@ -46,4 +46,4 @@ toolbar: search: prompt: backend::lang.list.search_prompt -filter: config_filter.yaml \ No newline at end of file +filter: config_filter.yaml diff --git a/controllers/locations/create.htm b/controllers/locations/create.htm deleted file mode 100644 index f3561c9..0000000 --- a/controllers/locations/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to locations list

- - diff --git a/controllers/locations/index.htm b/controllers/locations/index.htm deleted file mode 100644 index 766877d..0000000 --- a/controllers/locations/index.htm +++ /dev/null @@ -1,2 +0,0 @@ - -listRender() ?> diff --git a/controllers/locations/preview.htm b/controllers/locations/preview.htm deleted file mode 100644 index 91526a8..0000000 --- a/controllers/locations/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to locations list

- - diff --git a/controllers/locations/update.htm b/controllers/locations/update.htm deleted file mode 100644 index 50fe526..0000000 --- a/controllers/locations/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to locations list

- - diff --git a/controllers/members/create.htm b/controllers/members/create.htm deleted file mode 100644 index 8597ac7..0000000 --- a/controllers/members/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to members list

- - \ No newline at end of file diff --git a/controllers/members/preview.htm b/controllers/members/preview.htm deleted file mode 100644 index 50c1ebe..0000000 --- a/controllers/members/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to members list

- - \ No newline at end of file diff --git a/controllers/members/update.htm b/controllers/members/update.htm deleted file mode 100644 index 2b710f1..0000000 --- a/controllers/members/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to members list

- - \ No newline at end of file diff --git a/controllers/pages/_list_toolbar.htm b/controllers/pages/_list_toolbar.htm deleted file mode 100644 index 4c95965..0000000 --- a/controllers/pages/_list_toolbar.htm +++ /dev/null @@ -1,21 +0,0 @@ -
- - New Page - - - -
diff --git a/controllers/pages/config_list.yaml b/controllers/pages/config_list.yaml index 3bc6630..2a90dd5 100644 --- a/controllers/pages/config_list.yaml +++ b/controllers/pages/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/page/columns.yaml modelClass: Winter\Test\Models\Page # List Title -title: Manage Pages +title: winter.test::lang.models.page.label_plural # Link URL for each record recordUrl: winter/test/pages/update/:id diff --git a/controllers/pages/create.htm b/controllers/pages/create.htm deleted file mode 100644 index 19116c0..0000000 --- a/controllers/pages/create.htm +++ /dev/null @@ -1,50 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- - -
- - - - or Cancel - -
- - */ ?> - - - - - -

fatalError) ?>

-

Return to pages list

- - diff --git a/controllers/pages/preview.htm b/controllers/pages/preview.htm deleted file mode 100644 index 32f7128..0000000 --- a/controllers/pages/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to pages list

- - diff --git a/controllers/pages/update.htm b/controllers/pages/update.htm deleted file mode 100644 index aa59fa7..0000000 --- a/controllers/pages/update.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> -
- formRender() ?> -
- - -
- - - - - or Cancel - -
- - */ ?> - - - - - -

fatalError) ?>

-

Return to pages list

- - diff --git a/controllers/people/_list_toolbar.htm b/controllers/people/_list_toolbar.php similarity index 100% rename from controllers/people/_list_toolbar.htm rename to controllers/people/_list_toolbar.php diff --git a/controllers/people/config_form.yaml b/controllers/people/config_form.yaml index bb7e92e..03b3424 100644 --- a/controllers/people/config_form.yaml +++ b/controllers/people/config_form.yaml @@ -16,16 +16,16 @@ defaultRedirect: winter/test/people # Create page create: - title: Create People + title: Create Person redirect: winter/test/people/update/:id redirectClose: winter/test/people # Update page update: - title: Edit People + title: Edit Person redirect: winter/test/people redirectClose: winter/test/people # Preview page preview: - title: Preview People \ No newline at end of file + title: Preview Person diff --git a/controllers/people/config_list.yaml b/controllers/people/config_list.yaml index feb26e0..ff790f2 100644 --- a/controllers/people/config_list.yaml +++ b/controllers/people/config_list.yaml @@ -9,7 +9,7 @@ list: ~/plugins/winter/test/models/person/columns.yaml modelClass: Winter\Test\Models\Person # List Title -title: Manage Peoples +title: winter.test::lang.models.person.label_plural # Link URL for each record recordUrl: winter/test/people/update/:id diff --git a/controllers/phones/_list_toolbar.htm b/controllers/phones/_list_toolbar.htm deleted file mode 100644 index f2b155c..0000000 --- a/controllers/phones/_list_toolbar.htm +++ /dev/null @@ -1,3 +0,0 @@ -
- New Phone -
\ No newline at end of file diff --git a/controllers/phones/config_list.yaml b/controllers/phones/config_list.yaml index 0cfbead..2ebf015 100644 --- a/controllers/phones/config_list.yaml +++ b/controllers/phones/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/phone/columns.yaml modelClass: Winter\Test\Models\Phone # List Title -title: Manage Phones +title: winter.test::lang.models.phone.label_plural # Link URL for each record recordUrl: winter/test/phones/update/:id diff --git a/controllers/plugins/_list_toolbar.htm b/controllers/plugins/_list_toolbar.htm deleted file mode 100644 index 6248f92..0000000 --- a/controllers/plugins/_list_toolbar.htm +++ /dev/null @@ -1,7 +0,0 @@ -
- - New Plugin - -
\ No newline at end of file diff --git a/controllers/plugins/config_list.yaml b/controllers/plugins/config_list.yaml index 0b8b7b7..5e761ad 100644 --- a/controllers/plugins/config_list.yaml +++ b/controllers/plugins/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/plugin/columns.yaml modelClass: Winter\Test\Models\Plugin # List Title -title: Manage Plugins +title: winter.test::lang.models.plugin.label_plural # Link URL for each record recordUrl: winter/test/plugins/update/:id diff --git a/controllers/plugins/create.htm b/controllers/plugins/create.htm deleted file mode 100644 index 462c6cd..0000000 --- a/controllers/plugins/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to plugins list

- - \ No newline at end of file diff --git a/controllers/plugins/index.htm b/controllers/plugins/index.htm deleted file mode 100644 index 766877d..0000000 --- a/controllers/plugins/index.htm +++ /dev/null @@ -1,2 +0,0 @@ - -listRender() ?> diff --git a/controllers/plugins/preview.htm b/controllers/plugins/preview.htm deleted file mode 100644 index bf9ae9e..0000000 --- a/controllers/plugins/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to plugins list

- - \ No newline at end of file diff --git a/controllers/plugins/update.htm b/controllers/plugins/update.htm deleted file mode 100644 index bd16ef5..0000000 --- a/controllers/plugins/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to plugins list

- - \ No newline at end of file diff --git a/controllers/posts/config_comment_form.yaml b/controllers/posts/config_comment_form.yaml index c57e460..6e31800 100644 --- a/controllers/posts/config_comment_form.yaml +++ b/controllers/posts/config_comment_form.yaml @@ -16,16 +16,16 @@ defaultRedirect: winter/test/posts # Create page create: - title: Create Comments + title: Create Comment redirect: winter/test/posts/update/:id redirectClose: winter/test/posts # Update page update: - title: Edit Comments + title: Edit Comment redirect: winter/test/posts redirectClose: winter/test/posts # Preview page preview: - title: Preview Comments + title: Preview Comment diff --git a/controllers/posts/config_post_form.yaml b/controllers/posts/config_post_form.yaml index 1e19259..16abdb2 100644 --- a/controllers/posts/config_post_form.yaml +++ b/controllers/posts/config_post_form.yaml @@ -16,16 +16,16 @@ defaultRedirect: winter/test/posts # Create page create: - title: Create Posts + title: Create Post redirect: winter/test/posts/update/:id redirectClose: winter/test/posts # Update page update: - title: Edit Posts + title: Edit Post redirect: winter/test/posts redirectClose: winter/test/posts # Preview page preview: - title: Preview Posts \ No newline at end of file + title: Preview Post diff --git a/controllers/posts/config_tag_form.yaml b/controllers/posts/config_tag_form.yaml index 093bf49..a2c289e 100644 --- a/controllers/posts/config_tag_form.yaml +++ b/controllers/posts/config_tag_form.yaml @@ -16,16 +16,16 @@ defaultRedirect: winter/test/posts # Create page create: - title: Create Tags + title: Create Tag redirect: winter/test/tags/update/:id redirectClose: winter/test/tags # Update page update: - title: Edit Tags + title: Edit Tag redirect: winter/test/tags redirectClose: winter/test/tags # Preview page preview: - title: Preview Tags + title: Preview Tag diff --git a/controllers/posts/preview.htm b/controllers/posts/preview.htm deleted file mode 100644 index 6bbaa84..0000000 --- a/controllers/posts/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError)) ?>

-

Return to posts list

- - \ No newline at end of file diff --git a/controllers/records/_form_toolbar.php b/controllers/records/_form_toolbar.php deleted file mode 100644 index d39db43..0000000 --- a/controllers/records/_form_toolbar.php +++ /dev/null @@ -1,65 +0,0 @@ -formGetContext() === 'preview'; - $isCreate = $this->formGetContext() === 'create'; - $pageUrl = isset($pageUrl) ? $pageUrl : null; - $indexUrl = Backend::url('winter/test/records'); -?> -
- - - - - - - - data-request-data="redirect:0" - - data-hotkey="ctrl+s, cmd+s"> - - - - - - - - - - - - or - - - - - - - - - - - - -
diff --git a/controllers/records/_list_toolbar.php b/controllers/records/_list_toolbar.php deleted file mode 100644 index 53276e2..0000000 --- a/controllers/records/_list_toolbar.php +++ /dev/null @@ -1,21 +0,0 @@ -
- - trans('winter.test::lang.models.record.label')])); ?> - - - -
diff --git a/controllers/records/config_list.yaml b/controllers/records/config_list.yaml index 05437fc..a30bec3 100644 --- a/controllers/records/config_list.yaml +++ b/controllers/records/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/record/columns.yaml modelClass: Winter\Test\Models\Record # List Title -title: 'winter.test::lang.models.record.label_plural' +title: winter.test::lang.models.record.label_plural # Link URL for each record recordUrl: winter/test/records/update/:id diff --git a/controllers/records/create.php b/controllers/records/create.php deleted file mode 100644 index 9a92adf..0000000 --- a/controllers/records/create.php +++ /dev/null @@ -1,25 +0,0 @@ -fatalError): ?> - -
- 'layout', - 'data-change-monitor' => 'true', - 'data-window-close-confirm' => e(trans('winter.test::lang.general.unsaved_changes')), - ]) ?> - - formRender() ?> - - -
- - - -
- -
-
-

fatalError)) ?>

-

-
- - diff --git a/controllers/records/index.php b/controllers/records/index.php deleted file mode 100644 index ea43a36..0000000 --- a/controllers/records/index.php +++ /dev/null @@ -1 +0,0 @@ -listRender() ?> diff --git a/controllers/records/preview.php b/controllers/records/preview.php deleted file mode 100644 index 67320eb..0000000 --- a/controllers/records/preview.php +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

- - diff --git a/controllers/records/update.php b/controllers/records/update.php deleted file mode 100644 index 9a92adf..0000000 --- a/controllers/records/update.php +++ /dev/null @@ -1,25 +0,0 @@ -fatalError): ?> - -
- 'layout', - 'data-change-monitor' => 'true', - 'data-window-close-confirm' => e(trans('winter.test::lang.general.unsaved_changes')), - ]) ?> - - formRender() ?> - - -
- - - -
- -
-
-

fatalError)) ?>

-

-
- - diff --git a/controllers/reviews/_list_toolbar.htm b/controllers/reviews/_list_toolbar.php similarity index 100% rename from controllers/reviews/_list_toolbar.htm rename to controllers/reviews/_list_toolbar.php diff --git a/controllers/reviews/config_list.yaml b/controllers/reviews/config_list.yaml index 0ff4ba8..5d99800 100644 --- a/controllers/reviews/config_list.yaml +++ b/controllers/reviews/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/review/columns.yaml modelClass: Winter\Test\Models\Review # List Title -title: Manage Reviews +title: winter.test::lang.models.review.label_plural # Link URL for each record recordUrl: winter/test/reviews/update/:id diff --git a/controllers/reviews/create.htm b/controllers/reviews/create.htm deleted file mode 100644 index 088466d..0000000 --- a/controllers/reviews/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to reviews list

- - \ No newline at end of file diff --git a/controllers/themes/_list_toolbar.htm b/controllers/themes/_list_toolbar.htm deleted file mode 100644 index c583b24..0000000 --- a/controllers/themes/_list_toolbar.htm +++ /dev/null @@ -1,7 +0,0 @@ -
- - New Theme - -
\ No newline at end of file diff --git a/controllers/themes/config_list.yaml b/controllers/themes/config_list.yaml index 1939604..54d6daf 100644 --- a/controllers/themes/config_list.yaml +++ b/controllers/themes/config_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/theme/columns.yaml modelClass: Winter\Test\Models\Theme # List Title -title: Manage Themes +title: winter.test::lang.models.theme.label_plural # Link URL for each record recordUrl: winter/test/themes/update/:id diff --git a/controllers/themes/create.htm b/controllers/themes/create.htm deleted file mode 100644 index fbfbdbe..0000000 --- a/controllers/themes/create.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to themes list

- - \ No newline at end of file diff --git a/controllers/themes/preview.htm b/controllers/themes/preview.htm deleted file mode 100644 index ae73525..0000000 --- a/controllers/themes/preview.htm +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to themes list

- - \ No newline at end of file diff --git a/controllers/themes/update.htm b/controllers/themes/update.htm deleted file mode 100644 index 78fbe8d..0000000 --- a/controllers/themes/update.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to themes list

- - \ No newline at end of file diff --git a/controllers/trees/_list_categories_toolbar.htm b/controllers/trees/_list_categories_toolbar.htm index 0b1dbd1..bda1b46 100644 --- a/controllers/trees/_list_categories_toolbar.htm +++ b/controllers/trees/_list_categories_toolbar.htm @@ -2,11 +2,11 @@ - New + New Category - Reorder + Reorder Categories - \ No newline at end of file + diff --git a/controllers/trees/_list_channels_toolbar.htm b/controllers/trees/_list_channels_toolbar.htm index f4b71e0..85ca8b4 100644 --- a/controllers/trees/_list_channels_toolbar.htm +++ b/controllers/trees/_list_channels_toolbar.htm @@ -2,11 +2,11 @@ - New + New Channel - Reorder + Reorder Channels - \ No newline at end of file + diff --git a/controllers/trees/_list_members_toolbar.htm b/controllers/trees/_list_members_toolbar.htm index 3fb1c33..36e18f5 100644 --- a/controllers/trees/_list_members_toolbar.htm +++ b/controllers/trees/_list_members_toolbar.htm @@ -2,6 +2,6 @@ - New + New Member - \ No newline at end of file + diff --git a/controllers/trees/config_channels_list.yaml b/controllers/trees/config_channels_list.yaml index 87e3936..bc9aad8 100644 --- a/controllers/trees/config_channels_list.yaml +++ b/controllers/trees/config_channels_list.yaml @@ -9,7 +9,7 @@ list: $/winter/test/models/channel/columns.yaml modelClass: Winter\Test\Models\Channel # List Title -title: Manage Channels +title: winter.test::lang.models.channel.label_plural # Link URL for each record recordUrl: winter/test/channels/update/:id diff --git a/controllers/users/_list_toolbar.htm b/controllers/users/_list_toolbar.htm deleted file mode 100644 index 4ca85a6..0000000 --- a/controllers/users/_list_toolbar.htm +++ /dev/null @@ -1,3 +0,0 @@ -
- New User -
\ No newline at end of file diff --git a/controllers/users/config_form.yaml b/controllers/users/config_form.yaml index 94f6dce..4c03af8 100644 --- a/controllers/users/config_form.yaml +++ b/controllers/users/config_form.yaml @@ -16,16 +16,16 @@ defaultRedirect: winter/test/users # Create page create: - title: Create Users + title: Create User redirect: winter/test/users/update/:id redirectClose: winter/test/users # Update page update: - title: Edit Users + title: Edit User redirect: winter/test/users redirectClose: winter/test/users # Preview page preview: - title: Preview Users \ No newline at end of file + title: Preview User diff --git a/controllers/users/config_list.yaml b/controllers/users/config_list.yaml index ac11309..2a32987 100644 --- a/controllers/users/config_list.yaml +++ b/controllers/users/config_list.yaml @@ -9,7 +9,7 @@ list: ~/plugins/winter/test/models/user/columns.yaml modelClass: Winter\Test\Models\User # List Title -title: Manage Users +title: winter.test::lang.models.user.label_plural # Link URL for each record recordUrl: winter/test/users/update/:id diff --git a/lang/en/lang.php b/lang/en/lang.php index 6729e11..2bef2d2 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -14,10 +14,62 @@ 'updated_at' => 'Updated At', 'deleted_at' => 'Archived At', ], + 'channel' => [ + 'label' => 'Channel', + 'label_plural' => 'Channels', + ], + 'city' => [ + 'label' => 'City', + 'label_plural' => 'Cities', + ], + 'country' => [ + 'label' => 'Country', + 'label_plural' => 'Countries', + ], + 'gallery' => [ + 'label' => 'Gallery', + 'label_plural' => 'Galleries', + ], + 'location' => [ + 'label' => 'Location', + 'label_plural' => 'Locations', + ], + 'page' => [ + 'label' => 'Page', + 'label_plural' => 'Pages', + ], + 'person' => [ + 'label' => 'Person', + 'label_plural' => 'People', + ], + 'phone' => [ + 'label' => 'Phone', + 'label_plural' => 'Phones', + ], + 'plugin' => [ + 'label' => 'Plugin', + 'label_plural' => 'Plugins', + ], + 'post' => [ + 'label' => 'Post', + 'label_plural' => 'Posts', + ], 'record' => [ 'label' => 'Record', 'label_plural' => 'Records', ], + 'review' => [ + 'label' => 'Review', + 'label_plural' => 'Reviews', + ], + 'theme' => [ + 'label' => 'Theme', + 'label_plural' => 'Themes', + ], + 'tree' => [ + 'label' => 'Tree', + 'label_plural' => 'Trees', + ], 'user' => [ 'label' => 'User', 'label_plural' => 'Users', diff --git a/models/CustomFile.php b/models/CustomFile.php index 045c723..7ed063b 100644 --- a/models/CustomFile.php +++ b/models/CustomFile.php @@ -10,7 +10,7 @@ */ class CustomFile extends FileBase { - protected function getPartitionDirectory() + protected function getPartitionDirectory(): string { return '/'; } @@ -20,19 +20,19 @@ protected function getLocalRootPath(): string return storage_path(); } - public function getStorageDirectory() + public function getStorageDirectory(): string { return 'temp/test-plugin-custom-files'; } - public function getPublicPath() + public function getPublicPath(): string { $uploadsPath = '/storage/temp/test-plugin-custom-files'; return Request::getBasePath() . $uploadsPath; } - protected function isLocalStorage() + protected function isLocalStorage(): bool { return true; } diff --git a/models/meta/fields.yaml b/models/meta/fields.yaml index 14c97e4..8828005 100644 --- a/models/meta/fields.yaml +++ b/models/meta/fields.yaml @@ -42,7 +42,6 @@ fields: label: Robot follow type: dropdown default: follow - default: index span: right options: follow: Follow diff --git a/models/page/_toolbar.htm b/models/page/_toolbar.htm deleted file mode 100644 index b2185de..0000000 --- a/models/page/_toolbar.htm +++ /dev/null @@ -1,20 +0,0 @@ -
- - Save - - - formGetContext() !== 'create'): ?> - - - -
diff --git a/models/page/fields.yaml b/models/page/fields.yaml index a65caa1..70a1129 100644 --- a/models/page/fields.yaml +++ b/models/page/fields.yaml @@ -18,7 +18,6 @@ fields: toolbar: label: false type: partial - path: $/winter/test/models/page/_toolbar.htm tabs: cssClass: master-area diff --git a/models/record/fields.yaml b/models/record/fields.yaml index 6881412..e82616e 100644 --- a/models/record/fields.yaml +++ b/models/record/fields.yaml @@ -21,7 +21,7 @@ fields: disabled: true span: right - form_toolbar: + toolbar: type: partial span: full @@ -432,11 +432,6 @@ secondaryTabs: label: Description type: textarea size: small - blocks: - label: Grouped Repeater - tab: Repeater - type: repeater - groups: ~/plugins/winter/test/models/record/blocks.yaml ## ## Files From e88087eee787bd020e4092b578c4fddde9d14198 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Wed, 7 May 2025 00:45:15 -0400 Subject: [PATCH 02/13] remove htm partials to php --- controllers/countries/{_google_button.htm => _google_button.php} | 0 controllers/countries/{index.htm => index.php} | 0 controllers/galleries/{_posts.htm => _posts.php} | 0 controllers/pages/{index.htm => index.php} | 0 controllers/people/{_ajax_options.htm => _ajax_options.php} | 0 controllers/people/{_datatable.htm => _datatable.php} | 0 controllers/people/{_form_toggle.htm => _form_toggle.php} | 0 controllers/people/{_id.htm => _id.php} | 0 controllers/people/{_name.htm => _name.php} | 0 controllers/people/{_phone.htm => _phone.php} | 0 controllers/people/{create.htm => create.php} | 0 controllers/people/{index.htm => index.php} | 0 controllers/people/{preview.htm => preview.php} | 0 controllers/people/{update.htm => update.php} | 0 controllers/phones/{_form_toggle.htm => _form_toggle.php} | 0 controllers/phones/{_person.htm => _person.php} | 0 controllers/phones/{create.htm => create.php} | 0 controllers/phones/{index.htm => index.php} | 0 controllers/phones/{preview.htm => preview.php} | 0 controllers/phones/{update.htm => update.php} | 0 controllers/posts/{_comments.htm => _comments.php} | 0 controllers/posts/{_create_form.htm => _create_form.php} | 0 .../posts/{_delete_reason_form.htm => _delete_reason_form.php} | 0 controllers/posts/{_error_button.htm => _error_button.php} | 0 controllers/posts/{_form_toggle.htm => _form_toggle.php} | 0 controllers/posts/{_galleries.htm => _galleries.php} | 0 .../{_list_comments_toolbar.htm => _list_comments_toolbar.php} | 0 .../posts/{_list_posts_toolbar.htm => _list_posts_toolbar.php} | 0 .../posts/{_list_tags_toolbar.htm => _list_tags_toolbar.php} | 0 controllers/posts/{_review.htm => _review.php} | 0 controllers/posts/{_status.htm => _status.php} | 0 controllers/posts/{_update_form.htm => _update_form.php} | 0 controllers/posts/{create.htm => create.php} | 0 controllers/posts/{index.htm => index.php} | 0 controllers/posts/{update.htm => update.php} | 0 controllers/reviews/{_list_container.htm => _list_container.php} | 0 controllers/reviews/{_small_image.htm => _small_image.php} | 0 controllers/reviews/{index.htm => index.php} | 0 .../reviews/list/{_list_body_row.htm => _list_body_row.php} | 0 controllers/reviews/{preview.htm => preview.php} | 0 controllers/reviews/{update.htm => update.php} | 0 controllers/themes/{index.htm => index.php} | 0 ...{_list_categories_toolbar.htm => _list_categories_toolbar.php} | 0 .../{_list_channels_toolbar.htm => _list_channels_toolbar.php} | 0 .../{_list_members_toolbar.htm => _list_members_toolbar.php} | 0 controllers/trees/{index.htm => index.php} | 0 .../{_field_uppercase_name.htm => _field_uppercase_name.php} | 0 controllers/users/{_form_toggle.htm => _form_toggle.php} | 0 controllers/users/{_roles.htm => _roles.php} | 0 controllers/users/{_roles_pivot.htm => _roles_pivot.php} | 0 .../users/{_roles_pivot_model.htm => _roles_pivot_model.php} | 0 controllers/users/{create.htm => create.php} | 0 controllers/users/{index.htm => index.php} | 0 controllers/users/{preview.htm => preview.php} | 0 controllers/users/{update.htm => update.php} | 0 55 files changed, 0 insertions(+), 0 deletions(-) rename controllers/countries/{_google_button.htm => _google_button.php} (100%) rename controllers/countries/{index.htm => index.php} (100%) rename controllers/galleries/{_posts.htm => _posts.php} (100%) rename controllers/pages/{index.htm => index.php} (100%) rename controllers/people/{_ajax_options.htm => _ajax_options.php} (100%) rename controllers/people/{_datatable.htm => _datatable.php} (100%) rename controllers/people/{_form_toggle.htm => _form_toggle.php} (100%) rename controllers/people/{_id.htm => _id.php} (100%) rename controllers/people/{_name.htm => _name.php} (100%) rename controllers/people/{_phone.htm => _phone.php} (100%) rename controllers/people/{create.htm => create.php} (100%) rename controllers/people/{index.htm => index.php} (100%) rename controllers/people/{preview.htm => preview.php} (100%) rename controllers/people/{update.htm => update.php} (100%) rename controllers/phones/{_form_toggle.htm => _form_toggle.php} (100%) rename controllers/phones/{_person.htm => _person.php} (100%) rename controllers/phones/{create.htm => create.php} (100%) rename controllers/phones/{index.htm => index.php} (100%) rename controllers/phones/{preview.htm => preview.php} (100%) rename controllers/phones/{update.htm => update.php} (100%) rename controllers/posts/{_comments.htm => _comments.php} (100%) rename controllers/posts/{_create_form.htm => _create_form.php} (100%) rename controllers/posts/{_delete_reason_form.htm => _delete_reason_form.php} (100%) rename controllers/posts/{_error_button.htm => _error_button.php} (100%) rename controllers/posts/{_form_toggle.htm => _form_toggle.php} (100%) rename controllers/posts/{_galleries.htm => _galleries.php} (100%) rename controllers/posts/{_list_comments_toolbar.htm => _list_comments_toolbar.php} (100%) rename controllers/posts/{_list_posts_toolbar.htm => _list_posts_toolbar.php} (100%) rename controllers/posts/{_list_tags_toolbar.htm => _list_tags_toolbar.php} (100%) rename controllers/posts/{_review.htm => _review.php} (100%) rename controllers/posts/{_status.htm => _status.php} (100%) rename controllers/posts/{_update_form.htm => _update_form.php} (100%) rename controllers/posts/{create.htm => create.php} (100%) rename controllers/posts/{index.htm => index.php} (100%) rename controllers/posts/{update.htm => update.php} (100%) rename controllers/reviews/{_list_container.htm => _list_container.php} (100%) rename controllers/reviews/{_small_image.htm => _small_image.php} (100%) rename controllers/reviews/{index.htm => index.php} (100%) rename controllers/reviews/list/{_list_body_row.htm => _list_body_row.php} (100%) rename controllers/reviews/{preview.htm => preview.php} (100%) rename controllers/reviews/{update.htm => update.php} (100%) rename controllers/themes/{index.htm => index.php} (100%) rename controllers/trees/{_list_categories_toolbar.htm => _list_categories_toolbar.php} (100%) rename controllers/trees/{_list_channels_toolbar.htm => _list_channels_toolbar.php} (100%) rename controllers/trees/{_list_members_toolbar.htm => _list_members_toolbar.php} (100%) rename controllers/trees/{index.htm => index.php} (100%) rename controllers/users/{_field_uppercase_name.htm => _field_uppercase_name.php} (100%) rename controllers/users/{_form_toggle.htm => _form_toggle.php} (100%) rename controllers/users/{_roles.htm => _roles.php} (100%) rename controllers/users/{_roles_pivot.htm => _roles_pivot.php} (100%) rename controllers/users/{_roles_pivot_model.htm => _roles_pivot_model.php} (100%) rename controllers/users/{create.htm => create.php} (100%) rename controllers/users/{index.htm => index.php} (100%) rename controllers/users/{preview.htm => preview.php} (100%) rename controllers/users/{update.htm => update.php} (100%) diff --git a/controllers/countries/_google_button.htm b/controllers/countries/_google_button.php similarity index 100% rename from controllers/countries/_google_button.htm rename to controllers/countries/_google_button.php diff --git a/controllers/countries/index.htm b/controllers/countries/index.php similarity index 100% rename from controllers/countries/index.htm rename to controllers/countries/index.php diff --git a/controllers/galleries/_posts.htm b/controllers/galleries/_posts.php similarity index 100% rename from controllers/galleries/_posts.htm rename to controllers/galleries/_posts.php diff --git a/controllers/pages/index.htm b/controllers/pages/index.php similarity index 100% rename from controllers/pages/index.htm rename to controllers/pages/index.php diff --git a/controllers/people/_ajax_options.htm b/controllers/people/_ajax_options.php similarity index 100% rename from controllers/people/_ajax_options.htm rename to controllers/people/_ajax_options.php diff --git a/controllers/people/_datatable.htm b/controllers/people/_datatable.php similarity index 100% rename from controllers/people/_datatable.htm rename to controllers/people/_datatable.php diff --git a/controllers/people/_form_toggle.htm b/controllers/people/_form_toggle.php similarity index 100% rename from controllers/people/_form_toggle.htm rename to controllers/people/_form_toggle.php diff --git a/controllers/people/_id.htm b/controllers/people/_id.php similarity index 100% rename from controllers/people/_id.htm rename to controllers/people/_id.php diff --git a/controllers/people/_name.htm b/controllers/people/_name.php similarity index 100% rename from controllers/people/_name.htm rename to controllers/people/_name.php diff --git a/controllers/people/_phone.htm b/controllers/people/_phone.php similarity index 100% rename from controllers/people/_phone.htm rename to controllers/people/_phone.php diff --git a/controllers/people/create.htm b/controllers/people/create.php similarity index 100% rename from controllers/people/create.htm rename to controllers/people/create.php diff --git a/controllers/people/index.htm b/controllers/people/index.php similarity index 100% rename from controllers/people/index.htm rename to controllers/people/index.php diff --git a/controllers/people/preview.htm b/controllers/people/preview.php similarity index 100% rename from controllers/people/preview.htm rename to controllers/people/preview.php diff --git a/controllers/people/update.htm b/controllers/people/update.php similarity index 100% rename from controllers/people/update.htm rename to controllers/people/update.php diff --git a/controllers/phones/_form_toggle.htm b/controllers/phones/_form_toggle.php similarity index 100% rename from controllers/phones/_form_toggle.htm rename to controllers/phones/_form_toggle.php diff --git a/controllers/phones/_person.htm b/controllers/phones/_person.php similarity index 100% rename from controllers/phones/_person.htm rename to controllers/phones/_person.php diff --git a/controllers/phones/create.htm b/controllers/phones/create.php similarity index 100% rename from controllers/phones/create.htm rename to controllers/phones/create.php diff --git a/controllers/phones/index.htm b/controllers/phones/index.php similarity index 100% rename from controllers/phones/index.htm rename to controllers/phones/index.php diff --git a/controllers/phones/preview.htm b/controllers/phones/preview.php similarity index 100% rename from controllers/phones/preview.htm rename to controllers/phones/preview.php diff --git a/controllers/phones/update.htm b/controllers/phones/update.php similarity index 100% rename from controllers/phones/update.htm rename to controllers/phones/update.php diff --git a/controllers/posts/_comments.htm b/controllers/posts/_comments.php similarity index 100% rename from controllers/posts/_comments.htm rename to controllers/posts/_comments.php diff --git a/controllers/posts/_create_form.htm b/controllers/posts/_create_form.php similarity index 100% rename from controllers/posts/_create_form.htm rename to controllers/posts/_create_form.php diff --git a/controllers/posts/_delete_reason_form.htm b/controllers/posts/_delete_reason_form.php similarity index 100% rename from controllers/posts/_delete_reason_form.htm rename to controllers/posts/_delete_reason_form.php diff --git a/controllers/posts/_error_button.htm b/controllers/posts/_error_button.php similarity index 100% rename from controllers/posts/_error_button.htm rename to controllers/posts/_error_button.php diff --git a/controllers/posts/_form_toggle.htm b/controllers/posts/_form_toggle.php similarity index 100% rename from controllers/posts/_form_toggle.htm rename to controllers/posts/_form_toggle.php diff --git a/controllers/posts/_galleries.htm b/controllers/posts/_galleries.php similarity index 100% rename from controllers/posts/_galleries.htm rename to controllers/posts/_galleries.php diff --git a/controllers/posts/_list_comments_toolbar.htm b/controllers/posts/_list_comments_toolbar.php similarity index 100% rename from controllers/posts/_list_comments_toolbar.htm rename to controllers/posts/_list_comments_toolbar.php diff --git a/controllers/posts/_list_posts_toolbar.htm b/controllers/posts/_list_posts_toolbar.php similarity index 100% rename from controllers/posts/_list_posts_toolbar.htm rename to controllers/posts/_list_posts_toolbar.php diff --git a/controllers/posts/_list_tags_toolbar.htm b/controllers/posts/_list_tags_toolbar.php similarity index 100% rename from controllers/posts/_list_tags_toolbar.htm rename to controllers/posts/_list_tags_toolbar.php diff --git a/controllers/posts/_review.htm b/controllers/posts/_review.php similarity index 100% rename from controllers/posts/_review.htm rename to controllers/posts/_review.php diff --git a/controllers/posts/_status.htm b/controllers/posts/_status.php similarity index 100% rename from controllers/posts/_status.htm rename to controllers/posts/_status.php diff --git a/controllers/posts/_update_form.htm b/controllers/posts/_update_form.php similarity index 100% rename from controllers/posts/_update_form.htm rename to controllers/posts/_update_form.php diff --git a/controllers/posts/create.htm b/controllers/posts/create.php similarity index 100% rename from controllers/posts/create.htm rename to controllers/posts/create.php diff --git a/controllers/posts/index.htm b/controllers/posts/index.php similarity index 100% rename from controllers/posts/index.htm rename to controllers/posts/index.php diff --git a/controllers/posts/update.htm b/controllers/posts/update.php similarity index 100% rename from controllers/posts/update.htm rename to controllers/posts/update.php diff --git a/controllers/reviews/_list_container.htm b/controllers/reviews/_list_container.php similarity index 100% rename from controllers/reviews/_list_container.htm rename to controllers/reviews/_list_container.php diff --git a/controllers/reviews/_small_image.htm b/controllers/reviews/_small_image.php similarity index 100% rename from controllers/reviews/_small_image.htm rename to controllers/reviews/_small_image.php diff --git a/controllers/reviews/index.htm b/controllers/reviews/index.php similarity index 100% rename from controllers/reviews/index.htm rename to controllers/reviews/index.php diff --git a/controllers/reviews/list/_list_body_row.htm b/controllers/reviews/list/_list_body_row.php similarity index 100% rename from controllers/reviews/list/_list_body_row.htm rename to controllers/reviews/list/_list_body_row.php diff --git a/controllers/reviews/preview.htm b/controllers/reviews/preview.php similarity index 100% rename from controllers/reviews/preview.htm rename to controllers/reviews/preview.php diff --git a/controllers/reviews/update.htm b/controllers/reviews/update.php similarity index 100% rename from controllers/reviews/update.htm rename to controllers/reviews/update.php diff --git a/controllers/themes/index.htm b/controllers/themes/index.php similarity index 100% rename from controllers/themes/index.htm rename to controllers/themes/index.php diff --git a/controllers/trees/_list_categories_toolbar.htm b/controllers/trees/_list_categories_toolbar.php similarity index 100% rename from controllers/trees/_list_categories_toolbar.htm rename to controllers/trees/_list_categories_toolbar.php diff --git a/controllers/trees/_list_channels_toolbar.htm b/controllers/trees/_list_channels_toolbar.php similarity index 100% rename from controllers/trees/_list_channels_toolbar.htm rename to controllers/trees/_list_channels_toolbar.php diff --git a/controllers/trees/_list_members_toolbar.htm b/controllers/trees/_list_members_toolbar.php similarity index 100% rename from controllers/trees/_list_members_toolbar.htm rename to controllers/trees/_list_members_toolbar.php diff --git a/controllers/trees/index.htm b/controllers/trees/index.php similarity index 100% rename from controllers/trees/index.htm rename to controllers/trees/index.php diff --git a/controllers/users/_field_uppercase_name.htm b/controllers/users/_field_uppercase_name.php similarity index 100% rename from controllers/users/_field_uppercase_name.htm rename to controllers/users/_field_uppercase_name.php diff --git a/controllers/users/_form_toggle.htm b/controllers/users/_form_toggle.php similarity index 100% rename from controllers/users/_form_toggle.htm rename to controllers/users/_form_toggle.php diff --git a/controllers/users/_roles.htm b/controllers/users/_roles.php similarity index 100% rename from controllers/users/_roles.htm rename to controllers/users/_roles.php diff --git a/controllers/users/_roles_pivot.htm b/controllers/users/_roles_pivot.php similarity index 100% rename from controllers/users/_roles_pivot.htm rename to controllers/users/_roles_pivot.php diff --git a/controllers/users/_roles_pivot_model.htm b/controllers/users/_roles_pivot_model.php similarity index 100% rename from controllers/users/_roles_pivot_model.htm rename to controllers/users/_roles_pivot_model.php diff --git a/controllers/users/create.htm b/controllers/users/create.php similarity index 100% rename from controllers/users/create.htm rename to controllers/users/create.php diff --git a/controllers/users/index.htm b/controllers/users/index.php similarity index 100% rename from controllers/users/index.htm rename to controllers/users/index.php diff --git a/controllers/users/preview.htm b/controllers/users/preview.php similarity index 100% rename from controllers/users/preview.htm rename to controllers/users/preview.php diff --git a/controllers/users/update.htm b/controllers/users/update.php similarity index 100% rename from controllers/users/update.htm rename to controllers/users/update.php From b0375c08c157ef854d643fe70dad7407884dbc8d Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Wed, 7 May 2025 09:27:28 -0400 Subject: [PATCH 03/13] remove last remaining create/update/preview view files --- controllers/people/create.php | 50 ------------------ controllers/people/preview.php | 21 -------- controllers/people/update.php | 58 --------------------- controllers/phones/create.php | 53 ------------------- controllers/phones/preview.php | 20 -------- controllers/phones/update.php | 61 ---------------------- controllers/posts/create.php | 50 ------------------ controllers/posts/update.php | 58 --------------------- controllers/reviews/_form_orphan.php | 20 ++++++++ controllers/reviews/preview.php | 19 ------- controllers/reviews/update.php | 77 ---------------------------- controllers/users/create.php | 50 ------------------ controllers/users/preview.php | 19 ------- controllers/users/update.php | 58 --------------------- models/person/fields.yaml | 5 ++ models/phone/fields.yaml | 5 ++ models/post/fields.yaml | 5 ++ models/review/fields.yaml | 5 ++ models/user/fields.yaml | 5 ++ 19 files changed, 45 insertions(+), 594 deletions(-) delete mode 100644 controllers/people/create.php delete mode 100644 controllers/people/preview.php delete mode 100644 controllers/people/update.php delete mode 100644 controllers/phones/create.php delete mode 100644 controllers/phones/preview.php delete mode 100644 controllers/phones/update.php delete mode 100644 controllers/posts/create.php delete mode 100644 controllers/posts/update.php create mode 100644 controllers/reviews/_form_orphan.php delete mode 100644 controllers/reviews/preview.php delete mode 100644 controllers/reviews/update.php delete mode 100644 controllers/users/create.php delete mode 100644 controllers/users/preview.php delete mode 100644 controllers/users/update.php diff --git a/controllers/people/create.php b/controllers/people/create.php deleted file mode 100644 index ec0fdd3..0000000 --- a/controllers/people/create.php +++ /dev/null @@ -1,50 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - - makePartial('form_toggle') ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError)) ?>

-

Return to people list

- - \ No newline at end of file diff --git a/controllers/people/preview.php b/controllers/people/preview.php deleted file mode 100644 index 1b52ba3..0000000 --- a/controllers/people/preview.php +++ /dev/null @@ -1,21 +0,0 @@ - - - - -fatalError): ?> - - makePartial('form_toggle') ?> - -
- formRenderPreview() ?> -
- - - -

fatalError)) ?>

-

Return to people list

- - diff --git a/controllers/people/update.php b/controllers/people/update.php deleted file mode 100644 index a446a75..0000000 --- a/controllers/people/update.php +++ /dev/null @@ -1,58 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - - makePartial('form_toggle') ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError)) ?>

-

Return to people list

- - \ No newline at end of file diff --git a/controllers/phones/create.php b/controllers/phones/create.php deleted file mode 100644 index f302c45..0000000 --- a/controllers/phones/create.php +++ /dev/null @@ -1,53 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- - makePartial('form_toggle') ?> - - formRender() ?> - -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to phones list

- - \ No newline at end of file diff --git a/controllers/phones/preview.php b/controllers/phones/preview.php deleted file mode 100644 index 9f1a757..0000000 --- a/controllers/phones/preview.php +++ /dev/null @@ -1,20 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to phones list

- - \ No newline at end of file diff --git a/controllers/phones/update.php b/controllers/phones/update.php deleted file mode 100644 index b3dae94..0000000 --- a/controllers/phones/update.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - -
- - makePartial('form_toggle') ?> - - formRender() ?> - -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to phones list

- - \ No newline at end of file diff --git a/controllers/posts/create.php b/controllers/posts/create.php deleted file mode 100644 index e417ffd..0000000 --- a/controllers/posts/create.php +++ /dev/null @@ -1,50 +0,0 @@ - -
    -
  • Posts
  • -
  • pageTitle)) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - - makePartial('form_toggle') ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError)) ?>

-

Return to posts list

- - \ No newline at end of file diff --git a/controllers/posts/update.php b/controllers/posts/update.php deleted file mode 100644 index 01e837d..0000000 --- a/controllers/posts/update.php +++ /dev/null @@ -1,58 +0,0 @@ - -
    -
  • Posts
  • -
  • pageTitle)) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - - makePartial('form_toggle') ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError)) ?>

-

Return to posts list

- - \ No newline at end of file diff --git a/controllers/reviews/_form_orphan.php b/controllers/reviews/_form_orphan.php new file mode 100644 index 0000000..ef4c85d --- /dev/null +++ b/controllers/reviews/_form_orphan.php @@ -0,0 +1,20 @@ + product): ?> +
+
+
+

Product

+

product->name ?>

+

type: product) ?>

+
+
+
+ +
+
+

Orphan detected

+
+
+

This review is an orphan

+
+
+ diff --git a/controllers/reviews/preview.php b/controllers/reviews/preview.php deleted file mode 100644 index e593633..0000000 --- a/controllers/reviews/preview.php +++ /dev/null @@ -1,19 +0,0 @@ - - - - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError) ?>

-

Return to reviews list

- - \ No newline at end of file diff --git a/controllers/reviews/update.php b/controllers/reviews/update.php deleted file mode 100644 index e70cadb..0000000 --- a/controllers/reviews/update.php +++ /dev/null @@ -1,77 +0,0 @@ - - - - -fatalError): ?> - - 'layout']) ?> - - product): ?> -
-
-
-

Product

-

product->name ?>

-

type: product) ?>

-
-
-
- -
-
-

Orphan detected

-
-
-

This review is an orphan

-
-
- - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError) ?>

-

Return to reviews list

- - \ No newline at end of file diff --git a/controllers/users/create.php b/controllers/users/create.php deleted file mode 100644 index bf21634..0000000 --- a/controllers/users/create.php +++ /dev/null @@ -1,50 +0,0 @@ - -
    -
  • Users
  • -
  • pageTitle)) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - - makePartial('form_toggle') ?> - -
- formRender() ?> -
- -
-
- - - - or Cancel - -
-
- - - - - -

fatalError)) ?>

-

Return to users list

- - \ No newline at end of file diff --git a/controllers/users/preview.php b/controllers/users/preview.php deleted file mode 100644 index 6407c99..0000000 --- a/controllers/users/preview.php +++ /dev/null @@ -1,19 +0,0 @@ - -
    -
  • Users
  • -
  • pageTitle)) ?>
  • -
- - -fatalError): ?> - -
- formRenderPreview() ?> -
- - - -

fatalError)) ?>

-

Return to users list

- - \ No newline at end of file diff --git a/controllers/users/update.php b/controllers/users/update.php deleted file mode 100644 index 2b1faf4..0000000 --- a/controllers/users/update.php +++ /dev/null @@ -1,58 +0,0 @@ - -
    -
  • Users
  • -
  • pageTitle)) ?>
  • -
- - -fatalError): ?> - - 'layout']) ?> - - makePartial('form_toggle') ?> - -
- formRender() ?> -
- -
-
- - - - - or Cancel - -
-
- - - - - -

fatalError)) ?>

-

Return to users list

- - \ No newline at end of file diff --git a/models/person/fields.yaml b/models/person/fields.yaml index d9e9b84..7583c27 100644 --- a/models/person/fields.yaml +++ b/models/person/fields.yaml @@ -8,6 +8,11 @@ # =================================== fields: + _form_toggle: + type: partial + path: form_toggle + context: [create,update] + name: label: Name commentAbove: Text field, required. Given name in the first box, preferred name in the second box. diff --git a/models/phone/fields.yaml b/models/phone/fields.yaml index 5171dd5..3a6833c 100644 --- a/models/phone/fields.yaml +++ b/models/phone/fields.yaml @@ -4,6 +4,11 @@ fields: + _form_toggle: + type: partial + path: form_toggle + context: [create,update] + name: label: Name diff --git a/models/post/fields.yaml b/models/post/fields.yaml index eba2c90..0c1fbf8 100644 --- a/models/post/fields.yaml +++ b/models/post/fields.yaml @@ -4,6 +4,11 @@ fields: + _form_toggle: + type: partial + path: form_toggle + context: [create,update] + name: label: Name commentAbove: Text field, required. diff --git a/models/review/fields.yaml b/models/review/fields.yaml index ddab204..a32500a 100644 --- a/models/review/fields.yaml +++ b/models/review/fields.yaml @@ -3,6 +3,11 @@ # =================================== fields: + _form_orphan: + type: partial + path: form_orphan + context: [update] + content: label: Content type: textarea diff --git a/models/user/fields.yaml b/models/user/fields.yaml index 34e8731..3cac337 100644 --- a/models/user/fields.yaml +++ b/models/user/fields.yaml @@ -3,6 +3,11 @@ # =================================== fields: + _form_toggle: + type: partial + path: form_toggle + context: [create,update] + username: label: Username span: auto From db6e6328d88e5b3c3688e70403f27ba9e5f12328 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Thu, 8 May 2025 10:01:44 -0400 Subject: [PATCH 04/13] fix partial fields paths --- .../cities/_field_inspector.php | 0 .../people/{_ajax_options.php => _field_ajax_options.php} | 2 +- .../field.hint.php => controllers/records/_field_hint.php | 0 .../records/_field_partial.php | 0 .../reviews/_field_rating.php | 0 models/city/fields.yaml | 2 +- models/person/fields.yaml | 2 +- models/record/fields.yaml | 4 ++-- models/review/fields.yaml | 2 +- 9 files changed, 6 insertions(+), 6 deletions(-) rename models/city/_inspector_field.htm => controllers/cities/_field_inspector.php (100%) rename controllers/people/{_ajax_options.php => _field_ajax_options.php} (92%) rename models/record/field.hint.php => controllers/records/_field_hint.php (100%) rename models/record/field.partial.php => controllers/records/_field_partial.php (100%) rename models/review/_rating_field.htm => controllers/reviews/_field_rating.php (100%) diff --git a/models/city/_inspector_field.htm b/controllers/cities/_field_inspector.php similarity index 100% rename from models/city/_inspector_field.htm rename to controllers/cities/_field_inspector.php diff --git a/controllers/people/_ajax_options.php b/controllers/people/_field_ajax_options.php similarity index 92% rename from controllers/people/_ajax_options.php rename to controllers/people/_field_ajax_options.php index 3e180f0..4216878 100644 --- a/controllers/people/_ajax_options.php +++ b/controllers/people/_field_ajax_options.php @@ -4,4 +4,4 @@ class="form-control custom-select" data-minimum-input-length="2" data-ajax--delay="300" data-request-data="foo: 'bar'" - > \ No newline at end of file + > diff --git a/models/record/field.hint.php b/controllers/records/_field_hint.php similarity index 100% rename from models/record/field.hint.php rename to controllers/records/_field_hint.php diff --git a/models/record/field.partial.php b/controllers/records/_field_partial.php similarity index 100% rename from models/record/field.partial.php rename to controllers/records/_field_partial.php diff --git a/models/review/_rating_field.htm b/controllers/reviews/_field_rating.php similarity index 100% rename from models/review/_rating_field.htm rename to controllers/reviews/_field_rating.php diff --git a/models/city/fields.yaml b/models/city/fields.yaml index 85d053a..a76f430 100644 --- a/models/city/fields.yaml +++ b/models/city/fields.yaml @@ -19,4 +19,4 @@ fields: _inspector: label: City information type: partial - path: ~/plugins/winter/test/models/city/_inspector_field.htm + path: field_inspector diff --git a/models/person/fields.yaml b/models/person/fields.yaml index 7583c27..276a5c1 100644 --- a/models/person/fields.yaml +++ b/models/person/fields.yaml @@ -32,8 +32,8 @@ fields: ajax_options: label: AJAX Options comment: These options should be populated using AJAX - path: $/winter/test/controllers/people/_ajax_options.htm type: partial + path: field_ajax_options # Record Finder (Default) phone: diff --git a/models/record/fields.yaml b/models/record/fields.yaml index e82616e..d1b04cc 100644 --- a/models/record/fields.yaml +++ b/models/record/fields.yaml @@ -182,18 +182,18 @@ secondaryTabs: tab: Basic Fields label: Partial type: partial + path: field_partial span: auto commentAbove: Demonstration of a partial field commentHtml: true - path: $/winter/test/models/record/field.partial.php additional_data[basic_fields][hint]: tab: Basic Fields label: Hint type: hint + path: field_hint span: auto commentAbove: Demonstration of a hint field commentHtml: true - path: $/winter/test/models/record/field.hint.php additional_data[basic_fields][section]: tab: Basic Fields label: Section diff --git a/models/review/fields.yaml b/models/review/fields.yaml index a32500a..f16e867 100644 --- a/models/review/fields.yaml +++ b/models/review/fields.yaml @@ -32,7 +32,7 @@ fields: _rating_display: label: false type: partial - path: $/winter/test/models/review/_rating_field.htm + path: field_rating dependsOn: rating span: right From 58eb7bc22e05e998f7f5f87133d10d6e09d686e9 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 18 Jun 2025 14:27:47 -0600 Subject: [PATCH 05/13] Add grouped repeater example back --- models/record/fields.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/record/fields.yaml b/models/record/fields.yaml index d1b04cc..0f1ed48 100644 --- a/models/record/fields.yaml +++ b/models/record/fields.yaml @@ -433,6 +433,12 @@ secondaryTabs: type: textarea size: small + additional_data[blocks]: + label: Grouped Repeater + tab: Repeater + type: repeater + groups: ~/plugins/winter/test/models/record/blocks.yaml + ## ## Files ## @@ -536,4 +542,3 @@ secondaryTabs: field: status condition: value[published] action: show - From 5badb9b667ac4b96623a233e1b0720c05e856f4a Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 18 Jun 2025 15:09:16 -0600 Subject: [PATCH 06/13] Disable browser validation on the published_at date because it's sometimes hidden --- models/record/fields.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/record/fields.yaml b/models/record/fields.yaml index 0f1ed48..c7ebb69 100644 --- a/models/record/fields.yaml +++ b/models/record/fields.yaml @@ -537,7 +537,7 @@ secondaryTabs: span: right type: datepicker mode: datetime - required: true # used because the validation rule is required_if + required: false trigger: field: status condition: value[published] From 92b92127f7a16f1c259a877fa8fee80b0f8fab93 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 18 Jun 2025 15:55:24 -0600 Subject: [PATCH 07/13] Remove unnecessary bodyClass property --- controllers/Records.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/Records.php b/controllers/Records.php index ca3b710..c90b27c 100644 --- a/controllers/Records.php +++ b/controllers/Records.php @@ -15,7 +15,8 @@ class Records extends Controller \Backend\Behaviors\ListController::class, ]; + /** + * @var string The form layout to use. One of standard, sidebar, fancy + */ public $formLayout = 'fancy'; - - public $bodyClass = 'compact-container'; } From 81ccf0517f75b8f1973916b75be50608ae8527de Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 25 Jun 2025 17:42:59 -0600 Subject: [PATCH 08/13] Create config_filter.yaml --- controllers/people/config_filter.yaml | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 controllers/people/config_filter.yaml diff --git a/controllers/people/config_filter.yaml b/controllers/people/config_filter.yaml new file mode 100644 index 0000000..fddb942 --- /dev/null +++ b/controllers/people/config_filter.yaml @@ -0,0 +1,77 @@ +scopes: + status: + label: Status + type: button-group + # conditions: status = :filtered + options: + all: All + active: Active + archived: Archived + + status_dropdown: + type: dropdown + emptyOption: Select status + default: active + # conditions: status = :filtered + options: + all: All + active: Active + archived: Archived + + status_group: + label: Status + type: group + # conditions: status in (:filtered) + options: + pending: Pending + active: Active + closed: Closed + + published: + label: Hide published + type: checkbox + default: 1 + # conditions: is_published <> true + + approved: + label: Approved + type: switch + default: 1 + conditions: + # - is_approved <> true + # - is_approved = true + + name: + label: Name + type: text + conditions: name = :value + size: 2 + + expenses_min: + label: Expenses >= + type: number + step: 1 + min: 0 + max: 1000 + conditions: expenses >= ':filtered' + + expenses_range: + label: Expenses Range + type: numberrange + conditions: expenses >= ':min' and expenses <= ':max' + + created_at: + label: Date after + type: date + minDate: '2001-01-23' + maxDate: '2030-10-13' + yearRange: 10 + conditions: created_at >= ':filtered' + + published_at: + label: Date Range + type: daterange + minDate: '2001-01-23' + maxDate: '2030-10-13' + yearRange: 10 + conditions: created_at >= ':after' AND created_at <= ':before' From e2f6237b3aac0632a9288d03d8d59b1cc57f5cd8 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 25 Jun 2025 17:43:34 -0600 Subject: [PATCH 09/13] Update config_list.yaml --- controllers/people/config_list.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/people/config_list.yaml b/controllers/people/config_list.yaml index ff790f2..c769e28 100644 --- a/controllers/people/config_list.yaml +++ b/controllers/people/config_list.yaml @@ -18,7 +18,7 @@ recordUrl: winter/test/people/update/:id noRecordsMessage: backend::lang.list.no_records # Records to display per page -recordsPerPage: 20 +recordsPerPage: 2 # Displays the list column set up button showSetup: true @@ -43,3 +43,5 @@ toolbar: search: prompt: backend::lang.list.search_prompt mode: any + +filter: config_filter.yaml From 2bd77c9e1f5cd0bfa185a6093c2e1555235ad841 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 25 Jun 2025 17:44:13 -0600 Subject: [PATCH 10/13] Update columns.yaml --- models/person/columns.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/person/columns.yaml b/models/person/columns.yaml index b14d7ea..c7bae62 100644 --- a/models/person/columns.yaml +++ b/models/person/columns.yaml @@ -21,11 +21,14 @@ columns: expenses: label: Expenses format: $ %.2f + type: number + summable: true phone: label: Phone relation: phone select: number + sortable: false birth: label: Born From 33585f79b88af2d9f11a49369d030b1529ac636b Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 25 Jun 2025 17:44:42 -0600 Subject: [PATCH 11/13] Update Records.php --- controllers/Records.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/controllers/Records.php b/controllers/Records.php index c90b27c..ff575b6 100644 --- a/controllers/Records.php +++ b/controllers/Records.php @@ -1,6 +1,9 @@ -makePartial('basic_popup'); + } } From 439d1b70b6b3268182750baf01dd7ee9a4e217c4 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 25 Jun 2025 17:45:00 -0600 Subject: [PATCH 12/13] Create _basic_popup.php --- controllers/records/_basic_popup.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 controllers/records/_basic_popup.php diff --git a/controllers/records/_basic_popup.php b/controllers/records/_basic_popup.php new file mode 100644 index 0000000..20a1702 --- /dev/null +++ b/controllers/records/_basic_popup.php @@ -0,0 +1,17 @@ + + + From 89bb50b803351eac79587fc52a1e4b853e96d51f Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Wed, 25 Jun 2025 17:50:08 -0600 Subject: [PATCH 13/13] Update fields.yaml --- models/record/fields.yaml | 79 ++++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 17 deletions(-) diff --git a/models/record/fields.yaml b/models/record/fields.yaml index c7ebb69..be0107a 100644 --- a/models/record/fields.yaml +++ b/models/record/fields.yaml @@ -60,15 +60,26 @@ secondaryTabs: label: Email type: email span: auto - commentAbove: Demonstration of a email field + commentAbove: Demonstration of a email field commentHtml: true placeholder: email@example.com + additional_data[basic_fields][url]: + tab: Basic Fields + label: URL + type: url + span: auto + commentAbove: Demonstration of a url field + commentHtml: true + placeholder: https://example.com/ + options: + https://wintercms.com: Winter CMS + https://laravel.com: Laravel additional_data[basic_fields][number]: tab: Basic Fields label: Number type: number span: auto - commentAbove: Demonstration of a number field + commentAbove: Demonstration of a number field commentHtml: true min: 0 max: 100 @@ -79,21 +90,21 @@ secondaryTabs: label: Password type: password span: auto - commentAbove: Demonstration of a password field + commentAbove: Demonstration of a password field commentHtml: true additional_data[basic_fields][text]: tab: Basic Fields label: Text type: text span: auto - commentAbove: Demonstration of a text field + commentAbove: Demonstration of a text field commentHtml: true additional_data[basic_fields][textarea]: tab: Basic Fields label: Textarea type: textarea span: auto - commentAbove: Demonstration of a textarea field + commentAbove: Demonstration of a textarea field commentHtml: true size: small additional_data[basic_fields][range]: @@ -101,7 +112,7 @@ secondaryTabs: label: Range type: range span: auto - commentAbove: Demonstration of a range field + commentAbove: Demonstration of a range field commentHtml: true _section_optionable: @@ -116,7 +127,7 @@ secondaryTabs: label: Checkbox List type: checkboxlist span: auto - commentAbove: Demonstration of a checkboxlist field + commentAbove: Demonstration of a checkboxlist field commentHtml: true options: [\Winter\Test\Models\Record, staticGetOptions] default: option1 @@ -125,7 +136,7 @@ secondaryTabs: label: Radio type: radio span: auto - commentAbove: Demonstration of a radio field + commentAbove: Demonstration of a radio field commentHtml: true options: [\Winter\Test\Models\Record, staticGetOptions] default: option2 @@ -134,7 +145,7 @@ secondaryTabs: label: Dropdown type: dropdown span: auto - commentAbove: Demonstration of a dropdown field + commentAbove: Demonstration of a dropdown field commentHtml: true options: [\Winter\Test\Models\Record, staticGetOptions] default: option3 @@ -143,7 +154,7 @@ secondaryTabs: label: Balloon Selector type: balloon-selector span: auto - commentAbove: Demonstration of a balloon-selector field + commentAbove: Demonstration of a balloon-selector field commentHtml: true options: [\Winter\Test\Models\Record, staticGetOptions] default: option4 @@ -160,14 +171,14 @@ secondaryTabs: label: Checkbox type: checkbox span: auto - commentAbove: Demonstration of a checkbox field + commentAbove: Demonstration of a checkbox field commentHtml: true additional_data[basic_fields][switch]: tab: Basic Fields label: Switch type: switch span: auto - commentAbove: Demonstration of a switch field + commentAbove: Demonstration of a switch field commentHtml: true on: Yes off: No @@ -182,25 +193,59 @@ secondaryTabs: tab: Basic Fields label: Partial type: partial - path: field_partial span: auto - commentAbove: Demonstration of a partial field + commentAbove: Demonstration of a partial field commentHtml: true + path: $/winter/test/models/record/field.partial.php additional_data[basic_fields][hint]: tab: Basic Fields label: Hint type: hint - path: field_hint span: auto - commentAbove: Demonstration of a hint field + commentAbove: Demonstration of a hint field commentHtml: true + path: $/winter/test/models/record/field.hint.php additional_data[basic_fields][section]: tab: Basic Fields label: Section type: section + span: full + commentAbove: Demonstration of a section field + commentHtml: true + _button_button: + tab: Basic Fields + span: auto + label: Button (button action) + commentAbove: Demonstration of a button (button) field + commentHtml: true + type: button + buttonLabel: Triggers AJAX request + request: onBasicButton + icon: 'icon-cog' + loading: Working... + _button_link: + tab: Basic Fields + span: auto + label: Button (link action) + commentAbove: Demonstration of a button (link) field + commentHtml: true + type: button + buttonLabel: Opens URL + buttonType: link + href: 'https://example.com/' + icon: icon-link + target: blank + _button_popup: + tab: Basic Fields span: auto - commentAbove: Demonstration of a section field + label: Button (popup action) + commentAbove: Demonstration of a button (popup) field commentHtml: true + type: button + buttonLabel: Opens Popup + buttonType: danger + handler: onRenderBasicPopup + icon: icon-up-right-from-square ## ## FormWidgets