1497 Commits

Author SHA1 Message Date
Luke Towers
1890091565 Added support for Asset URLs in Snowboard
- Added url().asset() method to the Url Snowboard plugin
- Switched the AssetLoader Snowboard plugin to use url().asset()
2023-07-18 14:21:26 -04:00
Luke Towers
cd2d769402 Code tidying for console commands
Also switches theme:list, plugin:list, and mix:list to output nicely formatted tables.
2023-07-14 16:41:48 -06:00
Luke Towers
5b297aeb28 Use new hasDatabaseTable() helpers 2023-07-14 15:31:21 -06:00
Luke Towers
4f80b2bc6f
Make cms.beforeRoute a halting event
This change allows developers to prevent the CMS route from being registered.

An example use case for this is loading the CMS content under a set path prefix by re-registering the CMS route with the appropriate prefix in place. Preventing the registration of the default CMS route is required in order to override the mapping of the controller action to URL (and thus have the Cms::url() helper generate the correct URLs in this example). 

Example:
```php
Route::any('docs/{slug?}', 'Cms\Classes\CmsController@run')->where('slug', '(.*)?')->middleware('web');

Event::listen('cms.beforeRoute', function () {
    $path = Request::path();
    // Disable the CMS routes so that the docs/ route can take over for URL generation
    if (Str::startsWith($path, 'docs')) {
        return false;
    }
});
```
2023-07-06 20:46:40 -06:00
Luke Towers
0c4d27f4e6
Use a per-theme cache key for caching Theme asset URLs 2023-07-06 18:48:17 -06:00
Luke Towers
b6f147d16a Add support for --uninspiring flag on code generation commands 2023-07-03 22:24:50 -06:00
Marc Jauvin
de9d22fded close parenthesis in log entry 2023-06-13 23:33:25 -04:00
Marc Jauvin
9632e62920
Avoid logging error erroneously (#923)
Fixes #922
2023-06-13 15:58:27 -06:00
Luke Towers
cba5fa7562 Add support for selecting a theme's scaffold when generating through the backend
Also fixes #915.
2023-06-07 09:28:20 -06:00
Szabó Gergő
55728c7b9a
Improved Hungarian translation (#912) 2023-05-31 14:52:56 -06:00
Luke Towers
e026c372de Improve type hints 2023-05-30 17:59:58 -06:00
Marc Jauvin
af0f86675e
Allow scoped and local extensions on core controllers. (#908)
Complement wintercms/storm#134
2023-05-29 16:52:44 -06:00
Ben Thomson
d27dbbc5f8
Use temporary themesPath config for CMS tests
The override for the paths in the testing environment was causing plugin tests to fail as the base plugin test class was pointing to the wrong plugin root.

I've changed it so the override is now only applied for the test(s) that need it.

Refs: https://github.com/wintercms/wn-redirect-plugin/pull/15#issuecomment-1510038828
2023-04-30 20:38:01 +08:00
Jack Wilkinson
6fa840074a
Switch from using DIRECTORY_SEPARATOR to '/' (#898)
Fixes #895
2023-04-27 21:49:16 -06:00
Luke Towers
11ec68f60f Improve type hinting 2023-04-25 20:35:55 -06:00
AIC BV
77ca808b11
Removed unnecessary traceLog call (#880) 2023-04-14 11:56:05 -06:00
Luke Towers
6d5388229f Add support for single symbolized assets to theme asset URL generation
Also added tests for symbolized assets passed to the asset combiner from the themeUrl() method.
2023-04-11 12:28:44 -06:00
Luke Towers
b22dbdedf2
Ignore assets using path symbols
This excludes assets using path symbols from the child -> parent theme path resolution logic.

Fixes #884.
2023-04-11 10:59:07 -06:00
Jack Wilkinson
9294d39cc4
Multiple assets in combiner url (#875) 2023-03-29 08:06:30 +08:00
xitara
6954797be2
Add 'themes.' prefix to let work backend theme localization again (#861) 2023-03-06 07:24:30 -06:00
xitara
5d07e6523c
Fix Class "Cms\Classes\Log" not found error (#858) 2023-03-05 20:26:23 +08:00
Jack Wilkinson
5b4e977b07
Fix typehint (#856) 2023-03-02 09:20:10 -06:00
Luke Towers
1adb3abbff
Merge pull request #726 from wintercms/wip/child-theme 2023-03-01 07:42:14 -06:00
Jack Wilkinson
af37464ea3 Added child theme tests 2023-03-01 11:53:36 +00:00
Damien MATHIEU
e5f951a43a
Include theme Blocks in the Tailwind theme scaffold (#850) 2023-02-28 17:38:38 -06:00
WebVPF
b1d28d9d3e
Improved Russian translations (#847) 2023-02-28 20:32:57 +08:00
Jack Wilkinson
263a1a3c00 Removed undefined var and replaced with halycon registered event 2023-02-27 18:43:02 +00:00
Luke Towers
c91fe4ff5c
Apply suggestions from code review 2023-02-27 12:25:38 -06:00
Jack Wilkinson
3febe416fe Merge branch 'develop' into wip/child-theme 2023-02-27 17:53:17 +00:00
Luke Towers
a9e2e01fb6
Update modules/cms/classes/Theme.php 2023-02-27 11:52:48 -06:00
Luke Towers
85fe239da0
Update modules/cms/widgets/AssetList.php 2023-02-27 11:35:33 -06:00
Luke Towers
3c393b74c1
Update modules/cms/classes/Controller.php 2023-02-27 11:32:50 -06:00
Luke Towers
02319de0ed
Update modules/cms/classes/Controller.php 2023-02-27 11:28:15 -06:00
Luke Towers
ad3e19eeeb
Update modules/cms/classes/Controller.php 2023-02-27 11:26:40 -06:00
Jack Wilkinson
49d7ea0801 Removed whitespace 2023-02-27 17:19:53 +00:00
Jack Wilkinson
1a8fb449a9 Added Carbon cache timer 2023-02-27 14:34:43 +00:00
Jack Wilkinson
5414c6256a Added support to the theme filter to validate parent theme for assets 2023-02-24 17:33:47 +00:00
Luke Towers
c95c950d19 Pass the active theme code to the cms.theme.getActiveTheme event
Required for Winter.Blocks datasource registration and generally a good idea.
2023-02-17 13:13:12 -06:00
Arvis Lācis
ff3ee998c9
Updated and improved Latvian translations (#828) 2023-01-30 09:05:20 +08:00
Luke Towers
fe5f754566 Merge branch 'develop' into wip/child-theme-autodatasource-caching
* develop:
  Fix issue with autoloading modules (#792)
  Add support for icon picker (#725)
  Classloader improvements (#779)
  Update Markdown content test
  Improved Ukrainian translation (#766)
  Add AJAX form validation to Snowboard (#777)
  Improve theme scaffolding (#778)
2022-12-08 14:42:29 -06:00
Jack Wilkinson
5540dadaaf Added fix to allow nested AutoDatasource instances to manage their own populateCache 2022-12-08 18:08:59 +00:00
Luke Towers
0aed0b4b02
Classloader improvements (#779)
See wintercms/storm#72
2022-11-29 21:06:46 -06:00
Ben Thomson
596f8cc98d Update Markdown content test
The CommonMark implementation of Markdown specifies that a newline should follow block-level elements
2022-11-30 10:39:19 +08:00
Matteo Trubini
9b2282b280
Improve theme scaffolding (#778)
If gtag() is undefined an error is raised.
2022-11-27 18:59:32 -06:00
Luke Towers
4f0da6cd0c
Set the AutoDatasource's cache key based on the current theme 2022-11-23 23:13:29 -06:00
Luke Towers
3d77c7a03a
Add ability to specify the cache key of the AutoDatasource 2022-11-23 23:12:50 -06:00
Luke Towers
9b035c20e9 Merge branch 'develop' into wip/child-theme
* develop:
  Fix AuthManager tests
2022-11-23 11:12:13 -06:00
Luke Towers
554dd0e726 Fix AuthManager tests 2022-11-23 11:12:00 -06:00
Luke Towers
7a215c7baa Merge branch 'develop' into wip/child-theme
* develop:
  Improved Russian translation (#767)
  Remove empty widget width option (#772)
  Fix overlooked reference to App facade instead of local instance
  Use local app instance rather than facade
  Don't register backend permissions in the testing suite
  Type hinting and style tweaks
  Use the model instance returned by getRelationModel directly rather than as a static class reference
  Clone the form model before passing it to the RelationController

# Conflicts:
#	modules/cms/ServiceProvider.php
2022-11-23 10:35:54 -06:00
Luke Towers
1d8af5964c Fix overlooked reference to App facade instead of local instance 2022-11-21 15:44:45 -06:00