Merge branch 'wip/contactform' into 'develop'
feat: ✨ add some missing translations / add active in navbar / add...
See merge request ldc-web/projets/ldc!105
This commit is contained in:
commit
43519370ed
35 changed files with 537 additions and 452 deletions
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Enums\Contact;
|
||||
|
||||
use App\Helpers\RouteHelper;
|
||||
use Illuminate\Support\Facades\Lang;
|
||||
use Uwil\LaravelCommon\Traits\Enums\BaseEnum;
|
||||
|
||||
enum ContactFormType: int
|
||||
|
|
@ -117,21 +118,6 @@ enum ContactFormType: int
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data-target
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function hasBlankTarget(): string
|
||||
{
|
||||
$locale = config('app.locale');
|
||||
|
||||
return match (true) {
|
||||
$this === self::restauration => $locale === "en" ? true : false,
|
||||
default => false,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the subtitle
|
||||
*
|
||||
|
|
@ -150,18 +136,18 @@ enum ContactFormType: int
|
|||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function slug(): string|null
|
||||
public function slug(?string $locale = null): ?string
|
||||
{
|
||||
return match ($this) {
|
||||
self::collaborator => __('enums.contactFormType.collaborator.slug'),
|
||||
self::breeder => __('enums.contactFormType.breeder.slug'),
|
||||
self::collaborator => Lang::get('enums.contactFormType.collaborator.slug', [], $locale),
|
||||
self::breeder => Lang::get('enums.contactFormType.breeder.slug', [], $locale),
|
||||
self::professional => null,
|
||||
self::restauration => __('enums.contactFormType.restauration.slug'),
|
||||
self::export => __('enums.contactFormType.export.slug'),
|
||||
self::finance => __('enums.contactFormType.finance.slug'),
|
||||
self::commitments => __('enums.contactFormType.commitments.slug'),
|
||||
self::product => __('enums.contactFormType.product.slug'),
|
||||
self::info => __('enums.contactFormType.info.slug'),
|
||||
self::restauration => Lang::get('enums.contactFormType.restauration.slug', [], $locale),
|
||||
self::export => Lang::get('enums.contactFormType.export.slug', [], $locale),
|
||||
self::finance => Lang::get('enums.contactFormType.finance.slug', [], $locale),
|
||||
self::commitments => Lang::get('enums.contactFormType.commitments.slug', [], $locale),
|
||||
self::product => Lang::get('enums.contactFormType.product.slug', [], $locale),
|
||||
self::info => Lang::get('enums.contactFormType.info.slug', [], $locale),
|
||||
self::press => null,
|
||||
};
|
||||
}
|
||||
|
|
@ -182,16 +168,12 @@ enum ContactFormType: int
|
|||
self::commitments,
|
||||
self::product,
|
||||
self::info,
|
||||
|
||||
self::restauration
|
||||
];
|
||||
$locale = config('app.locale');
|
||||
return match (true) {
|
||||
in_array($this, $commonRoutes, true) => route('front.contact.show', ['slug' => $this->slug()]),
|
||||
$this === self::professional => null,
|
||||
$this === self::press => RouteHelper::routeNameChecker('front.dynamic-pages.espace-presse') . '#page-press-form',
|
||||
$this === self::restauration => $locale === "fr"
|
||||
? RouteHelper::routeNameChecker('front.contact.show', ['slug' => $this->slug()])
|
||||
: 'https://www.legauloisprofessionnel.fr/contactez-nous',
|
||||
default => null,
|
||||
};
|
||||
}
|
||||
|
|
@ -264,4 +246,22 @@ enum ContactFormType: int
|
|||
],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if current lang slug match in specific lang slug
|
||||
*/
|
||||
public static function fromSlug(string $slug, string $locale): ?self
|
||||
{
|
||||
foreach (self::cases() as $case) {
|
||||
$caseSlug = $case->slug($locale);
|
||||
|
||||
if (
|
||||
$caseSlug !== null &&
|
||||
mb_strtolower($caseSlug) === mb_strtolower($slug)
|
||||
) {
|
||||
return $case;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@
|
|||
namespace App\Helpers;
|
||||
|
||||
use App\Enums\DynamicFieldTypes;
|
||||
use App\Enums\DynamicPages\PageStatusEnum;
|
||||
use App\Models\DynamicPage;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Uwil\LaravelCommon\Helpers\FileHelper;
|
||||
|
|
@ -122,4 +125,38 @@ class DynamicPageHelper
|
|||
$new = collect($newContent)->filter($filter);
|
||||
return $new->keys()->merge($old->keys())->unique();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all segments url for dynamic pages
|
||||
*
|
||||
* @param DynamicPage $page
|
||||
* @param Collection $pages
|
||||
* @param string $locale
|
||||
* @return array|null
|
||||
*/
|
||||
public static function getAllDynamicPageSegments(DynamicPage $page, Collection $pages, string $locale): ?array
|
||||
{
|
||||
$segments = [];
|
||||
$parentId = $page->page_id ?? ($page->parentPage->id ?? null);
|
||||
|
||||
// Browse all relationships.
|
||||
while ($parentId) {
|
||||
/** @var \App\Models\DynamicPage|null $parentPage */
|
||||
$parent = $pages->find($parentId);
|
||||
|
||||
if (! $parent || !$parent->status->equals(PageStatusEnum::published)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$parentSlug = $parent->getTranslation('slug', $locale);
|
||||
|
||||
if (! $parentSlug) {
|
||||
return null;
|
||||
}
|
||||
|
||||
array_unshift($segments, $parentSlug);
|
||||
$parentId = $parent->page_id;
|
||||
}
|
||||
return $segments;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
namespace App\Helpers;
|
||||
|
||||
use App\Enums\Contact\ContactFormType;
|
||||
use App\Models\DynamicPage;
|
||||
use Illuminate\Routing\Route;
|
||||
use Uwil\LaravelCommon\Controllers\Controller;
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
|
||||
class RouteHelper extends Controller
|
||||
{
|
||||
|
|
@ -17,7 +21,7 @@ class RouteHelper extends Controller
|
|||
* @param string|null $locale The target locale to get the route.
|
||||
* @return string The route URL if it exists, or "#" otherwise.
|
||||
*/
|
||||
public static function routeNameChecker(string $routeName, string|null $locale = null): string
|
||||
public static function routeNameChecker(string $routeName, mixed $locale = null): string
|
||||
{
|
||||
if (is_null($locale)) {
|
||||
$locale = app()->getLocale();
|
||||
|
|
@ -28,4 +32,114 @@ class RouteHelper extends Controller
|
|||
}
|
||||
return "#";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true or false, if the passed route is actually active
|
||||
*
|
||||
* @param string $routeName
|
||||
* @param mixed $locale
|
||||
* @return boolean
|
||||
*/
|
||||
public static function isRouteActive(string $routeName, mixed $locale = null): bool
|
||||
{
|
||||
if (is_null($locale)) {
|
||||
$locale = app()->getLocale();
|
||||
}
|
||||
$definitiveRouteName = sprintf("$routeName.%s", $locale);
|
||||
return \request()->routeIs($definitiveRouteName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the localized url in the langage switcher
|
||||
*
|
||||
* @param string $localeCode LocaleCode from LaravelLocalization::getSupportedLocales()
|
||||
* @return string
|
||||
*/
|
||||
public static function getLocalizedUrl(string $localeCode): string
|
||||
{
|
||||
$route = request()->route();
|
||||
if (! $route) {
|
||||
return LaravelLocalization::getLocalizedURL($localeCode);
|
||||
}
|
||||
return self::resolve(
|
||||
self::getDynamicPageLocalizedURL($route, $localeCode),
|
||||
self::getContactShowLocalizedURL($route, $localeCode),
|
||||
) ?? LaravelLocalization::getLocalizedURL($localeCode, null, [], false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the url to be returned for the localized switcher
|
||||
*
|
||||
* @param string|null ...$urls
|
||||
* @return string|null
|
||||
*/
|
||||
private static function resolve(?string ...$urls): ?string
|
||||
{
|
||||
foreach ($urls as $url) {
|
||||
if ($url !== null) {
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the localized url for contact page show
|
||||
*
|
||||
* @param Route $route
|
||||
* @param string $localeCode
|
||||
* @return string|false|null
|
||||
*/
|
||||
private static function getContactShowLocalizedURL(Route $route, string $localeCode)
|
||||
{
|
||||
$contactPage = $route->parameter('contactPage');
|
||||
|
||||
if ($contactPage) {
|
||||
$localizedUrl = LaravelLocalization::getLocalizedURL(
|
||||
$localeCode,
|
||||
null,
|
||||
[],
|
||||
false
|
||||
);
|
||||
$parsed = parse_url($localizedUrl);
|
||||
if (! isset($parsed['path'])) {
|
||||
return $localizedUrl;
|
||||
}
|
||||
$segments = explode('/', trim($parsed['path'], '/'));
|
||||
$currentSlug = end($segments);
|
||||
|
||||
$enum = ContactFormType::fromSlug(
|
||||
$currentSlug,
|
||||
app()->getLocale()
|
||||
);
|
||||
|
||||
if ($enum) {
|
||||
$translatedSlug = $enum->slug($localeCode);
|
||||
if ($translatedSlug) {
|
||||
$segments[count($segments) - 1] = $translatedSlug;
|
||||
return '/' . implode('/', $segments);
|
||||
}
|
||||
}
|
||||
return $localizedUrl;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the localized url for all dynamic pages
|
||||
*
|
||||
* @param \Illuminate\Routing\Route $route
|
||||
* @param string $localeCode
|
||||
* @return string|false|null
|
||||
*/
|
||||
private static function getDynamicPageLocalizedURL(Route $route, string $localeCode)
|
||||
{
|
||||
/** @var DynamicPage|null $page */
|
||||
$dynamicPage = $route->parameter('dynamicPage');
|
||||
if ($dynamicPage instanceof DynamicPage) {
|
||||
$path = $dynamicPage->getLocalizedPath($localeCode);
|
||||
if ($path) {
|
||||
return LaravelLocalization::getLocalizedURL($localeCode, "/{$path}", [], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,11 +27,9 @@ class ContactController
|
|||
$enumType = collect(ContactFormType::all())->first(function ($enum) use ($slug) {
|
||||
return $enum->slug() === $slug;
|
||||
});
|
||||
|
||||
if (!$enumType) {
|
||||
return redirect()->route('front.contact.index');
|
||||
}
|
||||
|
||||
return view('front.pages.contact.show', compact('enumType'));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ class NewsController extends Controller
|
|||
return view('front.pages.news.index');
|
||||
}
|
||||
|
||||
public function show(News $model)
|
||||
public function show(News $news)
|
||||
{
|
||||
return view('front.pages.news.show', ['model' => $model->load('categories')]);
|
||||
return view('front.pages.news.show', ['model' => $news->load('categories')]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@ namespace App\Models;
|
|||
use App\Contracts\TranslatableModel;
|
||||
use App\Enums\DynamicFieldTypes;
|
||||
use App\Enums\DynamicPages\PageStatusEnum;
|
||||
use App\Helpers\DynamicPageHelper;
|
||||
use App\Helpers\RouteHelper;
|
||||
use App\Helpers\TranslationHelper;
|
||||
use App\Traits\Models\HasCache;
|
||||
use App\Traits\Models\HasTranslations;
|
||||
use App\Traits\Models\HasUwilImages;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
|
@ -79,7 +81,7 @@ class DynamicPage extends Model implements TranslatableModel
|
|||
'title',
|
||||
'content',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Relations should be included in the cache.
|
||||
*
|
||||
|
|
@ -274,7 +276,7 @@ class DynamicPage extends Model implements TranslatableModel
|
|||
|
||||
/**
|
||||
* Get the url to access a specific resource.
|
||||
*
|
||||
*
|
||||
* @param integer $id Id field of the target model.
|
||||
* @return string
|
||||
*/
|
||||
|
|
@ -319,4 +321,34 @@ class DynamicPage extends Model implements TranslatableModel
|
|||
{
|
||||
return $this->belongsTo(PageConfig::class, 'config_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get localized path from the locale
|
||||
*
|
||||
* @param string $locale
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLocalizedPath(string $locale): ?string
|
||||
{
|
||||
$slug = $this->getTranslation('slug', $locale);
|
||||
|
||||
if (! $slug) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Récupère toutes les pages publiées (cache déjà existant chez toi)
|
||||
$pages = static::getModelsCached()
|
||||
->where('status', PageStatusEnum::published)
|
||||
->load('parentPage')
|
||||
->keyBy('id');
|
||||
|
||||
$segments = DynamicPageHelper::getAllDynamicPageSegments($this, $pages, $locale);
|
||||
|
||||
$segmentsPath = implode('/', $segments);
|
||||
|
||||
return $segmentsPath
|
||||
? "{$segmentsPath}/{$slug}"
|
||||
: $slug;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ use Illuminate\Support\Str;
|
|||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Uwil\LaravelActivityLogs\Traits\ActivityLog;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Mcamara\LaravelLocalization\Interfaces\LocalizedUrlRoutable;
|
||||
|
||||
/**
|
||||
* @property string $seo_title SEO title of the news.
|
||||
|
|
@ -35,7 +36,7 @@ use Illuminate\Support\Facades\Cache;
|
|||
* @property-read \Illuminate\Support\Carbon $updated_at Date on which the news was updated.
|
||||
* @property-read \Illuminate\Support\Carbon $deleted_at Date on which the news was updated.
|
||||
*/
|
||||
class News extends Model implements TranslatableModel
|
||||
class News extends Model implements TranslatableModel, LocalizedUrlRoutable
|
||||
{
|
||||
use ActivityLog;
|
||||
use HasCache;
|
||||
|
|
@ -47,6 +48,19 @@ class News extends Model implements TranslatableModel
|
|||
HasUwilImages::inertiaFill as traitInertiaFill;
|
||||
}
|
||||
|
||||
public function getRouteKeyName(): string
|
||||
{
|
||||
return 'slug';
|
||||
}
|
||||
|
||||
public function getLocalizedRouteKey($locale)
|
||||
{
|
||||
return $this->getTranslation(
|
||||
$this->getRouteKeyName(),
|
||||
$locale
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Champs contenant des images dynamiques à gérer.
|
||||
*
|
||||
|
|
@ -298,4 +312,14 @@ class News extends Model implements TranslatableModel
|
|||
'category_id'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public static function getPublishedNewsInCurrentLocale()
|
||||
{
|
||||
$locale = App::getLocale();
|
||||
// ici mettre le cache avec la relation catégorie
|
||||
return News::query()
|
||||
->with('categories')
|
||||
->whereNotNull("slug->$locale");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,13 @@
|
|||
namespace App\Providers;
|
||||
|
||||
use App\Enums\DynamicPages\PageStatusEnum;
|
||||
use App\Helpers\DynamicPageHelper;
|
||||
use App\Models\DynamicPage;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
use Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes;
|
||||
|
||||
class DynamicPageRouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
|
@ -46,7 +45,9 @@ class DynamicPageRouteServiceProvider extends ServiceProvider
|
|||
// Set the prefix according to the locale.
|
||||
'prefix' => $prefix,
|
||||
// Set custom middlewares.
|
||||
'middleware' => ['web'],
|
||||
'middleware' => [
|
||||
'web'
|
||||
],
|
||||
], function () use ($locale, $dynamicPageModels) {
|
||||
foreach ($dynamicPageModels as $dynamicPageModel) {
|
||||
$slug = $dynamicPageModel->getTranslation('slug', $locale);
|
||||
|
|
@ -55,7 +56,7 @@ class DynamicPageRouteServiceProvider extends ServiceProvider
|
|||
if (!$slug) continue;
|
||||
|
||||
// Retrieves the parent segments for this locale.
|
||||
$segments = $this->buildFullUrlFromGroups(
|
||||
$segments = DynamicPageHelper::getAllDynamicPageSegments(
|
||||
$dynamicPageModel,
|
||||
$dynamicPageModels->keyBy('id'),
|
||||
$locale
|
||||
|
|
@ -71,7 +72,9 @@ class DynamicPageRouteServiceProvider extends ServiceProvider
|
|||
app()->setLocale($locale);
|
||||
LaravelLocalization::setLocale($locale);
|
||||
return view($dynamicPageModel->getView(), compact('dynamicPageModel'));
|
||||
})->name("front.dynamic-pages.{$dynamicPageModel->id_key}.{$locale}");
|
||||
})
|
||||
->defaults('dynamicPage', $dynamicPageModel)
|
||||
->name("front.dynamic-pages.{$dynamicPageModel->id_key}.{$locale}");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -82,44 +85,4 @@ class DynamicPageRouteServiceProvider extends ServiceProvider
|
|||
View::share(sprintf("page%s", $pascalCase), $dynamicPageModel);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the parent segments for the locale or null if a parent does not have a slug.
|
||||
*
|
||||
* @param \App\Models\DynamicPage $page
|
||||
* @param \Illuminate\Database\Eloquent\Collection $groupsKeyedById
|
||||
* @param string $locale
|
||||
* @return array|null
|
||||
*/
|
||||
private function buildFullUrlFromGroups(DynamicPage $page, Collection $groupsKeyedById, string $locale): ?array
|
||||
{
|
||||
$segments = [];
|
||||
|
||||
// Start at page_id of the DynamicPage.
|
||||
$parentPageId = $page->page_id ?? ($page->parentPage->id ?? null);
|
||||
|
||||
// Browse all relationships.
|
||||
while ($parentPageId) {
|
||||
/** @var \App\Models\DynamicPage|null $parentPage */
|
||||
$parentPage = $groupsKeyedById->find($parentPageId);
|
||||
|
||||
if (!$parentPage || !$parentPage->status->equals(PageStatusEnum::published)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$slug = $parentPage->getTranslation('slug', $locale);
|
||||
|
||||
if (empty($slug)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Save parentPage slug if it is published.
|
||||
array_unshift($segments, $slug);
|
||||
|
||||
// Continue to move up even if the parentPage is not published.
|
||||
$parentPageId = $parentPage->page_id;
|
||||
} //end while
|
||||
|
||||
return $segments;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class IndexNewsComponent extends Component
|
|||
->toArray();
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Builder<\App\Models\News> $query */
|
||||
$query = News::query()->with('categories');
|
||||
$query = News::getPublishedNewsInCurrentLocale();
|
||||
|
||||
/** Sort columns with a query */
|
||||
$bladeHelper->runSortQuery($query);
|
||||
|
|
@ -55,9 +55,6 @@ class IndexNewsComponent extends Component
|
|||
/** Custom pagination */
|
||||
$this->newsModels = $bladeHelper->runPaginate($query);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Cette section est à revoir mais c'est pour coller et être iso au site actuellement en prod
|
||||
*/
|
||||
|
|
@ -89,7 +86,7 @@ class IndexNewsComponent extends Component
|
|||
break;
|
||||
|
||||
default:
|
||||
$this->postContainer['load_more'] = __('front.buttons.load_more');
|
||||
$this->postContainer['load_more'] = ucfirst(__('front.buttons.see_more_news'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||
'auth' => \Uwil\LaravelBackend\Middlewares\Authenticate::class,
|
||||
'guest' => \Uwil\LaravelBackend\Middlewares\RedirectIfAuthenticated::class,
|
||||
'lang' => \Uwil\LaravelBackend\Middlewares\Lang::class,
|
||||
'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class,
|
||||
'localeCookieRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class,
|
||||
'localizationRedirect' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class,
|
||||
'localeViewPath' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class,
|
||||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions) {
|
||||
|
|
|
|||
|
|
@ -38,13 +38,15 @@ return [
|
|||
],
|
||||
'breeder' => [
|
||||
'label' => 'join us as a farmer',
|
||||
'slug' => 'join us as a farmer'
|
||||
'slug' => 'join-us-as-a-farmer'
|
||||
],
|
||||
'professional' => [
|
||||
'label' => 'a request as a professional'
|
||||
],
|
||||
'restauration' => [
|
||||
'label' => 'foodservice, Industry, Retailer France & Overseas',
|
||||
'slug' => 'foodservice-industry-retailer-distributor',
|
||||
'subtitle' => 'a request as a customer / retailer / distributor'
|
||||
],
|
||||
'export' => [
|
||||
'label' => 'other countries / Export',
|
||||
|
|
@ -54,7 +56,7 @@ return [
|
|||
'label' => 'finance',
|
||||
'slug' => 'finance-2' #FIXME: revoir le slug
|
||||
],
|
||||
'engagements' => [
|
||||
'commitments' => [
|
||||
'label' => 'our commitments',
|
||||
'slug' => 'our-commitments-2' #FIXME: revoir le slug
|
||||
],
|
||||
|
|
|
|||
|
|
@ -21,8 +21,13 @@ return [
|
|||
"respecter-la-terre" => "respecting the nature",
|
||||
"bien-nourrir" => "providing healthy food",
|
||||
'search' => 'search',
|
||||
"actualites" => [
|
||||
"news" => [
|
||||
"index" => "news",
|
||||
"read_article" => "read more",
|
||||
"results" => "results",
|
||||
"on_document_count" => ":current documents of :total",
|
||||
"theme" => "theme",
|
||||
"year" => "year",
|
||||
],
|
||||
"finance" => "finance",
|
||||
'espace-presse' => 'press space',
|
||||
|
|
@ -30,7 +35,8 @@ return [
|
|||
'send' => 'send',
|
||||
'back_to_contact' => 'return to choice of contact',
|
||||
'see_more_news' => 'load more news',
|
||||
'see_more_docs' => 'load more documentary resources'
|
||||
'see_more_docs' => 'load more documentary resources',
|
||||
"clear_filters" => "clear les filtres"
|
||||
],
|
||||
'contact' => [
|
||||
"index" => "Contact us",
|
||||
|
|
@ -108,4 +114,9 @@ return [
|
|||
'pole' => 'Pole',
|
||||
'responsible' => 'Responsible',
|
||||
'address' => 'Address',
|
||||
"follow_us" => 'follow us',
|
||||
"3_clicks" => 'I apply in 3 clicks',
|
||||
"contact_details" => 'Your contact details',
|
||||
'contact_our' => 'contact our',
|
||||
'press_department' => 'press department'
|
||||
];
|
||||
|
|
|
|||
7
lang/en/routes.php
Normal file
7
lang/en/routes.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'contact' => 'contact-us/{slug}',
|
||||
'contact_index' => 'contact-us',
|
||||
'news' => 'news/{news}'
|
||||
];
|
||||
|
|
@ -23,6 +23,11 @@ return [
|
|||
"bien-nourrir" => "bien nourrir",
|
||||
"news" => [
|
||||
"index" => "actualités",
|
||||
"read_article" => "lire l'article",
|
||||
"results" => "résultat",
|
||||
"on_document_count" => ":current documents sur :total",
|
||||
"theme" => "thématique",
|
||||
"year" => "année",
|
||||
],
|
||||
"finance" => "finance",
|
||||
'search' => 'rechercher',
|
||||
|
|
@ -31,7 +36,8 @@ return [
|
|||
'send' => 'envoyer',
|
||||
'back_to_contact' => 'retour au choix de contact',
|
||||
'see_more_news' => 'voir plus d\'actualités',
|
||||
'see_more_docs' => 'voir plus de ressources documentaires'
|
||||
'see_more_docs' => 'voir plus de ressources documentaires',
|
||||
"clear_filters" => "effacer les filtres"
|
||||
],
|
||||
'contact' => [
|
||||
"index" => "Nous contacter",
|
||||
|
|
@ -109,4 +115,9 @@ return [
|
|||
'pole' => 'Pôle',
|
||||
'responsible' => 'Responsable',
|
||||
'address' => 'Adresse',
|
||||
"follow_us" => 'suivez-nous',
|
||||
"3_clicks" => 'Je postule en 3 clics',
|
||||
"contact_details" => 'Vos coordonnées',
|
||||
'contact_our' => 'contactez notre',
|
||||
'press_department' => 'service presse'
|
||||
];
|
||||
|
|
|
|||
7
lang/fr/routes.php
Normal file
7
lang/fr/routes.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'contact' => 'nous-contacter/{slug}',
|
||||
'contact_index' => 'nous-contacter',
|
||||
'news' => 'actualites/{news}'
|
||||
];
|
||||
|
|
@ -39,11 +39,11 @@
|
|||
@endforeach
|
||||
@endif
|
||||
<div class="filter-results-num">
|
||||
Résultat :
|
||||
{{ ucfirst(__('front.news.results')) }} :
|
||||
<span class="filter-results-num__wrap">
|
||||
<span class="filter-results-num__current">0</span>
|
||||
documents sur
|
||||
<span class="filter-results-num__total">0</span>
|
||||
<span class="filter-results-num__current">
|
||||
{{ ucfirst(__('front.news.on_document_count', ['current' => 0, 'total' => 10])) }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -53,8 +53,9 @@
|
|||
</div>
|
||||
<div class="active-filters__clear-wrap">
|
||||
<div class="active-filters__item active-filters__item_clear">
|
||||
<a class="active-filters__item-remove clear-all" title="Effacer les filtres">✖</a> Effacer
|
||||
les filtres
|
||||
<a class="active-filters__item-remove clear-all"
|
||||
title="{{ ucfirst(__('front.buttons.clear_filters')) }}">✖</a>
|
||||
{{ ucfirst(__('front.buttons.clear_filters')) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
$filters = [
|
||||
[
|
||||
'title' => 'Thématique',
|
||||
'title' => ucfirst(__('front.news.theme')),
|
||||
'fields' => $categories,
|
||||
],
|
||||
[
|
||||
'title' => 'Année',
|
||||
'title' => ucfirst(__('front.news.year')),
|
||||
'fields' => $years,
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<x-front.cta title="Voir tous nos évènements, forums et job dating" url="{{ route('front.news.index') }}"
|
||||
buttonIcon="btn__icon_arrow-right" />
|
||||
@if (isset($pageActualites))
|
||||
<x-front.cta title="Voir tous nos évènements, forums et job dating"
|
||||
url="{{ \App\Helpers\RouteHelper::routeNameChecker(sprintf('front.dynamic-pages.%s', $pageActualites->id_key)) }}"
|
||||
buttonIcon="btn__icon_arrow-right" />
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<div class="textblock fw fw-container assemblees-generales half-bottom-padding">
|
||||
<div
|
||||
id="{{ data_get($data, 'string_title') ? Str::slug(data_get($data, 'string_title')) : '' }}"
|
||||
class="textblock fw fw-container assemblees-generales half-bottom-padding">
|
||||
<div class="textblock__wrapper wrapper">
|
||||
<x-front.sections.title :title="data_get($data, 'string_title')" :subtitle="data_get($data, 'string_subtitle')" />
|
||||
<div class="textblock__container textblock__container_row">
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
@endphp
|
||||
|
||||
@if (!empty($data))
|
||||
<div id="cours_de_bourse_ldc">
|
||||
<div id="{{ data_get($data, 'string_title') ? Str::slug(data_get($data, 'string_title')) : '' }}">
|
||||
<div class="finance-price fw fw-container gray-bg">
|
||||
<div class="finance-price__wrapper wrapper">
|
||||
<h2 class="finance-price__title textblock__title title">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@if (!empty($data))
|
||||
<div id="finance_3">
|
||||
<div id="{{ data_get($data, 'string_title') ? Str::slug(data_get($data, 'string_title')) : '' }}">
|
||||
<div class="finance-shareholders fw fw-container no-bottom-padding">
|
||||
<div class="finance-shareholders__wrapper wrapper">
|
||||
@if (!empty($data['string_title']))
|
||||
|
|
@ -126,15 +126,19 @@
|
|||
<div class="documents__list">
|
||||
<div class="swiper-container swiper-container-initialized swiper-container-horizontal">
|
||||
<div class="swiper-wrapper">
|
||||
@if(!empty($rightsSection['list_section_document_list']) && !empty($rightsSection['list_section_document_list'][0]['list_documents']))
|
||||
@if (
|
||||
!empty($rightsSection['list_section_document_list']) &&
|
||||
!empty($rightsSection['list_section_document_list'][0]['list_documents']))
|
||||
@php
|
||||
$btnConfig = $rightsSection['list_section_document_list'][0]['list_document_button'][0];
|
||||
$btnConfig =
|
||||
$rightsSection['list_section_document_list'][0]['list_document_button'][0];
|
||||
@endphp
|
||||
@foreach ($rightsSection['list_section_document_list'][0]['list_documents'] as $slide)
|
||||
@foreach ($rightsSection['list_section_document_list'][0]['list_documents'] as $slide)
|
||||
<div class="swiper-slide">
|
||||
<div class="documents__item document">
|
||||
<div class="document__icon">
|
||||
<img src="{{ asset($btnConfig['image_document_default']) }}" alt="Document">
|
||||
<img src="{{ asset($btnConfig['image_document_default']) }}"
|
||||
alt="Document">
|
||||
</div>
|
||||
<div class="document__text">{{ $slide['string_label'] }}</div>
|
||||
<x-front.cta :title="$btnConfig['string_document_label']" class="document__btn"
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
@endphp
|
||||
|
||||
@if (!empty($finance))
|
||||
<div id="finance_4">
|
||||
<div id="{{ data_get($data, 'string_title') ? Str::slug(data_get($data, 'string_title')) : '' }}">
|
||||
<div class="presentation gray-bg">
|
||||
<div class="textblock fw fw-container textblock_bg">
|
||||
<div class="textblock__wrapper wrapper">
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@
|
|||
];
|
||||
@endphp
|
||||
|
||||
<div id="finance_6">
|
||||
<div id="{{ data_get($data, 'string_title') ? Str::slug(data_get($data, 'string_title')) : '' }}">
|
||||
<div class="publications fw fw-container gray-bg">
|
||||
<div class="textblock fw fw-container no-top-padding no-bottom-padding">
|
||||
<div class="textblock__wrapper wrapper">
|
||||
|
|
|
|||
|
|
@ -18,10 +18,11 @@
|
|||
],
|
||||
];
|
||||
@endphp
|
||||
<div class="kfar">
|
||||
<div id="{{ data_get($data, 'string_title') ? Str::slug(data_get($data, 'string_title')) : '' }}"
|
||||
class="kfar">
|
||||
<div class="textblock fw fw-container">
|
||||
<div class="textblock__wrapper wrapper">
|
||||
<x-front.sections.title :title="$data['string_key_numbers_title']" :subtitle="$data['string_key_numbers_subtitle']" />
|
||||
<x-front.sections.title :title="$data['string_title']" :subtitle="$data['string_subtitle']" />
|
||||
<div class="textblock__container">
|
||||
<div class="textblock__info textblock__block"></div>
|
||||
</div>
|
||||
|
|
@ -33,12 +34,12 @@
|
|||
@foreach ($graphs as $g)
|
||||
<div class="kfar-item">
|
||||
@if (!empty($g['data']['string_label']))
|
||||
<div class="kfar-item__title subtitle">{{ $g['data']['string_label'] }}</div>
|
||||
<div class="kfar-item__title subtitle">{{ $g['data']['string_label'] }}</div>
|
||||
@endif
|
||||
@if (!empty($g['data']['string_sub_label']))
|
||||
<div class="kfar-item__text description">
|
||||
<p>{{ $g['data']['string_sub_label'] }}</</p>
|
||||
</div>
|
||||
<div class="kfar-item__text description">
|
||||
<p>{{ $g['data']['string_sub_label'] }}</< /p>
|
||||
</div>
|
||||
@endif
|
||||
<div class="kfar-item__text description">
|
||||
@php
|
||||
|
|
@ -52,7 +53,7 @@
|
|||
});
|
||||
</script>
|
||||
</div>
|
||||
@if($g['type'] === 'list_bilan_simplify')
|
||||
@if ($g['type'] === 'list_bilan_simplify')
|
||||
<div class="kfar-item__text description centered">
|
||||
{{ $g['data']['string_base_euros'] }}
|
||||
</div>
|
||||
|
|
@ -63,4 +64,3 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
url="{{ $url }}" buttonIcon="btn__icon_arrow-right" />
|
||||
@else
|
||||
<a class="list-item__readmore" href="{{ $url }}" title="Lire l'article">
|
||||
Lire l'article
|
||||
{{ ucfirst(__('front.news.read_article')) }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -67,12 +67,13 @@
|
|||
</li>
|
||||
@endif
|
||||
<li id="menu-item-6108" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-6108">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.contact.index') }}">Nous contacter</a>
|
||||
<a href="{{ LaravelLocalization::getLocalizedURL(app()->getLocale(), __('routes.contact_index')) }}">
|
||||
{{ ucfirst(__('front.contact.index')) }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="footer__social footer-social">
|
||||
<div class="footer-social__title">Suivez-nous</div>
|
||||
<div class="footer-social__title">{{ ucwords(__('front.follow_us')) }}</div>
|
||||
<div class="footer-social__list">
|
||||
<a class="footer-social__list-item" href="https://www.linkedin.com/company/767509" target="_blank" rel="noreferer noopener" title="Linked In"><img src="/assets/img/icon__linkedin.png" alt="LinkedIn" /></a>
|
||||
</div>
|
||||
|
|
@ -96,9 +97,9 @@
|
|||
</div>
|
||||
</footer>
|
||||
|
||||
<a class="apply-btn btn btn_white active" href="https://recrutement.ldc.fr/fr/annonces?s_o=Site%20ldc" target="_blank" rel="noreferer noopener" title="Je postule en 3 clics">
|
||||
<a class="apply-btn btn btn_white active" href="https://recrutement.ldc.fr/fr/annonces?s_o=Site%20ldc" target="_blank" rel="noreferer noopener" title="{{ ucfirst(__('front.3_clicks')) }}">
|
||||
<i class="btn__icon btn__icon_edit"></i>
|
||||
<span class="apply-btn__text"><span>Je postule en 3 clics</span></span>
|
||||
<span class="apply-btn__text"><span>{{ ucfirst(__('front.3_clicks')) }}</span></span>
|
||||
</a>
|
||||
|
||||
<a href="#" class="back-to-top anchor-scroll" title="back to top"><img src="/assets/img/back-to-top.png" alt="back-to-top" /></a>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,24 @@
|
|||
@php
|
||||
function currentMenuItemClass(string $routeName)
|
||||
{
|
||||
return \App\Helpers\RouteHelper::isRouteActive($routeName) ? 'current-menu-item' : '';
|
||||
}
|
||||
@endphp
|
||||
<div class="header__wrapper wrapper">
|
||||
|
||||
<div class="header__menu-trigger menu-trigger"><i></i><i></i><i></i></div>
|
||||
|
||||
<div class="header__block header__block_left">
|
||||
<ul id="menu-header-left" class="header__nav nav">
|
||||
@if (isset($pageNousConnaitre))
|
||||
@php
|
||||
$nousConnaitreRouteName = 'front.dynamic-pages.nous-connaitre';
|
||||
@endphp
|
||||
<li id="menu-item-186"
|
||||
class="no-padding menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-186">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nous-connaitre') }}">
|
||||
class="no-padding menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-186
|
||||
{{ currentMenuItemClass($nousConnaitreRouteName) }}
|
||||
">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker($nousConnaitreRouteName) }}">
|
||||
{{ $pageNousConnaitre->title }}
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
|
|
@ -56,10 +68,16 @@
|
|||
<p>{{ trans('front.nous-connaitre.list') }}</p>
|
||||
<ul class="sub-menu">
|
||||
@foreach ($nousConnaitreChildPages as $key => $nousConnaitreChildPage)
|
||||
<li id="menu-item-{{ $id + $key }}"
|
||||
class="nav-page-link menu-item menu-item-type-post_type menu-item-object-page menu-item-{{ $id + $key }}">
|
||||
@php
|
||||
$nousConnaitreChildPageRouteName = sprintf(
|
||||
'front.dynamic-pages.%s',
|
||||
$nousConnaitreChildPage->id_key,
|
||||
);
|
||||
@endphp
|
||||
<li id="menu-item-{{ $id + $key }} "
|
||||
class="nav-page-link menu-item menu-item-type-post_type menu-item-object-page menu-item-{{ $id + $key }} {{ currentMenuItemClass($nousConnaitreChildPageRouteName) }}">
|
||||
<a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker(sprintf('front.dynamic-pages.%s', $nousConnaitreChildPage->id_key)) }}">
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($nousConnaitreChildPageRouteName) }}">
|
||||
{{ $nousConnaitreChildPage->title }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -71,15 +89,22 @@
|
|||
</li>
|
||||
@endif
|
||||
@if (isset($pageNosMarques))
|
||||
<li id="menu-item-185" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-185">
|
||||
@php
|
||||
$pageNosMarquesRouteName = 'front.dynamic-pages.nos-marques';
|
||||
@endphp
|
||||
<li id="menu-item-185"
|
||||
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-185 {{ currentMenuItemClass($pageNosMarquesRouteName) }}">
|
||||
<a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nos-marques') }}">{{ $pageNosMarques->title }}</a>
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageNosMarquesRouteName) }}">{{ $pageNosMarques->title }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@if (isset($pageNosEngagements))
|
||||
@php
|
||||
$pageNosEngagementsRouteName = 'front.dynamic-pages.nos-engagements';
|
||||
@endphp
|
||||
<li id="menu-item-189"
|
||||
class="no-padding menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-189">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nos-engagements') }}">
|
||||
class="no-padding menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-189 {{ currentMenuItemClass($pageNosEngagementsRouteName) }}">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageNosEngagementsRouteName) }}">
|
||||
{{ $pageNosEngagements->title }}
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
|
|
@ -128,10 +153,16 @@
|
|||
</p>
|
||||
<ul class="sub-menu">
|
||||
@foreach ($nosEngagementsChildPages as $key => $nosEngagementsChildPage)
|
||||
@php
|
||||
$nosEngagementsChildPageRouteName = sprintf(
|
||||
'front.dynamic-pages.%s',
|
||||
$nosEngagementsChildPage->id_key,
|
||||
);
|
||||
@endphp
|
||||
<li id="menu-item-{{ $id + $key }}"
|
||||
class="nav-page-link menu-item menu-item-type-post_type menu-item-object-page menu-item-{{ $id + $key }}">
|
||||
class="nav-page-link menu-item menu-item-type-post_type menu-item-object-page menu-item-{{ $id + $key }} {{ currentMenuItemClass($nosEngagementsChildPageRouteName) }}">
|
||||
<a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker(sprintf('front.dynamic-pages.%s', $nosEngagementsChildPage->id_key)) }}">
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($nosEngagementsChildPageRouteName) }}">
|
||||
{{ $nosEngagementsChildPage->title }}
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -152,8 +183,11 @@
|
|||
<div class="header__block header__block_right">
|
||||
<ul class="header__nav header__nav_single nav">
|
||||
@if (isset($pageNousRejoindre))
|
||||
<li class="offer-tab">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nous-rejoindre') }}"
|
||||
@php
|
||||
$pageNousRejoindreRouteName = 'front.dynamic-pages.nous-rejoindre';
|
||||
@endphp
|
||||
<li class="offer-tab {{ currentMenuItemClass($pageNousRejoindreRouteName) }}">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageNousRejoindreRouteName) }}"
|
||||
aria-current="page"
|
||||
title="{{ $pageNousRejoindre->title }}">{{ $pageNousRejoindre->title }}</a>
|
||||
<div class="offer">
|
||||
|
|
@ -175,12 +209,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="offer__block offer__block_links">
|
||||
<div class="offer-link-wrap">
|
||||
<a class="offer-link offer-link_form" title="Être averti(e) d'une nouvelle offre">
|
||||
<span class="offer-link__text"><b>Être averti(e) d'une nouvelle offre</b></span>
|
||||
<i class="icon__arrow-right icon__arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="offer-link-wrap">
|
||||
<a class="offer-link"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nos-metiers') }}"
|
||||
|
|
@ -190,93 +218,6 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="offer-form-wrap">
|
||||
<div class="offer-form">
|
||||
<form class="form form_small" method="POST" id="dr-form">
|
||||
<div class="form__container">
|
||||
<div>
|
||||
<div class="form__field">
|
||||
<span class="cn-cookie-activate" data-cookie-name="recaptcha">
|
||||
<span>
|
||||
<span>Vous devez accepter les cookies reCaptcha pour utiliser
|
||||
les formulaires.</span>
|
||||
<small>Acceptez ce cookie pour utiliser les formulaires</small>
|
||||
</span>
|
||||
<button class="btn btn-red">Autoriser</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form__text">
|
||||
Activez les alertes pour recevoir par email les nouvelles offres
|
||||
correspondant à vos critères
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<div class="form__field-title">Métier</div>
|
||||
<select id="dr-metiers" name="metiers" class="form__input" required="">
|
||||
<option value="all">Tous les métiers</option>
|
||||
<option value="35565">Achats - Approvisionnement</option>
|
||||
<option value="35571">Administratif - Secrétariat</option>
|
||||
<option value="35568">Commerce</option>
|
||||
<option value="35574">Gestion - Finance - Juridique</option>
|
||||
<option value="35577">Industriel</option>
|
||||
<option value="35580">Informatique</option>
|
||||
<option value="35583">Logistique</option>
|
||||
<option value="35586">Maintenance - Technique</option>
|
||||
<option value="35562">Marketing</option>
|
||||
<option value="35589">Planification Ordonnancement</option>
|
||||
<option value="35592">Production</option>
|
||||
<option value="127925">Production Animale Amont</option>
|
||||
<option value="35595">Qualité - Sécurité - Environnement</option>
|
||||
<option value="35598">R&D</option>
|
||||
<option value="35601">Ressources Humaines</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<div class="form__field-title">Type de contrat</div>
|
||||
<select id="dr-contrats" name="contrats"
|
||||
class="wpcf7-form-control wpcf7-select form__input" required="">
|
||||
<option value="all">Tous les types de contrats</option>
|
||||
<option value="2">CDD</option>
|
||||
<option value="1">CDI</option>
|
||||
<option value="9">Contrat d'alternance (pro, apprentissage)
|
||||
</option>
|
||||
<option value="4">Interim</option>
|
||||
<option value="3">Stage</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<div class="form__field-title">Temps de travail</div>
|
||||
<select id="dr-temps" name="temps"
|
||||
class="wpcf7-form-control wpcf7-select form__input" required="">
|
||||
<option value="all">Tous les temps de travail</option>
|
||||
<option value="2">Temps partiel</option>
|
||||
<option value="1">Temps plein</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<div class="form__field-title">Email*</div>
|
||||
<input id="dr-email" type="email" name="Email" size="40"
|
||||
class="form__input" required="">
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<div class="form__field-label">
|
||||
<span class="form__field-label-text">Les informations recueillies à
|
||||
partir de ce formulaire sont traitées par le Responsable de
|
||||
Traitement pour donner suite à votre demande de contact. Pour
|
||||
connaître vos droits, vous pouvez consulter <br> <a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.politique-de-confidentialite') }}"
|
||||
target="_blank" rel="noreferer noopener">la Charte de
|
||||
confidentialité</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-submit">
|
||||
<input type="submit" value="Recevoir les offres"
|
||||
class="form-submit__btn btn">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="offer__block offer-anchors">
|
||||
<a class="anchor-scroll"
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.nous-rejoindre') }}#rejoin_0">Plus
|
||||
|
|
@ -304,135 +245,56 @@
|
|||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
<script nonce="{{ $nonce ?? '' }}">
|
||||
rejoin_path = "/nous-rejoindre/";
|
||||
if (window.location.href.indexOf(rejoin_path) == -1) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: rejoin_path,
|
||||
cache: true,
|
||||
dataType: 'html',
|
||||
success: function(data) {
|
||||
$(data).find('[data-anchor]').each(function(i) {
|
||||
var anchor_id = 'rejoin_' + i;
|
||||
var anchor_text = $(this).attr('data-anchor');
|
||||
$(this).attr('id', anchor_id);
|
||||
link = '<a class="anchor-scroll" href=' + rejoin_path + '#' + anchor_id + '>' +
|
||||
anchor_text + '</a>';
|
||||
$(document).find('.offer-anchors').append(link);
|
||||
});
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.log(textStatus, errorThrown);
|
||||
},
|
||||
complete: function() {}
|
||||
});
|
||||
}
|
||||
$("#dr-form").on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const emailRegex =
|
||||
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
const metiers = $("#dr-metiers");
|
||||
const contrats = $("#dr-contrats");
|
||||
const temps = $("#dr-temps");
|
||||
const email = $("#dr-email");
|
||||
const reset = () => {
|
||||
metiers.val('all');
|
||||
contrats.val('all');
|
||||
temps.val('all');
|
||||
email.val('');
|
||||
};
|
||||
const emailIsValid = emailRegex.test(email.val());
|
||||
if (!window.__CN_Recaptcha_Loaded_Callback) {
|
||||
console.warn('Vous devez activer les cookies recaptcha');
|
||||
alert('Vous devez activer les cookies recaptcha');
|
||||
return;
|
||||
}
|
||||
if (!emailIsValid) {
|
||||
alert('Le format de l\'adresse email est invalide.');
|
||||
return;
|
||||
}
|
||||
let processing = true;
|
||||
window.__CN_Recaptcha_Loaded_Callback('submit', (token) => $.ajax({
|
||||
url: MYSCRIPT.ajaxurl,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
'action': 'registerMailJobAlert',
|
||||
'metiers': metiers.val(),
|
||||
'types': contrats.val(),
|
||||
'temps': temps.val(),
|
||||
'email': email.val(),
|
||||
'token': token
|
||||
}
|
||||
})
|
||||
.done((response, textStatus, jqXHR) => {
|
||||
if (response === "ok") {
|
||||
alert('Alerte job enregistrée !');
|
||||
reset();
|
||||
} else {
|
||||
alert(response);
|
||||
}
|
||||
})
|
||||
.fail((jqXHR, textStatus, errorThrown) => {
|
||||
alert('Une erreur est survenue');
|
||||
})
|
||||
.always(() => processing = false)
|
||||
);
|
||||
});
|
||||
</script>
|
||||
<ul id="menu-header-right" class="header__nav nav">
|
||||
@if (isset($pageActualites))
|
||||
@php
|
||||
$pageActualitesRouteName = sprintf('front.dynamic-pages.%s', $pageActualites->id_key);
|
||||
@endphp
|
||||
<li id="menu-item-435"
|
||||
class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-435">
|
||||
<a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker(sprintf('front.dynamic-pages.%s', $pageActualites->id_key)) }}">
|
||||
class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-435 {{ currentMenuItemClass($pageActualitesRouteName) }}">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageActualitesRouteName) }}">
|
||||
{{ $pageActualites->title }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
<li id="menu-item-190"
|
||||
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-190">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}">Finance</a>
|
||||
<ul class="sub-menu">
|
||||
<li id="menu-item-216"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-216">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}#finance_1">Agir
|
||||
avec nos territoires</a>
|
||||
</li>
|
||||
<li id="menu-item-217"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-217">
|
||||
<a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}#cours_de_bourse_ldc">Cours
|
||||
de l’action LDC & Agenda</a>
|
||||
</li>
|
||||
<li id="menu-item-218"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-218">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}#finance_3">Espace
|
||||
actionnaires</a>
|
||||
</li>
|
||||
<li id="menu-item-2003"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2003">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}#finance_4">Présentations
|
||||
investisseurs</a>
|
||||
</li>
|
||||
<li id="menu-item-2004"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2004">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}#finance_5">Chiffres
|
||||
clés</a>
|
||||
</li>
|
||||
<li id="menu-item-2005"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2005">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}#finance_6">Publications
|
||||
et informations réglementées</a>
|
||||
</li>
|
||||
<li id="menu-item-2006"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2006">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.finance') }}#finance_7">Assemblées
|
||||
générales</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@if (isset($pageFinance))
|
||||
@php
|
||||
$pageFinanceName = sprintf('front.dynamic-pages.%s', $pageFinance->id_key);
|
||||
$PageFinancesections = [
|
||||
'list_agir_avec_territoires',
|
||||
'list_action_ldc',
|
||||
'list_shareholders_area',
|
||||
'list_investissor_presentation',
|
||||
'list_key_numbers',
|
||||
'list_publication_information',
|
||||
'list_assemble',
|
||||
];
|
||||
@endphp
|
||||
<li id="menu-item-190"
|
||||
class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-190 {{ currentMenuItemClass($pageFinanceName) }}">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageFinanceName) }}">{{ $pageFinance->title }}</a>
|
||||
@if ($PageFinancesections)
|
||||
<ul class="sub-menu">
|
||||
@foreach ($PageFinancesections as $key => $item)
|
||||
@php $pageFinanceSection = $pageFinance->content[$item];@endphp
|
||||
@if ($pageFinanceSection)
|
||||
@php
|
||||
$title = data_get($pageFinanceSection[0], 'string_title');
|
||||
$subtitle = data_get($pageFinanceSection[0], 'string_subtitle');
|
||||
@endphp
|
||||
<li id="menu-item-{{ $id + $key }}"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-216">
|
||||
<a
|
||||
href="{{ \App\Helpers\RouteHelper::routeNameChecker($pageFinanceName) }}#{{ Str::slug($title) }}">
|
||||
{{ $title }} {{ $subtitle ?? null }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
<div class="header__search-btn"></div>
|
||||
<div class="header__search header-search sub-menu">
|
||||
|
|
|
|||
|
|
@ -1,23 +1,37 @@
|
|||
{{-- FIXME: L'affichage de cette navbar était conditionné mais avait l'air d'être affichée partout --}}
|
||||
{{-- if (has_nav_menu('top')) : --}}
|
||||
<div class="top-menu fw">
|
||||
<ul id="menu-top-menu" class="top-menu__list">
|
||||
<li id="menu-item-1958" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1958">
|
||||
<a href="/nous-contacter/">
|
||||
Nous contacter
|
||||
<li id="menu-item-1958" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1958
|
||||
{{ \request()->routeIs('front.contact.index') || \request()->routeIs('front.contact.show') ? 'current-menu-item' : '' }}
|
||||
">
|
||||
<a href="{{ LaravelLocalization::getLocalizedURL(app()->getLocale(), __('routes.contact_index')) }}">
|
||||
{{ ucfirst(__('front.contact.index')) }}
|
||||
</a>
|
||||
</li>
|
||||
@if (isset($pageEspacePresse))
|
||||
<li id="menu-item-16" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-16">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker('front.dynamic-pages.espace-presse') }}">
|
||||
@php
|
||||
$pagePressRouteName = 'front.dynamic-pages.espace-presse';
|
||||
@endphp
|
||||
<li id="menu-item-16" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-16
|
||||
{{ \App\Helpers\RouteHelper::isRouteActive($pagePressRouteName) ? 'current-menu-item' : ''}}
|
||||
">
|
||||
<a href="{{ \App\Helpers\RouteHelper::routeNameChecker($pagePressRouteName) }}">
|
||||
{{ $pageEspacePresse->title }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
<div class="top-menu__item top-menu__item_lang langs">
|
||||
<a class="langs__item active">FR</a>
|
||||
<span href="langs__item"> / </span>
|
||||
<a class="langs__item" href="/en/">EN</a>
|
||||
@foreach (LaravelLocalization::getSupportedLocales() as $localeCode => $properties)
|
||||
@if (!$loop->first)
|
||||
<span class="langs__separator"> / </span>
|
||||
@endif
|
||||
@php
|
||||
$url = \App\Helpers\RouteHelper::getLocalizedUrl($localeCode);
|
||||
@endphp
|
||||
<a rel="alternate" hreflang="{{ $localeCode }}" href="{{ $url }}"
|
||||
class="langs__item {{ app()->getLocale() === $localeCode ? 'active' : '' }}">
|
||||
{{ strtoupper($localeCode) }}
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
@include('front.breadcrumbs.breadcrumb-body')
|
||||
|
||||
<x-front.pages.title h1Class="page-contacts__title" title="Nous contacter" />
|
||||
<x-front.pages.title h1Class="page-contacts__title" title="{{ __('front.contact.index') }}" />
|
||||
|
||||
<div class="contact-index">
|
||||
@foreach ($types as $type)
|
||||
|
|
@ -25,17 +25,16 @@
|
|||
<x-front.cta title="{{ ucfirst($type->label) }}" class="textblock__info-btn" url="{{ $enum->route() ? $enum->route() : '' }}"
|
||||
buttonIcon="btn__icon_arrow-right" type="{{ $hasSubType ?? null }}" dataTarget="{{ $dataTarget }}" />
|
||||
@if (count($type->subtype) > 0)
|
||||
<div id="{{ $dataTarget }}" class="contacts-group-buttons">
|
||||
@foreach ($type->subtype as $sub)
|
||||
<div>
|
||||
<x-front.cta
|
||||
target="{{ $sub->hasBlankTarget() ?? '' }}"
|
||||
title="{{ ucfirst($sub->label()) }}" class="textblock__info-btn" url="{{ $sub->route() ? $sub->route() : '' }}"
|
||||
buttonIcon="btn__icon_arrow-right" />
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
<div id="{{ $dataTarget }}" class="contacts-group-buttons">
|
||||
@foreach ($type->subtype as $sub)
|
||||
<div>
|
||||
<x-front.cta
|
||||
title="{{ ucfirst($sub->label()) }}" class="textblock__info-btn" url="{{ $sub->route() ? $sub->route() : '' }}"
|
||||
buttonIcon="btn__icon_arrow-right" />
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="form__title subtitle">Vos coordonnées</div>
|
||||
<div class="form__title subtitle">{{ ucfirst(__('front.contact_details')) }}</div>
|
||||
|
||||
<x-front.need-recaptcha-banner />
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
@include('front.breadcrumbs.breadcrumb-body')
|
||||
|
||||
|
||||
<x-front.pages.title h1Class="page-contacts__title" h2Class="contacts-page-subtitle" title="Nous contacter"
|
||||
<x-front.pages.title h1Class="page-contacts__title" h2Class="contacts-page-subtitle" title="{{ __('front.contact.index') }}"
|
||||
subtitle="{{ ucfirst($enumType->subtitle()) }}" />
|
||||
|
||||
<div class="contacts-category-page wrapper">
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@
|
|||
@section('description', data_get($dynamicPageModel->content, 'textarea_seo_description'))
|
||||
|
||||
@section('content')
|
||||
|
||||
<x-front.commitments.wrapper :engagements="[
|
||||
'title' => data_get($dynamicPageModel->content, 'list_agir_avec_territoires.0.string_title'),
|
||||
'text' => clean(data_get($dynamicPageModel->content, 'list_agir_avec_territoires.0.wysiwyg_content')),
|
||||
]" id="finance_1" />
|
||||
]" :id="Str::slug(data_get($dynamicPageModel->content, 'list_agir_avec_territoires.0.string_title'))" />
|
||||
<x-front.pages.finance.bourse :data="data_get($dynamicPageModel->content, 'list_action_ldc.0')" />
|
||||
<x-front.pages.finance.finance-3 :data="data_get($dynamicPageModel->content, 'list_shareholders_area.0')" />
|
||||
<x-front.pages.finance.finance-4 :data="data_get($dynamicPageModel->content, 'list_investissor_presentation.0')" />
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@
|
|||
<div id="page-press-form">
|
||||
<div class="page-press-form fw fw-container gray-bg">
|
||||
<div class="page-press-form__wrapper wrapper">
|
||||
<x-front.sections.title secondaryClass="page-press-form__subtitle" class="page-press-form__title" title="Contactez notre" subtitle="service presse" />
|
||||
<x-front.sections.title secondaryClass="page-press-form__subtitle" class="page-press-form__title"
|
||||
title="{{ ucfirst(__('front.contact_our')) }}"
|
||||
subtitle="{{ __('front.press_department') }}" />
|
||||
|
||||
<div class="fw-container no-bottom-padding">
|
||||
<div class="wpcf7-form">
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use App\Models\DynamicPage;
|
|||
use App\Models\News;
|
||||
use Diglactic\Breadcrumbs\Breadcrumbs;
|
||||
use Diglactic\Breadcrumbs\Generator;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
|
||||
|
|
@ -34,10 +33,11 @@ Breadcrumbs::for('front.contact.index', function (Generator $trail) {
|
|||
Breadcrumbs::for('front.contact.show', function (Generator $trail) {
|
||||
$trail->parent('front.contact.index');
|
||||
$slug = \request()->route()->parameters['slug'];
|
||||
// je sais que je suis dans une conact
|
||||
$enumType = collect(ContactFormType::all())->first(function ($enum) use ($slug) {
|
||||
return $enum->slug() === $slug;
|
||||
});
|
||||
if ($slug) {
|
||||
if ($enumType) {
|
||||
$trail->push(
|
||||
Str::of(trans($enumType->label()))->ucfirst()
|
||||
);
|
||||
|
|
@ -88,34 +88,6 @@ if ($pageOurCommitments) {
|
|||
}
|
||||
}
|
||||
}
|
||||
Breadcrumbs::for('front.elever-durablement', function (Generator $trail) {
|
||||
$trail->parent('front.dynamic-pages.nos-engagements.fr');
|
||||
$trail->push(
|
||||
Str::of(trans('front.elever-durablement'))->ucfirst(),
|
||||
route('front.elever-durablement')
|
||||
);
|
||||
});
|
||||
Breadcrumbs::for('front.mieux-vivre-ensemble', function (Generator $trail) {
|
||||
$trail->parent('front.dynamic-pages.nos-engagements.fr');
|
||||
$trail->push(
|
||||
Str::of(trans('front.mieux-vivre-ensemble'))->ucfirst(),
|
||||
route('front.mieux-vivre-ensemble')
|
||||
);
|
||||
});
|
||||
Breadcrumbs::for('front.respecter-la-terre', function (Generator $trail) {
|
||||
$trail->parent('front.dynamic-pages.nos-engagements.fr');
|
||||
$trail->push(
|
||||
Str::of(trans('front.respecter-la-terre'))->ucfirst(),
|
||||
route('front.respecter-la-terre')
|
||||
);
|
||||
});
|
||||
Breadcrumbs::for('front.bien-nourrir', function (Generator $trail) {
|
||||
$trail->parent('front.dynamic-pages.nos-engagements.fr');
|
||||
$trail->push(
|
||||
Str::of(trans('front.bien-nourrir'))->ucfirst(),
|
||||
route('front.bien-nourrir')
|
||||
);
|
||||
});
|
||||
|
||||
// * KNOW US PAGES.
|
||||
$pageKnowUs = DynamicPage::getModelsCached()
|
||||
|
|
@ -180,22 +152,28 @@ if ($pageNosMetiers) {
|
|||
}
|
||||
|
||||
// * NEWS.
|
||||
Breadcrumbs::for('front.news.index', function (Generator $trail) {
|
||||
$trail->parent('front.homepage');
|
||||
$trail->push(
|
||||
Str::of(trans('front.news.index'))->ucfirst(),
|
||||
route('front.news.index')
|
||||
);
|
||||
});
|
||||
Breadcrumbs::for('front.news.show', function (Generator $trail) {
|
||||
if(!request()->model instanceof Model) {
|
||||
return;
|
||||
$pageNews = DynamicPage::getModelsCached()
|
||||
->where('status', PageStatusEnum::published)
|
||||
->where('id_key', 'actualites')
|
||||
->first();
|
||||
if ($pageNews) {
|
||||
foreach ($supportedLocales as $key => $locale) {
|
||||
Breadcrumbs::for("front.dynamic-pages.actualites.$locale", function (Generator $trail) use ($pageNews) {
|
||||
$trail->parent('front.homepage');
|
||||
$trail->push($pageNews->title, RouteHelper::routeNameChecker('front.dynamic-pages.actualites'));
|
||||
});
|
||||
}
|
||||
$trail->parent('front.news.index');
|
||||
$trail->push(
|
||||
Str::of(request()->model->title)->ucfirst()
|
||||
);
|
||||
});
|
||||
// SHOW
|
||||
Breadcrumbs::for('front.news.show', function (Generator $trail) use ($locale) {
|
||||
$trail->parent("front.dynamic-pages.actualites.$locale");
|
||||
if (request()->news instanceof News) {
|
||||
$trail->push(
|
||||
Str::of(request()->news->title)->ucfirst()
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// * FINANCE.
|
||||
Breadcrumbs::for('front.finance', function (Generator $trail) {
|
||||
|
|
|
|||
|
|
@ -4,35 +4,47 @@ use App\Http\Controllers\Front\HomeController;
|
|||
use App\Http\Controllers\Front\ContactController;
|
||||
use App\Http\Controllers\Front\NewsController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||
|
||||
Route::name('front.')->group(function () {
|
||||
Route::get('/', [HomeController::class, 'homepage'])->name('homepage');
|
||||
Route::group(
|
||||
[
|
||||
'prefix' => LaravelLocalization::setLocale(),
|
||||
'as' => 'front.',
|
||||
'middleware' => [
|
||||
'localeSessionRedirect',
|
||||
'localizationRedirect',
|
||||
'localeViewPath'
|
||||
]
|
||||
],
|
||||
function () {
|
||||
Route::get('/', [HomeController::class, 'homepage'])->name('homepage');
|
||||
|
||||
Route::prefix('nous-contacter')->name('contact.')->group(function () {
|
||||
Route::get('', [ContactController::class, 'index'])->name('index');
|
||||
Route::get('{slug}', [ContactController::class, 'show'])->name('show');
|
||||
Route::post('/', [ContactController::class, 'send'])->name('send');
|
||||
});
|
||||
// * Unsubscribe from newsletter
|
||||
Route::get('/{unsubscribe}', [HomeController::class, 'unsubscribeNewsletter'])
|
||||
->where('unsubscribe', 'unsubscribe|unsubscribe.php|unsubscribe.html|newsletter')
|
||||
->name('unsubscribeNewsletter');
|
||||
Route::name('contact.')->controller(ContactController::class)->group(function () {
|
||||
Route::get(LaravelLocalization::transRoute('routes.contact_index'), 'index')->name('index');
|
||||
Route::get(LaravelLocalization::transRoute('routes.contact'), 'show')->defaults('contactPage', 'contactPage')->name('show');
|
||||
Route::post('/nous-contacter', 'send')->name('send');
|
||||
});
|
||||
|
||||
Route::get('search', function () {
|
||||
return view('front.pages.search');
|
||||
})->name('search');
|
||||
// * Unsubscribe from newsletter
|
||||
Route::get('/{unsubscribe}', [HomeController::class, 'unsubscribeNewsletter'])
|
||||
->where('unsubscribe', 'unsubscribe|unsubscribe.php|unsubscribe.html|newsletter')
|
||||
->name('unsubscribeNewsletter');
|
||||
|
||||
Route::prefix('actualites')->group(function () {
|
||||
Route::get('/{model:slug}', [NewsController::class, 'show'])->name('news.show');
|
||||
});
|
||||
Route::get('search', function () {
|
||||
return view('front.pages.search');
|
||||
})->name('search');
|
||||
|
||||
|
||||
Route::get('/politique-de-confidentialite', function () {
|
||||
$page = [
|
||||
'seo_title' => 'LDC Charte de confidentialité',
|
||||
'seo_description' => 'Politique de confidentialité, gestion de vos droits, cookies, confidentialité',
|
||||
'title' => 'Charte de confidentialité',
|
||||
'content' => "
|
||||
Route::get(LaravelLocalization::transRoute('routes.news'), [NewsController::class, 'show'])->name('news.show');
|
||||
|
||||
|
||||
|
||||
Route::get('/politique-de-confidentialite', function () {
|
||||
$page = [
|
||||
'seo_title' => 'LDC Charte de confidentialité',
|
||||
'seo_description' => 'Politique de confidentialité, gestion de vos droits, cookies, confidentialité',
|
||||
'title' => 'Charte de confidentialité',
|
||||
'content' => "
|
||||
<h2 class='wp-block-heading'><strong>INTRODUCTION</strong></h2>
|
||||
<p><strong>INTRODUCTION</strong></p>
|
||||
<p>La société LDC est particulièrement attentif à la protection de vos données personnelles. Concernant les données personnelles que vous nous confiez nous vous informons de manière transparente sur notre politique en matière de protection des données personnelles.<strong></strong></p>
|
||||
|
|
@ -85,8 +97,9 @@ Route::name('front.')->group(function () {
|
|||
<p><strong>DROIT APPLICABLE</strong></p>
|
||||
<p>La présente Charte de confidentialité est régie et sera interprétée conformément au droit français.</p>
|
||||
",
|
||||
];
|
||||
];
|
||||
|
||||
return view('front.pages.static-pages.template', ['page' => $page]);
|
||||
})->name('politique-de-confidentialite');
|
||||
});
|
||||
return view('front.pages.static-pages.template', ['page' => $page]);
|
||||
})->name('politique-de-confidentialite');
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue