Skip to content

Commit d007caf

Browse files
authored
Merge pull request #1027 from wintercms/develop
2 parents 90b0df8 + 5bc9257 commit d007caf

File tree

151 files changed

+2552
-732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+2552
-732
lines changed

.gitattributes

+10-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
* text=auto
1+
* text=auto
2+
3+
*.md diff=markdown
4+
*.php diff=php
5+
6+
/.github export-ignore
7+
/.gitpod export-ignore
8+
.gitattributes export-ignore
9+
.gitpod.yml export-ignore
10+
CHANGELOG.md export-ignore

.github/workflows/manifest.yml

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Manifest
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
updateManifest:
11+
name: Update manifest
12+
runs-on: ubuntu-latest
13+
env:
14+
phpVersion: '8.1'
15+
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
16+
key: winter-cms-cache-develop
17+
steps:
18+
- name: Cancel previous incomplete runs
19+
uses: styfle/[email protected]
20+
with:
21+
access_token: ${{ github.token }}
22+
23+
- name: Checkout changes
24+
uses: actions/checkout@v3
25+
26+
- name: Setup extension cache
27+
id: extcache
28+
uses: shivammathur/cache-extensions@v1
29+
with:
30+
php-version: ${{ env.phpVersion }}
31+
extensions: ${{ env.extensions }}
32+
key: ${{ env.key }}
33+
34+
- name: Cache extensions
35+
uses: actions/cache@v3
36+
with:
37+
path: ${{ steps.extcache.outputs.dir }}
38+
key: ${{ steps.extcache.outputs.key }}
39+
restore-keys: ${{ steps.extcache.outputs.key }}
40+
41+
- name: Install PHP
42+
uses: shivammathur/setup-php@v2
43+
with:
44+
php-version: ${{ env.phpVersion }}
45+
extensions: ${{ env.extensions }}
46+
47+
- name: Setup dependency cache
48+
id: composer-cache
49+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
50+
51+
- name: Cache dependencies
52+
uses: actions/cache@v3
53+
with:
54+
path: ${{ steps.composer-cache.outputs.dir }}
55+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
56+
restore-keys: ${{ runner.os }}-composer-
57+
58+
- name: Install Composer dependencies
59+
run: composer install --no-interaction --no-progress --no-scripts
60+
61+
- name: Download manifest
62+
run: wget -O builds.json https://github.com/wintercms/meta/raw/master/manifest/builds.json
63+
64+
- name: Run manifest
65+
run: php artisan winter:manifest builds.json
66+
67+
- name: Create artifact
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: winter-manifest
71+
path: builds.json
72+
commitManifest:
73+
name: Commit manifest
74+
runs-on: ubuntu-latest
75+
needs: updateManifest
76+
steps:
77+
- name: Cancel previous incomplete runs
78+
uses: styfle/[email protected]
79+
with:
80+
access_token: ${{ github.token }}
81+
82+
- name: Checkout changes
83+
uses: actions/checkout@v3
84+
with:
85+
repository: wintercms/meta
86+
ref: master
87+
token: ${{ secrets.WINTER_BOT_TOKEN }}
88+
89+
- name: Download artifact
90+
uses: actions/download-artifact@v3
91+
with:
92+
name: winter-manifest
93+
path: manifest
94+
95+
- name: Commit changes
96+
uses: stefanzweifel/git-auto-commit-action@v4
97+
with:
98+
commit_message: Update manifest
99+
commit_user_name: Winter Bot
100+
commit_user_email: [email protected]

.github/workflows/tests.yml

-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ jobs:
133133
php-version: ${{ matrix.phpVersion }}
134134
extensions: ${{ env.extensions }}
135135

136-
- name: Echo branches
137-
run: echo "${{ github.ref }} | ${{ github.head_ref }} | ${{ github.ref_name }} | ${{ github.base_ref }}"
138-
139136
- name: Switch library dependency (develop)
140137
if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop'
141138
run: php ./.github/workflows/utilities/library-switcher "dev-develop as 1.2"

.vscode/settings.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files.associations": {
33
"**/modules/*/behaviors/*/partials/*.htm": "php",
4-
"**/modules/*/blocks/*.block": "wintercms",
4+
"**/modules/*/blocks/*.block": "wintercms-block",
55
"**/modules/*/controllers/*/*.htm": "php",
66
"**/modules/*/formwidgets/*/partials/*.htm": "php",
77
"**/modules/*/layouts/*.htm": "php",
@@ -12,7 +12,7 @@
1212
"**/modules/*/widgets/*/partials/*.htm": "php",
1313

