diff --git a/app/Livewire/BannerComponent.php b/app/Livewire/BannerComponent.php new file mode 100644 index 00000000..3ac90875 --- /dev/null +++ b/app/Livewire/BannerComponent.php @@ -0,0 +1,21 @@ +banners = BannerManager::getActiveBanners(); + } + + public function render() + { + return view('livewire.banner-component', ['banners' => $this->banners]); + } +} diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 8d639c3c..52472951 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -19,6 +19,7 @@ use Illuminate\Session\Middleware\AuthenticateSession; use Illuminate\Session\Middleware\StartSession; use Illuminate\View\Middleware\ShareErrorsFromSession; +use Kenepa\Banner\BannerPlugin; use pxlrbt\FilamentSpotlight\SpotlightPlugin; use Stephenjude\FilamentDebugger\DebuggerPlugin; @@ -47,6 +48,7 @@ public function panel(Panel $panel): Panel DebuggerPlugin::make(), SpotlightPlugin::make(), AdvancedTablesPlugin::make(), + BannerPlugin::make(), ]) ->middleware([ EncryptCookies::class, diff --git a/composer.json b/composer.json index 8cd9bddd..1ddf8882 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ "filament/spatie-laravel-media-library-plugin": "^3.2", "filament/spatie-laravel-tags-plugin": "^3.2", "guzzlehttp/guzzle": "^7.2", + "kenepa/banner": "^0.0.9", "laravel/framework": "^11.34.2", "laravel/horizon": "*", "laravel/jetstream": "^5.0", diff --git a/composer.lock b/composer.lock index 53bc7540..04706c1e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ad69f15516dcedc03de1ca5010d241a3", + "content-hash": "c0b2c7cb27af81eb2917987258dd2c81", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -3162,6 +3162,86 @@ ], "time": "2023-12-03T19:50:20+00:00" }, + { + "name": "kenepa/banner", + "version": "0.0.9", + "source": { + "type": "git", + "url": "https://github.com/kenepa/banner.git", + "reference": "4c5ad62e8bdc1216713a21a265f3e1ecea74d2b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kenepa/banner/zipball/4c5ad62e8bdc1216713a21a265f3e1ecea74d2b0", + "reference": "4c5ad62e8bdc1216713a21a265f3e1ecea74d2b0", + "shasum": "" + }, + "require": { + "filament/filament": "^3.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.15.0" + }, + "require-dev": { + "laravel/pint": "^1.0", + "nunomaduro/collision": "^7.9", + "nunomaduro/larastan": "^2.0.1", + "orchestra/testbench": "^8.0", + "pestphp/pest": "^2.1", + "pestphp/pest-plugin-arch": "^2.0", + "pestphp/pest-plugin-laravel": "^2.0", + "pestphp/pest-plugin-livewire": "^2.1", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "tightenco/duster": "^3.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Kenepa\\Banner\\BannerServiceProvider" + ], + "aliases": { + "Banner": "BannerManager" + } + } + }, + "autoload": { + "psr-4": { + "Kenepa\\Banner\\": "src/", + "Kenepa\\Banner\\Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jehizkia", + "email": "Jehizkia@users.noreply.github.com", + "role": "Developer" + } + ], + "description": "Displays a informative banner to users", + "homepage": "https://github.com/kenepa/banner", + "keywords": [ + "Kenepa", + "banner", + "laravel" + ], + "support": { + "issues": "https://github.com/kenepa/banner/issues", + "source": "https://github.com/kenepa/banner" + }, + "funding": [ + { + "url": "https://github.com/kenepa", + "type": "github" + } + ], + "time": "2024-09-17T09:26:48+00:00" + }, { "name": "kirschbaum-development/eloquent-power-joins", "version": "4.0.1", @@ -15835,12 +15915,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^8.3" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 26e46402..b9f83c14 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -86,7 +86,7 @@ services: environment: HOMEPAGE_URL: "https://docs.api.naturalproducts.net" ports: - - '${APP_PORT:-8001}:80' + - '${API_PORT:-8001}:80' healthcheck: test: ["CMD", "curl", "-f", "http://cm:80/latest/chem/health"] interval: 1m30s diff --git a/resources/css/filament/dashboard/tailwind.config.js b/resources/css/filament/dashboard/tailwind.config.js index a6111c8e..712cb886 100644 --- a/resources/css/filament/dashboard/tailwind.config.js +++ b/resources/css/filament/dashboard/tailwind.config.js @@ -7,5 +7,6 @@ export default { './resources/views/filament/dashboard/**/*.blade.php', './vendor/filament/**/*.blade.php', './vendor/archilex/filament-filter-sets/**/*.php', + './vendor/kenepa/banner/resources/**/*.php', ], } diff --git a/resources/css/filament/dashboard/theme.css b/resources/css/filament/dashboard/theme.css index ecaa8efc..2b86aaf8 100644 --- a/resources/css/filament/dashboard/theme.css +++ b/resources/css/filament/dashboard/theme.css @@ -1,4 +1,5 @@ @import '/vendor/filament/filament/resources/css/theme.css'; @import '/vendor/archilex/filament-filter-sets/resources/css/plugin.css'; +@import '/vendor/kenepa/banner/resources/css/index.css'; @config 'tailwind.config.js'; diff --git a/resources/views/livewire/banner-component.blade.php b/resources/views/livewire/banner-component.blade.php new file mode 100644 index 00000000..74901fa1 --- /dev/null +++ b/resources/views/livewire/banner-component.blade.php @@ -0,0 +1,55 @@ +
+ @foreach ($banners as $banner) + @if ($banner->isVisible()) + @php + $startColor = $banner->start_color; + $endColor = $banner->background_type === 'gradient' ? $banner->end_color : $startColor; + @endphp + + + @endif + @endforeach +
diff --git a/resources/views/livewire/header.blade.php b/resources/views/livewire/header.blade.php index 5ad78fce..5cf9985a 100644 --- a/resources/views/livewire/header.blade.php +++ b/resources/views/livewire/header.blade.php @@ -153,4 +153,5 @@ class="-mx-3 block rounded-lg px-3 py-2.5 text-base font-semibold leading-7 text + diff --git a/resources/views/livewire/molecule-details.blade.php b/resources/views/livewire/molecule-details.blade.php index 498e83b2..78f4c30d 100644 --- a/resources/views/livewire/molecule-details.blade.php +++ b/resources/views/livewire/molecule-details.blade.php @@ -1,968 +1,1084 @@ -
-
- @if ($molecule->status == 'REVOKED') -
-
-
- -
-
-

STATUS: {{ $molecule->status }}

-

This compound has been removed from the COCONUT - database due to the lack - of conclusive evidence supporting its classification as a natural product.

-
-
    -
  • {{ $molecule->comment[0]['comment'] }}
    - Last update: {{ $molecule->comment[0]['timestamp'] }} - -
  • -
-
- Request - changes to this page -
-
-
- @endif -
-
-
-

{{ $molecule->identifier }}

-

- {!! convert_italics_notation($molecule->name ? $molecule->name : $molecule->iupac_name) !!} -

-

Created on · Last - update on -

-
-
-
- @if ($molecule->properties) -
-
-
-
NPLikeness -
- - NP Likeness Score: The likelihood of the compound to be a - natural - product, ranges from -5 (less likely) to 5 (very likely). -
-
-
-
-
- @foreach (range(0, ceil(npScore($molecule->properties->np_likeness))) as $i) -
- @endforeach +
+
+
+
+
+ @if ($molecule->status == 'REVOKED') +
+
+
+
- {{ $molecule->properties->np_likeness }} -
-
-
-
-
-
Annotation Level
-
- @for ($i = 0; $i < $molecule->annotation_level; $i++) - - @endfor - @for ($i = $molecule->annotation_level; $i < 5; $i++) - ☆ - @endfor -
-
-
-
-
-
-
-
- Mol. Weight +
+

STATUS: {{ $molecule->status }} +

+

This compound has been removed from the + COCONUT + database due to the lack + of conclusive evidence supporting its classification as a natural product.

+
+
    +
  • {{ $molecule->comment[0]['comment'] }}
    + Last update: {{ $molecule->comment[0]['timestamp'] }} + +
  • +
-
- - - -
- Exact Isotopic Mass is calculated using RDKit - https://www.rdkit.org/docs/source/rdkit.Chem.Descriptors.html -
-
-
- -
-
- {{ $molecule->properties->exact_molecular_weight }} -
-
-
-
-
-
Mol. Formula
-
{{ $molecule->properties->molecular_formula }} -
-
-
-
-
- @endif -
-
- @if ($molecule->organisms && count($molecule->organisms) > 0) -
-
-
-

- Organisms ({{ count($molecule->organisms) }}) -

-
-
-
- - - - @if (count($molecule->organisms) > 10) -
- - -
- @endif
-
-
- @endif - @if ($molecule->geo_locations && count($molecule->geo_locations) > 0) -
-
-
-

- Geolocations

-
-
-
-
    - @foreach ($molecule->geo_locations as $geo_location) - @if ($geo_location != '') -
  • - - {{ $geo_location->name }} - -
  • - @endif - @endforeach -
+ @endif +
+
+
+

{{ $molecule->identifier }}

+

+ {!! convert_italics_notation($molecule->name ? $molecule->name : $molecule->iupac_name) !!} +

+

Created on + · Last + update on +

-
- @endif - -
-
-
-

- Representations

-

Molecular details

-
-
-
-
-
-
-
-
- COCONUT id -
-
- {{ $molecule->identifier }} - -
-
-
-
- Name -
-
- {!! convert_italics_notation($molecule->name ? $molecule->name : '-') !!} - -
-
-
-
- IUPAC name -
-
- {!! convert_italics_notation($molecule->iupac_name) !!} - -
-
-
-
- InChI -
-
- {{ $molecule->standard_inchi }} - -
-
-
-
- InChIKey -
-
- {{ $molecule->standard_inchi_key }} - + @if ($molecule->properties) +
+
+
+
NPLikeness +
+ + NP Likeness Score: The likelihood of the compound + to be a + natural + product, ranges from -5 (less likely) to 5 (very likely). +
+
+
+
+
+ @foreach (range(0, ceil(npScore($molecule->properties->np_likeness))) as $i) +
+ @endforeach
-
-
-
- Canonical SMILES (RDKit) -
-
- {{ $molecule->canonical_smiles }} - + {{ $molecule->properties->np_likeness }} +
+
+
+
+
+
Annotation Level
+
+ @for ($i = 0; $i < $molecule->annotation_level; $i++) + + @endfor + @for ($i = $molecule->annotation_level; $i < 5; $i++) + ☆ + @endfor +
+
+
+
+
+
+
+
+ Mol. Weight
-
- @if ($molecule->properties) -
-
-
Murcko - Framework +
+ + + +
+ Exact Isotopic Mass is calculated using RDKit - https://www.rdkit.org/docs/source/rdkit.Chem.Descriptors.html
-
- {{ $molecule->properties->murcko_framework ? $molecule->properties->murcko_framework : '-' }} - -
- @endif - @if ($molecule->synonyms && count($molecule->synonyms) > 0) -
-
- Synonyms -
-
-
-
    - @foreach ($molecule->synonyms as $index => $synonym) - @if ($synonym != '') + +
    + {{ $molecule->properties->exact_molecular_weight }} +
    +
+
+
+
+
Mol. Formula
+
+ {{ $molecule->properties->molecular_formula }} +
+
+
+
+
+ @endif +
+
+ @if ($molecule->organisms && count($molecule->organisms) > 0) +
+
+
+

+ Organisms ({{ count($molecule->organisms) }}) +

+
+
+
+ +
+ +
+
    + @foreach ($molecule->organisms as $index => $organism) + @if ($organism != '')
  • + x-show="(showAll || {{ $index }} < 10) && (searchTerm === '' || '{{ strtolower($organism->name) }}'.includes(searchTerm.toLowerCase()))"> - {{ $synonym }} + class="isolate inline-flex rounded-md shadow-sm mb-2"> + + {{ $organism->name }}  + + + + + + {{ $organism->rank }}  + + + +
  • - @endif - @endforeach -
- @if ($molecule->synonym_count > 10) -
- - -
@endif + @endforeach + + @if (count($molecule->organisms) > 10) +
+ +
-
+ @endif
- @endif -
+
-
-
-
-
-
- - @if ($molecule->properties) -
- -
- @endif - - @if ($molecule->properties) -
- -
- @endif - +
+ @endif + @if ($molecule->geo_locations && count($molecule->geo_locations) > 0) +
+
+
+

+ Geolocations

+
+
+
+
    + @foreach ($molecule->geo_locations as $geo_location) + @if ($geo_location != '') +
  • + + {{ $geo_location->name }} + +
  • + @endif + @endforeach +
+
+
+
+
+ @endif -
-
-
-
-

References

-
-
-

Citations -

- @if (count($molecule->citations) > 0) -
-
- @foreach ($molecule->citations as $index => $citation) - @if ($citation->title != '') -
-
+ + @if ($molecule->properties) +
+ - @if (count($molecule->citations) > 6) -
- -
- @endif
- @else -

No citations

- @endif +
+ @endif -

- Collections

- @if (count($molecule->collections) > 0) -
- @foreach ($molecule->collections as $index => $collection) -
-
-
- - - {{ $collection->title }} - - - - -

- {{ $collection->description }} -

-

- {{ $collection->doi }} -

-

- @foreach($this->getReferenceUrls($collection->pivot) as $key => $item) - @foreach ( $item as $reference => $url) - @if (!empty($url)) - - {{ $reference }} - - - - + @if ($molecule->properties) +
+ +
+ @endif + +
+
+
+
+

References +

+
+
+
+

+ Citations +

+ @if (count($molecule->citations) > 0) +
+
+ @foreach ($molecule->citations as $index => $citation) + @if ($citation->title != '') +
+ +
+ +

+ + {{ $citation->title }} + +

+

+ + {{ $citation->authors }} + +

+

+ + {{ $citation->doi }} + +

+
+
+ @endif + @endforeach + +
+ @if (count($molecule->citations) > 6) +
+ + +
@endif +
+ @else +

No citations

+ @endif + +

+ Collections

+ @if (count($molecule->collections) > 0) +
+ @foreach ($molecule->collections as $index => $collection) +
+
+
+ + + {{ $collection->title }} + + + + +

+ {{ $collection->description }} +

+

+ {{ $collection->doi }} +

+

+ @foreach ($this->getReferenceUrls($collection->pivot) as $key => $item) + @foreach ($item as $reference => $url) + @if (!empty($url)) + + {{ $reference }} + + + + + + + + + @else + {{ $reference }} + + + + @endif + @endforeach + @endforeach + +

+
+
+
@endforeach - @endforeach + @if (count($molecule->collections) > 6) +
+ + +
+ @endif +
+ @else +

No collections

+ @endif +
+
-

+
+
+ + + @if ($molecule->related && count($molecule->related) > 0) +
+
+
+
+

+ Tautomers

+
+
+
+ @foreach ($molecule->related as $tautomer) + + @endforeach
- @endforeach - @if (count($molecule->collections) > 6) -
- - -
- @endif
- @else -

No collections

- @endif -
- + + @endif -
-
- + @if ($molecule->is_parent && $molecule->has_variants) +
+
+
+
+

+ Stereochemical + Variants +

+
+
+
+ @foreach ($molecule->variants as $variant) + + @endforeach +
+
+
+
+
+ @endif - @if ($molecule->related && count($molecule->related) > 0) -
-
-
-
-

Tautomers

-
-
-
- @foreach ($molecule->related as $tautomer) - - @endforeach -
-
-
-
-
- @endif + @if ($molecule->parent_id != null) +
+
+
+
+

Parent + (Without + stereo definitions) +

+
+
+
+
+ +
+
+
+
+
+
+ @endif - @if ($molecule->is_parent && $molecule->has_variants) -
-
-
-
-

Stereochemical - Variants -

-
-
-
- @foreach ($molecule->variants as $variant) - - @endforeach -
-
-
-
-
- @endif + @if ($molecule->properties) +
+
+
+
+

+ Molecular + Properties +

+
+
+
+
    +
  • Mol. Formula : + {{ $molecule->properties->molecular_formula }} +
  • +
  • + Mol. Weight + + + + +
    + Exact Isotopic Mass is calculated using RDKit - + https://www.rdkit.org/docs/source/rdkit.Chem.Descriptors.html +
    +
    {{ $molecule->properties->exact_molecular_weight }}
    +
  • +
  • Total + atom number : + {{ $molecule->properties->total_atom_count }} +
  • +
  • Heavy + atom number : + {{ $molecule->properties->heavy_atom_count }} +
  • +
  • Aromatic Ring + Count : + {{ $molecule->properties->aromatic_rings_count }} +
  • +
  • Rotatable Bond + count : + {{ $molecule->properties->rotatable_bond_count }} +
  • +
  • Minimal number of + rings + : + {{ $molecule->properties->number_of_minimal_rings }} +
  • +
  • Formal Charge : + {{ $molecule->properties->total_atom_count }} +
  • +
  • Contains Sugar : + {{ $molecule->properties->contains_sugar ? 'True' : 'False' }} +
  • +
  • Contains Ring + Sugars : + {{ $molecule->properties->contains_ring_sugars ? 'True' : 'False' }} +
  • +
  • Contains Linear + Sugars + : + {{ $molecule->properties->contains_linear_sugars ? 'True' : 'False' }} +
  • +
+
+
+
+
+
- @if ($molecule->parent_id != null) -
-
-
-
-

Parent (Without - stereo definitions) -

-
-
-
-
- +
+
+
+
+

+ Molecular + Descriptors +

+
+
+
    +
  • NP-likeness scores : + {{ $molecule->properties->np_likeness }}
  • +
  • Alogp + : + {{ $molecule->properties->alogp }}
  • +
  • TopoPSA : + {{ $molecule->properties->topological_polar_surface_area }} +
  • +
  • Fsp3 + : + {{ $molecule->properties->fractioncsp3 }}
  • +
  • Hydrogen + Bond Acceptor Count + : + {{ $molecule->properties->hydrogen_bond_acceptors }} +
  • +
  • Hydrogen + Bond Donor Count : + {{ $molecule->properties->hydrogen_bond_donors }} +
  • +
  • Lipinski + Hydrogen Bond + Acceptor Count : + {{ $molecule->properties->hydrogen_bond_acceptors_lipinski }} +
  • +
  • Lipinski + Hydrogen Bond Donor + Count : + {{ $molecule->properties->hydrogen_bond_donors_lipinski }} +
  • +
  • Lipinski + RO5 Violations : + {{ $molecule->properties->lipinski_rule_of_five_violations }} +
  • +
+
+
-
+
+ @endif + +
+
+
-
-
- - @endif - - @if ($molecule->properties) -
-
-
-
-

Molecular - Properties -

+
+
-
-
-
    -
  • Mol. Formula : - {{ $molecule->properties->molecular_formula }} -
  • -
  • - Mol. Weight - - - - -
    - Exact Isotopic Mass is calculated using RDKit - https://www.rdkit.org/docs/source/rdkit.Chem.Descriptors.html -
    -
    {{ $molecule->properties->exact_molecular_weight }}
    -
  • -
  • Total - atom number : - {{ $molecule->properties->total_atom_count }} -
  • -
  • Heavy - atom number : - {{ $molecule->properties->heavy_atom_count }}
  • -
  • Aromatic Ring Count : - {{ $molecule->properties->aromatic_rings_count }}
  • -
  • Rotatable Bond count : - {{ $molecule->properties->rotatable_bond_count }}
  • -
  • Minimal number of rings - : {{ $molecule->properties->number_of_minimal_rings }} -
  • -
  • Formal Charge : - {{ $molecule->properties->total_atom_count }}
  • -
  • Contains Sugar : - {{ $molecule->properties->contains_sugar ? 'True' : 'False' }} -
  • -
  • Contains Ring Sugars : - {{ $molecule->properties->contains_ring_sugars ? 'True' : 'False' }} -
  • -
  • Contains Linear Sugars - : - {{ $molecule->properties->contains_linear_sugars ? 'True' : 'False' }} -
  • -
+
+ +
+
+
-
+
- - -
-
-
-
-

Molecular - Descriptors -

-
-
-
    -
  • NP-likeness scores : - {{ $molecule->properties->np_likeness }}
  • -
  • Alogp - : - {{ $molecule->properties->alogp }}
  • -
  • TopoPSA : - {{ $molecule->properties->topological_polar_surface_area }} -
  • -
  • Fsp3 - : - {{ $molecule->properties->fractioncsp3 }}
  • -
  • Hydrogen - Bond Acceptor Count - : {{ $molecule->properties->hydrogen_bond_acceptors }}
  • -
  • Hydrogen - Bond Donor Count : - {{ $molecule->properties->hydrogen_bond_donors }} -
  • -
  • Lipinski - Hydrogen Bond - Acceptor Count : - {{ $molecule->properties->hydrogen_bond_acceptors_lipinski }} -
  • -
  • Lipinski - Hydrogen Bond Donor - Count : - {{ $molecule->properties->hydrogen_bond_donors_lipinski }} -
  • -
  • Lipinski - RO5 Violations : - {{ $molecule->properties->lipinski_rule_of_five_violations }} -
  • -
-
-
-
-
- @endif - -
-
- -
-
-
-
- -
-
- -
-
+ - \ No newline at end of file + diff --git a/resources/views/vendor/banner/components/banner.blade.php b/resources/views/vendor/banner/components/banner.blade.php new file mode 100644 index 00000000..6eca9e74 --- /dev/null +++ b/resources/views/vendor/banner/components/banner.blade.php @@ -0,0 +1,88 @@ +
$banner->getLocation() === 'panel', + '' => $banner->getLocation() === 'body', + '' => $banner->getLocation() === 'nav', + '' => $banner->getLocation() === 'global_search', + ]) +> + @if ($banner->isVisible()) + @php + $start_color = $banner->start_color; + $end_color = ''; + + if ($banner->background_type === 'gradient') { + $end_color = $banner->end_color; + } else { + $end_color = $banner->start_color; + } + @endphp +
$banner->render_location !== \Filament\View\PanelsRenderHook::BODY_START + ])> +
+
+ @if ($banner->icon) + + @endif +
+
+ {!! $banner->content !!} +
+ @if ($banner->can_be_closed_by_user) + + @endif +
+
+ @endif +
diff --git a/resources/views/vendor/banner/components/manager/banner-list-empty-state.blade.php b/resources/views/vendor/banner/components/manager/banner-list-empty-state.blade.php new file mode 100644 index 00000000..d02ad894 --- /dev/null +++ b/resources/views/vendor/banner/components/manager/banner-list-empty-state.blade.php @@ -0,0 +1,4 @@ +
+

{{ __('banner::manager.banner_list_empty_state_title') }}

+

{{ __('banner::manager.banner_list_empty_state_description') }}

+
diff --git a/resources/views/vendor/banner/pages/banner-manager.blade.php b/resources/views/vendor/banner/pages/banner-manager.blade.php new file mode 100644 index 00000000..49a487ad --- /dev/null +++ b/resources/views/vendor/banner/pages/banner-manager.blade.php @@ -0,0 +1,108 @@ + +
+
+ + + + {{ $this->createNewBanner }} + + + + + + + + + + + + {{ __('banner::manager.enable_all_banners') }} + + + + {{ __('banner::manager.disable_all_banners') }} + + + + + + + @if ($banners) +
+ @foreach ($banners as $banner) +
$this->isBannerActive($banner->id) ?? false + ]) + > +

{{ $banner->name }}

+
+
$banner->is_active, + 'bg-gray-400 border-gray-200 dark:border-gray-700' => ! $banner->is_active + ]) + >
+
+ @if ($banner->is_active) + {{ __('banner::manager.active_since') }} · {{ \Carbon\Carbon::parse($banner->active_since)->diffForHumans() }} + @else + {{ __('banner::manager.inactive') }} + @endif +
+
+
+ @endforeach +
+ @else + + @endif + +
+
+ +
+ @if ($selectedBanner) + + +
+ {{ $this->form }} + +
+ + {{ __('banner::manager.save') }} + + + {{ $this->deleteBanner }} +
+
+ +
+ @else +
+
+
+ +
+

{{ __('banner::manager.banner_edit_empty_state_title') }}

+

{{ __('banner::manager.banner_edit_empty_state_description') }}

+
+
+ @endif +
+
+