Merge branch 'develop' into trunk

This commit is contained in:
Noah Lancien 2025-03-05 11:51:36 +01:00
commit b13b34e860
5 changed files with 409 additions and 66 deletions

View file

@ -38,7 +38,7 @@ class SlideController extends Controller
$slideModels,
$search,
null,
'slider',
'type',
'title',
);
}

View file

@ -12,6 +12,8 @@ use App\Traits\Models\MiniCrudModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use App\Models\StaticPage;
use App\Enums\StaticPageType;
/**
* @property \App\Enums\Sections\PageSectionEnum $section Slider that contains the slide.
@ -443,6 +445,36 @@ class Section extends Model
return $data;
}
/**
* Returns the list of sections for a page type.
*
* @param \App\Enums\StaticPageType $type
* @return \Illuminate\Database\Eloquent\Collection
*/
public static function getSections(StaticPageType $type): \Illuminate\Database\Eloquent\Collection
{
$staticPageModel = StaticPage::query()->where('type', $type)->first();
$sectionModels = self::where('page_id', $staticPageModel->id)->get();
return $sectionModels;
}
/**
* Get the active section for a type page
*
* @param \App\Enums\StaticPageType $type
* @return boolean
*/
public static function isActive(StaticPageType $type)
{
$staticPage = StaticPage::getStaticPage($type);
return $staticPage->sections->contains(
function ($section) {
return request()->is("bo/sections/$section->id/edit");
}
);
}
// * RELATIONS
/**

View file

@ -150,4 +150,28 @@ class StaticPage extends Model
ToolboxHelper::assertFieldIsUnique($table, 'title', $title, $id);
ToolboxHelper::assertFieldIsUnique($table, 'slug', Str::slug($title), $id);
}
/**
* Returns the static page for a page type.
*
* @param \App\Enums\StaticPageType $type
* @return \App\Models\StaticPage
*/
public static function getStaticPage(StaticPageType $type): \App\Models\StaticPage
{
$query = (new self())->where('type', $type)->first();
return $query;
}
// * RELATIONS
/**
*
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function sections(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany(Section::class, 'page_id');
}
}

View file

@ -7,6 +7,10 @@ use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use App\Enums\StaticPageType;
use App\Enums\Slides\SliderTypeEnum;
use App\Models\StaticPage;
use App\Models\Section;
class ViewServiceProvider extends ServiceProvider
{
@ -34,6 +38,53 @@ class ViewServiceProvider extends ServiceProvider
} else {
Paginator::useBootstrapFive();
}
}
collect([
['name' => 'homeStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::home)],
['name' => 'veilStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::unveil)],
['name' => 'hireStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_hire)],
['name' => 'commitStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_commit)],
['name' => 'moveStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_move)],
['name' => 'produceStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_produce)],
['name' => 'listenStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::we_listen)],
['name' => 'confidentialityStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::confidentiality)],
['name' => 'legalsStaticPageModel', 'value' => StaticPage::getStaticPage(StaticPageType::legals)],
// * HOME SECTIONS
['name' => 'homeSections', 'value' => Section::getSections(StaticPageType::home)],
// * UNVEIL SECTION
['name' => 'veilSections', 'value' => Section::getSections(StaticPageType::unveil)],
// * WE HIRE SECTION
['name' => 'hireSections', 'value' => Section::getSections(StaticPageType::we_hire)],
// * WE COMMIT SECTION
['name' => 'commitSections', 'value' => Section::getSections(StaticPageType::we_commit)],
// * WE MOVE SECTION
['name' => 'moveSections', 'value' => Section::getSections(StaticPageType::we_move)],
// * WE PRODUCE SECTION
['name' => 'produceSections', 'value' => Section::getSections(StaticPageType::we_produce)],
// * WE LISTEN SECTION
['name' => 'listenSections', 'value' => Section::getSections(StaticPageType::we_listen)],
// * RESPECT HEARTH SLIDE
['name' => 'respectSlides', 'value' => SliderTypeEnum::respect_earth],
])->map(function ($array) {
View::share($array['name'], (function () use ($array) {
return $array['value'] ?: null;
})());
});
// * HOME ACTIVE SECTIONS
View::share('isActiveHome', Section::isActive(StaticPageType::home));
// * UNVEIL ACTIVE SECTIONS
View::share('isActiveVeil', Section::isActive(StaticPageType::unveil));
// * UNVEIL ACTIVE SECTIONS
View::share('isActiveHire', Section::isActive(StaticPageType::we_hire));
// * WE HIRE ACTIVE SECTIONS
View::share('isActiveCommit', Section::isActive(StaticPageType::we_commit));
// * WE COMMIT ACTIVE SECTIONS
View::share('isActiveMove', Section::isActive(StaticPageType::we_move));
// * WE PRODUCE ACTIVE SECTIONS
View::share('isActiveProduce', Section::isActive(StaticPageType::we_produce));
// * WE LISTEN ACTIVE SECTIONS
View::share('isActiveListen', Section::isActive(StaticPageType::we_listen));
} //end if
}
}

View file

@ -6,49 +6,104 @@
{{ __('Accueil') }}
</a>
</li>
{{-- HOME --}}
<li class="nav-item">
<div class="dropdown">
<a class="nav-link @if (request()->routeIs('bo.static_pages.*') || request()->routeIs('bo.sections.*')) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $homeStaticPageModel->type->value()) || $isActiveHome || request()->query('search') === $homeStaticPageModel->type->label() || request()->routeIs('bo.news.*') || request()->routeIs('bo.strips.*')) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
aria-expanded="false">
{{ Str::of(__('Pages'))->ucfirst() }}
{{ $homeStaticPageModel->type->label() }}
</a>
<ol class="dropdown-menu">
{{-- HOME PAGE --}}
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.static_pages.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(trans_choice('models.classes.static_page', 2))->title()]) }}">
{{ Str::of(trans_choice('models.classes.static_page', 2))->title() }}
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $homeStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $homeStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $homeStaticPageModel->type->label()]) }}">
{{ $homeStaticPageModel->type->label() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Section::class)
{{-- SLIDES --}}
@can('viewAny', \App\Models\Slide::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.sections.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.sections.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.section'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.section'))->plural()->title() }}
<a class="nav-link @if (request()->query('search') === $homeStaticPageModel->type->label()) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.slides.index', "search=" .$homeStaticPageModel->type->label()) }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.slide'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.slide'))->plural()->ucfirst() }}
</a>
</li>
@endcan
{{-- SECTIONS --}}
@can('viewAny', \App\Models\Section::class)
@foreach ($homeSections as $section)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.sections.edit', $section->id)) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.sections.edit', $section) }}"
title="{{ __('crud.helpers.update_model', ['model' => $section->section->label()]) }}">
{{ $section->section->label() }}
</a>
</li>
@endforeach
@endcan
{{-- NEWS --}}
@can('viewAny', \App\Models\News::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.news.*')) active @endif" data-bs-toggle="tooltip" href="{{ route('bo.news.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.news'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.news'))->plural()->ucfirst() }}
</a>
</li>
@endcan
{{-- STRIPS --}}
@can('viewAny', \App\Models\Strip::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.strips.*')) active @endif" data-bs-toggle="tooltip" href="{{ route('bo.strips.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(trans_choice('models.classes.strip', 2))->title()]) }}">
{{ Str::of(trans_choice('models.classes.strip', 2))->ucfirst() }}
</a>
</li>
@endcan
</ol>
</div>
</li>
@can('viewAny', \App\Models\News::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.news.*')) active @endif" data-bs-toggle="tooltip" href="{{ route('bo.news.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.news'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.news'))->plural()->ucfirst() }}
</a>
</li>
@endcan
{{-- UNVEIL --}}
<li class="nav-item">
<div class="dropdown">
<a class="nav-link @if (request()->routeIs('bo.sites.*') || request()->routeIs('bo.logos.*')) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $veilStaticPageModel->type->value()) || $isActiveVeil || request()->routeIs('bo.historicalmilestones.*') || request()->routeIs('bo.sites.*')) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
aria-expanded="false">
{{ Str::of(__('models.classes.site'))->plural()->title() }}
{{ $veilStaticPageModel->type->label() }}
</a>
<ol class="dropdown-menu">
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $veilStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $veilStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $veilStaticPageModel->type->label()]) }}">
{{ $veilStaticPageModel->type->label() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Section::class)
@foreach ($veilSections as $section)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.sections.edit', $section->id)) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.sections.edit', $section) }}"
title="{{ __('crud.helpers.update_model', ['model' => $section->section->label()]) }}">
{{ $section->section->label() }}
</a>
</li>
@endforeach
@endcan
@can('viewAny', \App\Models\HistoricalMilestone::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.historicalmilestones.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.historicalmilestones.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(trans_choice('models.classes.historicalMilestone', 2))->title()]) }}">
{{ Str::of(trans_choice('models.classes.historicalMilestone', 2))->ucfirst() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Site::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.sites.*')) active @endif" data-bs-toggle="tooltip"
@ -58,6 +113,209 @@
</a>
</li>
@endcan
</ol>
</div>
</li>
{{-- WE HIRE --}}
<li class="nav-item">
<div class="dropdown">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $hireStaticPageModel->type->value()) || $isActiveHire || request()->routeIs('bo.job_video.*') || request()->query('search') === $respectSlides->label() || request()->routeIs('bo.testimonials.*')) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
aria-expanded="false">
{{ $hireStaticPageModel->type->label() }}
</a>
<ol class="dropdown-menu">
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $hireStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $hireStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $hireStaticPageModel->type->label()]) }}">
{{ $hireStaticPageModel->type->label() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Section::class)
@foreach ($hireSections as $section)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.sections.edit', $section->id)) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.sections.edit', $section) }}"
title="{{ __('crud.helpers.update_model', ['model' => $section->section->label()]) }}">
{{ $section->section->label() }}
</a>
</li>
@endforeach
@endcan
@can('viewAny', \App\Models\JobVideo::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.jobvideos.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.jobvideos.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(trans_choice('models.classes.job_video', 2))->title()]) }}">
{{ Str::of(trans_choice('models.classes.job_video', 2))->ucfirst() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Slide::class)
<li class="nav-item">
<a class="nav-link @if (request()->query('search') === $respectSlides->label()) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.slides.index', "search=" .$respectSlides->label()) }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.slide'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.slide'))->plural()->ucfirst() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Testimonial::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.testimonials.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.testimonials.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.testimonial'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.testimonial'))->plural()->ucfirst() }}
</a>
</li>
@endcan
</ol>
</div>
</li>
{{-- WE COMMIT --}}
<li class="nav-item">
<div class="dropdown">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $commitStaticPageModel->type->value()) || $isActiveCommit) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
aria-expanded="false">
{{ $commitStaticPageModel->type->label() }}
</a>
<ol class="dropdown-menu">
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $commitStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $commitStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $commitStaticPageModel->type->label()]) }}">
{{ $commitStaticPageModel->type->label() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Section::class)
@foreach ($commitSections as $section)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.sections.edit', $section->id)) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.sections.edit', $section) }}"
title="{{ __('crud.helpers.update_model', ['model' => $section->section->label()]) }}">
{{ $section->section->label() }}
</a>
</li>
@endforeach
@endcan
@can('viewAny', \App\Models\Testimonial::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.testimonials.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.testimonials.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.testimonial'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.testimonial'))->plural()->ucfirst() }}
</a>
</li>
@endcan
</ol>
</div>
</li>
{{-- WE MOVE --}}
<li class="nav-item">
<div class="dropdown">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $moveStaticPageModel->type->value()) || $isActiveMove) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
aria-expanded="false">
{{ $moveStaticPageModel->type->label() }}
</a>
<ol class="dropdown-menu">
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $moveStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $moveStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $moveStaticPageModel->type->label()]) }}">
{{ $moveStaticPageModel->type->label() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Section::class)
@foreach ($moveSections as $section)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.sections.edit', $section->id)) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.sections.edit', $section) }}"
title="{{ __('crud.helpers.update_model', ['model' => $section->section->label()]) }}">
{{ $section->section->label() }}
</a>
</li>
@endforeach
@endcan
</ol>
</div>
</li>
{{-- WE PRODUCE --}}
<li class="nav-item">
<div class="dropdown">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $produceStaticPageModel->type->value()) || $isActiveProduce) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
aria-expanded="false">
{{ $produceStaticPageModel->type->label() }}
</a>
<ol class="dropdown-menu">
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $produceStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $produceStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $produceStaticPageModel->type->label()]) }}">
{{ $produceStaticPageModel->type->label() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Section::class)
@foreach ($produceSections as $section)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.sections.edit', $section->id)) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.sections.edit', $section) }}"
title="{{ __('crud.helpers.update_model', ['model' => $section->section->label()]) }}">
{{ $section->section->label() }}
</a>
</li>
@endforeach
@endcan
</ol>
</div>
</li>
{{-- WE LISTEN --}}
<li class="nav-item">
<div class="dropdown">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $listenStaticPageModel->type->value()) || $isActiveListen) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
aria-expanded="false">
{{ $listenStaticPageModel->type->label() }}
</a>
<ol class="dropdown-menu">
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $listenStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $listenStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $listenStaticPageModel->type->label()]) }}">
{{ $listenStaticPageModel->type->label() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Section::class)
@foreach ($listenSections as $section)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.sections.edit', $section->id)) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.sections.edit', $section) }}"
title="{{ __('crud.helpers.update_model', ['model' => $section->section->label()]) }}">
{{ $section->section->label() }}
</a>
</li>
@endforeach
@endcan
</ol>
</div>
</li>
{{-- MORE --}}
<li class="nav-item">
<div class="dropdown">
<a class="nav-link @if (request()->routeIs('bo.logos.*') || request()->is('bo/pages/2/edit') || request()->is('bo/pages/3/edit')) active @endif dropdown-toggle" data-bs-toggle="dropdown" type="button"
aria-expanded="false">
{{ Str::of(__('Voir plus'))->ucfirst() }}
</a>
<ol class="dropdown-menu">
{{-- LOGO --}}
@can('viewAny', \App\Models\Logo::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.logos.*')) active @endif" data-bs-toggle="tooltip"
@ -67,52 +325,30 @@
</a>
</li>
@endcan
{{-- CONFIDENTIALITY --}}
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $confidentialityStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $confidentialityStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $confidentialityStaticPageModel->type->label()]) }}">
{{ sprintf('Page %s', $confidentialityStaticPageModel->type->label()) }}
</a>
</li>
@endcan
{{-- LEGALS --}}
@can('viewAny', \App\Models\StaticPage::class)
<li class="nav-item">
<a class="nav-link @if (url()->current() === route('bo.static_pages.edit', $legalsStaticPageModel->type->value())) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.static_pages.edit', $legalsStaticPageModel) }}"
title="{{ __('crud.helpers.update_model', ['model' => $legalsStaticPageModel->type->label()]) }}">
{{ sprintf('Page %s', $legalsStaticPageModel->type->label()) }}
</a>
</li>
@endcan
</ol>
</div>
</li>
@can('viewAny', \App\Models\Slide::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.slides.*')) active @endif" data-bs-toggle="tooltip" href="{{ route('bo.slides.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.slide'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.slide'))->plural()->ucfirst() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Strip::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.strips.*')) active @endif" data-bs-toggle="tooltip" href="{{ route('bo.strips.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(trans_choice('models.classes.strip', 2))->title()]) }}">
{{ Str::of(trans_choice('models.classes.strip', 2))->ucfirst() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\Testimonial::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.testimonials.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.testimonials.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(__('models.classes.testimonial'))->plural()->title()]) }}">
{{ Str::of(__('models.classes.testimonial'))->plural()->ucfirst() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\JobVideo::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.jobvideos.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.jobvideos.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(trans_choice('models.classes.job_video', 2))->title()]) }}">
{{ Str::of(trans_choice('models.classes.job_video', 2))->ucfirst() }}
</a>
</li>
@endcan
@can('viewAny', \App\Models\HistoricalMilestone::class)
<li class="nav-item">
<a class="nav-link @if (request()->routeIs('bo.historicalmilestones.*')) active @endif" data-bs-toggle="tooltip"
href="{{ route('bo.historicalmilestones.index') }}"
title="{{ __('crud.helpers.list_all', ['model' => Str::of(trans_choice('models.classes.historicalMilestone', 2))->title()]) }}">
{{ Str::of(trans_choice('models.classes.historicalMilestone', 2))->ucfirst() }}
</a>
</li>
@endcan
@canAny(['isConceptor', 'viewAny'], \App\Models\User::class)
<li class="nav-item">
<div class="dropdown">