From ea646137a4cf9288da329092b6f6988b13ce6af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:33:42 +0300 Subject: [PATCH] Empty pages doc description hide --- app/View/Components/EmptyPage.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/View/Components/EmptyPage.php b/app/View/Components/EmptyPage.php index fa109c02d..f73a07a9c 100644 --- a/app/View/Components/EmptyPage.php +++ b/app/View/Components/EmptyPage.php @@ -53,6 +53,9 @@ class EmptyPage extends Component /** @var bool */ public $hideButtonImport; + /** @var bool */ + public $hideDocsDescription; + /** @var string */ public $importRoute; @@ -76,7 +79,7 @@ class EmptyPage extends Component string $image = '', string $imageEmptyPage = '', bool $checkPermissionCreate = true, string $permissionCreate = '', array $buttons = [], bool $hideButtonCreate = false, bool $hideButtonImport = false, - string $importRoute = '', array $importRouteParameters = [] + bool $hideDocsDescription = false, string $importRoute = '', array $importRouteParameters = [] ) { if (empty($alias) && ! empty($group)) { $alias = $group; @@ -98,6 +101,7 @@ class EmptyPage extends Component $this->hideButtonCreate = $hideButtonCreate; $this->hideButtonImport = $hideButtonImport; + $this->hideDocsDescription = $hideDocsDescription; $this->buttons = $this->getButtons($page, $group, $buttons); @@ -162,10 +166,12 @@ class EmptyPage extends Component $description = trans($text2); } - $docs_url = $this->getDocsUrl(); + if ($this->hideDocsDescription) { + $docs_url = $this->getDocsUrl(); - if (! empty($docs_url)) { - $description .= ' ' . trans('general.empty.documentation', ['url' => $docs_url]); + if (! empty($docs_url)) { + $description .= ' ' . trans('general.empty.documentation', ['url' => $docs_url]); + } } return $description;