diff --git a/CHANGELOG.md b/CHANGELOG.md index f3518410d..b30c515e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 2.x branch ## 2.27 branch +### 2.27.6 +* fixed little bug for `Icon` helper; +* fixed little bug for static pages. + ### 2.27.5 * `\MeCms\Controller\Admin\AppController::referer()`, unlike the original method, can return the `index` action of the same controller (if it has been diff --git a/phpcs.xml.dist b/phpcs.xml.dist index b1de799da..bba45b221 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -5,9 +5,5 @@ - - 0 - - /config/Migrations diff --git a/src/Controller/PagesController.php b/src/Controller/PagesController.php index c0de540e6..69e685fda 100644 --- a/src/Controller/PagesController.php +++ b/src/Controller/PagesController.php @@ -63,9 +63,7 @@ public function view($slug) if ($static) { $page = new Entity([ - 'category' => new Entity(['slug' => null, 'title' => null]), 'title' => StaticPage::getTitle($slug), - 'subtitle' => null, 'url' => Router::url(['_name' => 'page', $slug], true), ] + compact('slug')); diff --git a/src/Template/Element/admin/uploader.ctp b/src/Template/Element/admin/uploader.ctp index f84a83c42..a874c7e99 100644 --- a/src/Template/Element/admin/uploader.ctp +++ b/src/Template/Element/admin/uploader.ctp @@ -19,7 +19,7 @@ $this->Asset->script('/vendor/dropzone/dropzone', ['block' => 'script_bottom']); Dropzone.autoDiscover = false; $(function() { $('.dropzone').dropzone({ - dictDefaultMessage: 'Html->icon('cloud-upload'), __d('me_cms', 'Drag files here or click')) ?>', + dictDefaultMessage: 'Icon->icon('cloud-upload'), __d('me_cms', 'Drag files here or click')) ?>', Asset->script('/vendor/dropzone/dropzone', ['block' => 'script_bottom']); '
' + '
' + '
' + - '
Html->icon('check') ?>
' + - '
Html->icon('close') ?>
' + + '
Icon->icon('check') ?>
' + + '
Icon->icon('close') ?>
' + '
' + '' + '', diff --git a/src/Template/Element/views/page.ctp b/src/Template/Element/views/page.ctp index 4322d02ef..de2f9fc18 100644 --- a/src/Template/Element/views/page.ctp +++ b/src/Template/Element/views/page.ctp @@ -17,7 +17,7 @@ $category = $page->get('category');
- +
Html->link($category->get('title'), $category->get('url')) ?>
diff --git a/src/View/View.php b/src/View/View.php index 1adf1e51b..54308b928 100644 --- a/src/View/View.php +++ b/src/View/View.php @@ -80,6 +80,7 @@ public function initialize() $this->loadHelper('Html', ['className' => 'MeTools.Html']); $this->loadHelper('MeTools.Dropdown'); $this->loadHelper('MeTools.Form'); + $this->loadHelper('MeTools.Icon'); $this->loadHelper('MeTools.Library'); $this->loadHelper('MeTools.Paginator'); $this->loadHelper('Assets.Asset'); diff --git a/tests/TestCase/Controller/PagesControllerTest.php b/tests/TestCase/Controller/PagesControllerTest.php index d31dcc13d..0aab4c50d 100644 --- a/tests/TestCase/Controller/PagesControllerTest.php +++ b/tests/TestCase/Controller/PagesControllerTest.php @@ -61,11 +61,8 @@ public function testViewWithStaticPage() $this->assertResponseContains('This is a static page'); $this->assertTemplate('StaticPages' . DS . $slug . '.ctp'); $this->assertInstanceof(Entity::class, $this->viewVariable('page')); - $this->assertInstanceof(Entity::class, $this->viewVariable('page')->get('category')); $this->assertEquals([ - 'category' => ['slug' => null, 'title' => null], 'title' => 'Page From App', - 'subtitle' => null, 'url' => Router::url($url, true), ] + compact('slug'), $this->viewVariable('page')->toArray()); } diff --git a/version b/version index 474d1823c..9b3870323 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.27.5 +2.27.6