Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #224 from mirko-pagliai/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mirko-pagliai authored Dec 24, 2019
2 parents 5b29ae2 + 446ed61 commit fb8b030
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 0 additions & 4 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,5 @@

<rule ref="./vendor/mirko-pagliai/php-tools/sniffer-ruleset.xml"/>

<rule ref="PSR12.Properties.ConstantVisibility.NotFound">
<severity>0</severity>
</rule>

<exclude-pattern>/config/Migrations</exclude-pattern>
</ruleset>
2 changes: 0 additions & 2 deletions src/Controller/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand Down
6 changes: 3 additions & 3 deletions src/Template/Element/admin/uploader.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $this->Asset->script('/vendor/dropzone/dropzone', ['block' => 'script_bottom']);
Dropzone.autoDiscover = false;
$(function() {
$('.dropzone').dropzone({
dictDefaultMessage: '<?= sprintf('%s %s', $this->Html->icon('cloud-upload'), __d('me_cms', 'Drag files here or click')) ?>',
dictDefaultMessage: '<?= sprintf('%s %s', $this->Icon->icon('cloud-upload'), __d('me_cms', 'Drag files here or click')) ?>',
<?php
if (!empty($maxFiles)) {
echo 'maxFiles: \'' . $maxFiles . '\',';
Expand All @@ -36,8 +36,8 @@ $this->Asset->script('/vendor/dropzone/dropzone', ['block' => 'script_bottom']);
'<div class="progress dz-progress mb-3">' +
'<div class="progress-bar bg-success dz-upload" role="progressbar" data-dz-uploadprogress></div>' +
'</div>' +
'<div class="dz-success-mark text-center"><?= $this->Html->icon('check') ?></div>' +
'<div class="dz-error-mark text-center"><?= $this->Html->icon('close') ?></div>' +
'<div class="dz-success-mark text-center"><?= $this->Icon->icon('check') ?></div>' +
'<div class="dz-error-mark text-center"><?= $this->Icon->icon('close') ?></div>' +
'<div class="dz-error-message mt-2 text-danger text-center" data-dz-errormessage></div>' +
'</div>' +
'</div>',
Expand Down
2 changes: 1 addition & 1 deletion src/Template/Element/views/page.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $category = $page->get('category');

<article class="clearfix mb-4">
<header class="mb-3">
<?php if (getConfig('page.category')) : ?>
<?php if (getConfig('page.category') && $category) : ?>
<h5 class="category mb-2">
<?= $this->Html->link($category->get('title'), $category->get('url')) ?>
</h5>
Expand Down
1 change: 1 addition & 0 deletions src/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
3 changes: 0 additions & 3 deletions tests/TestCase/Controller/PagesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.27.5
2.27.6

0 comments on commit fb8b030

Please sign in to comment.