1414
"**/plugins/*/*/behaviors/*/partials/*.htm": "php",
15-
"**/plugins/*/*/blocks/*.block": "wintercms",
15+
"**/plugins/*/*/blocks/*.block": "wintercms-block",
1616
"**/plugins/*/*/components/**/*.htm": "wintercms-twig",
1717
"**/plugins/*/*/controllers/*/*.htm": "php",
1818
"**/plugins/*/*/formwidgets/*/partials/*.htm": "php",
@@ -23,7 +23,7 @@
2323
"**/plugins/*/*/views/mail/*.htm": "wintercms",
2424
"**/plugins/*/*/widgets/*/partials/*.htm": "php",
2525

26-
"**/themes/*/blocks/**/*.block": "wintercms",
26+
"**/themes/*/blocks/**/*.block": "wintercms-block",
2727
"**/themes/*/content/**/*.htm": "wintercms",
2828
"**/themes/*/layouts/*.htm": "wintercms",
2929
"**/themes/*/pages/**/*.htm": "wintercms",
@@ -32,6 +32,7 @@
3232
"emmet.includeLanguages": {
3333
"wintercms": "html",
3434
"wintercms-twig": "html",
35+
"wintercms-block": "html"
3536
},
3637
"eslint.validate": [
3738
"javascript",

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ No matter how large or small your project is, Winter provides a rich development
1010
[![Tests](https://img.shields.io/github/actions/workflow/status/wintercms/winter/tests.yml?branch=develop&label=tests&style=flat-square)](https://github.com/wintercms/winter/actions)
1111
[![License](https://img.shields.io/github/license/wintercms/winter?label=open%20source&style=flat-square)](https://packagist.org/packages/wintercms/winter)
1212
[![Discord](https://img.shields.io/discord/816852513684193281?label=discord&style=flat-square)](https://discord.gg/D5MFSPH6Ux)
13+
[![RINGER](https://www.ringerhq.com/images/get-support-on-ringer.svg)](https://www.ringerhq.com/i/wintercms/winter)
1314

1415
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/wintercms/winter)
1516

@@ -45,7 +46,7 @@ The best place to learn Winter is by [reading the documentation](https://winterc
4546

4647
Winter was forked from October CMS in March 2021 due to a difference in open source management philosophies between the core maintainer team and the two founders of October.
4748

48-
The development of Winter is lead by [Luke Towers](https://luketowers.ca/), along with many wonderful people that dedicate their time to help support and grow the community.
49+
The development of Winter is lead by [Luke Towers](https://luketowers.ca/), along with many wonderful people that dedicate their time to help support and grow the community. The [Frostbyte Foundation](mailto:[email protected]) provides an organisational backing for the project and the continued development of Winter, its plugins and themes and its ecosystem.
4950

5051
<table>
5152
<tr>
@@ -89,13 +90,18 @@ Winter CMS development is financially supported by the generosity of the followi
8990

9091
### Organizations
9192

92-
Spatial Media employs one of the core maintainers (Jack Wilkinson) who contributes to the ongoing development of Winter.
93-
9493
[![Froala logo](https://froala.com/wp-content/uploads/2019/10/froala.svg)](https://froala.com/wysiwyg-editor/)
9594

9695
Froala provides a perpetual, Enterprise license to Winter CMS which allows us and our users to use the Froala WYSIWYG Editor in Winter CMS powered projects.
9796

97+
Big thanks to our sponsors on OpenCollective:
98+
99+
- [FrogeHost](https://froge.host/?utm_source=wintercms)
100+
98101
### Individuals
102+
103+
Big thanks to our sponsors on OpenCollective:
104+
99105
- Orville
100106

101107
If you would like to have your name, company and link added to this list and support open-source development, feel free to make a donation to our [Open Collective](https://opencollective.com/wintercms).

bootstrap/cache/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

config/queue.php

+16
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,22 @@
6767
],
6868
],
6969

70+
/*
71+
|--------------------------------------------------------------------------
72+
| Job Batching
73+
|--------------------------------------------------------------------------
74+
|
75+
| The following options configure the database and table that store job
76+
| batching information. These options can be updated to any database
77+
| connection and table which has been defined by your application.
78+
|
79+
*/
80+
81+
'batching' => [
82+
'database' => env('DB_CONNECTION', 'mysql'),
83+
'table' => 'job_batches',
84+
],
85+
7086
/*
7187
|--------------------------------------------------------------------------
7288
| Failed Queue Jobs

modules/backend/.eslintrc.json

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
"airbnb-base",
1111
"plugin:vue/vue3-recommended"
1212
],
13+
"ignorePatterns": [
14+
"assets/js",
15+
"assets/vendor",
16+
"behaviors/**/*.js",
17+
"controllers/**/*.js",
18+
"formwidgets/**/*.js",
19+
"reportwidgets/**/*.js",
20+
"widgets/**/*.js"
21+
],
1322
"rules": {
1423
"class-methods-use-this": ["off"],
1524
"indent": ["error", 4, {

modules/backend/ServiceProvider.php

+17-16
Original file line numberDiff line numberDiff line change
@@ -213,22 +213,23 @@ protected function registerBackendPermissions()
213213
protected function registerBackendWidgets()
214214
{
215215
WidgetManager::instance()->registerFormWidgets(function ($manager) {
216-
$manager->registerFormWidget('Backend\FormWidgets\CodeEditor', 'codeeditor');
217-
$manager->registerFormWidget('Backend\FormWidgets\RichEditor', 'richeditor');
218-
$manager->registerFormWidget('Backend\FormWidgets\MarkdownEditor', 'markdown');
219-
$manager->registerFormWidget('Backend\FormWidgets\FileUpload', 'fileupload');
220-
$manager->registerFormWidget('Backend\FormWidgets\Relation', 'relation');
221-
$manager->registerFormWidget('Backend\FormWidgets\DatePicker', 'datepicker');
222-
$manager->registerFormWidget('Backend\FormWidgets\TimePicker', 'timepicker');
223-
$manager->registerFormWidget('Backend\FormWidgets\ColorPicker', 'colorpicker');
224-
$manager->registerFormWidget('Backend\FormWidgets\DataTable', 'datatable');
225-
$manager->registerFormWidget('Backend\FormWidgets\RecordFinder', 'recordfinder');
226-
$manager->registerFormWidget('Backend\FormWidgets\Repeater', 'repeater');
227-
$manager->registerFormWidget('Backend\FormWidgets\TagList', 'taglist');
228-
$manager->registerFormWidget('Backend\FormWidgets\MediaFinder', 'mediafinder');
229-
$manager->registerFormWidget('Backend\FormWidgets\NestedForm', 'nestedform');
230-
$manager->registerFormWidget('Backend\FormWidgets\Sensitive', 'sensitive');
231-
$manager->registerFormWidget('Backend\FormWidgets\IconPicker', 'iconpicker');
216+
$manager->registerFormWidget(\Backend\FormWidgets\CodeEditor::class, 'codeeditor');
217+
$manager->registerFormWidget(\Backend\FormWidgets\ColorPicker::class, 'colorpicker');
218+
$manager->registerFormWidget(\Backend\FormWidgets\DataTable::class, 'datatable');
219+
$manager->registerFormWidget(\Backend\FormWidgets\DatePicker::class, 'datepicker');
220+
$manager->registerFormWidget(\Backend\FormWidgets\FileUpload::class, 'fileupload');
221+
$manager->registerFormWidget(\Backend\FormWidgets\IconPicker::class, 'iconpicker');
222+
$manager->registerFormWidget(\Backend\FormWidgets\MarkdownEditor::class, 'markdown');
223+
$manager->registerFormWidget(\Backend\FormWidgets\MediaFinder::class, 'mediafinder');
224+
$manager->registerFormWidget(\Backend\FormWidgets\NestedForm::class, 'nestedform');
225+
$manager->registerFormWidget(\Backend\FormWidgets\RecordFinder::class, 'recordfinder');
226+
$manager->registerFormWidget(\Backend\FormWidgets\Relation::class, 'relation');
227+
$manager->registerFormWidget(\Backend\FormWidgets\RelationManager::class, 'relationmanager');
228+
$manager->registerFormWidget(\Backend\FormWidgets\Repeater::class, 'repeater');
229+
$manager->registerFormWidget(\Backend\FormWidgets\RichEditor::class, 'richeditor');
230+
$manager->registerFormWidget(\Backend\FormWidgets\Sensitive::class, 'sensitive');
231+
$manager->registerFormWidget(\Backend\FormWidgets\TagList::class, 'taglist');
232+
$manager->registerFormWidget(\Backend\FormWidgets\TimePicker::class, 'timepicker');
232233
});
233234
}
234235

modules/backend/assets/css/winter.css

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
.sweet-alert h2{word-break:break-word;word-wrap:break-word;max-height:350px;overflow-y:auto;margin:10px 0 17px 0;color:#2b3e50;text-align:left;font-size:15px;line-height:23px}
6666
.sweet-alert p{margin:0}
6767
.sweet-alert p.text-muted{margin-bottom:20px;color:#555}
68+
.global-notice{position:sticky;top:0;display:flex;align-items:center;flex-wrap:wrap;gap:0.5em;justify-content:space-between;z-index:10500;background:#ab2a1c;color:#FFF;padding:0.5em 0.75em}
69+
.global-notice .notice-icon{font-size:1.5em;vertical-align:bottom;display:inline-block;margin-right:.25em}
70+
.global-notice .notice-text{display:inline-block;vertical-align:middle}
6871
.control-simplelist{font-size:13px;padding:20px 20px 2px 20px;margin-bottom:20px;background:#fff;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}
6972
.control-simplelist ul{padding-left:15px}
7073
.control-simplelist.form-control ul{margin-bottom:0}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.global-notice {
2+
position: sticky;
3+
top: 0;
4+
display: flex;
5+
align-items: center;
6+
flex-wrap: wrap;
7+
gap: 0.5em;
8+
justify-content: space-between;
9+
z-index: 10500;
10+
background: #ab2a1c;
11+
color: #FFF;
12+
padding: 0.5em 0.75em;
13+
14+
.notice-icon {
15+
font-size: 1.5em;
16+
vertical-align: bottom;
17+
display: inline-block;
18+
margin-right: .25em;
19+
}
20+
21+
.notice-text {
22+
display: inline-block;
23+
vertical-align:middle;
24+
}
25+
}

modules/backend/assets/less/winter.less

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
@import "core/boot.less";
1212
@import "controls/alert.less";
13+
@import "controls/global-notice.less";
1314
@import "controls/simplelist.less";
1415
@import "controls/scrollbar.less";
1516
@import "controls/filelist.less";

modules/backend/assets/ui/js/build/vendor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/backend/behaviors/ListController.php

+13
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ public function makeList($definition = null)
164164
*/
165165
$widget = $this->makeWidget(\Backend\Widgets\Lists::class, $columnConfig);
166166

167+
$widget->bindEvent('list.extendColumnsBefore', function () use ($widget) {
168+
$this->controller->listExtendColumnsBefore($widget);
169+
});
170+
167171
$widget->bindEvent('list.extendColumns', function () use ($widget) {
168172
$this->controller->listExtendColumns($widget);
169173
});
@@ -468,6 +472,15 @@ public function listGetConfig(string $definition = null)
468472
// Overrides
469473
//
470474

475+
/**
476+
* Called before the list columns are defined.
477+
* @param \Backend\Widgets\Lists $host The hosting list widget
478+
* @return void
479+
*/
480+
public function listExtendColumnsBefore($host)
481+
{
482+
}
483+
471484
/**
472485
* Called after the list columns are defined.
473486
* @param \Backend\Widgets\Lists $host The hosting list widget

modules/backend/behaviors/RelationController.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ protected function makeViewWidget()
665665
$config = $this->makeConfigForMode('view', 'list');
666666
$config->model = $this->relationModel;
667667
$config->alias = $this->alias . 'ViewList';
668+
$config->showSetup = $this->getConfig('view[showSetup]', true);
668669
$config->showSorting = $this->getConfig('view[showSorting]', true);
669670
$config->defaultSort = $this->getConfig('view[defaultSort]');
670671
$config->recordsPerPage = $this->getConfig('view[recordsPerPage]');
@@ -814,7 +815,7 @@ protected function makeManageWidget()
814815
$config = $this->makeConfigForMode('manage', 'list');
815816
$config->model = $this->relationModel;
816817
$config->alias = $this->alias . 'ManageList';
817-
$config->showSetup = false;
818+
$config->showSetup = $this->getConfig('manage[showSetup]', !$isPivot);
818819
$config->showCheckboxes = $this->getConfig('manage[showCheckboxes]', !$isPivot);
819820
$config->showSorting = $this->getConfig('manage[showSorting]', !$isPivot);
820821
$config->defaultSort = $this->getConfig('manage[defaultSort]');
@@ -1025,6 +1026,12 @@ public function onRelationButtonLink()
10251026
return $this->onRelationManageForm();
10261027
}
10271028

1029+
public function onRelationButtonRefresh()
1030+
{
1031+
$this->beforeAjax();
1032+
return $this->relationRefresh();
1033+
}
1034+
10281035
public function onRelationButtonUnlink()
10291036
{
10301037
return $this->onRelationManageRemove();
@@ -1588,6 +1595,10 @@ protected function evalToolbarButtons()
15881595
$text = 'backend::lang.relation.add_name';
15891596
break;
15901597

1598+
case 'refresh':
1599+
$text = 'backend::lang.relation.refresh';
1600+
break;
1601+
15911602
case 'remove':
15921603
$text = 'backend::lang.relation.remove';
15931604
break;

0 commit comments

Comments
 (0)