Remove routability from page status

This commit is contained in:
Giuseppe Criscione 2024-10-19 19:47:29 +02:00
parent aafbc01983
commit 77f5fa11eb
3 changed files with 2 additions and 10 deletions

View File

@ -50,11 +50,6 @@ class Page extends Model implements Stringable
*/
public const PAGE_STATUS_NOT_PUBLISHED = 'notPublished';
/**
* Page `not routable` status
*/
public const PAGE_STATUS_NOT_ROUTABLE = 'notRoutable';
protected const MODEL_IDENTIFIER = 'page';
/**

View File

@ -50,9 +50,8 @@ trait PageStatus
}
$this->status = match (true) {
$published => Page::PAGE_STATUS_PUBLISHED,
!$this->routable() => Page::PAGE_STATUS_NOT_ROUTABLE,
!$published => Page::PAGE_STATUS_NOT_PUBLISHED
$published => Page::PAGE_STATUS_PUBLISHED,
!$published => Page::PAGE_STATUS_NOT_PUBLISHED
};
return $this->status;

View File

@ -2,6 +2,4 @@
<span class="page-status-published mr-2"><?= $this->icon('circle-small-fill') ?></span>
<?php elseif ($page->status() === 'notPublished') : ?>
<span class="page-status-not-published mr-2"><?= $this->icon('circle-small-fill') ?></span>
<?php elseif ($page->status() === 'notRoutable') : ?>
<span class="page-status-not-routable mr-2"><?= $this->icon('circle-small-fill') ?></span>
<?php endif ?>